From 591b93816f8f08aadd52d9e5514a7d912327ead9 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 1 Oct 2023 22:55:53 +0000 Subject: [PATCH] DEP Update JS dependencies --- client/dist/js/bundle.js | 2 +- yarn.lock | 2217 +++++++++++++++++++------------------- 2 files changed, 1136 insertions(+), 1083 deletions(-) diff --git a/client/dist/js/bundle.js b/client/dist/js/bundle.js index 1c2993de..7866805c 100644 --- a/client/dist/js/bundle.js +++ b/client/dist/js/bundle.js @@ -1 +1 @@ -!function(){var e={7274:function(e,t,n){"use strict";var r=s(n(9521)),o=s(n(4180));function s(e){return e&&e.__esModule?e:{default:e}}window.document.addEventListener("DOMContentLoaded",(()=>{(0,r.default)(),(0,o.default)()}))},9521:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=d(n(6648)),o=d(n(4065)),s=d(n(9559)),i=d(n(9769)),a=d(n(3461)),l=d(n(2477)),u=d(n(8488)),c=d(n(5385)),p=d(n(1553));function d(e){return e&&e.__esModule?e:{default:e}}t.default=()=>{r.default.component.registerMany({HistoryViewer:o.default,HistoryViewerHeading:s.default,HistoryViewerToolbar:i.default,HistoryViewerVersion:a.default,HistoryViewerVersionDetail:l.default,HistoryViewerVersionList:u.default,HistoryViewerVersionState:c.default,HistoryViewerCompareWarning:p.default})}},4180:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(6648)),o=n(2827),s=i(n(7908));function i(e){return e&&e.__esModule?e:{default:e}}var a=()=>{r.default.reducer.register("versionedAdmin",(0,o.combineReducers)({historyViewer:s.default}))};t.default=a},4065:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=b(n(7363)),o=n(2827),s=n(1624),i=y(n(8345)),a=y(n(2291)),l=y(n(4754)),u=n(6648),c=y(n(1264)),p=n(6215),d=n(185),f=n(1118),h=y(n(7820)),m=y(n(6104)),g=b(n(5108)),v=y(n(7086));function y(e){return e&&e.__esModule?e:{default:e}}function C(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(C=function(e){return e?n:t})(e)}function b(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=C(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}return r.default=e,n&&n.set(e,r),r}class w extends r.Component{constructor(e){super(e),this.handleSetPage=this.handleSetPage.bind(this),this.handleNextPage=this.handleNextPage.bind(this),this.handlePrevPage=this.handlePrevPage.bind(this)}componentDidUpdate(e){if(!this.props.actions||!this.props.actions.versions)return;const{page:t}=e,{page:n}=this.props,{actions:{versions:r}}=this.props;t!==n&&"function"==typeof r.goToPage&&r.goToPage(n)}componentWillUnmount(){const{onSelect:e}=this.props;"function"==typeof e&&e(0)}getVersions(){const{versions:e}=this.props;return e&&e.versions&&e.versions.nodes?e.versions.nodes:[]}getContainerClasses(){const{compare:e,isInGridField:t}=this.props;return(0,h.default)("history-viewer","fill-height","panel--scrollable",{"history-viewer__compare-mode":e,"history-viewer--no-margins":t&&!this.isListView()})}getLatestVersion(){const{currentVersion:e}=this.props;if(e&&!0===e.latestDraftVersion)return e;const t=this.getVersions().filter((e=>!0===e.latestDraftVersion));return t.length?t[0]:null}isListView(){const{compare:e,currentVersion:t}=this.props;return!t||!!e&&!(!e.versionFrom||e.versionTo)}handleSetPage(e){const{onSetPage:t}=this.props;"function"==typeof t&&t(e+1)}handleNextPage(){const{page:e}=this.props;this.handleSetPage(e)}handlePrevPage(){const{page:e}=this.props,t=e-1;t<1?this.handleSetPage(t):this.handleSetPage(t-1)}compareModeAvailable(){return this.getVersions().length>1}renderVersionDetail(){const{currentVersion:e,isPreviewable:t,isRevertable:n,recordId:o,recordClass:s,schemaUrl:i,VersionDetailComponent:a,compare:l,compare:{versionFrom:u=!1,versionTo:c=!1},previewState:p}=this.props,d={":id":o,":class":s,":version":e.version},f={":id":o,":class":s,":from":u.version||0,":to":c.version||0},h=l?/:id|:class|:from|:to/g:/:id|:class|:version/g,g=l?f:d,v=l?u:e,y=this.getLatestVersion(),C={isLatestVersion:!l&&y&&y.version===v.version,isPreviewable:t,isRevertable:n,recordId:o,schemaUrl:i.replace(h,(e=>g[e])),version:v,compare:l,compareModeAvailable:this.compareModeAvailable(),previewState:p};return r.default.createElement(m.default,{className:this.getContainerClasses(),onResize:e=>{let{width:t}=e;return this.props.onResize(t)}},r.default.createElement(a,C))}renderPagination(){const{limit:e,page:t,versions:n}=this.props;if(!n)return null;const o=n.versions?n.versions.pageInfo.totalCount:0;if(o<=e)return null;const s={setPage:this.handleSetPage,maxPage:Math.ceil(o/e),next:this.handleNextPage,nextText:l.default._t("HistoryViewer.NEXT","Next"),previous:this.handlePrevPage,previousText:l.default._t("HistoryViewer.PREVIOUS","Previous"),currentPage:t-1,useGriddleStyles:!1};return r.default.createElement("div",{className:"griddle-footer"},r.default.createElement(i.default.GridPagination,s))}renderComparisonSelectionList(){const{compare:{versionFrom:e},ListComponent:t}=this.props;if(!e)return null;const n=(0,h.default)("history-viewer__table","history-viewer__table--comparison-selected");return r.default.createElement(t,{versions:[e],extraClass:n})}renderVersionList(){const{isInGridField:e,ListComponent:t,CompareWarningComponent:n,compare:o,compare:{versionFrom:s}}=this.props;return r.default.createElement("div",{className:this.getContainerClasses()},r.default.createElement(n,null),r.default.createElement("div",{className:e?"":"panel panel--padded panel--scrollable"},this.renderComparisonSelectionList(),r.default.createElement(t,{versions:this.getVersions(),showHeader:!o||o&&!s,compareModeAvailable:this.compareModeAvailable()}),r.default.createElement("div",{className:"history-viewer__pagination"},this.renderPagination())))}renderCompareMode(){const{compare:e}=this.props;return e&&e.versionFrom&&e.versionTo?this.renderVersionDetail():this.renderVersionList()}render(){const{loading:e,compare:t,currentVersion:n}=this.props;return e?r.default.createElement(c.default,null):this.compareModeAvailable()&&t?this.renderCompareMode():n?this.renderVersionDetail():this.renderVersionList()}}t.Component=w,w.propTypes={contextKey:v.default.string,limit:v.default.number,ListComponent:v.default.elementType.isRequired,offset:v.default.number,recordId:v.default.number.isRequired,currentVersion:v.default.oneOfType([v.default.bool,d.versionType]),compare:f.compareType,isInGridField:v.default.bool,isPreviewable:v.default.bool,isRevertable:v.default.bool,VersionDetailComponent:v.default.elementType.isRequired,CompareWarningComponent:v.default.elementType.isRequired,versions:v.default.shape({versions:v.default.shape({pageInfo:v.default.shape({totalCount:v.default.number}),nodes:v.default.arrayOf(d.versionType)})}),page:v.default.number,schemaUrl:v.default.string,previewState:v.default.oneOf(["edit","preview","split"]),actions:v.default.object,onSelect:v.default.func,onSetPage:v.default.func,onResize:v.default.func},w.defaultProps={compare:{},contextKey:"",currentVersion:!1,isInGridField:!1,isPreviewable:!1,schemaUrl:"",versions:{versions:{pageInfo:{totalCount:0},nodes:[]}}};var x=(0,o.compose)((0,s.connect)((function(e){const{currentPage:t,currentVersion:n,compare:r}=e.versionedAdmin.historyViewer,{activeState:o}=e.viewMode;return{page:t,currentVersion:n,compare:r,previewState:o}}),(function(e){return{onSelect(t){e((0,p.showVersion)(t)),e((0,p.clearMessages)())},onSetPage(t){e((0,p.setCurrentPage)(t))},onResize(t){e(g.enableOrDisableSplitMode(t))}}})),a.default,(0,u.inject)(["HistoryViewerVersionList","HistoryViewerVersionDetail","HistoryViewerCompareWarning"],((e,t,n)=>({ListComponent:e,VersionDetailComponent:t,CompareWarningComponent:n})),(e=>{let{contextKey:t}=e;return`VersionedAdmin.HistoryViewer.${t}`})))(w);t.default=x},1553:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=l(n(7086)),s=n(1624),i=l(n(4754)),a=n(6215);function l(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}class c extends r.Component{constructor(e){super(e),this.handleDismissCompare=this.handleDismissCompare.bind(this)}handleDismissCompare(){this.props.onDismissCompare()}render(){return this.props.isCompare?r.default.createElement("div",{className:"history-viewer__compare-notice alert alert-info"},r.default.createElement("span",{className:"notice-message"},r.default.createElement("strong",null,i.default._t("HistoryViewer.COMPARE_MODE","Compare mode"),": "),i.default._t("HistoryViewer.SELECT_PROMPT","Select two versions")),r.default.createElement("button",{className:"btn dismiss-button font-icon-cancel",onClick:this.handleDismissCompare},i.default._t("HistoryViewer.EXIT","Exit"))):null}}t.Component=c,c.propTypes={isCompare:o.default.bool.isRequired};var p=(0,s.connect)((function(e){const{compare:t}=e.versionedAdmin.historyViewer;return{isCompare:!!t}}),(function(e){return{onDismissCompare(){e((0,a.setCompareMode)(!1))}}}))(c);t.default=p},9559:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=p(n(4754)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(7363)),s=n(8127),i=n(6215),a=n(2827),l=n(1624),u=p(n(7086));function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function p(e){return e&&e.__esModule?e:{default:e}}class d extends o.Component{constructor(e){super(e),this.toggle=this.toggle.bind(this),this.handleCompareModeChange=this.handleCompareModeChange.bind(this),this.state={dropdownOpen:!1}}toggle(){this.setState((e=>({dropdownOpen:!e.dropdownOpen})))}handleCompareModeChange(){const{compareModeSelected:e,onCompareModeUnselect:t,onCompareModeSelect:n}=this.props;e?t():n()}renderDropdown(){const{compareModeAvailable:e,compareModeSelected:t}=this.props,{dropdownOpen:n}=this.state;return e?o.default.createElement(s.Dropdown,{isOpen:n,toggle:this.toggle,className:"history-viewer__actions-dropdown"},o.default.createElement(s.DropdownToggle,{className:"font-icon-sliders"}),o.default.createElement(s.DropdownMenu,{right:!0},o.default.createElement("div",{className:"form-check"},o.default.createElement("input",{id:"history-viewer-compare-two",type:"checkbox",className:"no-change-track history-viewer-heading__compare-mode-checkbox",checked:t,onChange:this.handleCompareModeChange}),o.default.createElement("label",{className:"form-check-label",htmlFor:"history-viewer-compare-two"},r.default._t("HistoryViewerHeading.COMPARE_VERSIONS","Compare two versions"))))):null}render(){return o.default.createElement("li",{className:"history-viewer__heading",role:"row"},o.default.createElement("span",{className:"history-viewer__version-no",role:"columnheader"},"#"),o.default.createElement("span",{className:"history-viewer__version-state",role:"columnheader"},r.default._t("HistoryViewer.Record","Record")),o.default.createElement("span",{className:"history-viewer__author",role:"columnheader"},r.default._t("HistoryViewer.Author","Author")),o.default.createElement("span",{className:"history-viewer__actions",role:"columnheader"},this.renderDropdown()))}}t.Component=d,d.propTypes={compareModeAvailable:u.default.bool,compareModeSelected:u.default.bool,onCompareModeSelect:u.default.func,onCompareModeUnselect:u.default.func},d.defaultProps={compareModeAvailable:!0};var f=(0,a.compose)((0,l.connect)((function(e){return{compareModeSelected:!!e.versionedAdmin.historyViewer.compare}}),(function(e){return{onCompareModeSelect(){e((0,i.setCompareMode)(!0))},onCompareModeUnselect(){e((0,i.setCompareMode)(!1))}}})))(d);t.default=f},9769:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=c(n(7086)),s=n(2827),i=n(1624),a=c(n(4754)),l=n(6648),u=n(6215);function c(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}class d extends r.Component{constructor(e){super(e),this.handleRevert=this.handleRevert.bind(this),this.state={isReverting:!1}}handleRevert(){const{actions:{revertToVersion:e},onAfterRevert:t,recordId:n,versionId:r}=this.props;this.setState({isReverting:!0});const o="function"==typeof t?t:()=>{};return e(n,r,"DRAFT","DRAFT").then((()=>o(r)))}render(){const{FormActionComponent:e,ViewModeComponent:t,isLatestVersion:n,isPreviewable:o,isRevertable:s}=this.props,{isReverting:i}=this.state;let l="";return i?l=a.default._t("HistoryViewerToolbar.REVERT_IN_PROGRESS","Revert in progress..."):n&&(l=a.default._t("HistoryViewerToolbar.REVERT_UNAVAILABLE","Unavailable for the current version")),r.default.createElement("div",{className:"toolbar toolbar--south"},r.default.createElement("div",{className:"btn-toolbar"},s&&r.default.createElement(e,{onClick:this.handleRevert,icon:"back-in-time",name:"revert",attributes:{title:l},data:{buttonStyle:"warning"},disabled:n||i,loading:i,title:a.default._t("HistoryViewerToolbar.REVERT_TO_VERSION","Revert to this version")}),o&&r.default.createElement(t,{id:"history-viewer-edit-mode",area:"edit"})))}}t.Component=d,d.propTypes={actions:o.default.shape({revertToVersion:o.default.func.isRequired}),FormActionComponent:o.default.elementType.isRequired,ViewModeComponent:o.default.elementType.isRequired,isLatestVersion:o.default.bool,isPreviewable:o.default.bool,isRevertable:o.default.bool,onAfterRevert:o.default.func,recordId:o.default.number.isRequired,versionId:o.default.number.isRequired},d.defaultProps={isLatestVersion:!1,isPreviewable:!1,isRevertable:!1};var f=(0,s.compose)((0,i.connect)(null,(function(e){return{onAfterRevert(t){e((0,u.addMessage)(a.default.sprintf(a.default._t("HistoryViewerToolbar.REVERTED_MESSAGE","Successfully reverted to version %s"),t))),e((0,u.showList)())}}})),(0,l.inject)(["FormAction","ViewModeToggle"],((e,t)=>({FormActionComponent:e,ViewModeComponent:t})),(()=>"VersionedAdmin.HistoryViewer.Toolbar")))(d);t.default=f},3461:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=f(n(7086)),s=n(2827),i=n(1624),a=n(6648),l=n(185),u=n(1118),c=f(n(4754)),p=f(n(7820)),d=n(6215);function f(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}class m extends r.Component{constructor(e){super(e),this.handleClick=this.handleClick.bind(this),this.handleClose=this.handleClose.bind(this),this.handleCompare=this.handleCompare.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}getAuthor(){const{version:e}=this.props;let t={};return e.published&&e.publisher?t=e.publisher:e.author&&(t=e.author),`${t.firstName||""} ${t.surname||""}`}getClassNames(){const{extraClass:e,isActive:t,compare:n,compare:{compareFrom:r,compareTo:o}}=this.props,s={"history-viewer__row":!0,"history-viewer__row--current":t,"history-viewer__row--comparison-selected":n&&!(r&&o)};return(0,p.default)(s,e)}handleKeyUp(e){13===e.keyCode&&this.handleClick()}handleClick(){const{onSelect:e,version:t,isActive:n,compare:r}=this.props;return n||e(t,r),!1}handleCompare(){const{onCompareMode:e,version:t}=this.props;e(t)}handleClose(){const{onSelect:e,version:t,compare:n,compare:{versionFrom:r}}=this.props;r&&r.version===t.version&&delete n.versionFrom,e(0,n)}renderCompareButton(){const{compareModeAvailable:e,compare:t,FormActionComponent:n}=this.props,o=c.default._t("HistoryViewerVersion.COMPARE","Compare");return!e||t?null:r.default.createElement(n,{onClick:this.handleCompare,title:o,buttonStyle:"outline-light",extraClass:"history-viewer__compare-button"},o)}renderClearButton(){const{FormActionComponent:e,isActive:t}=this.props;return t?r.default.createElement(e,{onClick:this.handleClose,icon:"cancel",attributes:{title:c.default._t("HistoryViewerVersion.CLOSE","Close")},title:null,buttonStyle:"outline-light",extraClass:"history-viewer__close-button"}):null}renderSelectedMessage(){const{isActive:e}=this.props;return e?r.default.createElement("span",{className:"history-viewer__selected-message"},c.default._t("HistoryViewerVersion.SELECTED","Already selected")):null}renderActions(){const{isActive:e,compare:t}=this.props;return e||t?r.default.createElement("span",{className:"history-viewer__actions",role:"cell"},this.renderCompareButton(),this.renderSelectedMessage(),this.renderClearButton()):r.default.createElement("span",{className:"history-viewer__actions",role:"cell"})}render(){const{version:e,isActive:t,StateComponent:n}=this.props,o=c.default._t("HistoryViewerVersion.GO_TO_VERSION","Go to version {version}");return r.default.createElement("li",{className:this.getClassNames(),role:"row"},r.default.createElement("span",{className:"history-viewer__version-link",role:"button",title:c.default.inject(o,{version:e.Version}),onClick:this.handleClick,onKeyUp:this.handleKeyUp,tabIndex:0},r.default.createElement("span",{className:"history-viewer__version-no",role:"cell"},e.version),r.default.createElement(n,{version:e,isActive:t}),r.default.createElement("span",{className:"history-viewer__author",role:"cell"},this.getAuthor()),this.renderActions()))}}t.Component=m,m.propTypes={extraClass:o.default.oneOfType([o.default.string,o.default.array,o.default.object]),version:l.versionType,isActive:o.default.bool,onSelect:o.default.func,onCompareMode:o.default.func,compare:u.compareType,compareModeAvailable:o.default.bool,StateComponent:o.default.elementType.isRequired,FormActionComponent:o.default.elementType.isRequired},m.defaultProps={isActive:!1,version:l.defaultVersion,compare:!1,compareModeAvailable:!0};var g=(0,s.compose)((0,i.connect)(null,(function(e){return{onSelect(t,n){const{versionFrom:r}=n;n?e(r?(0,d.setCompareTo)(t):(0,d.setCompareFrom)(t)):(e((0,d.showVersion)(t)),e((0,d.clearMessages)()))},onCompareMode(t){e((0,d.setCompareFrom)(t)),e((0,d.setCompareMode)(!0))}}})),(0,a.inject)(["HistoryViewerVersionState","FormAction"],((e,t)=>({StateComponent:e,FormActionComponent:t})),(e=>{let{version:t}=e,n="VersionedAdmin.HistoryViewer.HistoryViewerVersion";return t&&(n+=`.${t.version}`),n})))(m);t.default=g},2477:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=p(n(7820)),s=p(n(8238)),i=n(6648),a=n(185),l=p(n(7086)),u=p(n(1872)),c=p(n(7902));function p(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}class f extends r.PureComponent{componentDidMount(){this.toggleToolbarClass(!0)}componentDidUpdate(){this.toggleToolbarClass("split"===this.props.previewState)}componentWillUnmount(){this.toggleToolbarClass(!1)}getListVersions(){const{compare:e,version:t}=this.props;return this.isCompareMode()?[e.versionTo,e.versionFrom]:[t]}isPreviewable(){const{isPreviewable:e}=this.props;return e&&!this.isCompareMode()}isCompareMode(){const{compare:e}=this.props;return e&&e.versionFrom&&e.versionTo}toggleToolbarClass(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=document.querySelector(".CMSPageHistoryViewerController div:not(.cms-content-tools) .cms-content-header"),n="history-viewer__toolbar--condensed";t&&this.isPreviewable()&&(e?t.classList.add(n):t.classList.remove(n))}renderPreview(){const{version:{absoluteLink:e,lastEdited:t,version:n},PreviewComponent:o,previewState:s}=this.props;if(!this.isPreviewable()||"edit"===s)return null;const i=u.default.parse(e),a=c.default.parse(i.query);a.archiveDate=t;const l=u.default.format({...i,search:c.default.stringify(a)});return r.default.createElement(o,{className:"history-viewer__preview flexbox-area-grow",itemLinks:{preview:{Stage:{href:l,type:"text/html"}}},itemId:n})}renderToolbar(){const{ToolbarComponent:e,isLatestVersion:t,isRevertable:n,recordId:o,version:s}=this.props;return this.isCompareMode()?null:r.default.createElement(e,{identifier:"HistoryViewer.VersionDetail.Toolbar",isLatestVersion:t,recordId:o,versionId:s.version,isPreviewable:this.isPreviewable(),isRevertable:n})}renderDetails(){const{compareModeAvailable:e,ListComponent:t,schemaUrl:n,CompareWarningComponent:i,previewState:a}=this.props;if(this.isPreviewable()&&"preview"===a)return null;const l={"history-viewer__table":!0,"history-viewer__table--current":!0,"history-viewer__table--compare":this.isCompareMode()},u={"history-viewer__version-detail":!0,"history-viewer__version-detail--compare":this.isCompareMode()};return r.default.createElement("div",{className:"flexbox-area-grow fill-height"},r.default.createElement(i,{fixed:!0}),r.default.createElement("div",{className:(0,o.default)(["flexbox-area-grow","panel","panel--scrollable","panel--padded","panel--padded-side"])},r.default.createElement(t,{extraClass:(0,o.default)(l),versions:this.getListVersions(),compareModeAvailable:e}),r.default.createElement("div",{className:(0,o.default)(u)},r.default.createElement(s.default,{identifier:"HistoryViewer.VersionDetail",schemaUrl:n}))),this.renderToolbar())}render(){return r.default.createElement("div",{className:"flexbox-area-grow fill-width"},this.renderDetails(),this.renderPreview())}}t.Component=f,f.propTypes={isLatestVersion:l.default.bool,isPreviewable:l.default.bool,isRevertable:l.default.bool,ListComponent:l.default.elementType.isRequired,PreviewComponent:l.default.elementType,recordId:l.default.number.isRequired,schemaUrl:l.default.string.isRequired,ToolbarComponent:l.default.elementType.isRequired,version:a.versionType,compare:l.default.oneOfType([l.default.shape({versionFrom:a.versionType,versionTo:a.versionType}),l.default.bool]),previewState:l.default.oneOf(["edit","preview","split"])},f.defaultProps={isLatestVersion:!1,isPreviewable:!1,isRevertable:!1,compare:!1};var h=(0,i.inject)(["HistoryViewerVersionList","HistoryViewerToolbar","Preview","HistoryViewerCompareWarning"],((e,t,n,r)=>({ListComponent:e,ToolbarComponent:t,PreviewComponent:n,CompareWarningComponent:r})),((e,t)=>{let{version:n}=e;return`${t}.HistoryViewerVersionDetail.${n.Version}`}))(f);t.default=h},8488:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=f(n(7086)),s=f(n(7820)),i=f(n(4754)),a=n(1624),l=n(2827),u=n(6648),c=n(3057),p=n(185),d=n(1118);function f(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}class m extends r.PureComponent{getClassNames(){const{extraClass:e,showHeader:t}=this.props;return(0,s.default)(e,{table:!0,"history-viewer__table--headerless":!t})}isVersionActive(e){const{currentVersion:t,compare:n,compare:{versionFrom:r,versionTo:o}}=this.props,s=t&&t.version===e.version,i=r&&r.version===e.version,a=o&&o.version===e.version;return!n&&s||i||a}renderMessages(){const{FormAlertComponent:e,messages:t}=this.props;return t.length?r.default.createElement("div",{className:"history-viewer__messages"},t.map((t=>r.default.createElement(e,{key:t.id,type:t.type,value:t.message,closeLabel:i.default._t("HistoryViewerVersionList.CLOSE","Close")})))):null}renderHeader(){const{showHeader:e,HeadingComponent:t,compareModeAvailable:n}=this.props;if(!e)return null;const o={compareModeAvailable:n};return r.default.createElement(t,o)}render(){const{VersionComponent:e,versions:t,compareModeAvailable:n,compare:o}=this.props;return r.default.createElement("div",{className:"history-viewer__list"},this.renderMessages(),r.default.createElement("ul",{className:this.getClassNames(),role:"table"},this.renderHeader(),t.map((t=>r.default.createElement(e,{key:t.version,isActive:this.isVersionActive(t),version:t,compare:o,compareModeAvailable:n})))))}}t.Component=m,m.propTypes={extraClass:o.default.oneOfType([o.default.string,o.default.array,o.default.object]),showHeader:o.default.bool,FormAlertComponent:o.default.elementType.isRequired,HeadingComponent:o.default.elementType.isRequired,messages:o.default.arrayOf(c.messageType),VersionComponent:o.default.elementType.isRequired,versions:o.default.arrayOf(p.versionType),compare:d.compareType,compareModeAvailable:o.default.bool},m.defaultProps={compareModeAvailable:!0,extraClass:"history-viewer__table",messages:[],showHeader:!0,versions:[]};var g=(0,l.compose)((0,a.connect)((function(e){const{messages:t,compare:n,currentVersion:r}=e.versionedAdmin.historyViewer;return{messages:t,compare:n,currentVersion:r}})),(0,u.inject)(["FormAlert","HistoryViewerHeading","HistoryViewerVersion"],((e,t,n)=>({FormAlertComponent:e,HeadingComponent:t,VersionComponent:n})),(()=>"VersionedAdmin.HistoryViewer.HistoryViewerVersionList")))(m);t.default=g},5385:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=c(n(7820)),s=c(n(4754)),i=c(n(7657)),a=n(185),l=n(6648),u=c(n(7086));function c(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}class d extends r.Component{getClassNames(){const{extraClass:e}=this.props;return(0,o.default)("history-viewer__version-state",e)}getPublishedState(){const{version:e}=this.props;return 1===e.version?s.default._t("HistoryViewer.Created","Created"):e.published?e.deleted?e.draft?s.default._t("HistoryViewer.Archived","Archived"):s.default._t("HistoryViewer.Unpublished","Unpublished"):s.default._t("HistoryViewer.Published","Published"):s.default._t("HistoryViewer.Saved","Saved")}getDate(){return i.default.locale(s.default.detectLocale()),(0,i.default)(this.props.version.lastEdited).format("L LT")}getBadges(){const{version:e,isActive:t,BadgeComponent:n}=this.props;return e.liveVersion?r.default.createElement(n,{status:"success",message:s.default._t("HistoryViewer.BadgeLive","Live"),className:"",inverted:t}):""}render(){return r.default.createElement("span",{className:this.getClassNames(),role:"cell"},this.getPublishedState()," ",r.default.createElement("small",{className:"text-muted"},this.getDate()),this.getBadges())}}t.Component=d,d.propTypes={version:a.versionType,extraClass:u.default.string,isActive:u.default.bool,BadgeComponent:u.default.oneOfType([u.default.node,u.default.func]).isRequired},d.defaultProps={version:a.defaultVersion,extraClass:"",isActive:!1};var f=(0,l.inject)(["Badge"],(e=>({BadgeComponent:e})),(e=>{let{version:t}=e;return`HistoryViewer.HistoryViewerVersionState.${t.Version}`}))(d);t.default=f},2291:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(7363)),o=i(n(4510)),s=n(6648);function i(e){return e&&e.__esModule?e:{default:e}}var a=e=>{class t extends r.default.Component{getConfig(){return o.default.getSection("SilverStripe\\VersionedAdmin\\Controllers\\HistoryViewerController")}getSchemaUrlDetails(){const{compare:e}=this.props;return e?{formName:"compareForm",queryParts:["RecordVersionFrom=:from","RecordVersionTo=:to"]}:{formName:"versionForm",queryParts:["RecordVersion=:version"]}}getSchemaUrl(){const e=this.getConfig(),{formName:t,queryParts:n}=this.getSchemaUrlDetails();return`${`${e.form[t].schemaUrl}/:id`}?${n.concat("RecordClass=:class&RecordID=:id").join("&")}`}render(){const t={...this.props,config:this.getConfig(),HistoryViewer:e,schemaUrl:this.getSchemaUrl()};return r.default.createElement(e,t)}}return(0,s.inject)(["HistoryViewer"])(t)};t.default=a},9679:function(e,t,n){"use strict";var r,o=(r=n(5311))&&r.__esModule?r:{default:r},s=n(4845);o.default.entwine("ss",(e=>{e(".ArchiveAdmin__action--restore").entwine({onmatch(){e(this).attr("readonly",!1),e(this).attr("disabled",!1)}}),e(".ArchiveAdmin .other-model-selector select").entwine({onchange(t){t.preventDefault();let n=e(this).val();const r=e(this).data("others-archive-url");if(n){n=n.replace(/\\/g,"-");const t=(0,s.joinUrlPaths)(r,n);e(".cms-container").loadPanel(t,"",{pjax:"CurrentForm"})}}})}))},6674:function(e,t,n){"use strict";var r=a(n(5311)),o=a(n(7363)),s=n(9691),i=n(6648);function a(e){return e&&e.__esModule?e:{default:e}}r.default.entwine("ss",(e=>{e(".js-injector-boot .history-viewer__container").entwine({ReactRoot:null,onmatch(){const e=this.closest(".cms-content").attr("id"),t=e?{context:e}:{},n=(0,i.loadComponent)("HistoryViewer",t),r=this.data("schema"),a={...r.data,isInGridField:r.data.isInGridField||!this.hasClass("history-viewer--standalone")},l=(0,s.createRoot)(this[0]);l.render(o.default.createElement(n,a)),this.setReactRoot(l)},onunmatch(){const e=this.getReactRoot();e&&(e.unmount(),this.setReactRoot(null))}}),e(".history-viewer__version-detail .nav-link").entwine({onclick(e){e.preventDefault(),this._super(e)}}),e(".tab.tab--history-viewer[aria-hidden=false]").entwine({onmatch(){e(".toolbar--south.cms-content-actions").hide()},onunmatch(){e(".toolbar--south.cms-content-actions").show()}}),e(".tab.tab--history-viewer .history-viewer__version-detail").entwine({onmatch(){this.parent().css("padding-bottom","3rem").next(".toolbar--south").css({position:"absolute",bottom:0,left:0,right:0})}})}))},574:function(e,t,n){"use strict";var r=o(n(4754));function o(e){return e&&e.__esModule?e:{default:e}}o(n(5311)).default.entwine("ss",(e=>{e(".cms-edit-form .btn-toolbar #Form_ItemEditForm_action_doUnpublish").entwine({onclick(e){const t=r.default._t("VersionedEditForm.PUBLISH_CONFIRM_MESSAGE","Are you sure you want to remove your record from the published site?\n\nThis record will still be available in the CMS as draft.");return!!confirm(t)&&(this.parents("form:first").addClass("loading"),this._super(e))}}),e(".cms-edit-form .btn-toolbar #Form_ItemEditForm_action_doArchive").entwine({onclick(e){const t=r.default._t("VersionedEditForm.ARCHIVE_CONFIRM_MESSAGE","Warning: This record will be unpublished before being sent to the archive.\n\nAre you sure you want to proceed?");return!!confirm(t)&&(this.parents("form:first").addClass("loading"),this._super(e))}})}))},3061:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=["SHOW_VERSION","SHOW_LIST","SET_CURRENT_PAGE","ADD_MESSAGE","CLEAR_MESSAGES","SET_COMPARE_MODE","SET_COMPARE_FROM","SET_COMPARE_TO"].reduce(((e,t)=>Object.assign(e,{[t]:`HISTORY_VIEWER.${t}`})),{});t.default=n},6215:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addMessage=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"success";return{type:s.default.ADD_MESSAGE,payload:{id:(0,o.v1)(),message:e,type:t}}},t.clearMessages=function(){return{type:s.default.CLEAR_MESSAGES}},t.setCompareFrom=function(e){return{type:s.default.SET_COMPARE_FROM,payload:{version:e}}},t.setCompareMode=function(e){return{type:s.default.SET_COMPARE_MODE,payload:{enabled:e}}},t.setCompareTo=function(e){return{type:s.default.SET_COMPARE_TO,payload:{version:e}}},t.setCurrentPage=function(e){return{type:s.default.SET_CURRENT_PAGE,payload:{page:e}}},t.showList=function(){return{type:s.default.SHOW_LIST}},t.showVersion=function(e){return{type:s.default.SHOW_VERSION,payload:{version:e}}};var r,o=n(7429),s=(r=n(3061))&&r.__esModule?r:{default:r}},7908:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,{type:t,payload:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(t){case s.default.SET_CURRENT_PAGE:return{...e,currentPage:n.page};case s.default.SHOW_VERSION:return{...e,currentVersion:n.version};case s.default.SHOW_LIST:return{...e,currentVersion:0,currentPage:0};case s.default.ADD_MESSAGE:return{...e,messages:[n,...e.messages]};case s.default.CLEAR_MESSAGES:return{...e,messages:[]};case s.default.SET_COMPARE_MODE:{const t={versionFrom:!1,versionTo:!1,...e.compare};return{...e,compare:!!n.enabled&&t}}case s.default.SET_COMPARE_FROM:{let{compare:{versionFrom:t,versionTo:r}}=e;return t=n.version||!1,t||(t=r,r=!1),{...e,currentVersion:t,compare:{versionFrom:t,versionTo:r}}}case s.default.SET_COMPARE_TO:{let{compare:{versionFrom:t,versionTo:r}}=e;return r=n.version||!1,r&&t&&r.version0}},{key:"getMetadataColumnProperty",value:function(e,t,n){var r=this.getColumnMetadataByName(e);return null==r?n:r.hasOwnProperty(t)?r[t]:n}},{key:"orderColumns",value:function(e){var t=this;return a(e,(function(e){var n=i(t.columnMetadata,{columnName:e});return null==n||isNaN(n.order)?100:n.order}))}},{key:"getColumns",value:function(){var e=0===this.filteredColumns.length?this.allColumns:this.filteredColumns;return e=l(e,this.metadataColumns),e=this.orderColumns(e)}}]),e}();e.exports=u},1172:function(e,t,n){"use strict";var r=n(7363),o=n(2555)({getDefaultProps:function(){return{placeholderText:""}},render:function(){return"function"!=typeof this.props.customFilterComponent?(console.log("Couldn't find valid template."),r.createElement("div",null)):r.createElement(this.props.customFilterComponent,{changeFilter:this.props.changeFilter,results:this.props.results,currentResults:this.props.currentResults,placeholderText:this.props.placeholderText})}});e.exports=o},2039:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t0&&(e=r.createElement("button",{type:"button",onClick:this.props.previous,style:this.props.useGriddleStyles?{color:"#222",border:"none",background:"none",margin:"0 0 0 10px"}:null},this.props.previousIconComponent,this.props.previousText)),this.props.currentPage!==this.props.maxPage-1&&(t=r.createElement("button",{type:"button",onClick:this.props.next,style:this.props.useGriddleStyles?{color:"#222",border:"none",background:"none",margin:"0 10px 0 0"}:null},this.props.nextText,this.props.nextIconComponent));var n=null,o=null,i=null;if(!0===this.props.useGriddleStyles){var a={float:"left",minHeight:"1px",marginTop:"5px"};i=s({textAlign:"right",width:"34%"},a),o=s({textAlign:"center",width:"33%"},a),n=s({width:"33%"},a)}for(var l=[],u=1;u<=this.props.maxPage;u++)l.push(r.createElement("option",{value:u,key:u},u));return r.createElement("div",{style:this.props.useGriddleStyles?{minHeight:"35px"}:null},r.createElement("div",{className:this.props.previousClassName,style:n},e),r.createElement("div",{className:"griddle-page",style:o},r.createElement("select",{value:this.props.currentPage+1,onChange:this.pageChange},l)," / ",this.props.maxPage),r.createElement("div",{className:this.props.nextClassName,style:i},t))}});e.exports=i},344:function(e,t,n){"use strict";var r=n(7363),o=n(2555),s=(n(3059),n(7024)),i=n(3560),a=n(7287),l=n(8583),u=n(1747),c=n(3220),p=n(2569),d=o({getDefaultProps:function(){return{isChildRow:!1,showChildren:!1,data:{},columnSettings:null,rowSettings:null,hasChildren:!1,useGriddleStyles:!0,useGriddleIcons:!0,isSubGriddle:!1,paddingHeight:null,rowHeight:null,parentRowCollapsedClassName:"parent-row",parentRowExpandedClassName:"parent-row expanded",parentRowCollapsedComponent:"▶",parentRowExpandedComponent:"▼",onRowClick:null,multipleSelectionSettings:null,onRowMouseEnter:null,onRowMouseLeave:null,onRowWillMount:null,onRowWillUnmount:null}},componentWillMount:function(){null!==this.props.onRowWillMount&&i(this.props.onRowWillMount)&&this.props.onRowWillMount(this)},componentWillUnmount:function(){null!==this.props.onRowWillUnmount&&i(this.props.onRowWillUnmount)&&this.props.onRowWillUnmount(this)},handleClick:function(e){null!==this.props.onRowClick&&i(this.props.onRowClick)?this.props.onRowClick(this,e):this.props.hasChildren&&this.props.toggleChildren()},handleMouseEnter:function(e){null!==this.props.onRowMouseEnter&&i(this.props.onRowMouseEnter)&&this.props.onRowMouseEnter(this,e)},handleMouseLeave:function(e){null!==this.props.onRowMouseLeave&&i(this.props.onRowMouseLeave)&&this.props.onRowMouseLeave(this,e)},handleSelectionChange:function(e){},handleSelectClick:function(e){this.props.multipleSelectionSettings.isMultipleSelection&&("checkbox"===e.target.type?this.props.multipleSelectionSettings.toggleSelectRow(this.props.data,this.refs.selected.checked):this.props.multipleSelectionSettings.toggleSelectRow(this.props.data,!this.refs.selected.checked))},verifyProps:function(){null===this.props.columnSettings&&console.error("gridRow: The columnSettings prop is null and it shouldn't be")},formatData:function(e){return"boolean"==typeof e?String(e):e},render:function(){var e=this;this.verifyProps();var t=this,n=null;this.props.useGriddleStyles&&(n={margin:"0px",padding:t.props.paddingHeight+"px 5px "+t.props.paddingHeight+"px 5px",height:t.props.rowHeight?this.props.rowHeight-2*t.props.paddingHeight+"px":null,backgroundColor:"#FFF",borderTopColor:"#DDD",color:"#222"});var o=this.props.columnSettings.getColumns(),d=a(o,[]),f=l({},this.props.data);u(f,d);var h,m,g=c(s.pick(f,p(o,"children"))).map((function(t,o){var s=null,i=e.props.columnSettings.getColumnMetadataByName(t[0]),a=0===o&&e.props.hasChildren&&!1===e.props.showChildren&&e.props.useGriddleIcons?r.createElement("span",{style:e.props.useGriddleStyles?{fontSize:"10px",marginRight:"5px"}:null},e.props.parentRowCollapsedComponent):0===o&&e.props.hasChildren&&e.props.showChildren&&e.props.useGriddleIcons?r.createElement("span",{style:e.props.useGriddleStyles?{fontSize:"10px"}:null},e.props.parentRowExpandedComponent):"";if(0===o&&e.props.isChildRow&&e.props.useGriddleStyles&&(n=l(n,{paddingLeft:10})),e.props.columnSettings.hasColumnMetadata()&&null!=i)if(void 0!==i.customComponent&&null!==i.customComponent){var u=r.createElement(i.customComponent,{data:t[1],rowData:f,metadata:i});s=r.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,className:i.cssClassName,key:o,style:n},u)}else s=r.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,className:i.cssClassName,key:o,style:n},a,e.formatData(t[1]));return s||r.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,key:o,style:n},a,t[1])}));if(null!==this.props.onRowClick&&i(this.props.onRowClick)?(h=null,m=this.handleSelectClick):this.props.multipleSelectionSettings&&this.props.multipleSelectionSettings.isMultipleSelection?(h=this.handleSelectClick,m=null):(h=null,m=null),g&&this.props.multipleSelectionSettings&&this.props.multipleSelectionSettings.isMultipleSelection){this.props.multipleSelectionSettings.getSelectedRowIds();g.unshift(r.createElement("td",{key:"selection",style:n,className:"griddle-select griddle-select-cell",onClick:m},r.createElement("input",{type:"checkbox",checked:this.props.multipleSelectionSettings.getIsRowChecked(f),onChange:this.handleSelectionChange,ref:"selected"})))}var v=t.props.rowSettings&&t.props.rowSettings.getBodyRowMetadataClass(t.props.data)||"standard-row";return t.props.isChildRow?v="child-row":t.props.hasChildren&&(v=t.props.showChildren?this.props.parentRowExpandedClassName:this.props.parentRowCollapsedClassName),r.createElement("tr",{onClick:h,className:v},g)}});e.exports=d},3302:function(e,t,n){"use strict";var r=n(7363),o=n(2555),s=(n(3059),n(8718)),i=o({getDefaultProps:function(){return{useGriddleStyles:!0,useGriddleIcons:!0,isSubGriddle:!1,columnSettings:null,rowSettings:null,paddingHeight:null,rowHeight:null,parentRowCollapsedClassName:"parent-row",parentRowExpandedClassName:"parent-row expanded",parentRowCollapsedComponent:"▶",parentRowExpandedComponent:"▼",onRowClick:null,onRowMouseEnter:null,onRowMouseLeave:null,onRowWillMount:null,onRowWillUnmount:null,multipleSelectionSettings:null}},getInitialState:function(){return{data:{},showChildren:!1}},componentWillReceiveProps:function(){this.setShowChildren(!1)},toggleChildren:function(){this.setShowChildren(!1===this.state.showChildren)},setShowChildren:function(e){this.setState({showChildren:e})},verifyProps:function(){null===this.props.columnSettings&&console.error("gridRowContainer: The columnSettings prop is null and it shouldn't be")},render:function(){this.verifyProps();var e=this;if(void 0===this.props.data)return r.createElement("tbody",null);var t=[],n=this.props.columnSettings.getColumns();t.push(r.createElement(this.props.rowSettings.rowComponent,{useGriddleStyles:this.props.useGriddleStyles,isSubGriddle:this.props.isSubGriddle,data:this.props.rowSettings.isCustom?s(this.props.data,n):this.props.data,rowData:this.props.rowSettings.isCustom?this.props.data:null,columnSettings:this.props.columnSettings,rowSettings:this.props.rowSettings,hasChildren:e.props.hasChildren,toggleChildren:e.toggleChildren,showChildren:e.state.showChildren,key:e.props.uniqueId+"_base_row",useGriddleIcons:e.props.useGriddleIcons,parentRowExpandedClassName:this.props.parentRowExpandedClassName,parentRowCollapsedClassName:this.props.parentRowCollapsedClassName,parentRowExpandedComponent:this.props.parentRowExpandedComponent,parentRowCollapsedComponent:this.props.parentRowCollapsedComponent,paddingHeight:e.props.paddingHeight,rowHeight:e.props.rowHeight,onRowClick:e.props.onRowClick,onRowMouseEnter:e.props.onRowMouseEnter,onRowMouseLeave:e.props.onRowMouseLeave,multipleSelectionSettings:this.props.multipleSelectionSettings,onRowWillMount:e.props.onRowWillMount,onRowWillUnmount:e.props.onRowWillUnmount}));var o=null;return e.state.showChildren&&(o=e.props.hasChildren&&this.props.data.children.map((function(t,n){var o=e.props.rowSettings.getRowKey(t,n);if(void 0!==t.children){var s=e.constructor.Griddle;return r.createElement("tr",{key:o,style:{paddingLeft:5}},r.createElement("td",{colSpan:e.props.columnSettings.getVisibleColumnCount(),className:"griddle-parent",style:e.props.useGriddleStyles?{border:"none",padding:"0 0 0 5px"}:null},r.createElement(s,{rowMetadata:{key:"id"},isSubGriddle:!0,results:[t],columns:e.props.columnSettings.getColumns(),tableClassName:e.props.tableClassName,parentRowExpandedClassName:e.props.parentRowExpandedClassName,parentRowCollapsedClassName:e.props.parentRowCollapsedClassName,showTableHeading:!1,showPager:!1,columnMetadata:e.props.columnSettings.columnMetadata,parentRowExpandedComponent:e.props.parentRowExpandedComponent,parentRowCollapsedComponent:e.props.parentRowCollapsedComponent,paddingHeight:e.props.paddingHeight,rowHeight:e.props.rowHeight})))}return r.createElement(e.props.rowSettings.rowComponent,{useGriddleStyles:e.props.useGriddleStyles,isSubGriddle:e.props.isSubGriddle,data:t,columnSettings:e.props.columnSettings,isChildRow:!0,columnMetadata:e.props.columnSettings.columnMetadata,key:o})}))),!1===e.props.hasChildren?t[0]:r.createElement("tbody",null,e.state.showChildren?t.concat(o):t)}});e.exports=i},7033:function(e,t,n){"use strict";var r=n(7363),o=n(2555),s=n(4721),i=n(2569),a=n(3311),l=o({getDefaultProps:function(){return{columns:[],columnMetadata:[],selectedColumns:[],settingsText:"",maxRowsText:"",resultsPerPage:0,enableToggleCustom:!1,useCustomComponent:!1,useGriddleStyles:!0,toggleCustomComponent:function(){}}},setPageSize:function(e){var t=parseInt(e.target.value,10);this.props.setPageSize(t)},handleChange:function(e){var t=e.target.dataset?e.target.dataset.name:e.target.getAttribute("data-name");!0===e.target.checked&&!1===s(this.props.selectedColumns,t)?(this.props.selectedColumns.push(t),this.props.setColumns(this.props.selectedColumns)):this.props.setColumns(i(this.props.selectedColumns,t))},render:function(){var e=this,t=[];!1===e.props.useCustomComponent&&(t=this.props.columns.map((function(t,n){var o=s(e.props.selectedColumns,t),i=a(e.props.columnMetadata,{columnName:t}),l=t;return void 0!==i&&void 0!==i.displayName&&null!=i.displayName&&(l=i.displayName),void 0!==i&&null!=i&&i.locked?r.createElement("div",{className:"column checkbox"},r.createElement("label",null,r.createElement("input",{type:"checkbox",disabled:!0,name:"check",checked:o,"data-name":t}),l)):void 0!==i&&null!=i&&void 0!==i.visible&&!1===i.visible?null:r.createElement("div",{className:"griddle-column-selection checkbox",key:t,style:e.props.useGriddleStyles?{float:"left",width:"20%"}:null},r.createElement("label",null,r.createElement("input",{type:"checkbox",name:"check",onChange:e.handleChange,checked:o,"data-name":t}),l))})));var n=e.props.enableToggleCustom?r.createElement("div",{className:"form-group"},r.createElement("label",{htmlFor:"maxRows"},r.createElement("input",{type:"checkbox",checked:this.props.useCustomComponent,onChange:this.props.toggleCustomComponent})," ",this.props.enableCustomFormatText)):"",o=this.props.showSetPageSize?r.createElement("div",null,r.createElement("label",{htmlFor:"maxRows"},this.props.maxRowsText,":",r.createElement("select",{onChange:this.setPageSize,value:this.props.resultsPerPage},r.createElement("option",{value:"5"},"5"),r.createElement("option",{value:"10"},"10"),r.createElement("option",{value:"25"},"25"),r.createElement("option",{value:"50"},"50"),r.createElement("option",{value:"100"},"100")))):"";return r.createElement("div",{className:"griddle-settings",style:this.props.useGriddleStyles?{backgroundColor:"#FFF",border:"1px solid #DDD",color:"#222",padding:"10px",marginBottom:"10px"}:null},r.createElement("h6",null,this.props.settingsText),r.createElement("div",{className:"griddle-columns",style:this.props.useGriddleStyles?{clear:"both",display:"table",width:"100%",borderBottom:"1px solid #EDEDED",marginBottom:"10px"}:null},t),o,n)}});e.exports=l},1277:function(e,t,n){"use strict";var r=n(7363),o=n(2555),s=n(4769),i=n(3302),a=(n(3059),n(5203),o({getDefaultProps:function(){return{data:[],columnSettings:null,rowSettings:null,sortSettings:null,multipleSelectionSettings:null,className:"",enableInfiniteScroll:!1,nextPage:null,hasMorePages:!1,useFixedHeader:!1,useFixedLayout:!0,paddingHeight:null,rowHeight:null,filterByColumn:null,infiniteScrollLoadTreshold:null,bodyHeight:null,useGriddleStyles:!0,useGriddleIcons:!0,isSubGriddle:!1,parentRowCollapsedClassName:"parent-row",parentRowExpandedClassName:"parent-row expanded",parentRowCollapsedComponent:"▶",parentRowExpandedComponent:"▼",externalLoadingComponent:null,externalIsLoading:!1,onRowClick:null,onRowMouseEnter:null,onRowMouseLeave:null,onRowWillMount:null,onRowWillUnmount:null}},getInitialState:function(){return{scrollTop:0,scrollHeight:this.props.bodyHeight,clientHeight:this.props.bodyHeight}},componentDidMount:function(){this.gridScroll()},componentDidUpdate:function(e,t){this.gridScroll()},gridScroll:function(){if(this.props.enableInfiniteScroll&&!this.props.externalIsLoading){var e=this.refs.scrollable,t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;if(null!==this.props.rowHeight&&this.state.scrollTop!==t&&Math.abs(this.state.scrollTop-t)>=this.getAdjustedRowHeight()){var o={scrollTop:t,scrollHeight:n,clientHeight:r};this.setState(o)}.6*(n-(t+r)-this.props.infiniteScrollLoadTreshold)<=this.props.infiniteScrollLoadTreshold&&this.props.nextPage()}},verifyProps:function(){null===this.props.columnSettings&&console.error("gridTable: The columnSettings prop is null and it shouldn't be"),null===this.props.rowSettings&&console.error("gridTable: The rowSettings prop is null and it shouldn't be")},getAdjustedRowHeight:function(){return this.props.rowHeight+2*this.props.paddingHeight},getNodeContent:function(){this.verifyProps();var e=this,t=!1;if(!this.props.externalIsLoading||this.props.enableInfiniteScroll){var n=e.props.data,o=null,s=null;if(this.props.enableInfiniteScroll&&null!==this.props.rowHeight&&void 0!==this.refs.scrollable){var a=e.getAdjustedRowHeight(),l=Math.ceil(e.state.clientHeight/a),u=Math.max(0,Math.floor(e.state.scrollTop/a)-.25*l),c=Math.min(u+1.25*l,this.props.data.length-1);n=n.slice(u,c+1);var p={height:u*a+"px"};o=r.createElement("tr",{key:"above-"+p.height,style:p});var d={height:(this.props.data.length-c)*a+"px"};s=r.createElement("tr",{key:"below-"+d.height,style:d})}var f=n.map((function(n,o){var s=void 0!==n.children&&n.children.length>0,a=e.props.rowSettings.getRowKey(n,o);return s&&(t=s),r.createElement(i,{useGriddleStyles:e.props.useGriddleStyles,isSubGriddle:e.props.isSubGriddle,parentRowExpandedClassName:e.props.parentRowExpandedClassName,parentRowCollapsedClassName:e.props.parentRowCollapsedClassName,parentRowExpandedComponent:e.props.parentRowExpandedComponent,parentRowCollapsedComponent:e.props.parentRowCollapsedComponent,data:n,key:a+"-container",uniqueId:a,columnSettings:e.props.columnSettings,rowSettings:e.props.rowSettings,paddingHeight:e.props.paddingHeight,multipleSelectionSettings:e.props.multipleSelectionSettings,rowHeight:e.props.rowHeight,hasChildren:s,tableClassName:e.props.className,onRowClick:e.props.onRowClick,onRowMouseEnter:e.props.onRowMouseEnter,onRowMouseLeave:e.props.onRowMouseLeave,onRowWillMount:e.props.onRowWillMount,onRowWillUnmount:e.props.onRowWillUnmount})}));if(this.props.showNoData){var h=this.props.columnSettings.getVisibleColumnCount();f.push(r.createElement("tr",{key:"no-data-section"},r.createElement("td",{colSpan:h},this.props.noDataSection)))}return o&&f.unshift(o),s&&f.push(s),{nodes:f,anyHasChildren:t}}return null},render:function(){var e=[],t=!1,n=this.getNodeContent();n&&(e=n.nodes,t=n.anyHasChildren);var o=null,i=null,a={width:"100%"};if(this.props.useFixedLayout&&(a.tableLayout="fixed"),this.props.enableInfiniteScroll&&(o={position:"relative",overflowY:"scroll",height:this.props.bodyHeight+"px",width:"100%"}),this.props.externalIsLoading){var l,u=null;this.props.useGriddleStyles&&(u={textAlign:"center",paddingBottom:"40px"}),l=this.props.columnSettings.getVisibleColumnCount();var c=this.props.externalLoadingComponent?r.createElement(this.props.externalLoadingComponent,null):r.createElement("div",null,"Loading...");i=r.createElement("tbody",null,r.createElement("tr",null,r.createElement("td",{style:u,colSpan:l},c)))}var p=this.props.showTableHeading?r.createElement(s,{useGriddleStyles:this.props.useGriddleStyles,useGriddleIcons:this.props.useGriddleIcons,sortSettings:this.props.sortSettings,multipleSelectionSettings:this.props.multipleSelectionSettings,columnSettings:this.props.columnSettings,filterByColumn:this.props.filterByColumn,rowSettings:this.props.rowSettings}):void 0;t||(e=r.createElement("tbody",null,e));var d=r.createElement("tbody",null);if(this.props.showPager){var f=this.props.useGriddleStyles?{padding:"0px",backgroundColor:"#EDEDED",border:"0px",color:"#222",height:this.props.showNoData?"20px":null}:null;d=r.createElement("tbody",null,r.createElement("tr",null,r.createElement("td",{colSpan:this.props.multipleSelectionSettings.isMultipleSelection?this.props.columnSettings.getVisibleColumnCount()+1:this.props.columnSettings.getVisibleColumnCount(),style:f,className:"footer-container"},this.props.showNoData?null:this.props.pagingContent)))}return this.props.useFixedHeader?(this.props.useGriddleStyles&&(a.tableLayout="fixed"),r.createElement("div",null,r.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&a||null},p),r.createElement("div",{ref:"scrollable",onScroll:this.gridScroll,style:o},r.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&a||null},e,i,d)))):r.createElement("div",{ref:"scrollable",onScroll:this.gridScroll,style:o},r.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&a||null},p,e,i,d))}}));e.exports=a},4769:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t=0)return!0}return!1}))},defaultColumnFilter:function(e,t,n){var r=A(M(n)?n:[n],(function(e){return(e||"").toLowerCase()}));return V(C.getObjectValues(t),(function(e){return e=e.toString().toLowerCase(),V(r,(function(t){return e.indexOf(t)>=0}))}))},filterByColumnFilters:function(e){var t=this.props.columnFilterFunc||this.defaultColumnFilter,n=Object.keys(e).reduce((function(n,r){return D(n,(function(n){var o=C.getAt(n,r||""),s=e[r];return t(r||"",o,s)}))}),this.props.results),r={columnFilters:e};e?(r.filteredResults=n,r.maxPage=this.getMaxPage(r.filteredResults)):this.state.filter?r.filteredResults=this.props.useCustomFilterer?this.props.customFilterer(this.props.results,filter):this.defaultFilter(this.props.results,filter):r.filteredResults=null,this.setState(r)},filterByColumn:function(e,t){var n=this.state.columnFilters;if(n.hasOwnProperty(t)&&!e)n=N(n,t);else{var r={};r[t]=e,n=T({},n,r)}this.filterByColumnFilters(n)},setFilter:function(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(this.props.useExternal)this.props.externalSetFilter(e);else{var n={page:0,filter:e};n.filteredResults=this.props.useCustomFilterer?this.props.customFilterer(t||this.props.results,e):this.defaultFilter(t||this.props.results,e),n.maxPage=this.getMaxPage(n.filteredResults),(j(e)||O(e)||R(e))&&(n.filter=e,n.filteredResults=null),this.setState(n),this._resetSelectedRows()}},setPageSize:function(e){if(this.props.useExternal)return this.setState({resultsPerPage:e}),void this.props.externalSetPageSize(e);this.state.resultsPerPage=e,this.setMaxPage()},toggleColumnChooser:function(){this.setState({showColumnChooser:!this.state.showColumnChooser})},isNullOrUndefined:function(e){return null==e},shouldUseCustomRowComponent:function(){return this.isNullOrUndefined(this.state.useCustomRowComponent)?this.props.useCustomRowComponent:this.state.useCustomRowComponent},shouldUseCustomGridComponent:function(){return this.isNullOrUndefined(this.state.useCustomGridComponent)?this.props.useCustomGridComponent:this.state.useCustomGridComponent},toggleCustomComponent:function(){"grid"===this.state.customComponentType?this.setState({useCustomGridComponent:!this.shouldUseCustomGridComponent()}):"row"===this.state.customComponentType&&this.setState({useCustomRowComponent:!this.shouldUseCustomRowComponent()})},getMaxPage:function(e,t){return this.props.useExternal?this.props.externalMaxPage:(t||(t=(e||this.getCurrentResults()).length),Math.ceil(t/this.state.resultsPerPage))},setMaxPage:function(e){var t=this.getMaxPage(e);this.state.maxPage!==t&&this.setState({page:0,maxPage:t,filteredColumns:this.columnSettings.filteredColumns})},setPage:function(e){if(this.props.useExternal)this.props.externalSetPage(e);else{if(e*this.state.resultsPerPage<=this.state.resultsPerPage*this.state.maxPage){var t={page:e};this.setState(t)}this.props.enableInfiniteScroll&&this.setState({isSelectAllChecked:!1})}},setColumns:function(e){this.columnSettings.filteredColumns=M(e)?e:[e],this.setState({filteredColumns:this.columnSettings.filteredColumns})},nextPage:function(){var e=this.getCurrentPage();e0&&this.setPage(e-1)},changeSort:function(e){if(!1!==this.props.enableSort){if(this.props.useExternal){var t=this.props.externalSortColumn!==e||!this.props.externalSortAscending;return this.setState({sortColumn:e,sortDirection:t?"asc":"desc"}),void this.props.externalChangeSort(e,t)}var n=x(this.props.columnMetadata,{columnName:e})||{},r=n.sortDirectionCycle?n.sortDirectionCycle:[null,"asc","desc"],o=r.indexOf(this.state.sortDirection&&e===this.state.sortColumn?this.state.sortDirection:null),s={page:0,sortColumn:e,sortDirection:r[o=(o+1)%r.length]?r[o]:null};this.setState(s)}},componentWillReceiveProps:function(e){if(e.results!==this.props.results&&this.setFilter(this.state.filter,e.results),this.setMaxPage(e.results),e.resultsPerPage!==this.props.resultsPerPage&&this.setPageSize(e.resultsPerPage),this.columnSettings.columnMetadata=e.columnMetadata,e.results.length>0){var t=C.keys(e.results[0]);this.columnSettings.allColumns.length==t.length&&this.columnSettings.allColumns.every((function(e,n){return e===t[n]}))||(this.columnSettings.allColumns=t)}else this.columnSettings.allColumns.length>0&&(this.columnSettings.allColumns=[]);if(e.selectedRowIds){var n=this.getDataForRender(this.getCurrentResults(e.results),this.columnSettings.getColumns(),!0);this.setState({isSelectAllChecked:this._getAreAllRowsChecked(e.selectedRowIds,A(n,this.props.uniqueIdentifier)),selectedRowIds:e.selectedRowIds})}},getInitialState:function(){return{maxPage:0,page:0,filteredResults:null,filteredColumns:[],filter:"",columnFilters:{},resultsPerPage:this.props.resultsPerPage||5,showColumnChooser:!1,isSelectAllChecked:!1,selectedRowIds:this.props.selectedRowIds}},componentWillMount:function(){this.verifyExternal(),this.verifyCustom(),this.columnSettings=new v(this.props.results.length>0?C.keys(this.props.results[0]):[],this.props.columns,this.props.childrenColumnName,this.props.columnMetadata,this.props.metadataColumns),this.rowSettings=new y(this.props.rowMetadata,this.props.useCustomTableRowComponent&&this.props.customTableRowComponent?this.props.customTableRowComponent:d,this.props.useCustomTableRowComponent),this.props.initialSort&&(this.props.useExternal?this.setState({sortColumn:this.props.externalSortColumn,sortDirection:this.props.externalSortAscending?"asc":"desc"}):this.changeSort(this.props.initialSort)),this.setMaxPage(),this.shouldUseCustomGridComponent()?this.setState({customComponentType:"grid"}):this.shouldUseCustomRowComponent()?this.setState({customComponentType:"row"}):this.setState({filteredColumns:this.columnSettings.filteredColumns})},componentDidMount:function(){if(this.props.componentDidMount&&"function"==typeof this.props.componentDidMount)return this.props.componentDidMount()},componentDidUpdate:function(){if(this.props.componentDidUpdate&&"function"==typeof this.props.componentDidUpdate)return this.props.componentDidUpdate(this.state)},verifyExternal:function(){!0===this.props.useExternal&&(null===this.props.externalSetPage&&console.error("useExternal is set to true but there is no externalSetPage function specified."),null===this.props.externalChangeSort&&console.error("useExternal is set to true but there is no externalChangeSort function specified."),null===this.props.externalSetFilter&&console.error("useExternal is set to true but there is no externalSetFilter function specified."),null===this.props.externalSetPageSize&&console.error("useExternal is set to true but there is no externalSetPageSize function specified."),null===this.props.externalMaxPage&&console.error("useExternal is set to true but externalMaxPage is not set."),null===this.props.externalCurrentPage&&console.error("useExternal is set to true but externalCurrentPage is not set. Griddle will not page correctly without that property when using external data."))},verifyCustom:function(){!0===this.props.useCustomGridComponent&&null===this.props.customGridComponent&&console.error("useCustomGridComponent is set to true but no custom component was specified."),!0===this.props.useCustomRowComponent&&null===this.props.customRowComponent&&console.error("useCustomRowComponent is set to true but no custom component was specified."),!0===this.props.useCustomGridComponent&&!0===this.props.useCustomRowComponent&&console.error("Cannot currently use both customGridComponent and customRowComponent."),!0===this.props.useCustomFilterer&&null===this.props.customFilterer&&console.error("useCustomFilterer is set to true but no custom filter function was specified."),!0===this.props.useCustomFilterComponent&&null===this.props.customFilterComponent&&console.error("useCustomFilterComponent is set to true but no customFilterComponent was specified.")},getDataForRender:function(e,t,n){var r=this,o=this;if(!this.props.useExternal){if(""!==this.state.sortColumn){var s,i=this.state.sortColumn,a=D(this.props.columnMetadata,{columnName:i}),l={columns:[],orders:[]};if(a.length>0&&(s=a[0].hasOwnProperty("customCompareFn")&&a[0].customCompareFn,a[0].multiSort&&(l=a[0].multiSort)),this.state.sortDirection)if("function"==typeof s)2===s.length?(e=e.sort((function(e,t){return s(F(e,i),F(t,i))})),"desc"===this.state.sortDirection&&e.reverse()):1===s.length&&(e=I(e,(function(e){return s(F(e,i))}),[this.state.sortDirection]));else{var u=[function(e){return(F(e,i)||"").toString().toLowerCase()}],c=[this.state.sortDirection];l.columns.forEach((function(e,t){u.push((function(t){return(F(t,e)||"").toString().toLowerCase()})),"asc"===l.orders[t]||"desc"===l.orders[t]?c.push(l.orders[t]):c.push(r.state.sortDirection)})),e=I(e,u,c)}}var p=this.getCurrentPage();if(!this.props.useExternal&&n&&this.state.resultsPerPage*(p+1)<=this.state.resultsPerPage*this.state.maxPage&&p>=0)if(this.isInfiniteScrollEnabled())e=S(e,(p+1)*this.state.resultsPerPage);else{var d=b(e,p*this.state.resultsPerPage);e=(w||E)(d,d.length-this.state.resultsPerPage)}}for(var f=[],h=0;h0&&(m.children=o.getDataForRender(m[o.props.childrenColumnName],t,!1),"children"!==o.props.childrenColumnName&&delete m[o.props.childrenColumnName]),f.push(m)}return f},getCurrentResults:function(e){return this.state.filteredResults||e||this.props.results},getCurrentPage:function(){return this.props.externalCurrentPage||this.state.page},getCurrentSort:function(){return this.props.useExternal?this.props.externalSortColumn:this.state.sortColumn},getCurrentSortAscending:function(){return this.props.useExternal?this.props.externalSortAscending:"asc"===this.state.sortDirection},getCurrentMaxPage:function(){return this.props.useExternal?this.props.externalMaxPage:this.state.maxPage},getSortObject:function(){return{enableSort:this.props.enableSort,changeSort:this.changeSort,sortColumn:this.getCurrentSort(),sortAscending:this.getCurrentSortAscending(),sortDirection:this.state.sortDirection,sortAscendingClassName:this.props.sortAscendingClassName,sortDescendingClassName:this.props.sortDescendingClassName,sortAscendingComponent:this.props.sortAscendingComponent,sortDescendingComponent:this.props.sortDescendingComponent,sortDefaultComponent:this.props.sortDefaultComponent}},_toggleSelectAll:function(){var e=this.getDataForRender(this.getCurrentResults(),this.columnSettings.getColumns(),!0),t=!this.state.isSelectAllChecked,n=JSON.parse(JSON.stringify(this.state.selectedRowIds)),r=this;_(e,(function(e){r._updateSelectedRowIds(e[r.props.uniqueIdentifier],n,t)}),this),this.setState({isSelectAllChecked:t,selectedRowIds:n}),this.props.onSelectionChange&&this.props.onSelectionChange(n,t)},_toggleSelectRow:function(e,t){var n=this.getDataForRender(this.getCurrentResults(),this.columnSettings.getColumns(),!0),r=JSON.parse(JSON.stringify(this.state.selectedRowIds));this._updateSelectedRowIds(e[this.props.uniqueIdentifier],r,t);var o=this._getAreAllRowsChecked(r,A(n,this.props.uniqueIdentifier));this.setState({isSelectAllChecked:o,selectedRowIds:r}),this.props.onSelectionChange&&this.props.onSelectionChange(r,o)},_updateSelectedRowIds:function(e,t,n){n?void 0===x(t,(function(t){return e===t}))&&t.push(e):t.splice(t.indexOf(e),1)},_getIsSelectAllChecked:function(){return this.state.isSelectAllChecked},_getAreAllRowsChecked:function(e,t){return t.length===P(t,e).length},_getIsRowChecked:function(e){return this.state.selectedRowIds.indexOf(e[this.props.uniqueIdentifier])>-1},getSelectedRowIds:function(){return this.state.selectedRowIds},_resetSelectedRows:function(){this.setState({isSelectAllChecked:!1,selectedRowIds:[]})},getMultipleSelectionObject:function(){return{isMultipleSelection:!x(this.props.results,(function(e){return"children"in e}))&&this.props.isMultipleSelection,toggleSelectAll:this._toggleSelectAll,getIsSelectAllChecked:this._getIsSelectAllChecked,toggleSelectRow:this._toggleSelectRow,getSelectedRowIds:this.getSelectedRowIds,getIsRowChecked:this._getIsRowChecked}},isInfiniteScrollEnabled:function(){return!this.props.useCustomPagerComponent&&this.props.enableInfiniteScroll},getClearFixStyles:function(){return{clear:"both",display:"table",width:"100%"}},getSettingsStyles:function(){return{float:"left",width:"50%",textAlign:"right"}},getFilterStyles:function(){return{float:"left",width:"50%",textAlign:"left",color:"#222",minHeight:"1px"}},getFilter:function(){return this.props.showFilter&&!1===this.shouldUseCustomGridComponent()?this.props.useCustomFilterComponent?o.createElement(g,{changeFilter:this.setFilter,placeholderText:this.props.filterPlaceholderText,customFilterComponent:this.props.customFilterComponent,results:this.props.results,currentResults:this.getCurrentResults()}):o.createElement(l,{changeFilter:this.setFilter,placeholderText:this.props.filterPlaceholderText}):""},getSettings:function(){return this.props.showSettings?o.createElement("button",{type:"button",className:this.props.settingsToggleClassName,onClick:this.toggleColumnChooser,style:this.props.useGriddleStyles?{background:"none",border:"none",padding:0,margin:0,fontSize:14}:null},this.props.settingsText,this.props.settingsIconComponent):""},getTopSection:function(e,t){if(!1===this.props.showFilter&&!1===this.props.showSettings)return"";var n=null,r=null,s=null;return this.props.useGriddleStyles&&(n=this.getFilterStyles(),r=this.getSettingsStyles(),s=this.getClearFixStyles()),o.createElement("div",{className:"top-section",style:s},o.createElement("div",{className:"griddle-filter",style:n},e),o.createElement("div",{className:"griddle-settings-toggle",style:r},t))},getPagingSection:function(e,t){if(!1!==(this.props.showPager&&!this.isInfiniteScrollEnabled()&&!this.shouldUseCustomGridComponent()))return o.createElement("div",{className:"griddle-footer"},this.props.useCustomPagerComponent?o.createElement(m,{customPagerComponentOptions:this.props.customPagerComponentOptions,next:this.nextPage,previous:this.previousPage,currentPage:e,maxPage:t,setPage:this.setPage,nextText:this.props.nextText,previousText:this.props.previousText,customPagerComponent:this.props.customPagerComponent}):o.createElement(u,{useGriddleStyles:this.props.useGriddleStyles,next:this.nextPage,previous:this.previousPage,nextClassName:this.props.nextClassName,nextIconComponent:this.props.nextIconComponent,previousClassName:this.props.previousClassName,previousIconComponent:this.props.previousIconComponent,currentPage:e,maxPage:t,setPage:this.setPage,nextText:this.props.nextText,previousText:this.props.previousText}))},getColumnSelectorSection:function(e,t){return this.state.showColumnChooser?o.createElement(c,{columns:e,selectedColumns:t,setColumns:this.setColumns,settingsText:this.props.settingsText,settingsIconComponent:this.props.settingsIconComponent,maxRowsText:this.props.maxRowsText,setPageSize:this.setPageSize,showSetPageSize:!this.shouldUseCustomGridComponent(),resultsPerPage:this.state.resultsPerPage,enableToggleCustom:this.props.enableToggleCustom,toggleCustomComponent:this.toggleCustomComponent,useCustomComponent:this.shouldUseCustomRowComponent()||this.shouldUseCustomGridComponent(),useGriddleStyles:this.props.useGriddleStyles,enableCustomFormatText:this.props.enableCustomFormatText,columnMetadata:this.props.columnMetadata}):""},getCustomGridSection:function(){return o.createElement(this.props.customGridComponent,r({data:this.props.results,className:this.props.customGridComponentClassName},this.props.gridMetadata))},getCustomRowSection:function(e,t,n,r,s){return o.createElement("div",null,o.createElement(h,{data:e,columns:t,metadataColumns:n,globalData:s,className:this.props.customRowComponentClassName,customComponent:this.props.customRowComponent,style:this.props.useGriddleStyles?this.getClearFixStyles():null}),this.props.showPager&&r)},getStandardGridSection:function(e,t,n,r,s){var i=this.getSortObject(),l=this.getMultipleSelectionObject(),u=this.shouldShowNoDataSection(e),c=this.getNoDataSection();return o.createElement("div",{className:"griddle-body"},o.createElement(a,{useGriddleStyles:this.props.useGriddleStyles,noDataSection:c,showNoData:u,columnSettings:this.columnSettings,rowSettings:this.rowSettings,sortSettings:i,multipleSelectionSettings:l,filterByColumn:this.filterByColumn,isSubGriddle:this.props.isSubGriddle,useGriddleIcons:this.props.useGriddleIcons,useFixedLayout:this.props.useFixedLayout,showPager:this.props.showPager,pagingContent:r,data:e,className:this.props.tableClassName,enableInfiniteScroll:this.isInfiniteScrollEnabled(),nextPage:this.nextPage,showTableHeading:this.props.showTableHeading,useFixedHeader:this.props.useFixedHeader,parentRowCollapsedClassName:this.props.parentRowCollapsedClassName,parentRowExpandedClassName:this.props.parentRowExpandedClassName,parentRowCollapsedComponent:this.props.parentRowCollapsedComponent,parentRowExpandedComponent:this.props.parentRowExpandedComponent,bodyHeight:this.props.bodyHeight,paddingHeight:this.props.paddingHeight,rowHeight:this.props.rowHeight,infiniteScrollLoadTreshold:this.props.infiniteScrollLoadTreshold,externalLoadingComponent:this.props.externalLoadingComponent,externalIsLoading:this.props.externalIsLoading,hasMorePages:s,onRowClick:this.props.onRowClick,onRowMouseEnter:this.props.onRowMouseEnter,onRowMouseLeave:this.props.onRowMouseLeave,onRowWillMount:this.props.onRowWillMount,onRowWillUnmount:this.props.onRowWillUnmount}))},getContentSection:function(e,t,n,r,o,s){return this.shouldUseCustomGridComponent()&&null!==this.props.customGridComponent?this.getCustomGridSection():this.shouldUseCustomRowComponent()?this.getCustomRowSection(e,t,n,r,s):this.getStandardGridSection(e,t,n,r,o)},getNoDataSection:function(){return null!=this.props.customNoDataComponent?o.createElement("div",{className:this.props.noDataClassName},o.createElement(this.props.customNoDataComponent,this.props.customNoDataComponentProps)):o.createElement(p,{noDataMessage:this.props.noDataMessage})},shouldShowNoDataSection:function(e){return!this.props.allowEmptyGrid&&(!1===this.props.useExternal&&(void 0===e||0===e.length)||!0===this.props.useExternal&&!1===this.props.externalIsLoading&&0===e.length)},render:function(){var e=this.getCurrentResults(),t=(this.props.tableClassName,this.getFilter()),n=this.getSettings(),r=this.getTopSection(t,n),s=[],i=this.columnSettings.getColumns(),a=this.getDataForRender(e,i,!0),l=this.columnSettings.getMetadataColumns();this.props.columnMetadata?_(this.props.columnMetadata,(function(e){"boolean"==typeof e.visible&&!1===e.visible||s.push(e.columnName)})):s=C.keys(N(e[0],l)),s=this.columnSettings.orderColumns(s);var u=this.getCurrentPage(),c=this.getCurrentMaxPage(),p=u+10?"griddle "+this.props.gridClassName:"griddle";return m+=this.shouldUseCustomRowComponent()?" griddle-custom":"",o.createElement("div",{className:m},r,h,o.createElement("div",{className:"griddle-container",style:this.props.useGriddleStyles&&!this.props.isSubGriddle?{border:"1px solid #DDD"}:null},f))}});f.Griddle=e.exports=k},5203:function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n-1}},1196:function(e){e.exports=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r=200&&(p=l,d=!1,t=new r(t));e:for(;++c0&&s(c)?n>1?e(c,n-1,s,i,a):r(a,c):i||(a[a.length]=c)}return a}},8483:function(e,t,n){var r=n(5063)();e.exports=r},7816:function(e,t,n){var r=n(8483),o=n(3674);e.exports=function(e,t){return e&&r(e,t,o)}},7786:function(e,t,n){var r=n(1811),o=n(327);e.exports=function(e,t){for(var n=0,s=(t=r(t,e)).length;null!=e&&n=120&&v.length>=120)?new r(f&&v):void 0}v=e[0];var y=-1,C=h[0];e:for(;++yo?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(o);++rt||i&&a&&u&&!l&&!c||o&&a&&u||!n&&u||!s)return 1;if(!o&&!i&&!c&&e=l?u:u*("desc"==n[o]?-1:1)}return e.index-t.index}},278:function(e){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1?n[s-1]:void 0,a=s>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(s--,i):void 0,a&&o(n[0],n[1],a)&&(i=s<3?void 0:i,s=1),t=Object(t);++r-1?a[l?t[u]:u]:void 0}}},3866:function(e,t,n){var r=n(8969),o=n(4160),s=n(8776),i=n(9294);e.exports=function(e){return function(t){var n=o(t);return"[object Map]"==n?s(t):"[object Set]"==n?i(t):r(t,e(t))}}},696:function(e,t,n){var r=n(8630);e.exports=function(e){return r(e)?void 0:e}},8777:function(e,t,n){var r=n(852),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},7114:function(e,t,n){var r=n(8668),o=n(2908),s=n(4757);e.exports=function(e,t,n,i,a,l){var u=1&n,c=e.length,p=t.length;if(c!=p&&!(u&&p>c))return!1;var d=l.get(e),f=l.get(t);if(d&&f)return d==t&&f==e;var h=-1,m=!0,g=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++h-1&&e%1==0&&e-1}},4705:function(e,t,n){var r=n(8470);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},4785:function(e,t,n){var r=n(1989),o=n(8407),s=n(7071);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(s||o),string:new r}}},1285:function(e,t,n){var r=n(5050);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},6e3:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).get(e)}},9916:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).has(e)}},5265:function(e,t,n){var r=n(5050);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},8776:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},2634:function(e){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},4523:function(e,t,n){var r=n(8306);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},4536:function(e,t,n){var r=n(852)(Object,"create");e.exports=r},6916:function(e,t,n){var r=n(5569)(Object.keys,Object);e.exports=r},3498:function(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},1167:function(e,t,n){e=n.nmd(e);var r=n(1957),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,i=s&&s.exports===o&&r.process,a=function(){try{var e=s&&s.require&&s.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=a},2333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},5357:function(e,t,n){var r=n(6874),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var s=arguments,i=-1,a=o(s.length-t,0),l=Array(a);++i0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},7465:function(e,t,n){var r=n(8407);e.exports=function(){this.__data__=new r,this.size=0}},3779:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},7599:function(e){e.exports=function(e){return this.__data__.get(e)}},4758:function(e){e.exports=function(e){return this.__data__.has(e)}},4309:function(e,t,n){var r=n(8407),o=n(7071),s=n(3369);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new s(i)}return n.set(e,t),this.size=n.size,this}},2351:function(e){e.exports=function(e,t,n){for(var r=n-1,o=e.length;++r2?t[2]:void 0;for(u&&s(t[0],t[1],u)&&(r=1);++n-1:!!c&&r(e,t,n)>-1}},8125:function(e,t,n){var r=n(4259);e.exports=function(e){return(null==e?0:e.length)?r(e,0,-1):[]}},5325:function(e,t,n){var r=n(9932),o=n(7556),s=n(5976),i=n(4387),a=s((function(e){var t=r(e,i);return t.length&&t[0]===e[0]?o(t):[]}));e.exports=a},5694:function(e,t,n){var r=n(9454),o=n(7005),s=Object.prototype,i=s.hasOwnProperty,a=s.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return o(e)&&i.call(e,"callee")&&!a.call(e,"callee")};e.exports=l},1469:function(e){var t=Array.isArray;e.exports=t},8612:function(e,t,n){var r=n(3560),o=n(1780);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},9246:function(e,t,n){var r=n(8612),o=n(7005);e.exports=function(e){return o(e)&&r(e)}},4144:function(e,t,n){e=n.nmd(e);var r=n(5639),o=n(5062),s=t&&!t.nodeType&&t,i=s&&e&&!e.nodeType&&e,a=i&&i.exports===s?r.Buffer:void 0,l=(a?a.isBuffer:void 0)||o;e.exports=l},1609:function(e,t,n){var r=n(280),o=n(4160),s=n(5694),i=n(1469),a=n(8612),l=n(4144),u=n(5726),c=n(6719),p=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(a(e)&&(i(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||c(e)||s(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(u(e))return!r(e).length;for(var n in e)if(p.call(e,n))return!1;return!0}},3560:function(e,t,n){var r=n(4239),o=n(3218);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},6688:function(e,t,n){var r=n(5588),o=n(1717),s=n(1167),i=s&&s.isMap,a=i?o(i):r;e.exports=a},5220:function(e){e.exports=function(e){return null===e}},3218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},8630:function(e,t,n){var r=n(4239),o=n(5924),s=n(7005),i=Function.prototype,a=Object.prototype,l=i.toString,u=a.hasOwnProperty,c=l.call(Object);e.exports=function(e){if(!s(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==c}},2928:function(e,t,n){var r=n(9221),o=n(1717),s=n(1167),i=s&&s.isSet,a=i?o(i):r;e.exports=a},7037:function(e,t,n){var r=n(4239),o=n(1469),s=n(7005);e.exports=function(e){return"string"==typeof e||!o(e)&&s(e)&&"[object String]"==r(e)}},3448:function(e,t,n){var r=n(4239),o=n(7005);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},6719:function(e,t,n){var r=n(8749),o=n(1717),s=n(1167),i=s&&s.isTypedArray,a=i?o(i):r;e.exports=a},2353:function(e){e.exports=function(e){return void 0===e}},3674:function(e,t,n){var r=n(4636),o=n(280),s=n(8612);e.exports=function(e){return s(e)?r(e):o(e)}},1704:function(e,t,n){var r=n(4636),o=n(313),s=n(8612);e.exports=function(e){return s(e)?r(e,!0):o(e)}},928:function(e){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},5161:function(e,t,n){var r=n(9932),o=n(7206),s=n(9199),i=n(1469);e.exports=function(e,t){return(i(e)?r:s)(e,o(t,3))}},8306:function(e,t,n){var r=n(3369);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],s=n.cache;if(s.has(o))return s.get(o);var i=e.apply(this,r);return n.cache=s.set(o,i)||s,i};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},7557:function(e,t,n){var r=n(9932),o=n(5990),s=n(7406),i=n(1811),a=n(8363),l=n(696),u=n(9021),c=n(6904),p=u((function(e,t){var n={};if(null==e)return n;var u=!1;t=r(t,(function(t){return t=i(t,e),u||(u=t.length>1),t})),a(e,c(e),n),u&&(n=o(n,7,l));for(var p=t.length;p--;)s(n,t[p]);return n}));e.exports=p},5472:function(e,t,n){var r=n(2689),o=n(1469);e.exports=function(e,t,n,s){return null==e?[]:(o(t)||(t=null==t?[]:[t]),o(n=s?void 0:n)||(n=null==n?[]:[n]),r(e,t,n))}},8718:function(e,t,n){var r=n(5970),o=n(9021)((function(e,t){return null==e?{}:r(e,t)}));e.exports=o},9601:function(e,t,n){var r=n(371),o=n(9152),s=n(5403),i=n(327);e.exports=function(e){return s(e)?r(i(e)):o(e)}},9704:function(e,t,n){var r=n(2908),o=n(7206),s=n(5076),i=n(1469),a=n(6612);e.exports=function(e,t,n){var l=i(e)?r:s;return n&&a(e,t,n)&&(t=void 0),l(e,o(t,3))}},9734:function(e,t,n){var r=n(1078),o=n(2689),s=n(5976),i=n(6612),a=s((function(e,t){if(null==e)return[];var n=t.length;return n>1&&i(e,t[0],t[1])?t=[]:n>2&&i(t[0],t[1],t[2])&&(t=[t[0]]),o(e,r(t,1),[])}));e.exports=a},479:function(e){e.exports=function(){return[]}},5062:function(e){e.exports=function(){return!1}},9572:function(e,t,n){var r=n(4259),o=n(554);e.exports=function(e,t,n){return e&&e.length?(t=n||void 0===t?1:o(t),r(e,0,t<0?0:t)):[]}},8601:function(e,t,n){var r=n(4841),o=1/0;e.exports=function(e){return e?(e=r(e))===o||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},554:function(e,t,n){var r=n(8601);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},4841:function(e,t,n){var r=n(7561),o=n(3218),s=n(3448),i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(s(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=a.test(e);return n||l.test(e)?u(e.slice(2),n?2:8):i.test(e)?NaN:+e}},3220:function(e,t,n){var r=n(3866)(n(3674));e.exports=r},9833:function(e,t,n){var r=n(531);e.exports=function(e){return null==e?"":r(e)}},3955:function(e,t,n){var r=n(9833),o=0;e.exports=function(e){var t=++o;return r(e)+t}},2628:function(e,t,n){var r=n(7415),o=n(3674);e.exports=function(e){return null==e?[]:r(e,o(e))}},2569:function(e,t,n){var r=n(731),o=n(5976),s=n(9246),i=o((function(e,t){return s(e)?r(e,t):[]}));e.exports=i},7287:function(e,t,n){var r=n(4865),o=n(1757);e.exports=function(e,t){return o(e||[],t||[],r)}},7418:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var s,i,a=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l>>9<<4)+1}function r(e,t){const n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function o(e,t,n,o,s,i){return r((a=r(r(t,e),r(o,i)))<<(l=s)|a>>>32-l,n);var a,l}function s(e,t,n,r,s,i,a){return o(t&n|~t&r,e,t,s,i,a)}function i(e,t,n,r,s,i,a){return o(t&r|n&~r,e,t,s,i,a)}function a(e,t,n,r,s,i,a){return o(t^n^r,e,t,s,i,a)}function l(e,t,n,r,s,i,a){return o(n^(t|~r),e,t,s,i,a)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var u=function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let n=0;n>5]>>>o%32&255,s=parseInt(r.charAt(n>>>4&15)+r.charAt(15&n),16);t.push(s)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[n/8])<>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n};t.default=s},58:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},3319:function(e,t){"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!n&&(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!n))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(r)};const r=new Uint8Array(16)},3757:function(e,t){"use strict";function n(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function r(e,t){return e<>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e){const t=[1518500249,1859775393,2400959708,3395469782],o=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let n=0;n>>0;p=c,c=u,u=r(l,30)>>>0,l=i,i=a}o[0]=o[0]+i>>>0,o[1]=o[1]+l>>>0,o[2]=o[2]+u>>>0,o[3]=o[3]+c>>>0,o[4]=o[4]+p>>>0}return[o[0]>>24&255,o[0]>>16&255,o[0]>>8&255,255&o[0],o[1]>>24&255,o[1]>>16&255,o[1]>>8&255,255&o[1],o[2]>>24&255,o[2]>>16&255,o[2]>>8&255,255&o[2],o[3]>>24&255,o[3]>>16&255,o[3]>>8&255,255&o[3],o[4]>>24&255,o[4]>>16&255,o[4]>>8&255,255&o[4]]};t.default=o},4008:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.unsafeStringify=i;var r,o=(r=n(6435))&&r.__esModule?r:{default:r};const s=[];for(let e=0;e<256;++e)s.push((e+256).toString(16).slice(1));function i(e,t=0){return(s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]).toLowerCase()}var a=function(e,t=0){const n=i(e,t);if(!(0,o.default)(n))throw TypeError("Stringified UUID is invalid");return n};t.default=a},3990:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(3319))&&r.__esModule?r:{default:r},s=n(4008);let i,a,l=0,u=0;var c=function(e,t,n){let r=t&&n||0;const c=t||new Array(16);let p=(e=e||{}).node||i,d=void 0!==e.clockseq?e.clockseq:a;if(null==p||null==d){const t=e.random||(e.rng||o.default)();null==p&&(p=i=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==d&&(d=a=16383&(t[6]<<8|t[7]))}let f=void 0!==e.msecs?e.msecs:Date.now(),h=void 0!==e.nsecs?e.nsecs:u+1;const m=f-l+(h-u)/1e4;if(m<0&&void 0===e.clockseq&&(d=d+1&16383),(m<0||f>l)&&void 0===e.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=f,u=h,a=d,f+=122192928e5;const g=(1e4*(268435455&f)+h)%4294967296;c[r++]=g>>>24&255,c[r++]=g>>>16&255,c[r++]=g>>>8&255,c[r++]=255&g;const v=f/4294967296*1e4&268435455;c[r++]=v>>>8&255,c[r++]=255&v,c[r++]=v>>>24&15|16,c[r++]=v>>>16&255,c[r++]=d>>>8|128,c[r++]=255&d;for(let e=0;e<6;++e)c[r+e]=p[e];return t||(0,s.unsafeStringify)(c)};t.default=c},8237:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(7925)),o=s(n(4163));function s(e){return e&&e.__esModule?e:{default:e}}var i=(0,r.default)("v3",48,o.default);t.default=i},7925:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0,t.default=function(e,t,n){function r(e,r,i,a){var l;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let n=0;n{(0,r.default)(),(0,o.default)()}))},9521:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=d(n(6648)),o=d(n(4065)),s=d(n(9559)),i=d(n(9769)),a=d(n(3461)),l=d(n(2477)),u=d(n(8488)),c=d(n(5385)),p=d(n(1553));function d(e){return e&&e.__esModule?e:{default:e}}t.default=()=>{r.default.component.registerMany({HistoryViewer:o.default,HistoryViewerHeading:s.default,HistoryViewerToolbar:i.default,HistoryViewerVersion:a.default,HistoryViewerVersionDetail:l.default,HistoryViewerVersionList:u.default,HistoryViewerVersionState:c.default,HistoryViewerCompareWarning:p.default})}},4180:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(6648)),o=n(2827),s=i(n(7908));function i(e){return e&&e.__esModule?e:{default:e}}t.default=()=>{r.default.reducer.register("versionedAdmin",(0,o.combineReducers)({historyViewer:s.default}))}},4065:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=b(n(7363)),o=n(2827),s=n(1624),i=y(n(8345)),a=y(n(2291)),l=y(n(4754)),u=n(6648),c=y(n(1264)),p=n(6215),d=n(185),f=n(1118),h=y(n(7820)),m=y(n(6104)),g=b(n(5108)),v=y(n(7086));function y(e){return e&&e.__esModule?e:{default:e}}function C(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(C=function(e){return e?n:t})(e)}function b(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=C(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}return r.default=e,n&&n.set(e,r),r}class w extends r.Component{constructor(e){super(e),this.handleSetPage=this.handleSetPage.bind(this),this.handleNextPage=this.handleNextPage.bind(this),this.handlePrevPage=this.handlePrevPage.bind(this)}componentDidUpdate(e){if(!this.props.actions||!this.props.actions.versions)return;const{page:t}=e,{page:n}=this.props,{actions:{versions:r}}=this.props;t!==n&&"function"==typeof r.goToPage&&r.goToPage(n)}componentWillUnmount(){const{onSelect:e}=this.props;"function"==typeof e&&e(0)}getVersions(){const{versions:e}=this.props;return e&&e.versions&&e.versions.nodes?e.versions.nodes:[]}getContainerClasses(){const{compare:e,isInGridField:t}=this.props;return(0,h.default)("history-viewer","fill-height","panel--scrollable",{"history-viewer__compare-mode":e,"history-viewer--no-margins":t&&!this.isListView()})}getLatestVersion(){const{currentVersion:e}=this.props;if(e&&!0===e.latestDraftVersion)return e;const t=this.getVersions().filter((e=>!0===e.latestDraftVersion));return t.length?t[0]:null}isListView(){const{compare:e,currentVersion:t}=this.props;return!t||!!e&&!(!e.versionFrom||e.versionTo)}handleSetPage(e){const{onSetPage:t}=this.props;"function"==typeof t&&t(e+1)}handleNextPage(){const{page:e}=this.props;this.handleSetPage(e)}handlePrevPage(){const{page:e}=this.props,t=e-1;t<1?this.handleSetPage(t):this.handleSetPage(t-1)}compareModeAvailable(){return this.getVersions().length>1}renderVersionDetail(){const{currentVersion:e,isPreviewable:t,isRevertable:n,recordId:o,recordClass:s,schemaUrl:i,VersionDetailComponent:a,compare:l,compare:{versionFrom:u=!1,versionTo:c=!1},previewState:p}=this.props,d={":id":o,":class":s,":version":e.version},f={":id":o,":class":s,":from":u.version||0,":to":c.version||0},h=l?/:id|:class|:from|:to/g:/:id|:class|:version/g,g=l?f:d,v=l?u:e,y=this.getLatestVersion(),C={isLatestVersion:!l&&y&&y.version===v.version,isPreviewable:t,isRevertable:n,recordId:o,schemaUrl:i.replace(h,(e=>g[e])),version:v,compare:l,compareModeAvailable:this.compareModeAvailable(),previewState:p};return r.default.createElement(m.default,{className:this.getContainerClasses(),onResize:e=>{let{width:t}=e;return this.props.onResize(t)}},r.default.createElement(a,C))}renderPagination(){const{limit:e,page:t,versions:n}=this.props;if(!n)return null;const o=n.versions?n.versions.pageInfo.totalCount:0;if(o<=e)return null;const s={setPage:this.handleSetPage,maxPage:Math.ceil(o/e),next:this.handleNextPage,nextText:l.default._t("HistoryViewer.NEXT","Next"),previous:this.handlePrevPage,previousText:l.default._t("HistoryViewer.PREVIOUS","Previous"),currentPage:t-1,useGriddleStyles:!1};return r.default.createElement("div",{className:"griddle-footer"},r.default.createElement(i.default.GridPagination,s))}renderComparisonSelectionList(){const{compare:{versionFrom:e},ListComponent:t}=this.props;if(!e)return null;const n=(0,h.default)("history-viewer__table","history-viewer__table--comparison-selected");return r.default.createElement(t,{versions:[e],extraClass:n})}renderVersionList(){const{isInGridField:e,ListComponent:t,CompareWarningComponent:n,compare:o,compare:{versionFrom:s}}=this.props;return r.default.createElement("div",{className:this.getContainerClasses()},r.default.createElement(n,null),r.default.createElement("div",{className:e?"":"panel panel--padded panel--scrollable"},this.renderComparisonSelectionList(),r.default.createElement(t,{versions:this.getVersions(),showHeader:!o||o&&!s,compareModeAvailable:this.compareModeAvailable()}),r.default.createElement("div",{className:"history-viewer__pagination"},this.renderPagination())))}renderCompareMode(){const{compare:e}=this.props;return e&&e.versionFrom&&e.versionTo?this.renderVersionDetail():this.renderVersionList()}render(){const{loading:e,compare:t,currentVersion:n}=this.props;return e?r.default.createElement(c.default,null):this.compareModeAvailable()&&t?this.renderCompareMode():n?this.renderVersionDetail():this.renderVersionList()}}t.Component=w,w.propTypes={contextKey:v.default.string,limit:v.default.number,ListComponent:v.default.elementType.isRequired,offset:v.default.number,recordId:v.default.number.isRequired,currentVersion:v.default.oneOfType([v.default.bool,d.versionType]),compare:f.compareType,isInGridField:v.default.bool,isPreviewable:v.default.bool,isRevertable:v.default.bool,VersionDetailComponent:v.default.elementType.isRequired,CompareWarningComponent:v.default.elementType.isRequired,versions:v.default.shape({versions:v.default.shape({pageInfo:v.default.shape({totalCount:v.default.number}),nodes:v.default.arrayOf(d.versionType)})}),page:v.default.number,schemaUrl:v.default.string,previewState:v.default.oneOf(["edit","preview","split"]),actions:v.default.object,onSelect:v.default.func,onSetPage:v.default.func,onResize:v.default.func},w.defaultProps={compare:{},contextKey:"",currentVersion:!1,isInGridField:!1,isPreviewable:!1,schemaUrl:"",versions:{versions:{pageInfo:{totalCount:0},nodes:[]}}};t.default=(0,o.compose)((0,s.connect)((function(e){const{currentPage:t,currentVersion:n,compare:r}=e.versionedAdmin.historyViewer,{activeState:o}=e.viewMode;return{page:t,currentVersion:n,compare:r,previewState:o}}),(function(e){return{onSelect(t){e((0,p.showVersion)(t)),e((0,p.clearMessages)())},onSetPage(t){e((0,p.setCurrentPage)(t))},onResize(t){e(g.enableOrDisableSplitMode(t))}}})),a.default,(0,u.inject)(["HistoryViewerVersionList","HistoryViewerVersionDetail","HistoryViewerCompareWarning"],((e,t,n)=>({ListComponent:e,VersionDetailComponent:t,CompareWarningComponent:n})),(e=>{let{contextKey:t}=e;return`VersionedAdmin.HistoryViewer.${t}`})))(w)},1553:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=l(n(7086)),s=n(1624),i=l(n(4754)),a=n(6215);function l(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}class c extends r.Component{constructor(e){super(e),this.handleDismissCompare=this.handleDismissCompare.bind(this)}handleDismissCompare(){this.props.onDismissCompare()}render(){return this.props.isCompare?r.default.createElement("div",{className:"history-viewer__compare-notice alert alert-info"},r.default.createElement("span",{className:"notice-message"},r.default.createElement("strong",null,i.default._t("HistoryViewer.COMPARE_MODE","Compare mode"),": "),i.default._t("HistoryViewer.SELECT_PROMPT","Select two versions")),r.default.createElement("button",{className:"btn dismiss-button font-icon-cancel",onClick:this.handleDismissCompare},i.default._t("HistoryViewer.EXIT","Exit"))):null}}t.Component=c,c.propTypes={isCompare:o.default.bool.isRequired};t.default=(0,s.connect)((function(e){const{compare:t}=e.versionedAdmin.historyViewer;return{isCompare:!!t}}),(function(e){return{onDismissCompare(){e((0,a.setCompareMode)(!1))}}}))(c)},9559:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=p(n(4754)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(7363)),s=n(8127),i=n(6215),a=n(2827),l=n(1624),u=p(n(7086));function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function p(e){return e&&e.__esModule?e:{default:e}}class d extends o.Component{constructor(e){super(e),this.toggle=this.toggle.bind(this),this.handleCompareModeChange=this.handleCompareModeChange.bind(this),this.state={dropdownOpen:!1}}toggle(){this.setState((e=>({dropdownOpen:!e.dropdownOpen})))}handleCompareModeChange(){const{compareModeSelected:e,onCompareModeUnselect:t,onCompareModeSelect:n}=this.props;e?t():n()}renderDropdown(){const{compareModeAvailable:e,compareModeSelected:t}=this.props,{dropdownOpen:n}=this.state;return e?o.default.createElement(s.Dropdown,{isOpen:n,toggle:this.toggle,className:"history-viewer__actions-dropdown"},o.default.createElement(s.DropdownToggle,{className:"font-icon-sliders"}),o.default.createElement(s.DropdownMenu,{right:!0},o.default.createElement("div",{className:"form-check"},o.default.createElement("input",{id:"history-viewer-compare-two",type:"checkbox",className:"no-change-track history-viewer-heading__compare-mode-checkbox",checked:t,onChange:this.handleCompareModeChange}),o.default.createElement("label",{className:"form-check-label",htmlFor:"history-viewer-compare-two"},r.default._t("HistoryViewerHeading.COMPARE_VERSIONS","Compare two versions"))))):null}render(){return o.default.createElement("li",{className:"history-viewer__heading",role:"row"},o.default.createElement("span",{className:"history-viewer__version-no",role:"columnheader"},"#"),o.default.createElement("span",{className:"history-viewer__version-state",role:"columnheader"},r.default._t("HistoryViewer.Record","Record")),o.default.createElement("span",{className:"history-viewer__author",role:"columnheader"},r.default._t("HistoryViewer.Author","Author")),o.default.createElement("span",{className:"history-viewer__actions",role:"columnheader"},this.renderDropdown()))}}t.Component=d,d.propTypes={compareModeAvailable:u.default.bool,compareModeSelected:u.default.bool,onCompareModeSelect:u.default.func,onCompareModeUnselect:u.default.func},d.defaultProps={compareModeAvailable:!0};t.default=(0,a.compose)((0,l.connect)((function(e){return{compareModeSelected:!!e.versionedAdmin.historyViewer.compare}}),(function(e){return{onCompareModeSelect(){e((0,i.setCompareMode)(!0))},onCompareModeUnselect(){e((0,i.setCompareMode)(!1))}}})))(d)},9769:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=c(n(7086)),s=n(2827),i=n(1624),a=c(n(4754)),l=n(6648),u=n(6215);function c(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}class d extends r.Component{constructor(e){super(e),this.handleRevert=this.handleRevert.bind(this),this.state={isReverting:!1}}handleRevert(){const{actions:{revertToVersion:e},onAfterRevert:t,recordId:n,versionId:r}=this.props;this.setState({isReverting:!0});const o="function"==typeof t?t:()=>{};return e(n,r,"DRAFT","DRAFT").then((()=>o(r)))}render(){const{FormActionComponent:e,ViewModeComponent:t,isLatestVersion:n,isPreviewable:o,isRevertable:s}=this.props,{isReverting:i}=this.state;let l="";return i?l=a.default._t("HistoryViewerToolbar.REVERT_IN_PROGRESS","Revert in progress..."):n&&(l=a.default._t("HistoryViewerToolbar.REVERT_UNAVAILABLE","Unavailable for the current version")),r.default.createElement("div",{className:"toolbar toolbar--south"},r.default.createElement("div",{className:"btn-toolbar"},s&&r.default.createElement(e,{onClick:this.handleRevert,icon:"back-in-time",name:"revert",attributes:{title:l},data:{buttonStyle:"warning"},disabled:n||i,loading:i,title:a.default._t("HistoryViewerToolbar.REVERT_TO_VERSION","Revert to this version")}),o&&r.default.createElement(t,{id:"history-viewer-edit-mode",area:"edit"})))}}t.Component=d,d.propTypes={actions:o.default.shape({revertToVersion:o.default.func.isRequired}),FormActionComponent:o.default.elementType.isRequired,ViewModeComponent:o.default.elementType.isRequired,isLatestVersion:o.default.bool,isPreviewable:o.default.bool,isRevertable:o.default.bool,onAfterRevert:o.default.func,recordId:o.default.number.isRequired,versionId:o.default.number.isRequired},d.defaultProps={isLatestVersion:!1,isPreviewable:!1,isRevertable:!1};t.default=(0,s.compose)((0,i.connect)(null,(function(e){return{onAfterRevert(t){e((0,u.addMessage)(a.default.sprintf(a.default._t("HistoryViewerToolbar.REVERTED_MESSAGE","Successfully reverted to version %s"),t))),e((0,u.showList)())}}})),(0,l.inject)(["FormAction","ViewModeToggle"],((e,t)=>({FormActionComponent:e,ViewModeComponent:t})),(()=>"VersionedAdmin.HistoryViewer.Toolbar")))(d)},3461:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=f(n(7086)),s=n(2827),i=n(1624),a=n(6648),l=n(185),u=n(1118),c=f(n(4754)),p=f(n(7820)),d=n(6215);function f(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}class m extends r.Component{constructor(e){super(e),this.handleClick=this.handleClick.bind(this),this.handleClose=this.handleClose.bind(this),this.handleCompare=this.handleCompare.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}getAuthor(){const{version:e}=this.props;let t={};return e.published&&e.publisher?t=e.publisher:e.author&&(t=e.author),`${t.firstName||""} ${t.surname||""}`}getClassNames(){const{extraClass:e,isActive:t,compare:n,compare:{compareFrom:r,compareTo:o}}=this.props,s={"history-viewer__row":!0,"history-viewer__row--current":t,"history-viewer__row--comparison-selected":n&&!(r&&o)};return(0,p.default)(s,e)}handleKeyUp(e){13===e.keyCode&&this.handleClick()}handleClick(){const{onSelect:e,version:t,isActive:n,compare:r}=this.props;return n||e(t,r),!1}handleCompare(){const{onCompareMode:e,version:t}=this.props;e(t)}handleClose(){const{onSelect:e,version:t,compare:n,compare:{versionFrom:r}}=this.props;r&&r.version===t.version&&delete n.versionFrom,e(0,n)}renderCompareButton(){const{compareModeAvailable:e,compare:t,FormActionComponent:n}=this.props,o=c.default._t("HistoryViewerVersion.COMPARE","Compare");return!e||t?null:r.default.createElement(n,{onClick:this.handleCompare,title:o,buttonStyle:"outline-light",extraClass:"history-viewer__compare-button"},o)}renderClearButton(){const{FormActionComponent:e,isActive:t}=this.props;return t?r.default.createElement(e,{onClick:this.handleClose,icon:"cancel",attributes:{title:c.default._t("HistoryViewerVersion.CLOSE","Close")},title:null,buttonStyle:"outline-light",extraClass:"history-viewer__close-button"}):null}renderSelectedMessage(){const{isActive:e}=this.props;return e?r.default.createElement("span",{className:"history-viewer__selected-message"},c.default._t("HistoryViewerVersion.SELECTED","Already selected")):null}renderActions(){const{isActive:e,compare:t}=this.props;return e||t?r.default.createElement("span",{className:"history-viewer__actions",role:"cell"},this.renderCompareButton(),this.renderSelectedMessage(),this.renderClearButton()):r.default.createElement("span",{className:"history-viewer__actions",role:"cell"})}render(){const{version:e,isActive:t,StateComponent:n}=this.props,o=c.default._t("HistoryViewerVersion.GO_TO_VERSION","Go to version {version}");return r.default.createElement("li",{className:this.getClassNames(),role:"row"},r.default.createElement("span",{className:"history-viewer__version-link",role:"button",title:c.default.inject(o,{version:e.Version}),onClick:this.handleClick,onKeyUp:this.handleKeyUp,tabIndex:0},r.default.createElement("span",{className:"history-viewer__version-no",role:"cell"},e.version),r.default.createElement(n,{version:e,isActive:t}),r.default.createElement("span",{className:"history-viewer__author",role:"cell"},this.getAuthor()),this.renderActions()))}}t.Component=m,m.propTypes={extraClass:o.default.oneOfType([o.default.string,o.default.array,o.default.object]),version:l.versionType,isActive:o.default.bool,onSelect:o.default.func,onCompareMode:o.default.func,compare:u.compareType,compareModeAvailable:o.default.bool,StateComponent:o.default.elementType.isRequired,FormActionComponent:o.default.elementType.isRequired},m.defaultProps={isActive:!1,version:l.defaultVersion,compare:!1,compareModeAvailable:!0};t.default=(0,s.compose)((0,i.connect)(null,(function(e){return{onSelect(t,n){const{versionFrom:r}=n;n?e(r?(0,d.setCompareTo)(t):(0,d.setCompareFrom)(t)):(e((0,d.showVersion)(t)),e((0,d.clearMessages)()))},onCompareMode(t){e((0,d.setCompareFrom)(t)),e((0,d.setCompareMode)(!0))}}})),(0,a.inject)(["HistoryViewerVersionState","FormAction"],((e,t)=>({StateComponent:e,FormActionComponent:t})),(e=>{let{version:t}=e,n="VersionedAdmin.HistoryViewer.HistoryViewerVersion";return t&&(n+=`.${t.version}`),n})))(m)},2477:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=p(n(7820)),s=p(n(8238)),i=n(6648),a=n(185),l=p(n(7086)),u=p(n(1872)),c=p(n(7902));function p(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}class f extends r.PureComponent{componentDidMount(){this.toggleToolbarClass(!0)}componentDidUpdate(){this.toggleToolbarClass("split"===this.props.previewState)}componentWillUnmount(){this.toggleToolbarClass(!1)}getListVersions(){const{compare:e,version:t}=this.props;return this.isCompareMode()?[e.versionTo,e.versionFrom]:[t]}isPreviewable(){const{isPreviewable:e}=this.props;return e&&!this.isCompareMode()}isCompareMode(){const{compare:e}=this.props;return e&&e.versionFrom&&e.versionTo}toggleToolbarClass(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=document.querySelector(".CMSPageHistoryViewerController div:not(.cms-content-tools) .cms-content-header"),n="history-viewer__toolbar--condensed";t&&this.isPreviewable()&&(e?t.classList.add(n):t.classList.remove(n))}renderPreview(){const{version:{absoluteLink:e,lastEdited:t,version:n},PreviewComponent:o,previewState:s}=this.props;if(!this.isPreviewable()||"edit"===s)return null;const i=u.default.parse(e),a=c.default.parse(i.query);a.archiveDate=t;const l=u.default.format({...i,search:c.default.stringify(a)});return r.default.createElement(o,{className:"history-viewer__preview flexbox-area-grow",itemLinks:{preview:{Stage:{href:l,type:"text/html"}}},itemId:n})}renderToolbar(){const{ToolbarComponent:e,isLatestVersion:t,isRevertable:n,recordId:o,version:s}=this.props;return this.isCompareMode()?null:r.default.createElement(e,{identifier:"HistoryViewer.VersionDetail.Toolbar",isLatestVersion:t,recordId:o,versionId:s.version,isPreviewable:this.isPreviewable(),isRevertable:n})}renderDetails(){const{compareModeAvailable:e,ListComponent:t,schemaUrl:n,CompareWarningComponent:i,previewState:a}=this.props;if(this.isPreviewable()&&"preview"===a)return null;const l={"history-viewer__table":!0,"history-viewer__table--current":!0,"history-viewer__table--compare":this.isCompareMode()},u={"history-viewer__version-detail":!0,"history-viewer__version-detail--compare":this.isCompareMode()};return r.default.createElement("div",{className:"flexbox-area-grow fill-height"},r.default.createElement(i,{fixed:!0}),r.default.createElement("div",{className:(0,o.default)(["flexbox-area-grow","panel","panel--scrollable","panel--padded","panel--padded-side"])},r.default.createElement(t,{extraClass:(0,o.default)(l),versions:this.getListVersions(),compareModeAvailable:e}),r.default.createElement("div",{className:(0,o.default)(u)},r.default.createElement(s.default,{identifier:"HistoryViewer.VersionDetail",schemaUrl:n}))),this.renderToolbar())}render(){return r.default.createElement("div",{className:"flexbox-area-grow fill-width"},this.renderDetails(),this.renderPreview())}}t.Component=f,f.propTypes={isLatestVersion:l.default.bool,isPreviewable:l.default.bool,isRevertable:l.default.bool,ListComponent:l.default.elementType.isRequired,PreviewComponent:l.default.elementType,recordId:l.default.number.isRequired,schemaUrl:l.default.string.isRequired,ToolbarComponent:l.default.elementType.isRequired,version:a.versionType,compare:l.default.oneOfType([l.default.shape({versionFrom:a.versionType,versionTo:a.versionType}),l.default.bool]),previewState:l.default.oneOf(["edit","preview","split"])},f.defaultProps={isLatestVersion:!1,isPreviewable:!1,isRevertable:!1,compare:!1};t.default=(0,i.inject)(["HistoryViewerVersionList","HistoryViewerToolbar","Preview","HistoryViewerCompareWarning"],((e,t,n,r)=>({ListComponent:e,ToolbarComponent:t,PreviewComponent:n,CompareWarningComponent:r})),((e,t)=>{let{version:n}=e;return`${t}.HistoryViewerVersionDetail.${n.Version}`}))(f)},8488:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=f(n(7086)),s=f(n(7820)),i=f(n(4754)),a=n(1624),l=n(2827),u=n(6648),c=n(3057),p=n(185),d=n(1118);function f(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}class m extends r.PureComponent{getClassNames(){const{extraClass:e,showHeader:t}=this.props;return(0,s.default)(e,{table:!0,"history-viewer__table--headerless":!t})}isVersionActive(e){const{currentVersion:t,compare:n,compare:{versionFrom:r,versionTo:o}}=this.props,s=t&&t.version===e.version,i=r&&r.version===e.version,a=o&&o.version===e.version;return!n&&s||i||a}renderMessages(){const{FormAlertComponent:e,messages:t}=this.props;return t.length?r.default.createElement("div",{className:"history-viewer__messages"},t.map((t=>r.default.createElement(e,{key:t.id,type:t.type,value:t.message,closeLabel:i.default._t("HistoryViewerVersionList.CLOSE","Close")})))):null}renderHeader(){const{showHeader:e,HeadingComponent:t,compareModeAvailable:n}=this.props;if(!e)return null;const o={compareModeAvailable:n};return r.default.createElement(t,o)}render(){const{VersionComponent:e,versions:t,compareModeAvailable:n,compare:o}=this.props;return r.default.createElement("div",{className:"history-viewer__list"},this.renderMessages(),r.default.createElement("ul",{className:this.getClassNames(),role:"table"},this.renderHeader(),t.map((t=>r.default.createElement(e,{key:t.version,isActive:this.isVersionActive(t),version:t,compare:o,compareModeAvailable:n})))))}}t.Component=m,m.propTypes={extraClass:o.default.oneOfType([o.default.string,o.default.array,o.default.object]),showHeader:o.default.bool,FormAlertComponent:o.default.elementType.isRequired,HeadingComponent:o.default.elementType.isRequired,messages:o.default.arrayOf(c.messageType),VersionComponent:o.default.elementType.isRequired,versions:o.default.arrayOf(p.versionType),compare:d.compareType,compareModeAvailable:o.default.bool},m.defaultProps={compareModeAvailable:!0,extraClass:"history-viewer__table",messages:[],showHeader:!0,versions:[]};t.default=(0,l.compose)((0,a.connect)((function(e){const{messages:t,compare:n,currentVersion:r}=e.versionedAdmin.historyViewer;return{messages:t,compare:n,currentVersion:r}})),(0,u.inject)(["FormAlert","HistoryViewerHeading","HistoryViewerVersion"],((e,t,n)=>({FormAlertComponent:e,HeadingComponent:t,VersionComponent:n})),(()=>"VersionedAdmin.HistoryViewer.HistoryViewerVersionList")))(m)},5385:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=c(n(7820)),s=c(n(4754)),i=c(n(7657)),a=n(185),l=n(6648),u=c(n(7086));function c(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}class d extends r.Component{getClassNames(){const{extraClass:e}=this.props;return(0,o.default)("history-viewer__version-state",e)}getPublishedState(){const{version:e}=this.props;return 1===e.version?s.default._t("HistoryViewer.Created","Created"):e.published?e.deleted?e.draft?s.default._t("HistoryViewer.Archived","Archived"):s.default._t("HistoryViewer.Unpublished","Unpublished"):s.default._t("HistoryViewer.Published","Published"):s.default._t("HistoryViewer.Saved","Saved")}getDate(){return i.default.locale(s.default.detectLocale()),(0,i.default)(this.props.version.lastEdited).format("L LT")}getBadges(){const{version:e,isActive:t,BadgeComponent:n}=this.props;return e.liveVersion?r.default.createElement(n,{status:"success",message:s.default._t("HistoryViewer.BadgeLive","Live"),className:"",inverted:t}):""}render(){return r.default.createElement("span",{className:this.getClassNames(),role:"cell"},this.getPublishedState()," ",r.default.createElement("small",{className:"text-muted"},this.getDate()),this.getBadges())}}t.Component=d,d.propTypes={version:a.versionType,extraClass:u.default.string,isActive:u.default.bool,BadgeComponent:u.default.oneOfType([u.default.node,u.default.func]).isRequired},d.defaultProps={version:a.defaultVersion,extraClass:"",isActive:!1};t.default=(0,l.inject)(["Badge"],(e=>({BadgeComponent:e})),(e=>{let{version:t}=e;return`HistoryViewer.HistoryViewerVersionState.${t.Version}`}))(d)},2291:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(7363)),o=i(n(4510)),s=n(6648);function i(e){return e&&e.__esModule?e:{default:e}}t.default=e=>{class t extends r.default.Component{getConfig(){return o.default.getSection("SilverStripe\\VersionedAdmin\\Controllers\\HistoryViewerController")}getSchemaUrlDetails(){const{compare:e}=this.props;return e?{formName:"compareForm",queryParts:["RecordVersionFrom=:from","RecordVersionTo=:to"]}:{formName:"versionForm",queryParts:["RecordVersion=:version"]}}getSchemaUrl(){const e=this.getConfig(),{formName:t,queryParts:n}=this.getSchemaUrlDetails();return`${`${e.form[t].schemaUrl}/:id`}?${n.concat("RecordClass=:class&RecordID=:id").join("&")}`}render(){const t={...this.props,config:this.getConfig(),HistoryViewer:e,schemaUrl:this.getSchemaUrl()};return r.default.createElement(e,t)}}return(0,s.inject)(["HistoryViewer"])(t)}},9679:function(e,t,n){"use strict";var r,o=(r=n(5311))&&r.__esModule?r:{default:r},s=n(4845);o.default.entwine("ss",(e=>{e(".ArchiveAdmin__action--restore").entwine({onmatch(){e(this).attr("readonly",!1),e(this).attr("disabled",!1)}}),e(".ArchiveAdmin .other-model-selector select").entwine({onchange(t){t.preventDefault();let n=e(this).val();const r=e(this).data("others-archive-url");if(n){n=n.replace(/\\/g,"-");const t=(0,s.joinUrlPaths)(r,n);e(".cms-container").loadPanel(t,"",{pjax:"CurrentForm"})}}})}))},6674:function(e,t,n){"use strict";var r=a(n(5311)),o=a(n(7363)),s=n(9691),i=n(6648);function a(e){return e&&e.__esModule?e:{default:e}}r.default.entwine("ss",(e=>{e(".js-injector-boot .history-viewer__container").entwine({ReactRoot:null,onmatch(){const e=this.closest(".cms-content").attr("id"),t=e?{context:e}:{},n=(0,i.loadComponent)("HistoryViewer",t),r=this.data("schema"),a={...r.data,isInGridField:r.data.isInGridField||!this.hasClass("history-viewer--standalone")},l=(0,s.createRoot)(this[0]);l.render(o.default.createElement(n,a)),this.setReactRoot(l)},onunmatch(){const e=this.getReactRoot();e&&(e.unmount(),this.setReactRoot(null))}}),e(".history-viewer__version-detail .nav-link").entwine({onclick(e){e.preventDefault(),this._super(e)}}),e(".tab.tab--history-viewer[aria-hidden=false]").entwine({onmatch(){e(".toolbar--south.cms-content-actions").hide()},onunmatch(){e(".toolbar--south.cms-content-actions").show()}}),e(".tab.tab--history-viewer .history-viewer__version-detail").entwine({onmatch(){this.parent().css("padding-bottom","3rem").next(".toolbar--south").css({position:"absolute",bottom:0,left:0,right:0})}})}))},574:function(e,t,n){"use strict";var r=o(n(4754));function o(e){return e&&e.__esModule?e:{default:e}}o(n(5311)).default.entwine("ss",(e=>{e(".cms-edit-form .btn-toolbar #Form_ItemEditForm_action_doUnpublish").entwine({onclick(e){const t=r.default._t("VersionedEditForm.PUBLISH_CONFIRM_MESSAGE","Are you sure you want to remove your record from the published site?\n\nThis record will still be available in the CMS as draft.");return!!confirm(t)&&(this.parents("form:first").addClass("loading"),this._super(e))}}),e(".cms-edit-form .btn-toolbar #Form_ItemEditForm_action_doArchive").entwine({onclick(e){const t=r.default._t("VersionedEditForm.ARCHIVE_CONFIRM_MESSAGE","Warning: This record will be unpublished before being sent to the archive.\n\nAre you sure you want to proceed?");return!!confirm(t)&&(this.parents("form:first").addClass("loading"),this._super(e))}})}))},3061:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=["SHOW_VERSION","SHOW_LIST","SET_CURRENT_PAGE","ADD_MESSAGE","CLEAR_MESSAGES","SET_COMPARE_MODE","SET_COMPARE_FROM","SET_COMPARE_TO"].reduce(((e,t)=>Object.assign(e,{[t]:`HISTORY_VIEWER.${t}`})),{})},6215:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addMessage=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"success";return{type:s.default.ADD_MESSAGE,payload:{id:(0,o.v1)(),message:e,type:t}}},t.clearMessages=function(){return{type:s.default.CLEAR_MESSAGES}},t.setCompareFrom=function(e){return{type:s.default.SET_COMPARE_FROM,payload:{version:e}}},t.setCompareMode=function(e){return{type:s.default.SET_COMPARE_MODE,payload:{enabled:e}}},t.setCompareTo=function(e){return{type:s.default.SET_COMPARE_TO,payload:{version:e}}},t.setCurrentPage=function(e){return{type:s.default.SET_CURRENT_PAGE,payload:{page:e}}},t.showList=function(){return{type:s.default.SHOW_LIST}},t.showVersion=function(e){return{type:s.default.SHOW_VERSION,payload:{version:e}}};var r,o=n(7429),s=(r=n(3061))&&r.__esModule?r:{default:r}},7908:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,{type:t,payload:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(t){case s.default.SET_CURRENT_PAGE:return{...e,currentPage:n.page};case s.default.SHOW_VERSION:return{...e,currentVersion:n.version};case s.default.SHOW_LIST:return{...e,currentVersion:0,currentPage:0};case s.default.ADD_MESSAGE:return{...e,messages:[n,...e.messages]};case s.default.CLEAR_MESSAGES:return{...e,messages:[]};case s.default.SET_COMPARE_MODE:{const t={versionFrom:!1,versionTo:!1,...e.compare};return{...e,compare:!!n.enabled&&t}}case s.default.SET_COMPARE_FROM:{let{compare:{versionFrom:t,versionTo:r}}=e;return t=n.version||!1,t||(t=r,r=!1),{...e,currentVersion:t,compare:{versionFrom:t,versionTo:r}}}case s.default.SET_COMPARE_TO:{let{compare:{versionFrom:t,versionTo:r}}=e;return r=n.version||!1,r&&t&&r.version0}},{key:"getMetadataColumnProperty",value:function(e,t,n){var r=this.getColumnMetadataByName(e);return null==r?n:r.hasOwnProperty(t)?r[t]:n}},{key:"orderColumns",value:function(e){var t=this;return a(e,(function(e){var n=i(t.columnMetadata,{columnName:e});return null==n||isNaN(n.order)?100:n.order}))}},{key:"getColumns",value:function(){var e=0===this.filteredColumns.length?this.allColumns:this.filteredColumns;return e=l(e,this.metadataColumns),e=this.orderColumns(e)}}]),e}();e.exports=u},1172:function(e,t,n){"use strict";var r=n(7363),o=n(2555)({getDefaultProps:function(){return{placeholderText:""}},render:function(){return"function"!=typeof this.props.customFilterComponent?(console.log("Couldn't find valid template."),r.createElement("div",null)):r.createElement(this.props.customFilterComponent,{changeFilter:this.props.changeFilter,results:this.props.results,currentResults:this.props.currentResults,placeholderText:this.props.placeholderText})}});e.exports=o},2039:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t0&&(e=r.createElement("button",{type:"button",onClick:this.props.previous,style:this.props.useGriddleStyles?{color:"#222",border:"none",background:"none",margin:"0 0 0 10px"}:null},this.props.previousIconComponent,this.props.previousText)),this.props.currentPage!==this.props.maxPage-1&&(t=r.createElement("button",{type:"button",onClick:this.props.next,style:this.props.useGriddleStyles?{color:"#222",border:"none",background:"none",margin:"0 10px 0 0"}:null},this.props.nextText,this.props.nextIconComponent));var n=null,o=null,i=null;if(!0===this.props.useGriddleStyles){var a={float:"left",minHeight:"1px",marginTop:"5px"};i=s({textAlign:"right",width:"34%"},a),o=s({textAlign:"center",width:"33%"},a),n=s({width:"33%"},a)}for(var l=[],u=1;u<=this.props.maxPage;u++)l.push(r.createElement("option",{value:u,key:u},u));return r.createElement("div",{style:this.props.useGriddleStyles?{minHeight:"35px"}:null},r.createElement("div",{className:this.props.previousClassName,style:n},e),r.createElement("div",{className:"griddle-page",style:o},r.createElement("select",{value:this.props.currentPage+1,onChange:this.pageChange},l)," / ",this.props.maxPage),r.createElement("div",{className:this.props.nextClassName,style:i},t))}});e.exports=i},344:function(e,t,n){"use strict";var r=n(7363),o=n(2555),s=(n(3059),n(7024)),i=n(3560),a=n(7287),l=n(8583),u=n(1747),c=n(3220),p=n(2569),d=o({getDefaultProps:function(){return{isChildRow:!1,showChildren:!1,data:{},columnSettings:null,rowSettings:null,hasChildren:!1,useGriddleStyles:!0,useGriddleIcons:!0,isSubGriddle:!1,paddingHeight:null,rowHeight:null,parentRowCollapsedClassName:"parent-row",parentRowExpandedClassName:"parent-row expanded",parentRowCollapsedComponent:"▶",parentRowExpandedComponent:"▼",onRowClick:null,multipleSelectionSettings:null,onRowMouseEnter:null,onRowMouseLeave:null,onRowWillMount:null,onRowWillUnmount:null}},componentWillMount:function(){null!==this.props.onRowWillMount&&i(this.props.onRowWillMount)&&this.props.onRowWillMount(this)},componentWillUnmount:function(){null!==this.props.onRowWillUnmount&&i(this.props.onRowWillUnmount)&&this.props.onRowWillUnmount(this)},handleClick:function(e){null!==this.props.onRowClick&&i(this.props.onRowClick)?this.props.onRowClick(this,e):this.props.hasChildren&&this.props.toggleChildren()},handleMouseEnter:function(e){null!==this.props.onRowMouseEnter&&i(this.props.onRowMouseEnter)&&this.props.onRowMouseEnter(this,e)},handleMouseLeave:function(e){null!==this.props.onRowMouseLeave&&i(this.props.onRowMouseLeave)&&this.props.onRowMouseLeave(this,e)},handleSelectionChange:function(e){},handleSelectClick:function(e){this.props.multipleSelectionSettings.isMultipleSelection&&("checkbox"===e.target.type?this.props.multipleSelectionSettings.toggleSelectRow(this.props.data,this.refs.selected.checked):this.props.multipleSelectionSettings.toggleSelectRow(this.props.data,!this.refs.selected.checked))},verifyProps:function(){null===this.props.columnSettings&&console.error("gridRow: The columnSettings prop is null and it shouldn't be")},formatData:function(e){return"boolean"==typeof e?String(e):e},render:function(){var e=this;this.verifyProps();var t=this,n=null;this.props.useGriddleStyles&&(n={margin:"0px",padding:t.props.paddingHeight+"px 5px "+t.props.paddingHeight+"px 5px",height:t.props.rowHeight?this.props.rowHeight-2*t.props.paddingHeight+"px":null,backgroundColor:"#FFF",borderTopColor:"#DDD",color:"#222"});var o=this.props.columnSettings.getColumns(),d=a(o,[]),f=l({},this.props.data);u(f,d);var h,m,g=c(s.pick(f,p(o,"children"))).map((function(t,o){var s=null,i=e.props.columnSettings.getColumnMetadataByName(t[0]),a=0===o&&e.props.hasChildren&&!1===e.props.showChildren&&e.props.useGriddleIcons?r.createElement("span",{style:e.props.useGriddleStyles?{fontSize:"10px",marginRight:"5px"}:null},e.props.parentRowCollapsedComponent):0===o&&e.props.hasChildren&&e.props.showChildren&&e.props.useGriddleIcons?r.createElement("span",{style:e.props.useGriddleStyles?{fontSize:"10px"}:null},e.props.parentRowExpandedComponent):"";if(0===o&&e.props.isChildRow&&e.props.useGriddleStyles&&(n=l(n,{paddingLeft:10})),e.props.columnSettings.hasColumnMetadata()&&null!=i)if(void 0!==i.customComponent&&null!==i.customComponent){var u=r.createElement(i.customComponent,{data:t[1],rowData:f,metadata:i});s=r.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,className:i.cssClassName,key:o,style:n},u)}else s=r.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,className:i.cssClassName,key:o,style:n},a,e.formatData(t[1]));return s||r.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,key:o,style:n},a,t[1])}));if(null!==this.props.onRowClick&&i(this.props.onRowClick)?(h=null,m=this.handleSelectClick):this.props.multipleSelectionSettings&&this.props.multipleSelectionSettings.isMultipleSelection?(h=this.handleSelectClick,m=null):(h=null,m=null),g&&this.props.multipleSelectionSettings&&this.props.multipleSelectionSettings.isMultipleSelection){this.props.multipleSelectionSettings.getSelectedRowIds();g.unshift(r.createElement("td",{key:"selection",style:n,className:"griddle-select griddle-select-cell",onClick:m},r.createElement("input",{type:"checkbox",checked:this.props.multipleSelectionSettings.getIsRowChecked(f),onChange:this.handleSelectionChange,ref:"selected"})))}var v=t.props.rowSettings&&t.props.rowSettings.getBodyRowMetadataClass(t.props.data)||"standard-row";return t.props.isChildRow?v="child-row":t.props.hasChildren&&(v=t.props.showChildren?this.props.parentRowExpandedClassName:this.props.parentRowCollapsedClassName),r.createElement("tr",{onClick:h,className:v},g)}});e.exports=d},3302:function(e,t,n){"use strict";var r=n(7363),o=n(2555),s=(n(3059),n(8718)),i=o({getDefaultProps:function(){return{useGriddleStyles:!0,useGriddleIcons:!0,isSubGriddle:!1,columnSettings:null,rowSettings:null,paddingHeight:null,rowHeight:null,parentRowCollapsedClassName:"parent-row",parentRowExpandedClassName:"parent-row expanded",parentRowCollapsedComponent:"▶",parentRowExpandedComponent:"▼",onRowClick:null,onRowMouseEnter:null,onRowMouseLeave:null,onRowWillMount:null,onRowWillUnmount:null,multipleSelectionSettings:null}},getInitialState:function(){return{data:{},showChildren:!1}},componentWillReceiveProps:function(){this.setShowChildren(!1)},toggleChildren:function(){this.setShowChildren(!1===this.state.showChildren)},setShowChildren:function(e){this.setState({showChildren:e})},verifyProps:function(){null===this.props.columnSettings&&console.error("gridRowContainer: The columnSettings prop is null and it shouldn't be")},render:function(){this.verifyProps();var e=this;if(void 0===this.props.data)return r.createElement("tbody",null);var t=[],n=this.props.columnSettings.getColumns();t.push(r.createElement(this.props.rowSettings.rowComponent,{useGriddleStyles:this.props.useGriddleStyles,isSubGriddle:this.props.isSubGriddle,data:this.props.rowSettings.isCustom?s(this.props.data,n):this.props.data,rowData:this.props.rowSettings.isCustom?this.props.data:null,columnSettings:this.props.columnSettings,rowSettings:this.props.rowSettings,hasChildren:e.props.hasChildren,toggleChildren:e.toggleChildren,showChildren:e.state.showChildren,key:e.props.uniqueId+"_base_row",useGriddleIcons:e.props.useGriddleIcons,parentRowExpandedClassName:this.props.parentRowExpandedClassName,parentRowCollapsedClassName:this.props.parentRowCollapsedClassName,parentRowExpandedComponent:this.props.parentRowExpandedComponent,parentRowCollapsedComponent:this.props.parentRowCollapsedComponent,paddingHeight:e.props.paddingHeight,rowHeight:e.props.rowHeight,onRowClick:e.props.onRowClick,onRowMouseEnter:e.props.onRowMouseEnter,onRowMouseLeave:e.props.onRowMouseLeave,multipleSelectionSettings:this.props.multipleSelectionSettings,onRowWillMount:e.props.onRowWillMount,onRowWillUnmount:e.props.onRowWillUnmount}));var o=null;return e.state.showChildren&&(o=e.props.hasChildren&&this.props.data.children.map((function(t,n){var o=e.props.rowSettings.getRowKey(t,n);if(void 0!==t.children){var s=e.constructor.Griddle;return r.createElement("tr",{key:o,style:{paddingLeft:5}},r.createElement("td",{colSpan:e.props.columnSettings.getVisibleColumnCount(),className:"griddle-parent",style:e.props.useGriddleStyles?{border:"none",padding:"0 0 0 5px"}:null},r.createElement(s,{rowMetadata:{key:"id"},isSubGriddle:!0,results:[t],columns:e.props.columnSettings.getColumns(),tableClassName:e.props.tableClassName,parentRowExpandedClassName:e.props.parentRowExpandedClassName,parentRowCollapsedClassName:e.props.parentRowCollapsedClassName,showTableHeading:!1,showPager:!1,columnMetadata:e.props.columnSettings.columnMetadata,parentRowExpandedComponent:e.props.parentRowExpandedComponent,parentRowCollapsedComponent:e.props.parentRowCollapsedComponent,paddingHeight:e.props.paddingHeight,rowHeight:e.props.rowHeight})))}return r.createElement(e.props.rowSettings.rowComponent,{useGriddleStyles:e.props.useGriddleStyles,isSubGriddle:e.props.isSubGriddle,data:t,columnSettings:e.props.columnSettings,isChildRow:!0,columnMetadata:e.props.columnSettings.columnMetadata,key:o})}))),!1===e.props.hasChildren?t[0]:r.createElement("tbody",null,e.state.showChildren?t.concat(o):t)}});e.exports=i},7033:function(e,t,n){"use strict";var r=n(7363),o=n(2555),s=n(4721),i=n(2569),a=n(3311),l=o({getDefaultProps:function(){return{columns:[],columnMetadata:[],selectedColumns:[],settingsText:"",maxRowsText:"",resultsPerPage:0,enableToggleCustom:!1,useCustomComponent:!1,useGriddleStyles:!0,toggleCustomComponent:function(){}}},setPageSize:function(e){var t=parseInt(e.target.value,10);this.props.setPageSize(t)},handleChange:function(e){var t=e.target.dataset?e.target.dataset.name:e.target.getAttribute("data-name");!0===e.target.checked&&!1===s(this.props.selectedColumns,t)?(this.props.selectedColumns.push(t),this.props.setColumns(this.props.selectedColumns)):this.props.setColumns(i(this.props.selectedColumns,t))},render:function(){var e=this,t=[];!1===e.props.useCustomComponent&&(t=this.props.columns.map((function(t,n){var o=s(e.props.selectedColumns,t),i=a(e.props.columnMetadata,{columnName:t}),l=t;return void 0!==i&&void 0!==i.displayName&&null!=i.displayName&&(l=i.displayName),void 0!==i&&null!=i&&i.locked?r.createElement("div",{className:"column checkbox"},r.createElement("label",null,r.createElement("input",{type:"checkbox",disabled:!0,name:"check",checked:o,"data-name":t}),l)):void 0!==i&&null!=i&&void 0!==i.visible&&!1===i.visible?null:r.createElement("div",{className:"griddle-column-selection checkbox",key:t,style:e.props.useGriddleStyles?{float:"left",width:"20%"}:null},r.createElement("label",null,r.createElement("input",{type:"checkbox",name:"check",onChange:e.handleChange,checked:o,"data-name":t}),l))})));var n=e.props.enableToggleCustom?r.createElement("div",{className:"form-group"},r.createElement("label",{htmlFor:"maxRows"},r.createElement("input",{type:"checkbox",checked:this.props.useCustomComponent,onChange:this.props.toggleCustomComponent})," ",this.props.enableCustomFormatText)):"",o=this.props.showSetPageSize?r.createElement("div",null,r.createElement("label",{htmlFor:"maxRows"},this.props.maxRowsText,":",r.createElement("select",{onChange:this.setPageSize,value:this.props.resultsPerPage},r.createElement("option",{value:"5"},"5"),r.createElement("option",{value:"10"},"10"),r.createElement("option",{value:"25"},"25"),r.createElement("option",{value:"50"},"50"),r.createElement("option",{value:"100"},"100")))):"";return r.createElement("div",{className:"griddle-settings",style:this.props.useGriddleStyles?{backgroundColor:"#FFF",border:"1px solid #DDD",color:"#222",padding:"10px",marginBottom:"10px"}:null},r.createElement("h6",null,this.props.settingsText),r.createElement("div",{className:"griddle-columns",style:this.props.useGriddleStyles?{clear:"both",display:"table",width:"100%",borderBottom:"1px solid #EDEDED",marginBottom:"10px"}:null},t),o,n)}});e.exports=l},1277:function(e,t,n){"use strict";var r=n(7363),o=n(2555),s=n(4769),i=n(3302),a=(n(3059),n(5203),o({getDefaultProps:function(){return{data:[],columnSettings:null,rowSettings:null,sortSettings:null,multipleSelectionSettings:null,className:"",enableInfiniteScroll:!1,nextPage:null,hasMorePages:!1,useFixedHeader:!1,useFixedLayout:!0,paddingHeight:null,rowHeight:null,filterByColumn:null,infiniteScrollLoadTreshold:null,bodyHeight:null,useGriddleStyles:!0,useGriddleIcons:!0,isSubGriddle:!1,parentRowCollapsedClassName:"parent-row",parentRowExpandedClassName:"parent-row expanded",parentRowCollapsedComponent:"▶",parentRowExpandedComponent:"▼",externalLoadingComponent:null,externalIsLoading:!1,onRowClick:null,onRowMouseEnter:null,onRowMouseLeave:null,onRowWillMount:null,onRowWillUnmount:null}},getInitialState:function(){return{scrollTop:0,scrollHeight:this.props.bodyHeight,clientHeight:this.props.bodyHeight}},componentDidMount:function(){this.gridScroll()},componentDidUpdate:function(e,t){this.gridScroll()},gridScroll:function(){if(this.props.enableInfiniteScroll&&!this.props.externalIsLoading){var e=this.refs.scrollable,t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;if(null!==this.props.rowHeight&&this.state.scrollTop!==t&&Math.abs(this.state.scrollTop-t)>=this.getAdjustedRowHeight()){var o={scrollTop:t,scrollHeight:n,clientHeight:r};this.setState(o)}.6*(n-(t+r)-this.props.infiniteScrollLoadTreshold)<=this.props.infiniteScrollLoadTreshold&&this.props.nextPage()}},verifyProps:function(){null===this.props.columnSettings&&console.error("gridTable: The columnSettings prop is null and it shouldn't be"),null===this.props.rowSettings&&console.error("gridTable: The rowSettings prop is null and it shouldn't be")},getAdjustedRowHeight:function(){return this.props.rowHeight+2*this.props.paddingHeight},getNodeContent:function(){this.verifyProps();var e=this,t=!1;if(!this.props.externalIsLoading||this.props.enableInfiniteScroll){var n=e.props.data,o=null,s=null;if(this.props.enableInfiniteScroll&&null!==this.props.rowHeight&&void 0!==this.refs.scrollable){var a=e.getAdjustedRowHeight(),l=Math.ceil(e.state.clientHeight/a),u=Math.max(0,Math.floor(e.state.scrollTop/a)-.25*l),c=Math.min(u+1.25*l,this.props.data.length-1);n=n.slice(u,c+1);var p={height:u*a+"px"};o=r.createElement("tr",{key:"above-"+p.height,style:p});var d={height:(this.props.data.length-c)*a+"px"};s=r.createElement("tr",{key:"below-"+d.height,style:d})}var f=n.map((function(n,o){var s=void 0!==n.children&&n.children.length>0,a=e.props.rowSettings.getRowKey(n,o);return s&&(t=s),r.createElement(i,{useGriddleStyles:e.props.useGriddleStyles,isSubGriddle:e.props.isSubGriddle,parentRowExpandedClassName:e.props.parentRowExpandedClassName,parentRowCollapsedClassName:e.props.parentRowCollapsedClassName,parentRowExpandedComponent:e.props.parentRowExpandedComponent,parentRowCollapsedComponent:e.props.parentRowCollapsedComponent,data:n,key:a+"-container",uniqueId:a,columnSettings:e.props.columnSettings,rowSettings:e.props.rowSettings,paddingHeight:e.props.paddingHeight,multipleSelectionSettings:e.props.multipleSelectionSettings,rowHeight:e.props.rowHeight,hasChildren:s,tableClassName:e.props.className,onRowClick:e.props.onRowClick,onRowMouseEnter:e.props.onRowMouseEnter,onRowMouseLeave:e.props.onRowMouseLeave,onRowWillMount:e.props.onRowWillMount,onRowWillUnmount:e.props.onRowWillUnmount})}));if(this.props.showNoData){var h=this.props.columnSettings.getVisibleColumnCount();f.push(r.createElement("tr",{key:"no-data-section"},r.createElement("td",{colSpan:h},this.props.noDataSection)))}return o&&f.unshift(o),s&&f.push(s),{nodes:f,anyHasChildren:t}}return null},render:function(){var e=[],t=!1,n=this.getNodeContent();n&&(e=n.nodes,t=n.anyHasChildren);var o=null,i=null,a={width:"100%"};if(this.props.useFixedLayout&&(a.tableLayout="fixed"),this.props.enableInfiniteScroll&&(o={position:"relative",overflowY:"scroll",height:this.props.bodyHeight+"px",width:"100%"}),this.props.externalIsLoading){var l,u=null;this.props.useGriddleStyles&&(u={textAlign:"center",paddingBottom:"40px"}),l=this.props.columnSettings.getVisibleColumnCount();var c=this.props.externalLoadingComponent?r.createElement(this.props.externalLoadingComponent,null):r.createElement("div",null,"Loading...");i=r.createElement("tbody",null,r.createElement("tr",null,r.createElement("td",{style:u,colSpan:l},c)))}var p=this.props.showTableHeading?r.createElement(s,{useGriddleStyles:this.props.useGriddleStyles,useGriddleIcons:this.props.useGriddleIcons,sortSettings:this.props.sortSettings,multipleSelectionSettings:this.props.multipleSelectionSettings,columnSettings:this.props.columnSettings,filterByColumn:this.props.filterByColumn,rowSettings:this.props.rowSettings}):void 0;t||(e=r.createElement("tbody",null,e));var d=r.createElement("tbody",null);if(this.props.showPager){var f=this.props.useGriddleStyles?{padding:"0px",backgroundColor:"#EDEDED",border:"0px",color:"#222",height:this.props.showNoData?"20px":null}:null;d=r.createElement("tbody",null,r.createElement("tr",null,r.createElement("td",{colSpan:this.props.multipleSelectionSettings.isMultipleSelection?this.props.columnSettings.getVisibleColumnCount()+1:this.props.columnSettings.getVisibleColumnCount(),style:f,className:"footer-container"},this.props.showNoData?null:this.props.pagingContent)))}return this.props.useFixedHeader?(this.props.useGriddleStyles&&(a.tableLayout="fixed"),r.createElement("div",null,r.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&a||null},p),r.createElement("div",{ref:"scrollable",onScroll:this.gridScroll,style:o},r.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&a||null},e,i,d)))):r.createElement("div",{ref:"scrollable",onScroll:this.gridScroll,style:o},r.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&a||null},p,e,i,d))}}));e.exports=a},4769:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t=0)return!0}return!1}))},defaultColumnFilter:function(e,t,n){var r=A(M(n)?n:[n],(function(e){return(e||"").toLowerCase()}));return V(C.getObjectValues(t),(function(e){return e=e.toString().toLowerCase(),V(r,(function(t){return e.indexOf(t)>=0}))}))},filterByColumnFilters:function(e){var t=this.props.columnFilterFunc||this.defaultColumnFilter,n=Object.keys(e).reduce((function(n,r){return D(n,(function(n){var o=C.getAt(n,r||""),s=e[r];return t(r||"",o,s)}))}),this.props.results),r={columnFilters:e};e?(r.filteredResults=n,r.maxPage=this.getMaxPage(r.filteredResults)):this.state.filter?r.filteredResults=this.props.useCustomFilterer?this.props.customFilterer(this.props.results,filter):this.defaultFilter(this.props.results,filter):r.filteredResults=null,this.setState(r)},filterByColumn:function(e,t){var n=this.state.columnFilters;if(n.hasOwnProperty(t)&&!e)n=N(n,t);else{var r={};r[t]=e,n=T({},n,r)}this.filterByColumnFilters(n)},setFilter:function(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(this.props.useExternal)this.props.externalSetFilter(e);else{var n={page:0,filter:e};n.filteredResults=this.props.useCustomFilterer?this.props.customFilterer(t||this.props.results,e):this.defaultFilter(t||this.props.results,e),n.maxPage=this.getMaxPage(n.filteredResults),(j(e)||O(e)||R(e))&&(n.filter=e,n.filteredResults=null),this.setState(n),this._resetSelectedRows()}},setPageSize:function(e){if(this.props.useExternal)return this.setState({resultsPerPage:e}),void this.props.externalSetPageSize(e);this.state.resultsPerPage=e,this.setMaxPage()},toggleColumnChooser:function(){this.setState({showColumnChooser:!this.state.showColumnChooser})},isNullOrUndefined:function(e){return null==e},shouldUseCustomRowComponent:function(){return this.isNullOrUndefined(this.state.useCustomRowComponent)?this.props.useCustomRowComponent:this.state.useCustomRowComponent},shouldUseCustomGridComponent:function(){return this.isNullOrUndefined(this.state.useCustomGridComponent)?this.props.useCustomGridComponent:this.state.useCustomGridComponent},toggleCustomComponent:function(){"grid"===this.state.customComponentType?this.setState({useCustomGridComponent:!this.shouldUseCustomGridComponent()}):"row"===this.state.customComponentType&&this.setState({useCustomRowComponent:!this.shouldUseCustomRowComponent()})},getMaxPage:function(e,t){return this.props.useExternal?this.props.externalMaxPage:(t||(t=(e||this.getCurrentResults()).length),Math.ceil(t/this.state.resultsPerPage))},setMaxPage:function(e){var t=this.getMaxPage(e);this.state.maxPage!==t&&this.setState({page:0,maxPage:t,filteredColumns:this.columnSettings.filteredColumns})},setPage:function(e){if(this.props.useExternal)this.props.externalSetPage(e);else{if(e*this.state.resultsPerPage<=this.state.resultsPerPage*this.state.maxPage){var t={page:e};this.setState(t)}this.props.enableInfiniteScroll&&this.setState({isSelectAllChecked:!1})}},setColumns:function(e){this.columnSettings.filteredColumns=M(e)?e:[e],this.setState({filteredColumns:this.columnSettings.filteredColumns})},nextPage:function(){var e=this.getCurrentPage();e0&&this.setPage(e-1)},changeSort:function(e){if(!1!==this.props.enableSort){if(this.props.useExternal){var t=this.props.externalSortColumn!==e||!this.props.externalSortAscending;return this.setState({sortColumn:e,sortDirection:t?"asc":"desc"}),void this.props.externalChangeSort(e,t)}var n=x(this.props.columnMetadata,{columnName:e})||{},r=n.sortDirectionCycle?n.sortDirectionCycle:[null,"asc","desc"],o=r.indexOf(this.state.sortDirection&&e===this.state.sortColumn?this.state.sortDirection:null),s={page:0,sortColumn:e,sortDirection:r[o=(o+1)%r.length]?r[o]:null};this.setState(s)}},componentWillReceiveProps:function(e){if(e.results!==this.props.results&&this.setFilter(this.state.filter,e.results),this.setMaxPage(e.results),e.resultsPerPage!==this.props.resultsPerPage&&this.setPageSize(e.resultsPerPage),this.columnSettings.columnMetadata=e.columnMetadata,e.results.length>0){var t=C.keys(e.results[0]);this.columnSettings.allColumns.length==t.length&&this.columnSettings.allColumns.every((function(e,n){return e===t[n]}))||(this.columnSettings.allColumns=t)}else this.columnSettings.allColumns.length>0&&(this.columnSettings.allColumns=[]);if(e.selectedRowIds){var n=this.getDataForRender(this.getCurrentResults(e.results),this.columnSettings.getColumns(),!0);this.setState({isSelectAllChecked:this._getAreAllRowsChecked(e.selectedRowIds,A(n,this.props.uniqueIdentifier)),selectedRowIds:e.selectedRowIds})}},getInitialState:function(){return{maxPage:0,page:0,filteredResults:null,filteredColumns:[],filter:"",columnFilters:{},resultsPerPage:this.props.resultsPerPage||5,showColumnChooser:!1,isSelectAllChecked:!1,selectedRowIds:this.props.selectedRowIds}},componentWillMount:function(){this.verifyExternal(),this.verifyCustom(),this.columnSettings=new v(this.props.results.length>0?C.keys(this.props.results[0]):[],this.props.columns,this.props.childrenColumnName,this.props.columnMetadata,this.props.metadataColumns),this.rowSettings=new y(this.props.rowMetadata,this.props.useCustomTableRowComponent&&this.props.customTableRowComponent?this.props.customTableRowComponent:d,this.props.useCustomTableRowComponent),this.props.initialSort&&(this.props.useExternal?this.setState({sortColumn:this.props.externalSortColumn,sortDirection:this.props.externalSortAscending?"asc":"desc"}):this.changeSort(this.props.initialSort)),this.setMaxPage(),this.shouldUseCustomGridComponent()?this.setState({customComponentType:"grid"}):this.shouldUseCustomRowComponent()?this.setState({customComponentType:"row"}):this.setState({filteredColumns:this.columnSettings.filteredColumns})},componentDidMount:function(){if(this.props.componentDidMount&&"function"==typeof this.props.componentDidMount)return this.props.componentDidMount()},componentDidUpdate:function(){if(this.props.componentDidUpdate&&"function"==typeof this.props.componentDidUpdate)return this.props.componentDidUpdate(this.state)},verifyExternal:function(){!0===this.props.useExternal&&(null===this.props.externalSetPage&&console.error("useExternal is set to true but there is no externalSetPage function specified."),null===this.props.externalChangeSort&&console.error("useExternal is set to true but there is no externalChangeSort function specified."),null===this.props.externalSetFilter&&console.error("useExternal is set to true but there is no externalSetFilter function specified."),null===this.props.externalSetPageSize&&console.error("useExternal is set to true but there is no externalSetPageSize function specified."),null===this.props.externalMaxPage&&console.error("useExternal is set to true but externalMaxPage is not set."),null===this.props.externalCurrentPage&&console.error("useExternal is set to true but externalCurrentPage is not set. Griddle will not page correctly without that property when using external data."))},verifyCustom:function(){!0===this.props.useCustomGridComponent&&null===this.props.customGridComponent&&console.error("useCustomGridComponent is set to true but no custom component was specified."),!0===this.props.useCustomRowComponent&&null===this.props.customRowComponent&&console.error("useCustomRowComponent is set to true but no custom component was specified."),!0===this.props.useCustomGridComponent&&!0===this.props.useCustomRowComponent&&console.error("Cannot currently use both customGridComponent and customRowComponent."),!0===this.props.useCustomFilterer&&null===this.props.customFilterer&&console.error("useCustomFilterer is set to true but no custom filter function was specified."),!0===this.props.useCustomFilterComponent&&null===this.props.customFilterComponent&&console.error("useCustomFilterComponent is set to true but no customFilterComponent was specified.")},getDataForRender:function(e,t,n){var r=this,o=this;if(!this.props.useExternal){if(""!==this.state.sortColumn){var s,i=this.state.sortColumn,a=D(this.props.columnMetadata,{columnName:i}),l={columns:[],orders:[]};if(a.length>0&&(s=a[0].hasOwnProperty("customCompareFn")&&a[0].customCompareFn,a[0].multiSort&&(l=a[0].multiSort)),this.state.sortDirection)if("function"==typeof s)2===s.length?(e=e.sort((function(e,t){return s(F(e,i),F(t,i))})),"desc"===this.state.sortDirection&&e.reverse()):1===s.length&&(e=I(e,(function(e){return s(F(e,i))}),[this.state.sortDirection]));else{var u=[function(e){return(F(e,i)||"").toString().toLowerCase()}],c=[this.state.sortDirection];l.columns.forEach((function(e,t){u.push((function(t){return(F(t,e)||"").toString().toLowerCase()})),"asc"===l.orders[t]||"desc"===l.orders[t]?c.push(l.orders[t]):c.push(r.state.sortDirection)})),e=I(e,u,c)}}var p=this.getCurrentPage();if(!this.props.useExternal&&n&&this.state.resultsPerPage*(p+1)<=this.state.resultsPerPage*this.state.maxPage&&p>=0)if(this.isInfiniteScrollEnabled())e=S(e,(p+1)*this.state.resultsPerPage);else{var d=b(e,p*this.state.resultsPerPage);e=(w||E)(d,d.length-this.state.resultsPerPage)}}for(var f=[],h=0;h0&&(m.children=o.getDataForRender(m[o.props.childrenColumnName],t,!1),"children"!==o.props.childrenColumnName&&delete m[o.props.childrenColumnName]),f.push(m)}return f},getCurrentResults:function(e){return this.state.filteredResults||e||this.props.results},getCurrentPage:function(){return this.props.externalCurrentPage||this.state.page},getCurrentSort:function(){return this.props.useExternal?this.props.externalSortColumn:this.state.sortColumn},getCurrentSortAscending:function(){return this.props.useExternal?this.props.externalSortAscending:"asc"===this.state.sortDirection},getCurrentMaxPage:function(){return this.props.useExternal?this.props.externalMaxPage:this.state.maxPage},getSortObject:function(){return{enableSort:this.props.enableSort,changeSort:this.changeSort,sortColumn:this.getCurrentSort(),sortAscending:this.getCurrentSortAscending(),sortDirection:this.state.sortDirection,sortAscendingClassName:this.props.sortAscendingClassName,sortDescendingClassName:this.props.sortDescendingClassName,sortAscendingComponent:this.props.sortAscendingComponent,sortDescendingComponent:this.props.sortDescendingComponent,sortDefaultComponent:this.props.sortDefaultComponent}},_toggleSelectAll:function(){var e=this.getDataForRender(this.getCurrentResults(),this.columnSettings.getColumns(),!0),t=!this.state.isSelectAllChecked,n=JSON.parse(JSON.stringify(this.state.selectedRowIds)),r=this;_(e,(function(e){r._updateSelectedRowIds(e[r.props.uniqueIdentifier],n,t)}),this),this.setState({isSelectAllChecked:t,selectedRowIds:n}),this.props.onSelectionChange&&this.props.onSelectionChange(n,t)},_toggleSelectRow:function(e,t){var n=this.getDataForRender(this.getCurrentResults(),this.columnSettings.getColumns(),!0),r=JSON.parse(JSON.stringify(this.state.selectedRowIds));this._updateSelectedRowIds(e[this.props.uniqueIdentifier],r,t);var o=this._getAreAllRowsChecked(r,A(n,this.props.uniqueIdentifier));this.setState({isSelectAllChecked:o,selectedRowIds:r}),this.props.onSelectionChange&&this.props.onSelectionChange(r,o)},_updateSelectedRowIds:function(e,t,n){n?void 0===x(t,(function(t){return e===t}))&&t.push(e):t.splice(t.indexOf(e),1)},_getIsSelectAllChecked:function(){return this.state.isSelectAllChecked},_getAreAllRowsChecked:function(e,t){return t.length===P(t,e).length},_getIsRowChecked:function(e){return this.state.selectedRowIds.indexOf(e[this.props.uniqueIdentifier])>-1},getSelectedRowIds:function(){return this.state.selectedRowIds},_resetSelectedRows:function(){this.setState({isSelectAllChecked:!1,selectedRowIds:[]})},getMultipleSelectionObject:function(){return{isMultipleSelection:!x(this.props.results,(function(e){return"children"in e}))&&this.props.isMultipleSelection,toggleSelectAll:this._toggleSelectAll,getIsSelectAllChecked:this._getIsSelectAllChecked,toggleSelectRow:this._toggleSelectRow,getSelectedRowIds:this.getSelectedRowIds,getIsRowChecked:this._getIsRowChecked}},isInfiniteScrollEnabled:function(){return!this.props.useCustomPagerComponent&&this.props.enableInfiniteScroll},getClearFixStyles:function(){return{clear:"both",display:"table",width:"100%"}},getSettingsStyles:function(){return{float:"left",width:"50%",textAlign:"right"}},getFilterStyles:function(){return{float:"left",width:"50%",textAlign:"left",color:"#222",minHeight:"1px"}},getFilter:function(){return this.props.showFilter&&!1===this.shouldUseCustomGridComponent()?this.props.useCustomFilterComponent?o.createElement(g,{changeFilter:this.setFilter,placeholderText:this.props.filterPlaceholderText,customFilterComponent:this.props.customFilterComponent,results:this.props.results,currentResults:this.getCurrentResults()}):o.createElement(l,{changeFilter:this.setFilter,placeholderText:this.props.filterPlaceholderText}):""},getSettings:function(){return this.props.showSettings?o.createElement("button",{type:"button",className:this.props.settingsToggleClassName,onClick:this.toggleColumnChooser,style:this.props.useGriddleStyles?{background:"none",border:"none",padding:0,margin:0,fontSize:14}:null},this.props.settingsText,this.props.settingsIconComponent):""},getTopSection:function(e,t){if(!1===this.props.showFilter&&!1===this.props.showSettings)return"";var n=null,r=null,s=null;return this.props.useGriddleStyles&&(n=this.getFilterStyles(),r=this.getSettingsStyles(),s=this.getClearFixStyles()),o.createElement("div",{className:"top-section",style:s},o.createElement("div",{className:"griddle-filter",style:n},e),o.createElement("div",{className:"griddle-settings-toggle",style:r},t))},getPagingSection:function(e,t){if(!1!==(this.props.showPager&&!this.isInfiniteScrollEnabled()&&!this.shouldUseCustomGridComponent()))return o.createElement("div",{className:"griddle-footer"},this.props.useCustomPagerComponent?o.createElement(m,{customPagerComponentOptions:this.props.customPagerComponentOptions,next:this.nextPage,previous:this.previousPage,currentPage:e,maxPage:t,setPage:this.setPage,nextText:this.props.nextText,previousText:this.props.previousText,customPagerComponent:this.props.customPagerComponent}):o.createElement(u,{useGriddleStyles:this.props.useGriddleStyles,next:this.nextPage,previous:this.previousPage,nextClassName:this.props.nextClassName,nextIconComponent:this.props.nextIconComponent,previousClassName:this.props.previousClassName,previousIconComponent:this.props.previousIconComponent,currentPage:e,maxPage:t,setPage:this.setPage,nextText:this.props.nextText,previousText:this.props.previousText}))},getColumnSelectorSection:function(e,t){return this.state.showColumnChooser?o.createElement(c,{columns:e,selectedColumns:t,setColumns:this.setColumns,settingsText:this.props.settingsText,settingsIconComponent:this.props.settingsIconComponent,maxRowsText:this.props.maxRowsText,setPageSize:this.setPageSize,showSetPageSize:!this.shouldUseCustomGridComponent(),resultsPerPage:this.state.resultsPerPage,enableToggleCustom:this.props.enableToggleCustom,toggleCustomComponent:this.toggleCustomComponent,useCustomComponent:this.shouldUseCustomRowComponent()||this.shouldUseCustomGridComponent(),useGriddleStyles:this.props.useGriddleStyles,enableCustomFormatText:this.props.enableCustomFormatText,columnMetadata:this.props.columnMetadata}):""},getCustomGridSection:function(){return o.createElement(this.props.customGridComponent,r({data:this.props.results,className:this.props.customGridComponentClassName},this.props.gridMetadata))},getCustomRowSection:function(e,t,n,r,s){return o.createElement("div",null,o.createElement(h,{data:e,columns:t,metadataColumns:n,globalData:s,className:this.props.customRowComponentClassName,customComponent:this.props.customRowComponent,style:this.props.useGriddleStyles?this.getClearFixStyles():null}),this.props.showPager&&r)},getStandardGridSection:function(e,t,n,r,s){var i=this.getSortObject(),l=this.getMultipleSelectionObject(),u=this.shouldShowNoDataSection(e),c=this.getNoDataSection();return o.createElement("div",{className:"griddle-body"},o.createElement(a,{useGriddleStyles:this.props.useGriddleStyles,noDataSection:c,showNoData:u,columnSettings:this.columnSettings,rowSettings:this.rowSettings,sortSettings:i,multipleSelectionSettings:l,filterByColumn:this.filterByColumn,isSubGriddle:this.props.isSubGriddle,useGriddleIcons:this.props.useGriddleIcons,useFixedLayout:this.props.useFixedLayout,showPager:this.props.showPager,pagingContent:r,data:e,className:this.props.tableClassName,enableInfiniteScroll:this.isInfiniteScrollEnabled(),nextPage:this.nextPage,showTableHeading:this.props.showTableHeading,useFixedHeader:this.props.useFixedHeader,parentRowCollapsedClassName:this.props.parentRowCollapsedClassName,parentRowExpandedClassName:this.props.parentRowExpandedClassName,parentRowCollapsedComponent:this.props.parentRowCollapsedComponent,parentRowExpandedComponent:this.props.parentRowExpandedComponent,bodyHeight:this.props.bodyHeight,paddingHeight:this.props.paddingHeight,rowHeight:this.props.rowHeight,infiniteScrollLoadTreshold:this.props.infiniteScrollLoadTreshold,externalLoadingComponent:this.props.externalLoadingComponent,externalIsLoading:this.props.externalIsLoading,hasMorePages:s,onRowClick:this.props.onRowClick,onRowMouseEnter:this.props.onRowMouseEnter,onRowMouseLeave:this.props.onRowMouseLeave,onRowWillMount:this.props.onRowWillMount,onRowWillUnmount:this.props.onRowWillUnmount}))},getContentSection:function(e,t,n,r,o,s){return this.shouldUseCustomGridComponent()&&null!==this.props.customGridComponent?this.getCustomGridSection():this.shouldUseCustomRowComponent()?this.getCustomRowSection(e,t,n,r,s):this.getStandardGridSection(e,t,n,r,o)},getNoDataSection:function(){return null!=this.props.customNoDataComponent?o.createElement("div",{className:this.props.noDataClassName},o.createElement(this.props.customNoDataComponent,this.props.customNoDataComponentProps)):o.createElement(p,{noDataMessage:this.props.noDataMessage})},shouldShowNoDataSection:function(e){return!this.props.allowEmptyGrid&&(!1===this.props.useExternal&&(void 0===e||0===e.length)||!0===this.props.useExternal&&!1===this.props.externalIsLoading&&0===e.length)},render:function(){var e=this.getCurrentResults(),t=(this.props.tableClassName,this.getFilter()),n=this.getSettings(),r=this.getTopSection(t,n),s=[],i=this.columnSettings.getColumns(),a=this.getDataForRender(e,i,!0),l=this.columnSettings.getMetadataColumns();this.props.columnMetadata?_(this.props.columnMetadata,(function(e){"boolean"==typeof e.visible&&!1===e.visible||s.push(e.columnName)})):s=C.keys(N(e[0],l)),s=this.columnSettings.orderColumns(s);var u=this.getCurrentPage(),c=this.getCurrentMaxPage(),p=u+10?"griddle "+this.props.gridClassName:"griddle";return m+=this.shouldUseCustomRowComponent()?" griddle-custom":"",o.createElement("div",{className:m},r,h,o.createElement("div",{className:"griddle-container",style:this.props.useGriddleStyles&&!this.props.isSubGriddle?{border:"1px solid #DDD"}:null},f))}});f.Griddle=e.exports=k},5203:function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n-1}},1196:function(e){e.exports=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r=200&&(p=l,d=!1,t=new r(t));e:for(;++c0&&s(c)?n>1?e(c,n-1,s,i,a):r(a,c):i||(a[a.length]=c)}return a}},8483:function(e,t,n){var r=n(5063)();e.exports=r},7816:function(e,t,n){var r=n(8483),o=n(3674);e.exports=function(e,t){return e&&r(e,t,o)}},7786:function(e,t,n){var r=n(1811),o=n(327);e.exports=function(e,t){for(var n=0,s=(t=r(t,e)).length;null!=e&&n=120&&v.length>=120)?new r(f&&v):void 0}v=e[0];var y=-1,C=h[0];e:for(;++yo?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(o);++rt||i&&a&&u&&!l&&!c||o&&a&&u||!n&&u||!s)return 1;if(!o&&!i&&!c&&e=l?u:u*("desc"==n[o]?-1:1)}return e.index-t.index}},278:function(e){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1?n[s-1]:void 0,a=s>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(s--,i):void 0,a&&o(n[0],n[1],a)&&(i=s<3?void 0:i,s=1),t=Object(t);++r-1?a[l?t[u]:u]:void 0}}},3866:function(e,t,n){var r=n(8969),o=n(4160),s=n(8776),i=n(9294);e.exports=function(e){return function(t){var n=o(t);return"[object Map]"==n?s(t):"[object Set]"==n?i(t):r(t,e(t))}}},696:function(e,t,n){var r=n(8630);e.exports=function(e){return r(e)?void 0:e}},8777:function(e,t,n){var r=n(852),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},7114:function(e,t,n){var r=n(8668),o=n(2908),s=n(4757);e.exports=function(e,t,n,i,a,l){var u=1&n,c=e.length,p=t.length;if(c!=p&&!(u&&p>c))return!1;var d=l.get(e),f=l.get(t);if(d&&f)return d==t&&f==e;var h=-1,m=!0,g=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++h-1&&e%1==0&&e-1}},4705:function(e,t,n){var r=n(8470);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},4785:function(e,t,n){var r=n(1989),o=n(8407),s=n(7071);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(s||o),string:new r}}},1285:function(e,t,n){var r=n(5050);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},6e3:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).get(e)}},9916:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).has(e)}},5265:function(e,t,n){var r=n(5050);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},8776:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},2634:function(e){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},4523:function(e,t,n){var r=n(8306);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},4536:function(e,t,n){var r=n(852)(Object,"create");e.exports=r},6916:function(e,t,n){var r=n(5569)(Object.keys,Object);e.exports=r},3498:function(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},1167:function(e,t,n){e=n.nmd(e);var r=n(1957),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,i=s&&s.exports===o&&r.process,a=function(){try{var e=s&&s.require&&s.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=a},2333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},5357:function(e,t,n){var r=n(6874),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var s=arguments,i=-1,a=o(s.length-t,0),l=Array(a);++i0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},7465:function(e,t,n){var r=n(8407);e.exports=function(){this.__data__=new r,this.size=0}},3779:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},7599:function(e){e.exports=function(e){return this.__data__.get(e)}},4758:function(e){e.exports=function(e){return this.__data__.has(e)}},4309:function(e,t,n){var r=n(8407),o=n(7071),s=n(3369);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new s(i)}return n.set(e,t),this.size=n.size,this}},2351:function(e){e.exports=function(e,t,n){for(var r=n-1,o=e.length;++r2?t[2]:void 0;for(u&&s(t[0],t[1],u)&&(r=1);++n-1:!!c&&r(e,t,n)>-1}},8125:function(e,t,n){var r=n(4259);e.exports=function(e){return(null==e?0:e.length)?r(e,0,-1):[]}},5325:function(e,t,n){var r=n(9932),o=n(7556),s=n(5976),i=n(4387),a=s((function(e){var t=r(e,i);return t.length&&t[0]===e[0]?o(t):[]}));e.exports=a},5694:function(e,t,n){var r=n(9454),o=n(7005),s=Object.prototype,i=s.hasOwnProperty,a=s.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return o(e)&&i.call(e,"callee")&&!a.call(e,"callee")};e.exports=l},1469:function(e){var t=Array.isArray;e.exports=t},8612:function(e,t,n){var r=n(3560),o=n(1780);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},9246:function(e,t,n){var r=n(8612),o=n(7005);e.exports=function(e){return o(e)&&r(e)}},4144:function(e,t,n){e=n.nmd(e);var r=n(5639),o=n(5062),s=t&&!t.nodeType&&t,i=s&&e&&!e.nodeType&&e,a=i&&i.exports===s?r.Buffer:void 0,l=(a?a.isBuffer:void 0)||o;e.exports=l},1609:function(e,t,n){var r=n(280),o=n(4160),s=n(5694),i=n(1469),a=n(8612),l=n(4144),u=n(5726),c=n(6719),p=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(a(e)&&(i(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||c(e)||s(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(u(e))return!r(e).length;for(var n in e)if(p.call(e,n))return!1;return!0}},3560:function(e,t,n){var r=n(4239),o=n(3218);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},6688:function(e,t,n){var r=n(5588),o=n(1717),s=n(1167),i=s&&s.isMap,a=i?o(i):r;e.exports=a},5220:function(e){e.exports=function(e){return null===e}},3218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},8630:function(e,t,n){var r=n(4239),o=n(5924),s=n(7005),i=Function.prototype,a=Object.prototype,l=i.toString,u=a.hasOwnProperty,c=l.call(Object);e.exports=function(e){if(!s(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==c}},2928:function(e,t,n){var r=n(9221),o=n(1717),s=n(1167),i=s&&s.isSet,a=i?o(i):r;e.exports=a},7037:function(e,t,n){var r=n(4239),o=n(1469),s=n(7005);e.exports=function(e){return"string"==typeof e||!o(e)&&s(e)&&"[object String]"==r(e)}},3448:function(e,t,n){var r=n(4239),o=n(7005);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},6719:function(e,t,n){var r=n(8749),o=n(1717),s=n(1167),i=s&&s.isTypedArray,a=i?o(i):r;e.exports=a},2353:function(e){e.exports=function(e){return void 0===e}},3674:function(e,t,n){var r=n(4636),o=n(280),s=n(8612);e.exports=function(e){return s(e)?r(e):o(e)}},1704:function(e,t,n){var r=n(4636),o=n(313),s=n(8612);e.exports=function(e){return s(e)?r(e,!0):o(e)}},928:function(e){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},5161:function(e,t,n){var r=n(9932),o=n(7206),s=n(9199),i=n(1469);e.exports=function(e,t){return(i(e)?r:s)(e,o(t,3))}},8306:function(e,t,n){var r=n(3369);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],s=n.cache;if(s.has(o))return s.get(o);var i=e.apply(this,r);return n.cache=s.set(o,i)||s,i};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},7557:function(e,t,n){var r=n(9932),o=n(5990),s=n(7406),i=n(1811),a=n(8363),l=n(696),u=n(9021),c=n(6904),p=u((function(e,t){var n={};if(null==e)return n;var u=!1;t=r(t,(function(t){return t=i(t,e),u||(u=t.length>1),t})),a(e,c(e),n),u&&(n=o(n,7,l));for(var p=t.length;p--;)s(n,t[p]);return n}));e.exports=p},5472:function(e,t,n){var r=n(2689),o=n(1469);e.exports=function(e,t,n,s){return null==e?[]:(o(t)||(t=null==t?[]:[t]),o(n=s?void 0:n)||(n=null==n?[]:[n]),r(e,t,n))}},8718:function(e,t,n){var r=n(5970),o=n(9021)((function(e,t){return null==e?{}:r(e,t)}));e.exports=o},9601:function(e,t,n){var r=n(371),o=n(9152),s=n(5403),i=n(327);e.exports=function(e){return s(e)?r(i(e)):o(e)}},9704:function(e,t,n){var r=n(2908),o=n(7206),s=n(5076),i=n(1469),a=n(6612);e.exports=function(e,t,n){var l=i(e)?r:s;return n&&a(e,t,n)&&(t=void 0),l(e,o(t,3))}},9734:function(e,t,n){var r=n(1078),o=n(2689),s=n(5976),i=n(6612),a=s((function(e,t){if(null==e)return[];var n=t.length;return n>1&&i(e,t[0],t[1])?t=[]:n>2&&i(t[0],t[1],t[2])&&(t=[t[0]]),o(e,r(t,1),[])}));e.exports=a},479:function(e){e.exports=function(){return[]}},5062:function(e){e.exports=function(){return!1}},9572:function(e,t,n){var r=n(4259),o=n(554);e.exports=function(e,t,n){return e&&e.length?(t=n||void 0===t?1:o(t),r(e,0,t<0?0:t)):[]}},8601:function(e,t,n){var r=n(4841),o=1/0;e.exports=function(e){return e?(e=r(e))===o||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},554:function(e,t,n){var r=n(8601);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},4841:function(e,t,n){var r=n(7561),o=n(3218),s=n(3448),i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(s(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=a.test(e);return n||l.test(e)?u(e.slice(2),n?2:8):i.test(e)?NaN:+e}},3220:function(e,t,n){var r=n(3866)(n(3674));e.exports=r},9833:function(e,t,n){var r=n(531);e.exports=function(e){return null==e?"":r(e)}},3955:function(e,t,n){var r=n(9833),o=0;e.exports=function(e){var t=++o;return r(e)+t}},2628:function(e,t,n){var r=n(7415),o=n(3674);e.exports=function(e){return null==e?[]:r(e,o(e))}},2569:function(e,t,n){var r=n(731),o=n(5976),s=n(9246),i=o((function(e,t){return s(e)?r(e,t):[]}));e.exports=i},7287:function(e,t,n){var r=n(4865),o=n(1757);e.exports=function(e,t){return o(e||[],t||[],r)}},7418:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var s,i,a=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l>>9<<4)+1}function r(e,t){const n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function o(e,t,n,o,s,i){return r((a=r(r(t,e),r(o,i)))<<(l=s)|a>>>32-l,n);var a,l}function s(e,t,n,r,s,i,a){return o(t&n|~t&r,e,t,s,i,a)}function i(e,t,n,r,s,i,a){return o(t&r|n&~r,e,t,s,i,a)}function a(e,t,n,r,s,i,a){return o(t^n^r,e,t,s,i,a)}function l(e,t,n,r,s,i,a){return o(n^(t|~r),e,t,s,i,a)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var u=function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let n=0;n>5]>>>o%32&255,s=parseInt(r.charAt(n>>>4&15)+r.charAt(15&n),16);t.push(s)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[n/8])<>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n};t.default=s},58:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},3319:function(e,t){"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!n&&(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!n))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(r)};const r=new Uint8Array(16)},3757:function(e,t){"use strict";function n(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function r(e,t){return e<>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e){const t=[1518500249,1859775393,2400959708,3395469782],o=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let n=0;n>>0;p=c,c=u,u=r(l,30)>>>0,l=i,i=a}o[0]=o[0]+i>>>0,o[1]=o[1]+l>>>0,o[2]=o[2]+u>>>0,o[3]=o[3]+c>>>0,o[4]=o[4]+p>>>0}return[o[0]>>24&255,o[0]>>16&255,o[0]>>8&255,255&o[0],o[1]>>24&255,o[1]>>16&255,o[1]>>8&255,255&o[1],o[2]>>24&255,o[2]>>16&255,o[2]>>8&255,255&o[2],o[3]>>24&255,o[3]>>16&255,o[3]>>8&255,255&o[3],o[4]>>24&255,o[4]>>16&255,o[4]>>8&255,255&o[4]]};t.default=o},4008:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.unsafeStringify=i;var r,o=(r=n(6435))&&r.__esModule?r:{default:r};const s=[];for(let e=0;e<256;++e)s.push((e+256).toString(16).slice(1));function i(e,t=0){return s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]}var a=function(e,t=0){const n=i(e,t);if(!(0,o.default)(n))throw TypeError("Stringified UUID is invalid");return n};t.default=a},3990:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(3319))&&r.__esModule?r:{default:r},s=n(4008);let i,a,l=0,u=0;var c=function(e,t,n){let r=t&&n||0;const c=t||new Array(16);let p=(e=e||{}).node||i,d=void 0!==e.clockseq?e.clockseq:a;if(null==p||null==d){const t=e.random||(e.rng||o.default)();null==p&&(p=i=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==d&&(d=a=16383&(t[6]<<8|t[7]))}let f=void 0!==e.msecs?e.msecs:Date.now(),h=void 0!==e.nsecs?e.nsecs:u+1;const m=f-l+(h-u)/1e4;if(m<0&&void 0===e.clockseq&&(d=d+1&16383),(m<0||f>l)&&void 0===e.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=f,u=h,a=d,f+=122192928e5;const g=(1e4*(268435455&f)+h)%4294967296;c[r++]=g>>>24&255,c[r++]=g>>>16&255,c[r++]=g>>>8&255,c[r++]=255&g;const v=f/4294967296*1e4&268435455;c[r++]=v>>>8&255,c[r++]=255&v,c[r++]=v>>>24&15|16,c[r++]=v>>>16&255,c[r++]=d>>>8|128,c[r++]=255&d;for(let e=0;e<6;++e)c[r+e]=p[e];return t||(0,s.unsafeStringify)(c)};t.default=c},8237:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(7925)),o=s(n(4163));function s(e){return e&&e.__esModule?e:{default:e}}var i=(0,r.default)("v3",48,o.default);t.default=i},7925:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0,t.default=function(e,t,n){function r(e,r,i,a){var l;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let n=0;n=3.0.0 <4.0.0" immutable "^4.0.0" @@ -12202,6 +12246,15 @@ set-blocking@^2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== +set-function-name@^2.0.0, set-function-name@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.1.tgz#12ce38b7954310b9f61faa12701620a0c882793a" + integrity sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA== + dependencies: + define-data-property "^1.0.1" + functions-have-names "^1.2.3" + has-property-descriptors "^1.0.0" + set-value@^2.0.0, set-value@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" @@ -12273,14 +12326,14 @@ signal-exit@^4.0.1: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== -sirv@^1.0.7: - version "1.0.19" - resolved "https://registry.yarnpkg.com/sirv/-/sirv-1.0.19.tgz#1d73979b38c7fe91fcba49c85280daa9c2363b49" - integrity sha512-JuLThK3TnZG1TAKDwNIqNq6QA2afLOCcm+iE8D1Kj3GA40pSPsxQjjJl0J8X3tsR7T+CP1GavpzLwYkgVLWrZQ== +sirv@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/sirv/-/sirv-2.0.3.tgz#ca5868b87205a74bef62a469ed0296abceccd446" + integrity sha512-O9jm9BsID1P+0HOi81VpXPoDxYP374pkOLzACAoyUQ/3OUVndNpsz6wMnY2z+yOxzbllCKZrM+9QrWsv4THnyA== dependencies: "@polka/url" "^1.0.0-next.20" mrmime "^1.0.0" - totalist "^1.0.0" + totalist "^3.0.0" sisteransi@^1.0.5: version "1.0.5" @@ -12438,9 +12491,9 @@ spdx-expression-parse@^3.0.0: spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.13" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz#7189a474c46f8d47c7b0da4b987bb45e908bd2d5" - integrity sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w== + version "3.0.15" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.15.tgz#142460aabaca062bc7cd4cc87b7d50725ed6a4ba" + integrity sha512-lpT8hSQp9jAKp9mhtBU4Xjon8LPGBvLIuBiSVhMEtmLecTh2mO0tlqrAMp47tBXzMr13NJMQ2lf7RpQGLJ3HsQ== split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" @@ -12605,63 +12658,64 @@ string-width@^5.0.1, string-width@^5.1.2: strip-ansi "^7.0.1" "string.prototype.matchall@^4.0.0 || ^3.0.1", string.prototype.matchall@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz#3bf85722021816dcd1bf38bb714915887ca79fd3" - integrity sha512-6zOCOcJ+RJAQshcTvXPHoxoQGONa3e/Lqx90wUA+wEzX78sg5Bo+1tQo4N0pohS0erG9qtCqJDjNCQBjeWVxyg== + version "4.0.10" + resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.10.tgz#a1553eb532221d4180c51581d6072cd65d1ee100" + integrity sha512-rGXbGmOEosIQi6Qva94HUjgPs9vKW+dkG7Y8Q5O2OYkWL6wFaTRZO8zM4mhP94uX55wgyrXzfS2aGtGzUL7EJQ== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - get-intrinsic "^1.1.3" + define-properties "^1.2.0" + es-abstract "^1.22.1" + get-intrinsic "^1.2.1" has-symbols "^1.0.3" - internal-slot "^1.0.3" - regexp.prototype.flags "^1.4.3" + internal-slot "^1.0.5" + regexp.prototype.flags "^1.5.0" + set-function-name "^2.0.0" side-channel "^1.0.4" string.prototype.padend@^3.0.0: - version "3.1.4" - resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.1.4.tgz#2c43bb3a89eb54b6750de5942c123d6c98dd65b6" - integrity sha512-67otBXoksdjsnXXRUq+KMVTdlVRZ2af422Y0aTyTjVaoQkGr3mxl2Bc5emi7dOQ3OGVVQQskmLEWwFXwommpNw== + version "3.1.5" + resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.1.5.tgz#311ef3a4e3c557dd999cdf88fbdde223f2ac0f95" + integrity sha512-DOB27b/2UTTD+4myKUFh+/fXWcu/UDyASIXfg+7VzoCNNGOfWvoyU/x5pvVHr++ztyt/oSYI1BcWBBG/hmlNjA== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + define-properties "^1.2.0" + es-abstract "^1.22.1" string.prototype.padstart@^3.0.0: - version "3.1.4" - resolved "https://registry.yarnpkg.com/string.prototype.padstart/-/string.prototype.padstart-3.1.4.tgz#4842d58a09df2addac23cf0b325ce9f087978e90" - integrity sha512-XqOHj8horGsF+zwxraBvMTkBFM28sS/jHBJajh17JtJKA92qazidiQbLosV4UA18azvLOVKYo/E3g3T9Y5826w== + version "3.1.5" + resolved "https://registry.yarnpkg.com/string.prototype.padstart/-/string.prototype.padstart-3.1.5.tgz#ce435e145e4d68b701d1db51cb546ba100177d98" + integrity sha512-R57IsE3JIfModQWrVXYZ8ZHWMBNDpIoniDwhYCR1nx+iHwDkjjk26a8xM9BYgf7SAXJO7sdNPng5J+0ccr5LFQ== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + define-properties "^1.2.0" + es-abstract "^1.22.1" -string.prototype.trim@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz#a68352740859f6893f14ce3ef1bb3037f7a90533" - integrity sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg== +string.prototype.trim@^1.2.8: + version "1.2.8" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz#f9ac6f8af4bd55ddfa8895e6aea92a96395393bd" + integrity sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + define-properties "^1.2.0" + es-abstract "^1.22.1" -string.prototype.trimend@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533" - integrity sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ== +string.prototype.trimend@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz#1bb3afc5008661d73e2dc015cd4853732d6c471e" + integrity sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + define-properties "^1.2.0" + es-abstract "^1.22.1" -string.prototype.trimstart@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4" - integrity sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA== +string.prototype.trimstart@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz#d4cdb44b83a4737ffbac2d406e405d43d0184298" + integrity sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + define-properties "^1.2.0" + es-abstract "^1.22.1" string_decoder@^1.0.0, string_decoder@^1.1.1: version "1.3.0" @@ -12850,9 +12904,9 @@ tapable@^2.1.1, tapable@^2.2.0: integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== tar@^6.0.2, tar@^6.1.0, tar@^6.1.11, tar@^6.1.2: - version "6.1.15" - resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.15.tgz#c9738b0b98845a3b344d334b8fa3041aaba53a69" - integrity sha512-/zKt9UyngnxIT/EAGYuxaMYgOIJiP81ab9ZfkILq4oNLPFX50qyYmu7jRj9qeXoxmJHjGlbH0+cm2uy1WCs10A== + version "6.2.0" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.0.tgz#b14ce49a79cb1cd23bc9b016302dea5474493f73" + integrity sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ== dependencies: chownr "^2.0.0" fs-minipass "^2.0.0" @@ -12926,9 +12980,9 @@ terser@^4.1.2, terser@^4.6.3: source-map-support "~0.5.12" terser@^5.16.8, terser@^5.3.4: - version "5.19.2" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.19.2.tgz#bdb8017a9a4a8de4663a7983f45c506534f9234e" - integrity sha512-qC5+dmecKJA4cpYxRa5aVkKehYsQKc+AHeKl0Oe62aYjBL8ZA33tTljktDHJSaxxMnbI5ZYw+o/S2DxxLu8OfA== + version "5.20.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.20.0.tgz#ea42aea62578703e33def47d5c5b93c49772423e" + integrity sha512-e56ETryaQDyebBwJIWYB2TT6f2EZ0fL0sW/JRXNMN26zZdKi2u/E/5my5lG6jNxym6qsrVXfFRmOdV42zlAgLQ== dependencies: "@jridgewell/source-map" "^0.3.3" acorn "^8.8.2" @@ -13026,10 +13080,10 @@ toidentifier@1.0.1: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== -totalist@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/totalist/-/totalist-1.1.0.tgz#a4d65a3e546517701e3e5c37a47a70ac97fe56df" - integrity sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g== +totalist@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/totalist/-/totalist-3.0.1.tgz#ba3a3d600c915b1a97872348f79c127475f6acf8" + integrity sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ== tough-cookie@^4.1.2: version "4.1.3" @@ -13439,10 +13493,10 @@ upath@^1.1.1: resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== -update-browserslist-db@^1.0.11: - version "1.0.11" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz#9a2a641ad2907ae7b3616506f4b977851db5b940" - integrity sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA== +update-browserslist-db@^1.0.13: + version "1.0.13" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4" + integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg== dependencies: escalade "^3.1.1" picocolors "^1.0.0" @@ -13477,12 +13531,12 @@ url-parse@^1.5.3: requires-port "^1.0.0" url@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.1.tgz#26f90f615427eca1b9f4d6a28288c147e2302a32" - integrity sha512-rWS3H04/+mzzJkv0eZ7vEDGiQbgquI1fGfOad6zKvgYQi1SzMmhl7c/DdRGxhaWrVH6z0qWITo8rpnxK/RfEhA== + version "0.11.3" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.3.tgz#6f495f4b935de40ce4a0a52faee8954244f3d3ad" + integrity sha512-6hxOLGfZASQK/cijlZnZJTq8OXAkt/3YGfQX45vvMYXpZoo8NdWZcY73K108Jf759lS1Bv/8wXnHDTSz17dSRw== dependencies: punycode "^1.4.1" - qs "^6.11.0" + qs "^6.11.2" use-sync-external-store@^1.0.0: version "1.2.0" @@ -13514,14 +13568,7 @@ util.promisify@1.0.0: define-properties "^1.1.2" object.getownpropertydescriptors "^2.0.3" -util@0.10.3: - version "0.10.3" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" - integrity sha512-5KiHfsmkqacuKjkRkdV7SsfDJ2EGiPsK92s2MhNSY0craxjTdKTtqKsJaCWp4LW33ZZ0OPUv1WO/TFvNQRiQxQ== - dependencies: - inherits "2.0.1" - -util@^0.10.3: +util@^0.10.3, util@^0.10.4: version "0.10.4" resolved "https://registry.yarnpkg.com/util/-/util-0.10.4.tgz#3aa0125bfe668a4672de58857d3ace27ecb76901" integrity sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A== @@ -13556,9 +13603,9 @@ uuid@^3.3.2: integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== uuid@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5" - integrity sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg== + version "9.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" + integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== v8-to-istanbul@^9.0.0, v8-to-istanbul@^9.0.1: version "9.1.0" @@ -13692,19 +13739,26 @@ webidl-conversions@^7.0.0: integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g== webpack-bundle-analyzer@^4.7.0: - version "4.9.0" - resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.9.0.tgz#fc093c4ab174fd3dcbd1c30b763f56d10141209d" - integrity sha512-+bXGmO1LyiNx0i9enBu3H8mv42sj/BJWhZNFwjz92tVnBa9J3JMGo2an2IXlEleoDOPn/Hofl5hr/xCpObUDtw== + version "4.9.1" + resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.9.1.tgz#d00bbf3f17500c10985084f22f1a2bf45cb2f09d" + integrity sha512-jnd6EoYrf9yMxCyYDPj8eutJvtjQNp8PHmni/e/ulydHBWhT5J3menXt3HEkScsu9YqMAcG4CfFjs3rj5pVU1w== dependencies: "@discoveryjs/json-ext" "0.5.7" acorn "^8.0.4" acorn-walk "^8.0.0" - chalk "^4.1.0" commander "^7.2.0" + escape-string-regexp "^4.0.0" gzip-size "^6.0.0" - lodash "^4.17.20" + is-plain-object "^5.0.0" + lodash.debounce "^4.0.8" + lodash.escape "^4.0.1" + lodash.flatten "^4.4.0" + lodash.invokemap "^4.6.0" + lodash.pullall "^4.2.0" + lodash.uniqby "^4.7.0" opener "^1.5.2" - sirv "^1.0.7" + picocolors "^1.0.0" + sirv "^2.0.3" ws "^7.3.1" webpack-cli@^5.0.0: @@ -13788,9 +13842,9 @@ webpack-virtual-modules@^0.2.2: debug "^3.0.0" webpack@4: - version "4.46.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.46.0.tgz#bf9b4404ea20a073605e0a011d188d77cb6ad542" - integrity sha512-6jJuJjg8znb/xRItk7bkT0+Q7AHCYjjFnvKIWQPkNIOyRqoCGvkOs0ipeQzrqz4l5FtN5ZI/ukEHroeX/o1/5Q== + version "4.47.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.47.0.tgz#8b8a02152d7076aeb03b61b47dad2eeed9810ebc" + integrity sha512-td7fYwgLSrky3fI1EuU5cneU4+pbH6GgOfuKNS1tNPcfdGinGELAqsb/BP4nnvZyKSG2i/xFGU7+n2PvZA8HJQ== dependencies: "@webassemblyjs/ast" "1.9.0" "@webassemblyjs/helper-module-context" "1.9.0" @@ -13918,7 +13972,7 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.1.tgz#776b1fe35d90aebe99e8ac15eb24093389a4a409" integrity sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ== -which-typed-array@^1.1.10, which-typed-array@^1.1.11, which-typed-array@^1.1.9: +which-typed-array@^1.1.11, which-typed-array@^1.1.9: version "1.1.11" resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.11.tgz#99d691f23c72aab6768680805a271b69761ed61a" integrity sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew== @@ -13980,7 +14034,6 @@ worker-rpc@^0.1.0: microevent.ts "~0.1.1" "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: - name wrap-ansi-cjs version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -14033,9 +14086,9 @@ ws@^7.3.1: integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== ws@^8.11.0, ws@^8.2.3: - version "8.13.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.13.0.tgz#9a9fb92f93cf41512a0735c8f4dd09b8a1211cd0" - integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA== + version "8.14.2" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.14.2.tgz#6c249a806eb2db7a20d26d51e7709eab7b2e6c7f" + integrity sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g== x-default-browser@^0.4.0: version "0.4.0" @@ -14085,9 +14138,9 @@ yaml@^1.10.0, yaml@^1.7.2: integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== yaml@^2.1.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.3.1.tgz#02fe0975d23cd441242aa7204e09fc28ac2ac33b" - integrity sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ== + version "2.3.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.3.2.tgz#f522db4313c671a0ca963a75670f1c12ea909144" + integrity sha512-N/lyzTPaJasoDmfV7YTrYCI0G/3ivm/9wdG0aHuheKowWQwGTsK0Eoiw6utmzAnI6pkJa0DUVygvp3spqqEKXg== yargs-parser@^18.1.2: version "18.1.3"