From 85640cf582f278111c8338e1553787654d3a0568 Mon Sep 17 00:00:00 2001 From: Nick Ross Date: Fri, 20 Oct 2023 15:32:52 +0100 Subject: [PATCH] feat: add code snippets to your files teams folders (#2817) * feat: add code snippets to your files teams folders * feat: add built js --- .../dataworkspace/apps/core/utils.py | 9 +++- .../bundles/yourfiles.2e3320d0c45a8054b2c0.js | 2 - .../bundles/yourfiles.70fed0402f7640f5dcc1.js | 2 + .../bundles/yourfiles.bfc1dceee24b64203abb.js | 2 - .../bundles/yourfiles.c93bfed2dd8a9c6f4718.js | 2 - .../js/react_apps/src/your-files/App.jsx | 10 +++- .../src/your-files/TeamsPrefixMessage.jsx | 49 +++++++++++++++++++ .../static/js/stats/react_apps-stats.json | 44 ++++------------- 8 files changed, 76 insertions(+), 44 deletions(-) delete mode 100644 dataworkspace/dataworkspace/static/js/bundles/yourfiles.2e3320d0c45a8054b2c0.js create mode 100644 dataworkspace/dataworkspace/static/js/bundles/yourfiles.70fed0402f7640f5dcc1.js delete mode 100644 dataworkspace/dataworkspace/static/js/bundles/yourfiles.bfc1dceee24b64203abb.js delete mode 100644 dataworkspace/dataworkspace/static/js/bundles/yourfiles.c93bfed2dd8a9c6f4718.js create mode 100644 dataworkspace/dataworkspace/static/js/react_apps/src/your-files/TeamsPrefixMessage.jsx diff --git a/dataworkspace/dataworkspace/apps/core/utils.py b/dataworkspace/dataworkspace/apps/core/utils.py index 35426e3c62..4df7d8020e 100644 --- a/dataworkspace/dataworkspace/apps/core/utils.py +++ b/dataworkspace/dataworkspace/apps/core/utils.py @@ -1489,7 +1489,14 @@ def get_user_s3_prefixes(user): def get_team_prefixes(user): - return [f'teams/{x["schema_name"]}/' for x in get_team_schemas_for_user(user)] + return [ + { + "name": x["name"], + "env_var": f"S3_PREFIX_TEAM_{clean_db_identifier(x['name']).upper()}", + "prefix": f'teams/{x["schema_name"]}/', + } + for x in get_team_schemas_for_user(user) + ] def update_user_tool_access_policy(user, access_point_id): diff --git a/dataworkspace/dataworkspace/static/js/bundles/yourfiles.2e3320d0c45a8054b2c0.js b/dataworkspace/dataworkspace/static/js/bundles/yourfiles.2e3320d0c45a8054b2c0.js deleted file mode 100644 index 37cb88de19..0000000000 --- a/dataworkspace/dataworkspace/static/js/bundles/yourfiles.2e3320d0c45a8054b2c0.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see yourfiles.2e3320d0c45a8054b2c0.js.LICENSE.txt */ -(()=>{var __webpack_modules__={11609:(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>App});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(67294),_App_scss__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(97841),_Header__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(18906),_FileList__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(21039),_BigDataMessage__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(34120),_utils__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(15471),_popups__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(65739),_popups_DeleteObjects__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(99800),_popups_ErrorModal__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(78912),enterModule;function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}module=__webpack_require__.hmd(module),enterModule="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0,enterModule&&enterModule(module);var __signature__="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e};const popupTypes={ADD_FOLDER:"addFolder",UPLOAD_FILES:"uploadFiles",DELETE_OBJECTS:"deleteObjects"};class Credentials extends AWS.Credentials{constructor(e){super(),this.expiration=0,this.credentialsUrl=e}async refresh(e){try{const e=await(await fetch(this.credentialsUrl)).json();this.accessKeyId=e.AccessKeyId,this.secretAccessKey=e.SecretAccessKey,this.sessionToken=e.SessionToken,this.expiration=Date.parse(e.Expiration)}catch(t){return void e(t)}e()}needsRefresh(){return this.expiration-60{if(!e.target.files)return;const t=[];for(let n=0;n{e.preventDefault(),await this.navigateTo(t.prefix)})),_defineProperty(this,"onRefreshClick",(async()=>{await this.navigateTo(this.state.currentPrefix)})),_defineProperty(this,"showNewFolderPopup",(async e=>{this.showPopup(popupTypes.ADD_FOLDER)})),_defineProperty(this,"hidePopup",(e=>{const t={popups:{}};t.popups[e]=!1,this.setState(t)})),_defineProperty(this,"onUploadsComplete",(async()=>{await this.refresh(this.state.currentPrefix)})),_defineProperty(this,"onUploadClick",(async e=>{this.fileInputRef.current.click()})),_defineProperty(this,"onDeleteClick",(async()=>{const e=this.state.files.filter((e=>e.isSelected)),t=this.state.folders.filter((e=>e.isSelected));this.setState({filesToDelete:e,foldersToDelete:t}),this.showPopup(popupTypes.DELETE_OBJECTS)})),_defineProperty(this,"showErrorPopup",(e=>{const t={error:e,popups:this.state.popups};Object.keys(t.popups).forEach((e=>{t.popups[e]=!1})),this.setState(t)})),_defineProperty(this,"handleFileClick",(async e=>{const t={Bucket:this.state.bucketName,Key:e,Expires:15,ResponseContentDisposition:"attachment"};let n;try{n=await this.s3.getSignedUrlPromise("getObject",t),window.location.href=n}catch(e){this.showErrorPopup(e)}})),_defineProperty(this,"handleFolderClick",(async e=>{await this.navigateTo(e)})),_defineProperty(this,"onFileSelect",((e,t)=>{this.setState({files:this.state.files.map((n=>(n.Key===e.Key&&(n.isSelected=t),n)))})})),_defineProperty(this,"onFolderSelect",((e,t)=>{this.setState({folders:this.state.folders.map((n=>(n.Prefix===e.Prefix&&(n.isSelected=t),n)))})})),_defineProperty(this,"handleDragEnter",(e=>{e.preventDefault(),e.stopPropagation(),this.setState({dragActive:!0})})),_defineProperty(this,"handleDragLeave",(e=>{e.preventDefault(),e.stopPropagation(),e.currentTarget.contains(e.relatedTarget)||this.setState({dragActive:!1})})),_defineProperty(this,"handleDragOver",(e=>{e.preventDefault(),e.stopPropagation()})),_defineProperty(this,"handleDrop",(async e=>{async function t(e){for(var t=[];;){var n=await new Promise(((t,n)=>{e.readEntries(t,n)}));if(0==n.length)break;t=t.concat(n)}return t}async function n(e){var t=await new Promise(((t,n)=>{e.file(t,n)}));return t.relativePath=e.fullPath.substring(1),t}e.preventDefault(),e.stopPropagation(),this.setState({dragActive:!1,selectedFiles:await async function(e){const r=[],a=[];for(let t=0;t0;){const e=a.shift();e.isFile?r.push(await n(e)):e.isDirectory&&a.push(...await t(e.createReader()))}return r}(e.dataTransfer.items)}),this.showPopup(popupTypes.UPLOAD_FILES)}));const t=this.props.config,n={credentials:new Credentials(t.credentialsUrl),region:t.region,s3ForcePathStyle:!0,...t.endpointUrl?{endpoint:t.endpointUrl}:{},httpOptions:{timeout:36e6}};this.s3=new AWS.S3(n),this.state={files:[],folders:[],selectedFiles:[],filesToDelete:[],foldersToDelete:[],currentPrefix:t.initialPrefix.replace(/^\//,"").replace(/([^\/]$)/,"$1/"),bigDataFolder:t.bigdataPrefix,createTableUrl:t.createTableUrl,isLoaded:!1,error:null,bucketName:t.bucketName,region:t.region,showBigDataMessage:!1,popups:Object.fromEntries(Object.entries(popupTypes).map(((e,t)=>[t,!1]))),dragActive:!1},this.fileInputRef=react__WEBPACK_IMPORTED_MODULE_0__.createRef()}async componentDidMount(){addEventListener("popstate",(e=>{this.setState({currentPrefix:e.state&&e.state.prefix?e.state.prefix:this.props.config.initialPrefix},(()=>{this.refresh()}))})),await this.refresh()}showPopup(e){const t={popups:{}};t.popups[e]=!0,this.setState(t)}async navigateTo(e){window.history.pushState({prefix:e},null,this.props.config.rootUrl+e),this.setState({prefix:e}),await this.refresh(e)}async refresh(e){const t=this.props.config.rootPrefix,n=this.props.config.bigdataPrefix,r=e===t+n,a={Bucket:this.state.bucketName,Prefix:e||this.state.currentPrefix,Delimiter:"/"},l=async()=>{let e;try{e=await this.s3.listObjectsV2(a).promise()}catch(e){throw new Error(e)}const r=e.Contents.filter((e=>e.Key!==a.Prefix)).map((e=>({...e,formattedDate:new Date(e.LastModified),isSelected:!1}))),l=a.Prefix===t?this.props.config.teamsPrefixes.map((e=>({Prefix:e,isSharedFolder:!0,isSelected:!1}))):[],o=a.Prefix===t?[{Prefix:t+n,isBigData:!0,isSelected:!1}]:[],i=e.CommonPrefixes.filter((e=>e.Prefix!==`${t}${n}`)).map((e=>({...e,isBigData:!1,isSelected:!1})));return{files:r,folders:l.concat(o).concat(i)}};try{const e=await l();this.setState({files:e.files,folders:e.folders,currentPrefix:a.Prefix,showBigDataMessage:r})}catch(e){this.showErrorPopup(e)}}render(){const e=(0,_utils__WEBPACK_IMPORTED_MODULE_5__.ZD)(this.props.config.rootPrefix,this.props.config.teamsPrefix,this.state.currentPrefix),t=(0,_utils__WEBPACK_IMPORTED_MODULE_5__.R_)(this.state.currentPrefix,this.props.config.rootPrefix);return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"browser"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",{type:"file",onChange:this.onFileChange,multiple:!0,ref:this.fileInputRef,style:{display:"none"}}),this.state.error?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_popups_ErrorModal__WEBPACK_IMPORTED_MODULE_8__.C,{error:this.state.error,onClose:()=>this.setState({error:null})}):null,this.state.popups.deleteObjects?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_popups_DeleteObjects__WEBPACK_IMPORTED_MODULE_7__.q,{s3:this.s3,bucketName:this.props.config.bucketName,filesToDelete:this.state.filesToDelete,foldersToDelete:this.state.foldersToDelete,onClose:async()=>{this.hidePopup(popupTypes.DELETE_OBJECTS)},onSuccess:async()=>{await this.onRefreshClick()}}):null,this.state.popups.addFolder?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_popups__WEBPACK_IMPORTED_MODULE_6__.m,{s3:this.s3,bucketName:this.props.config.bucketName,currentPrefix:this.state.currentPrefix,onSuccess:()=>this.onRefreshClick(),onClose:()=>this.hidePopup(popupTypes.ADD_FOLDER),onError:e=>this.showErrorPopup(e)}):null,this.state.popups[popupTypes.UPLOAD_FILES]?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_popups__WEBPACK_IMPORTED_MODULE_6__.w,{s3:this.s3,bucketName:this.props.config.bucketName,currentPrefix:this.state.currentPrefix,selectedFiles:this.state.selectedFiles,folderName:t,onCancel:()=>this.hidePopup(popupTypes.UPLOAD_FILES),onUploadsComplete:this.onUploadsComplete}):null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"drop-zone "+(this.state.dragActive?"drag-active":""),onDragEnter:this.handleDragEnter,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop,onDragOver:this.handleDragOver},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Header__WEBPACK_IMPORTED_MODULE_2__.h,{breadCrumbs:e,canDelete:this.state.folders.concat(this.state.files).filter((e=>e.isSelected)).length>0,currentPrefix:this.state.currentPrefix,onBreadcrumbClick:this.onBreadcrumbClick,onRefreshClick:this.onRefreshClick,onNewFolderClick:this.showNewFolderPopup,onUploadClick:this.onUploadClick,onDeleteClick:this.onDeleteClick}),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_FileList__WEBPACK_IMPORTED_MODULE_3__.m,{files:this.state.files,folders:this.state.folders,createTableUrl:this.state.createTableUrl,onFolderClick:this.handleFolderClick,onFolderSelect:this.onFolderSelect,onFileClick:this.handleFileClick,onFileSelect:this.onFileSelect}),this.state.showBigDataMessage?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_BigDataMessage__WEBPACK_IMPORTED_MODULE_4__.W,{bigDataFolder:this.state.bigDataFolder,bucketName:this.state.bucketName}):null))}__reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}var reactHotLoader,leaveModule;reactHotLoader="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0,reactHotLoader&&(reactHotLoader.register(popupTypes,"popupTypes","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/App.jsx"),reactHotLoader.register(Credentials,"Credentials","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/App.jsx"),reactHotLoader.register(App,"App","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/App.jsx")),leaveModule="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0,leaveModule&&leaveModule(module)},34120:(e,t,n)=>{"use strict";n.d(t,{W:()=>i});var r,a=n(67294);e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e);var l,o;"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;function i(e){return a.createElement("div",{className:"govuk-inset-text"},a.createElement("p",{className:"govuk-body"},"Files in the ",a.createElement("code",null,e.bigDataFolder)," folder are not automatically accessible from your tools in the same way other files are. However, they can be manually accessed. For example, after uploading a file ",a.createElement("code",null,e.bigDataFolder,"file.csv"),", you can create a Pandas DataFrame in a JupyterLab Python notebook by running the following code."),a.createElement("code",null,a.createElement("pre",null,`import os\nimport pandas as pd \nimport boto3 \n\nclient = boto3.client('s3', region_name='eu-west-2') \nresponse = client.get_object(\n Bucket='${e.bucketName}', \n Key=os.environ['S3_PREFIX'] + '${e.bigDataFolder}file.csv' ) \ndf = pd.read_csv(response['Body'])\n `)),a.createElement("p",{className:"govuk-body govuk-!-margin-top-2"},"You can also create a tibble from this file in R by running the following code."),a.createElement("code",null,a.createElement("pre",null,`library("aws.s3")\nlibrary("readr")\nfilename <- "${e.bigDataFolder}file.csv"\nconn = s3connection(paste(c(\n "s3://${e.bucketName}/",\n Sys.getenv("S3_PREFIX"), filename), \n collapse=""\n))\n\ntb = read_csv(conn)\nclose(conn)\n `)))}(l="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&l.register(i,"BigDataMessage","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/BigDataMessage.jsx"),(o="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&o(e)},21039:(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{m:()=>FileList});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(67294),_FileList_css__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(89185),_utils__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(15471),enterModule;module=__webpack_require__.hmd(module),enterModule="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0,enterModule&&enterModule(module);var __signature__="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e},reactHotLoader,leaveModule;function TableHeader(e){return react__WEBPACK_IMPORTED_MODULE_0__.createElement("tr",{className:"govuk-table__row"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__header govuk-table__header--checkbox"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("th",{scope:"col",className:"govuk-table__header"},"Name"),react__WEBPACK_IMPORTED_MODULE_0__.createElement("th",{scope:"col",className:"govuk-table__header",style:{width:"15em"}},"Last modified"),react__WEBPACK_IMPORTED_MODULE_0__.createElement("th",{scope:"col",className:"govuk-table__header",style:{width:"5em"}},"Size"),react__WEBPACK_IMPORTED_MODULE_0__.createElement("th",{scope:"col",className:"govuk-table__header",style:{width:"8em"}}," "))}function TableRowBigDataFolder(e){const t=(0,_utils__WEBPACK_IMPORTED_MODULE_2__.Oq)(e.folder.Prefix);return react__WEBPACK_IMPORTED_MODULE_0__.createElement("tr",{className:"govuk-table__row"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell govuk-table__cell--checkbox",title:"This folder cannot be deleted"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"database",className:"svg-inline--fa fa-database fa-w-14",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",style:{marginTop:"10px",height:"24px",marginLeft:"2px"},width:"21",height:"24"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{fill:"currentColor",d:"M448 73.143v45.714C448 159.143 347.667 192 224 192S0 159.143 0 118.857V73.143C0 32.857 100.333 0 224 0s224 32.857 224 73.143zM448 176v102.857C448 319.143 347.667 352 224 352S0 319.143 0 278.857V176c48.125 33.143 136.208 48.572 224 48.572S399.874 209.143 448 176zm0 160v102.857C448 479.143 347.667 512 224 512S0 479.143 0 438.857V336c48.125 33.143 136.208 48.572 224 48.572S399.874 369.143 448 336z"}))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{draggable:"false",className:"folder govuk-link govuk-link--no-visited",onClick:t=>(t.preventDefault(),e.onClick(),!1),href:"#"},t)),react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell"}))}function TableRowSharedFolder(e){const t=(0,_utils__WEBPACK_IMPORTED_MODULE_2__.Oq)(e.folder.Prefix);return react__WEBPACK_IMPORTED_MODULE_0__.createElement("tr",{className:"govuk-table__row"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell govuk-table__cell--checkbox",title:"This folder cannot be deleted"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"80%",viewBox:"0 0 400 400","enable-background":"new 0 0 400 400",style:{marginLeft:"-4px",marginTop:"7px",height:"30px"}},react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{fill:"#FEFEFE",opacity:"1.000000",stroke:"none",d:"\nM1.000000,149.000000 C1.000000,99.348694 1.000000,50.197392 1.000000,1.023043 C134.276306,1.023043 267.552643,1.023043 400.914490,1.023043 C400.914490,134.234604 400.914490,267.469269 400.914490,400.851990 C267.666779,400.851990 134.333420,400.851990 1.000000,400.851990 C1.000000,317.114105 1.000000,233.307053 1.000000,149.000000\nM330.499756,375.620758 C346.829956,375.620758 363.160248,375.645264 379.490356,375.609619 C386.851654,375.593536 389.979431,372.624390 389.981537,365.442352 C390.008698,273.124939 390.143555,180.807144 389.911224,88.490318 C389.842041,60.995514 366.435394,46.064514 347.754425,46.642120 C322.782593,47.414238 297.768951,46.833019 272.773254,46.833126 C261.775146,46.833176 250.777008,46.852341 239.778976,46.824715 C235.304367,46.813477 232.501694,48.863743 231.901337,53.343231 C231.075256,59.507065 234.317398,63.019737 240.751022,63.023434 C275.744995,63.043533 310.738983,63.009411 345.732819,63.075512 C348.693054,63.081104 351.734039,63.358219 354.597260,64.071800 C365.569824,66.806412 374.015564,77.992943 372.333801,87.644501 C363.027618,81.028839 352.585052,79.806786 341.553650,79.872276 C301.228668,80.111702 260.901428,79.967010 220.575058,79.967010 C218.804901,79.967010 217.034744,79.967010 214.999573,79.967010 C214.999573,75.122726 215.009140,70.815552 214.997955,66.508438 C214.940262,44.269337 197.911896,26.177160 175.676025,25.983925 C134.854919,25.629177 94.025795,25.663500 53.204830,26.047737 C31.959282,26.247715 14.969735,44.234421 14.968859,65.326912 C14.964725,164.809753 14.966973,264.292603 14.967052,363.775452 C14.967060,373.577026 17.047764,375.620056 27.051868,375.620178 C127.867821,375.621155 228.683777,375.620758 330.499756,375.620758\nz"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{fill:"#010101",opacity:"1.000000",stroke:"none",d:"\nM329.999756,375.620758 C228.683777,375.620758 127.867821,375.621155 27.051868,375.620178 C17.047764,375.620056 14.967060,373.577026 14.967052,363.775452 C14.966973,264.292603 14.964725,164.809753 14.968859,65.326912 C14.969735,44.234421 31.959282,26.247715 53.204830,26.047737 C94.025795,25.663500 134.854919,25.629177 175.676025,25.983925 C197.911896,26.177160 214.940262,44.269337 214.997955,66.508438 C215.009140,70.815552 214.999573,75.122726 214.999573,79.967010 C217.034744,79.967010 218.804901,79.967010 220.575058,79.967010 C260.901428,79.967010 301.228668,80.111702 341.553650,79.872276 C352.585052,79.806786 363.027618,81.028839 372.333801,87.644501 C374.015564,77.992943 365.569824,66.806412 354.597260,64.071800 C351.734039,63.358219 348.693054,63.081104 345.732819,63.075512 C310.738983,63.009411 275.744995,63.043533 240.751022,63.023434 C234.317398,63.019737 231.075256,59.507065 231.901337,53.343231 C232.501694,48.863743 235.304367,46.813477 239.778976,46.824715 C250.777008,46.852341 261.775146,46.833176 272.773254,46.833126 C297.768951,46.833019 322.782593,47.414238 347.754425,46.642120 C366.435394,46.064514 389.842041,60.995514 389.911224,88.490318 C390.143555,180.807144 390.008698,273.124939 389.981537,365.442352 C389.979431,372.624390 386.851654,375.593536 379.490356,375.609619 C363.160248,375.645264 346.829956,375.620758 329.999756,375.620758\nM143.550705,268.134583 C138.577469,276.757874 136.116165,286.083496 135.631393,295.994141 C135.155350,305.726074 141.864670,312.987244 151.549469,312.992676 C185.519196,313.011810 219.488953,313.015289 253.458649,312.989532 C262.145599,312.982941 269.076172,306.288879 268.919373,297.619843 C268.492157,273.999603 257.477264,256.615631 237.118988,245.024185 C224.298676,237.724640 210.176498,237.651550 196.008804,238.031158 C173.429291,238.636124 155.915405,248.163132 143.550705,268.134583\nM322.498108,294.967804 C327.324768,294.966980 332.157837,295.125275 336.976715,294.930939 C345.925079,294.570007 352.705841,287.608612 352.321167,278.703827 C351.305267,255.189667 339.977783,238.306503 318.756439,228.210251 C306.269928,222.269684 292.863617,223.440033 279.621796,223.856018 C271.739655,224.103638 264.373230,226.303818 257.557129,230.371155 C267.307404,249.988907 277.098969,269.328461 286.494202,288.858643 C288.717194,293.479614 291.881958,295.010315 296.533600,294.982056 C304.855103,294.931519 313.177124,294.967804 322.498108,294.967804\nM175.851868,214.652435 C191.452423,229.510117 214.162537,229.479782 228.981094,214.581497 C243.481293,200.003265 243.509430,176.287491 229.043869,161.662811 C214.848801,147.311646 191.047592,146.996277 176.475922,160.966309 C161.321152,175.495331 160.835693,198.320526 175.851868,214.652435\nM322.941284,176.031174 C322.961395,174.366333 323.000488,172.701462 322.998657,171.036636 C322.979828,153.877197 309.274109,139.300873 292.038269,138.102112 C269.752899,136.552155 251.960648,157.704849 257.336884,179.357544 C261.801575,197.338928 280.111603,208.607147 297.919922,203.820709 C311.654602,200.129181 319.781403,190.727692 322.941284,176.031174\nz"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{fill:"#FEFEFE",opacity:"1.000000",stroke:"none",d:"\nM143.764099,267.832886 C155.915405,248.163132 173.429291,238.636124 196.008804,238.031158 C210.176498,237.651550 224.298676,237.724640 237.118988,245.024185 C257.477264,256.615631 268.492157,273.999603 268.919373,297.619843 C269.076172,306.288879 262.145599,312.982941 253.458649,312.989532 C219.488953,313.015289 185.519196,313.011810 151.549469,312.992676 C141.864670,312.987244 135.155350,305.726074 135.631393,295.994141 C136.116165,286.083496 138.577469,276.757874 143.764099,267.832886\nz"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{fill:"#FEFEFE",opacity:"1.000000",stroke:"none",d:"\nM321.998535,294.967804 C313.177124,294.967804 304.855103,294.931519 296.533600,294.982056 C291.881958,295.010315 288.717194,293.479614 286.494202,288.858643 C277.098969,269.328461 267.307404,249.988907 257.557129,230.371155 C264.373230,226.303818 271.739655,224.103638 279.621796,223.856018 C292.863617,223.440033 306.269928,222.269684 318.756439,228.210251 C339.977783,238.306503 351.305267,255.189667 352.321167,278.703827 C352.705841,287.608612 345.925079,294.570007 336.976715,294.930939 C332.157837,295.125275 327.324768,294.966980 321.998535,294.967804\nz"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{fill:"#FEFEFE",opacity:"1.000000",stroke:"none",d:"\nM175.598373,214.399170 C160.835693,198.320526 161.321152,175.495331 176.475922,160.966309 C191.047592,146.996277 214.848801,147.311646 229.043869,161.662811 C243.509430,176.287491 243.481293,200.003265 228.981094,214.581497 C214.162537,229.479782 191.452423,229.510117 175.598373,214.399170\nz"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{fill:"#FDFDFD",opacity:"1.000000",stroke:"none",d:"\nM322.909729,176.471893 C319.781403,190.727692 311.654602,200.129181 297.919922,203.820709 C280.111603,208.607147 261.801575,197.338928 257.336884,179.357544 C251.960648,157.704849 269.752899,136.552155 292.038269,138.102112 C309.274109,139.300873 322.979828,153.877197 322.998657,171.036636 C323.000488,172.701462 322.961395,174.366333 322.909729,176.471893\nz"}))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{draggable:"false",className:"folder govuk-link govuk-link--no-visited",onClick:t=>(t.preventDefault(),e.onClick(),!1),href:"#"},t)),react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell"}))}function TableRowFolder(e){const t=(0,_utils__WEBPACK_IMPORTED_MODULE_2__.Oq)(e.folder.Prefix),n=e.folder;return react__WEBPACK_IMPORTED_MODULE_0__.createElement("tr",{className:"govuk-table__row pointer",onClick:()=>e.onFolderSelect(n,!n.isSelected)},react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell govuk-table__cell--checkbox"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"govuk-form-group",style:{marginBottom:"0"}},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"govuk-checkboxes--small"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"govuk-checkboxes__item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",{className:"govuk-checkboxes__input",type:"checkbox",checked:n.isSelected,onChange:t=>e.onFolderSelect(n,t.target.checked)}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("label",{className:"govuk-label govuk-checkboxes__label"})))))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{className:"folder govuk-link govuk-link--no-visited",onClick:t=>{t.preventDefault(),t.stopPropagation(),e.onClick()},href:"#"},t)),react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell",style:{width:"8em"}}))}function TableRowFile(e){let t=null;const n=e.file,r=(0,_utils__WEBPACK_IMPORTED_MODULE_2__.LH)(n.Key);if(".csv"===n.Key.substr(n.Key.length-4,n.Key.length)){const r=`${e.createTableUrl}?path=${n.Key}`;t=react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{className:"create-table govuk-link govuk-link--no-visited",href:r},"Create table")}return react__WEBPACK_IMPORTED_MODULE_0__.createElement("tr",{className:"govuk-table__row pointer",onClick:()=>e.onFileSelect(n,!n.isSelected)},react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell govuk-table__cell--checkbox"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"govuk-form-group",style:{marginBottom:"0"}},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"govuk-checkboxes--small"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"govuk-checkboxes__item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",{className:"govuk-checkboxes__input",type:"checkbox",checked:n.isSelected,onChange:t=>e.onFileSelect(n,t.target.checked)}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("label",{className:"govuk-label govuk-checkboxes__label"}))))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{className:"file govuk-link govuk-link--no-visited",onClick:t=>{t.preventDefault(),t.stopPropagation(),e.onFileClick(n.Key)},href:"#"},r)),react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell"},n.formattedDate.toLocaleString()),react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell"},(0,_utils__WEBPACK_IMPORTED_MODULE_2__.RD)(n.Size)),react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell"},t))}class FileList extends react__WEBPACK_IMPORTED_MODULE_0__.Component{constructor(e){super(e)}render(){const e=this.props.files,t=this.props.folders;return react__WEBPACK_IMPORTED_MODULE_0__.createElement("table",{className:"govuk-table",style:{tableLayout:"fixed"}},react__WEBPACK_IMPORTED_MODULE_0__.createElement("thead",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(TableHeader,null)),react__WEBPACK_IMPORTED_MODULE_0__.createElement("tbody",null,t.map((e=>e.isBigData?react__WEBPACK_IMPORTED_MODULE_0__.createElement(TableRowBigDataFolder,{key:e.Prefix,folder:e,onClick:()=>this.props.onFolderClick(e.Prefix)}):e.isSharedFolder?react__WEBPACK_IMPORTED_MODULE_0__.createElement(TableRowSharedFolder,{key:e.Prefix,folder:e,onClick:()=>this.props.onFolderClick(e.Prefix)}):react__WEBPACK_IMPORTED_MODULE_0__.createElement(TableRowFolder,{key:e.Prefix,folder:e,onClick:()=>this.props.onFolderClick(e.Prefix),onFolderSelect:this.props.onFolderSelect}))),e.map((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(TableRowFile,{key:e.Key,file:e,createTableUrl:this.props.createTableUrl,onFileClick:()=>this.props.onFileClick(e.Key),onFileSelect:this.props.onFileSelect})))))}__reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}reactHotLoader="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0,reactHotLoader&&(reactHotLoader.register(TableHeader,"TableHeader","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/FileList.jsx"),reactHotLoader.register(TableRowBigDataFolder,"TableRowBigDataFolder","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/FileList.jsx"),reactHotLoader.register(TableRowSharedFolder,"TableRowSharedFolder","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/FileList.jsx"),reactHotLoader.register(TableRowFolder,"TableRowFolder","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/FileList.jsx"),reactHotLoader.register(TableRowFile,"TableRowFile","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/FileList.jsx"),reactHotLoader.register(FileList,"FileList","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/FileList.jsx")),leaveModule="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0,leaveModule&&leaveModule(module)},18906:(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{h:()=>Header});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(67294),_icons_trash__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(72545),_icons_upload__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(85628),_icons_newfolder__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(87602),enterModule;module=__webpack_require__.hmd(module),enterModule="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0,enterModule&&enterModule(module);var __signature__="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e},reactHotLoader,leaveModule;class Header extends react__WEBPACK_IMPORTED_MODULE_0__.Component{constructor(e){super(e),this.state={spin:!1}}handleRefreshClick(){this.props.onRefreshClick(),this.setState({spin:!0})}render(){const e=this.props.breadCrumbs.map((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"browser-breadcrumb",key:e.prefix}," ",react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"",onClick:t=>this.props.onBreadcrumbClick(t,e),className:"browser-breadcrumb-link"},e.label)," ")));return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"browser-header"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{className:"navbutton",onClick:()=>this.handleRefreshClick()},react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg",{spinner:"refresh","aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"sync",className:"navbutton-icon navbutton-icon-small svg-inline--fa fa-sync fa-w-16"+(this.state.spin?" spin":""),onAnimationEnd:()=>this.setState({spin:!1}),role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"60",height:"60"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{fill:"currentColor",d:"M440.65 12.57l4 82.77A247.16 247.16 0 0 0 255.83 8C134.73 8 33.91 94.92 12.29 209.82A12 12 0 0 0 24.09 224h49.05a12 12 0 0 0 11.67-9.26 175.91 175.91 0 0 1 317-56.94l-101.46-4.86a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12H500a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12h-47.37a12 12 0 0 0-11.98 12.57zM255.83 432a175.61 175.61 0 0 1-146-77.8l101.8 4.87a12 12 0 0 0 12.57-12v-47.4a12 12 0 0 0-12-12H12a12 12 0 0 0-12 12V500a12 12 0 0 0 12 12h47.35a12 12 0 0 0 12-12.6l-4.15-82.57A247.17 247.17 0 0 0 255.83 504c121.11 0 221.93-86.92 243.55-201.82a12 12 0 0 0-11.8-14.18h-49.05a12 12 0 0 0-11.67 9.26A175.86 175.86 0 0 1 255.83 432z"}))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("ul",{className:"govuk-body browser-breadcrumbs"},e),react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{className:"navbutton",title:"Create folder",onClick:()=>this.props.onNewFolderClick(this.props.currentPrefix)},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_icons_newfolder__WEBPACK_IMPORTED_MODULE_3__.w,{isNavIcon:!0})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{className:"navbutton",title:"Upload files",onClick:()=>this.props.onUploadClick(this.props.currentPrefix)},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_icons_upload__WEBPACK_IMPORTED_MODULE_2__.r,{isNavIcon:!0})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{className:"navbutton",title:"Delete selected items",onClick:()=>this.props.onDeleteClick(),disabled:!this.props.canDelete},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_icons_trash__WEBPACK_IMPORTED_MODULE_1__.X,{isNavIcon:!0})))}__reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}reactHotLoader="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0,reactHotLoader&&reactHotLoader.register(Header,"Header","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/Header.jsx"),leaveModule="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0,leaveModule&&leaveModule(module)},87602:(e,t,n)=>{"use strict";n.d(t,{w:()=>u});var r,a=n(67294),l=n(94184),o=n.n(l);e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e);var i,s;"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;function u(e){const t=o()("svg-inline--fa","fa-folder-plus","fa-w-16",{"navbutton-icon":e.isNavIcon,"button-icon":!e.isNavIcon,"navbutton-icon-large":e.isNavIcon});return a.createElement("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"folder-plus",className:t,role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:e.isNavIcon?"60":"18",height:e.isNavIcon?"60":"18"},a.createElement("path",{fill:"currentColor",d:"M464 128H272l-64-64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48zm-96 168c0 8.84-7.16 16-16 16h-72v72c0 8.84-7.16 16-16 16h-16c-8.84 0-16-7.16-16-16v-72h-72c-8.84 0-16-7.16-16-16v-16c0-8.84 7.16-16 16-16h72v-72c0-8.84 7.16-16 16-16h16c8.84 0 16 7.16 16 16v72h72c8.84 0 16 7.16 16 16v16z"}))}(i="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&i.register(u,"NewFolderIcon","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/icons/newfolder.js"),(s="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&s(e)},72545:(e,t,n)=>{"use strict";n.d(t,{X:()=>u});var r,a=n(67294),l=n(94184),o=n.n(l);e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e);var i,s;"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;function u(e){let t=16,n=18;e.isNavIcon&&(t=60,n=60);const r=o()("svg-inline--fa","fa-trash-alt","fa-w-14",{"navbutton-icon":e.isNavIcon,"button-icon":!e.isNavIcon});return a.createElement("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"trash-alt",className:r,role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:t,height:n},a.createElement("path",{fill:"currentColor",d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}))}(i="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&i.register(u,"TrashIcon","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/icons/trash.js"),(s="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&s(e)},85628:(e,t,n)=>{"use strict";n.d(t,{r:()=>u});var r,a=n(67294),l=n(94184),o=n.n(l);e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e);var i,s;"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;function u(e){const t=o()("svg-inline--fa","fa-cloud-upload-alt",{"navbutton-icon":e.isNavIcon,"button-icon":!e.isNavIcon,"fa-w-14":!e.isNavIcon,"fa-w-20":e.isNavIcon});return a.createElement("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"cloud-upload-alt",className:t,role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",width:e.isNavIcon?"60":null,height:e.isNavIcon?"60":null},a.createElement("path",{fill:"currentColor",d:"M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zM393.4 288H328v112c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V288h-65.4c-14.3 0-21.4-17.2-11.3-27.3l105.4-105.4c6.2-6.2 16.4-6.2 22.6 0l105.4 105.4c10.1 10.1 2.9 27.3-11.3 27.3z"}))}(i="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&i.register(u,"UploadIcon","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/icons/upload.js"),(s="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&s(e)},80976:(e,t,n)=>{"use strict";var r,a=n(67294),l=n(73935),o=n(11609);e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e);"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;const i=document.getElementById("your-files-app");var s,u;l.render(a.createElement(o.Z,{config:YOURFILES_CONFIG}),i),(s="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&s.register(i,"el","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/index.js"),(u="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&u(e)},63145:(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{m:()=>AddFolderPopup});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(67294),_icons_newfolder__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(87602),enterModule;function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}module=__webpack_require__.hmd(module),enterModule="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0,enterModule&&enterModule(module);var __signature__="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e},reactHotLoader,leaveModule;class AddFolderPopup extends react__WEBPACK_IMPORTED_MODULE_0__.Component{constructor(e){super(e),_defineProperty(this,"escFunction",(e=>{"Escape"===e.key&&this.props.onClose()})),this.state={value:""},this.handleChange=this.handleChange.bind(this),this.handleSubmit=this.handleSubmit.bind(this)}componentDidMount(){document.addEventListener("keydown",this.escFunction,!1)}componentWillUnmount(){document.removeEventListener("keydown",this.escFunction,!1)}async handleSubmit(e){e.preventDefault();const t=this.state.value;if(!t)return;const n=this.props.s3,r=this.props.bucketName,a=this.props.currentPrefix,l=this.props.onSuccess,o=this.props.onClose,i=this.props.onError;const s={Bucket:r,Key:a+t.replace(/^\/+/g,"").replace(/\/+$/g,"")+"/"};let u=!1;try{await n.headObject(s).promise()}catch(e){if(u="NotFound"===e.code,!u)return void i(e)}if(u){try{await n.putObject(s).promise()}catch(e){return void i(e)}l(),o()}else alert("Error: folder or object already exists at "+s.Key)}handleChange(e){this.setState({value:e.target.value})}render(){return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"popup-container"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"popup-container__overlay",onClick:this.props.onCancel}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"popup-container__modal",tabIndex:"-1",role:"dialog","aria-labelledby":"add-folder-title","aria-hidden":"true"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("form",{className:"modal-dialog",name:"add_folder_form",onSubmit:()=>this.handleSubmit(event)},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-header"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("h2",{className:"modal-title govuk-heading-m"},"New folder")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-body"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"govuk-form-group"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("label",{className:"govuk-label",htmlFor:"folder"},"Folder name"),react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",{className:"govuk-input",type:"text",value:this.state.value,onChange:this.handleChange,required:!0,autoFocus:!0}))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-footer",style:{textAlign:"right"}},react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{type:"button",className:"govuk-button govuk-button--secondary modal-button",onClick:this.props.onClose},"Cancel")," ",react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{type:"submit",className:"govuk-button modal-button"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_icons_newfolder__WEBPACK_IMPORTED_MODULE_1__.w,null)," Add Folder")))))}__reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}class AddFilesPopup extends react__WEBPACK_IMPORTED_MODULE_0__.Component{constructor(e){super(e)}__reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}reactHotLoader="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0,reactHotLoader&&(reactHotLoader.register(AddFolderPopup,"AddFolderPopup","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/popups/AddFolder.jsx"),reactHotLoader.register(AddFilesPopup,"AddFilesPopup","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/popups/AddFolder.jsx")),leaveModule="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0,leaveModule&&leaveModule(module)},99800:(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{q:()=>DeleteObjectsPopup});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(67294),_icons_trash__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(72545),_utils__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(15471),enterModule;function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}module=__webpack_require__.hmd(module),enterModule="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0,enterModule&&enterModule(module);var __signature__="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e};const BULK_DELETE_MAX_FILES=1e3;function DeleteTableHeader(){return react__WEBPACK_IMPORTED_MODULE_0__.createElement("thead",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("tr",{className:"govuk-table__row"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("th",{scope:"col",className:"govuk-table__header"},"Name"),react__WEBPACK_IMPORTED_MODULE_0__.createElement("th",{scope:"col",className:"govuk-table__header govuk-table__header--numeric",style:{width:"15em"}},"Last modified"),react__WEBPACK_IMPORTED_MODULE_0__.createElement("th",{scope:"col",className:"govuk-table__header govuk-table__header--numeric",style:{width:"5em"}},"Size"),react__WEBPACK_IMPORTED_MODULE_0__.createElement("th",{scope:"col",className:"govuk-table__header govuk-table__header--numeric",style:{width:"7em"}},"Status")))}class DeleteObjectsPopup extends react__WEBPACK_IMPORTED_MODULE_0__.Component{constructor(e){super(e),_defineProperty(this,"escFunction",(e=>{"Escape"===e.key&&this.onCloseClick()})),_defineProperty(this,"onDeleteClick",(async()=>{const e=this.props.s3,t=this.props.bucketName,n=this.state.foldersToDelete,r=this.state.filesToDelete;n.length,r.length;var a=!1,l=!1,o=[];this.abort=()=>{l=!0};const i=(e,t)=>{this.setState({foldersToDelete:this.state.foldersToDelete.map((n=>n.Prefix===e.Prefix?{...n,...t}:n)),filesToDelete:this.state.filesToDelete.map((n=>n.Key===e.Key?{...n,...t}:n))})},s=async()=>{const n=o.map((([e,t])=>e));try{await e.deleteObjects({Bucket:t,Delete:{Objects:o.map((([e,t])=>({Key:t})))}}).promise()}catch(e){a=!0;for(const t of n)i(t,{deleteError:e.code||e.message||e});throw e}finally{o=[]}for(const e of n)i(e,{deleteFinished:!0})},u=async(e,t)=>{o.push([e,t]),o.length>=BULK_DELETE_MAX_FILES&&await s()};for(const r of n){i(r,{deleteStarted:!0});let n=null,o=!0;for(;o&&!l;){let s;try{s=await e.listObjectsV2({Bucket:t,Prefix:r.Prefix,ContinuationToken:n}).promise(),n=s.NextContinuationToken,o=s.IsTruncated}catch(e){throw a=!0,i(r,{deleteError:e.code||e.message||e}),e}for(let e=0;e{o.length&&await s()})(),this.setState({finished:!0}),a||this.props.onSuccess())})),_defineProperty(this,"onCloseClick",(()=>{this.abort(),this.props.onClose()})),this.abort=()=>{},this.state={finished:!1,trashing:!1,aborted:!1,foldersToDelete:this.props.foldersToDelete.map((e=>({...e,deleteStarted:!1,deleteFinished:!1,deleteError:null}))),filesToDelete:this.props.filesToDelete.map((e=>({...e,deleteStarted:!1,deleteFinished:!1,deleteError:null})))}}componentDidMount(){document.addEventListener("keydown",this.escFunction,!1)}componentWillUnmount(){document.removeEventListener("keydown",this.escFunction,!1)}render(){const e=this.state.foldersToDelete,t=this.state.filesToDelete,n=t.length+e.length;return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"popup-container"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"popup-container__overlay"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"popup-container__modal"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-dialog",style:{maxWidth:"100%"}},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-header"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("h2",{className:"modal-title govuk-heading-m",id:"trash-title"},`Confirm delete of ${n} object${n>1?"s":""}`)),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-body"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"panel-body"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("table",{className:"govuk-table",style:{tableLayout:"fixed"}},react__WEBPACK_IMPORTED_MODULE_0__.createElement(DeleteTableHeader,null),react__WEBPACK_IMPORTED_MODULE_0__.createElement("tbody",{id:"s3objects-tbody"},e.map((e=>{const t=(0,_utils__WEBPACK_IMPORTED_MODULE_2__.Oq)(e.Prefix);return react__WEBPACK_IMPORTED_MODULE_0__.createElement("tr",{key:e.Prefix,className:"govuk-table__row"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell"},t),react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell govuk-table__cell--numeric govuk-table__cell-progress"},e.deleteStarted||e.deleteFinished||e.deleteError?null:react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",null,"..."),!e.deleteStarted||e.deleteFinished||e.deleteError?null:react__WEBPACK_IMPORTED_MODULE_0__.createElement("strong",{className:"govuk-tag progress-percentage"},"Deleting"),e.deleteError?react__WEBPACK_IMPORTED_MODULE_0__.createElement("strong",{className:"govuk-tag progress-error"},e.deleteError):null,e.deleteFinished?react__WEBPACK_IMPORTED_MODULE_0__.createElement("strong",{className:"govuk-tag progress-percentage-complete"},"Deleted"):null))})),t.map((e=>{const t=(0,_utils__WEBPACK_IMPORTED_MODULE_2__.LH)(e.Key);return react__WEBPACK_IMPORTED_MODULE_0__.createElement("tr",{key:e.Key,className:"govuk-table__row","ng-repeat":"object in model.objects"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell"},t),react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell govuk-table__cell--numeric"},e.LastModified.toLocaleString()),react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell govuk-table__cell--numeric"},(0,_utils__WEBPACK_IMPORTED_MODULE_2__.RD)(e.Size)),react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell govuk-table__cell--numeric govuk-table__cell-progress"},e.deleteFinished||e.deleteError?null:react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",null,"..."),e.deleteError?react__WEBPACK_IMPORTED_MODULE_0__.createElement("strong",{className:"govuk-tag progress-error"},e.deleteError):null,e.deleteFinished?react__WEBPACK_IMPORTED_MODULE_0__.createElement("strong",{className:"govuk-tag progress-percentage-complete"},"Deleted"):null))})))))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-footer"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{id:"trash-btn-cancel",type:"button",onClick:()=>this.onCloseClick(),className:"govuk-button govuk-button--secondary modal-button"},this.state.finished?"Close":"Cancel"),this.state.finished?null:react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",null," ",react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{id:"trash-btn-delete",type:"button",onClick:()=>this.onDeleteClick(),className:"govuk-button govuk-button--warning modal-button",disabled:this.state.trashing||this.state.finished},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_icons_trash__WEBPACK_IMPORTED_MODULE_1__.X,null)," Delete ",n))))))}__reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}var reactHotLoader,leaveModule;reactHotLoader="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0,reactHotLoader&&(reactHotLoader.register(BULK_DELETE_MAX_FILES,"BULK_DELETE_MAX_FILES","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/popups/DeleteObjects.jsx"),reactHotLoader.register(DeleteTableHeader,"DeleteTableHeader","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/popups/DeleteObjects.jsx"),reactHotLoader.register(DeleteObjectsPopup,"DeleteObjectsPopup","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/popups/DeleteObjects.jsx")),leaveModule="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0,leaveModule&&leaveModule(module)},78912:(e,t,n)=>{"use strict";n.d(t,{C:()=>i});var r,a=n(67294);e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e);var l,o;"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;function i({error:e,onClose:t}){const n=Object.entries(e||{}).map((([e,t])=>({key:e,value:t})));return a.createElement("div",{className:"popup-container"},a.createElement("div",{className:"popup-container__overlay"}),a.createElement("div",{className:"popup-container__modal"},a.createElement("div",{className:"modal-header"},a.createElement("h2",{className:"modal-title govuk-heading-m",id:"trash-title"},"Error ",e.code?`(${e.code})`:null)),a.createElement("div",{className:"modal-body"},a.createElement("div",{className:"panel-body"},a.createElement("p",{className:"govuk-body","ng-if":"error.errors.length"},e.message),a.createElement("table",{className:"govuk-table","ng-if":"error.errors.length"},a.createElement("thead",null,a.createElement("tr",{className:"govuk-table__row"},a.createElement("th",{className:"govuk-table__header"},"Key"),a.createElement("th",{className:"govuk-table__header"},"Value"))),a.createElement("tbody",null,n.map(((e,t)=>a.createElement("tr",{className:"govuk-table__row",key:t},a.createElement("td",{className:"govuk-table__cell"},e.key),a.createElement("td",{className:"govuk-table__cell"},e.value.toString())))))))),a.createElement("div",{className:"modal-footer"},a.createElement("div",{className:"form-group"},a.createElement("div",{className:"govuk-button-group"},a.createElement("button",{id:"error-btn-close",type:"button",onClick:t,className:"govuk-button govuk-button--secondary modal-button"},"Close"))))))}(l="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&l.register(i,"ErrorModal","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/popups/ErrorModal.js"),(o="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&o(e)},6421:(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{w:()=>UploadFilesPopup});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(67294),_utils__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(15471),_icons_upload__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(85628),enterModule;function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}module=__webpack_require__.hmd(module),enterModule="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0,enterModule&&enterModule(module);var __signature__="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e},reactHotLoader,leaveModule;function UploadHeaderRow(){return react__WEBPACK_IMPORTED_MODULE_0__.createElement("tr",{className:"govuk-table__row"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("th",{className:"govuk-table__header"},"Name"),react__WEBPACK_IMPORTED_MODULE_0__.createElement("th",{className:"govuk-table__header",style:{width:"8em"}},"Type"),react__WEBPACK_IMPORTED_MODULE_0__.createElement("th",{className:"govuk-table__header govuk-table__header--numeric",style:{width:"5em"}},"Size"),react__WEBPACK_IMPORTED_MODULE_0__.createElement("th",{className:"govuk-table__header govuk-table__header--numeric",style:{width:"7em"}},"Status"))}function UploadFileRow(e){return react__WEBPACK_IMPORTED_MODULE_0__.createElement("tr",{className:"govuk-table__row"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell"},e.file.relativePath),react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell"},e.file.type),react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell govuk-table__cell--numeric"},(0,_utils__WEBPACK_IMPORTED_MODULE_1__.RD)(e.file.size)),react__WEBPACK_IMPORTED_MODULE_0__.createElement("td",{className:"govuk-table__cell govuk-table__cell--numeric govuk-table__cell-progress"},void 0===e.file.progress&&void 0===e.file.error?react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",null,"..."):null,e.file.progress?react__WEBPACK_IMPORTED_MODULE_0__.createElement("strong",{className:"govuk-tag progress-percentage "+(100==e.file.progress?"progress-percentage-complete":"")},e.file.progress+"%"):null,void 0!==e.file.error?react__WEBPACK_IMPORTED_MODULE_0__.createElement("strong",{className:"govuk-tag progress-error",title:"{ props.file.error }"},e.file.error):null))}class UploadFilesPopup extends react__WEBPACK_IMPORTED_MODULE_0__.Component{constructor(e){super(e),_defineProperty(this,"escFunction",(e=>{"Escape"===e.key&&this.close()})),_defineProperty(this,"close",(()=>{this.state.isUploading&&this.cancelUpload(),this.props.onCancel()})),_defineProperty(this,"onUploadClick",(()=>{const e=this.props.onUploadsComplete,t=this.props.s3,n=this.props.bucketName,r=this.props.currentPrefix,a=this.state.selectedFiles;var l=!1,o=!1,i=a.length,s=[];const u=Math.min(4,a.length),c=Math.floor(4/u),d=(0,_utils__WEBPACK_IMPORTED_MODULE_1__.gc)(u);for(const u of a)d((async()=>{try{if(!o){const e=t.upload({Bucket:n,Key:r+u.relativePath,ContentType:u.type,Body:u},{queueSize:c});s.push(e),await e.on("httpUploadProgress",(e=>{u.progress=Math.round(e.total?100*e.loaded/e.total:0),this.setState({selectedFiles:a})})).promise()}}catch(e){throw l=!0,u.error=e.code||e.message||e,this.setState({selectedFiles:a}),e}finally{i--}0===i&&(this.setState({uploadsComplete:!0,isUploading:!1}),l||e(),f)}));this.cancelUpload=()=>{o=!0,s.forEach((e=>{e.abort()}))},this.setState({isUploading:!0})})),this.state={remaining:this.props.selectedFiles.length,folderName:this.props.folderName,selectedFiles:this.props.selectedFiles,currentPrefix:this.props.currentPrefix,uploadsComplete:!1,isUploading:!1}}componentDidMount(){document.addEventListener("keydown",this.escFunction,!1)}componentWillUnmount(){document.removeEventListener("keydown",this.escFunction,!1)}render(){const e=this.state.selectedFiles;return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"popup-container"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"popup-container__overlay",onClick:this.props.onCancel}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"popup-container__modal modal-xl"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-dialog",style:{maxWidth:"100%"}},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-header"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("h2",{className:"modal-title govuk-heading-m",id:"upload-title"},"Upload to ",this.state.folderName)),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-body"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"col-md-18"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"panel-body"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("table",{className:"govuk-table",style:{tableLayout:"fixed"}},react__WEBPACK_IMPORTED_MODULE_0__.createElement("thead",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(UploadHeaderRow,null)),react__WEBPACK_IMPORTED_MODULE_0__.createElement("tbody",{id:"upload-tbody"},e.map((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(UploadFileRow,{file:e,key:e.relativePath}))))))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"govuk-warning-text",style:{marginBottom:0}},react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"govuk-warning-text__icon","aria-hidden":"true"},"!"),react__WEBPACK_IMPORTED_MODULE_0__.createElement("strong",{className:"govuk-warning-text__text"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"govuk-warning-text__assistive"},"Warning"),"It is your personal responsibility to protect and handle data appropriately. If you are unsure about the information security or data protection of this upload, seek advice on"," ",react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{className:"govuk-link",href:"https://workspace.trade.gov.uk/working-at-dit/policies-and-guidance/guidance/information-classification-and-handling/"},"information classification and data handling")," ","or contact your line manager."))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-footer",style:{textAlign:"right"}},react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{id:"upload-btn-cancel",type:"button",className:"govuk-button govuk-button--secondary modal-button",onClick:()=>this.close()},this.state.isUploading?"Cancel":"Close"),this.state.uploadsComplete?null:react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",null," ",react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{onClick:()=>this.onUploadClick(e),className:"govuk-button modal-button",disabled:this.state.isUploading},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_icons_upload__WEBPACK_IMPORTED_MODULE_2__.r,null)," Upload (",this.state.selectedFiles.length,")"))))))}__reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}reactHotLoader="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0,reactHotLoader&&(reactHotLoader.register(UploadHeaderRow,"UploadHeaderRow","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/popups/UploadFiles.jsx"),reactHotLoader.register(UploadFileRow,"UploadFileRow","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/popups/UploadFiles.jsx"),reactHotLoader.register(UploadFilesPopup,"UploadFilesPopup","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/popups/UploadFiles.jsx")),leaveModule="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0,leaveModule&&leaveModule(module)},65739:(e,t,n)=>{"use strict";n.d(t,{m:()=>r.m,w:()=>a.w});var r=n(63145),a=n(6421);"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature},15471:(e,t,n)=>{"use strict";var r;n.d(t,{LH:()=>i,Oq:()=>s,RD:()=>o,R_:()=>u,ZD:()=>l,gc:()=>c}),e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e);"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;const a="home";function l(e,t,n){const r=[{prefix:e,label:a}],l=new RegExp(`(^${e}|^${t}).*?`),o=n.match(l),i=n.replace(l,"").split("/");let s=null!==o?o[1]:"";for(let e=0;e=e)){for(++t;n.length;)try{await n.shift()()}catch(e){}--t}}}var d,f;(d="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(d.register(a,"ROOT_FOLDER_NAME","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/utils.js"),d.register(l,"getBreadcrumbs","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/utils.js"),d.register(o,"bytesToSize","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/utils.js"),d.register(i,"fullPathToFilename","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/utils.js"),d.register(s,"prefixToFolder","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/utils.js"),d.register(u,"getFolderName","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/utils.js"),d.register(c,"fileQueue","/Users/nickross/work/dit/data-workspace/dataworkspace/dataworkspace/static/js/react_apps/src/your-files/utils.js")),(f="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&f(e)},94184:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e=[],t=0;t{"use strict";n.d(t,{Z:()=>l});var r=n(23645),a=n.n(r)()((function(e){return e[1]}));a.push([e.id,'.govuk-link--no-visited:visited{color:#005ea5}.govuk-link--no-visited:focus{color:#000}.govuk-button--warning[disabled],.govuk-button--warning[disabled]:hover{opacity:.5;background:#b10e1e}.browser-header{background:#005ea5;color:#fff;display:flex;align-items:center;height:40px;margin-bottom:15px}@media(min-width: 40.0625em){.browser-header{height:60px}}.browser-breadcrumbs{padding-left:15px;margin-bottom:0;height:40px;line-height:40px;font-size:18px;flex:0 1 100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#fff;direction:rtl;text-align:left}@media(min-width: 40.0625em){.browser-breadcrumbs{height:60px;line-height:60px;font-size:24px}}.browser-breadcrumb{display:inline;cursor:pointer;position:relative;top:2px}.browser-breadcrumb:before{content:"/";vertical-align:middle;position:relative;color:#fff;font-size:30px;top:1px}@media(min-width: 40.0625em){.browser-breadcrumb:after{font-size:39px;top:3px}}.browser-breadcrumb-link,.browser-breadcrumb-link:hover{color:#fff;text-decoration:none}.browser-breadcrumb-link:focus{background:#ffbf47;color:#000}.navbutton{cursor:pointer;font-size:20px;text-align:center;width:40px;height:40px;line-height:40px;border:none;padding:0;margin:0;text-decoration:none;background:rgba(0,0,0,0);color:#fff;flex:0 0 auto;-webkit-appearance:none;-moz-appearance:none}.navbutton[disabled]{color:rgba(255,255,255,.6)}.navbutton:focus{position:relative;z-index:1;outline:4px solid #ffbf47;background:#005ea5}.navbutton:active{position:relative;z-index:1;top:2px;background:#005ea5}.navbutton+.navbutton:focus,.browser-breadcrumbs+.navbutton:focus{border-left:2px solid rgba(0,0,0,0)}.navbutton-icon{display:block;margin:auto;height:20px}@media(min-width: 40.0625em){.navbutton{width:60px;height:60px;line-height:60px}.navbutton-icon{height:24px}.navbutton-icon-small{height:22px}.navbutton-icon-large{height:26px}}.navbutton+.navbutton,.browser-breadcrumbs+.navbutton,.browser-breadcrumbs{border-left:2px solid #fff}.button-icon{height:18px;margin-top:-1px;margin-right:2px;vertical-align:top}.govuk-table__header--checkbox{width:25px}.govuk-table__cell--checkbox{padding:0 5px 0 8px;vertical-align:top}.govuk-table__row:hover .govuk-checkboxes__label:before,.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:not(:disabled)+.govuk-checkboxes__label:before{box-shadow:0 0 0 8px #dee0e2}.govuk-table__cell{vertical-align:top}@media(min-width: 40.0625em){.govuk-table__header--checkbox{width:35px}.govuk-table__cell--checkbox{padding:0 5px 0 10px}.govuk-checkboxes--small .govuk-checkboxes__label:before{top:10px;width:25px;height:25px}.govuk-checkboxes--small .govuk-checkboxes__label:after{top:18px}.govuk-table__row:hover .govuk-checkboxes__label:before,.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:not(:disabled)+.govuk-checkboxes__label:before{box-shadow:0 0 0 10px #dee0e2}}.pointer{cursor:pointer}.dropzone{background:#fff;border:2px solid #fff;margin:-2px}.dropzone.dragover{box-shadow:0 0 0 5px #ffbf47}.govuk-table__cell-progress{overflow:hidden;text-overflow:ellipsis}.progress-percentage,.progress-error,.progress-percentage-complete{font-size:14px}.progress-percentage-complete{background:#00703c}.progress-percentage{font-variant-numeric:tabular-nums}.progress-error{background:#d4351c;text-transform:none;letter-spacing:0}.modal{visibility:hidden;opacity:0;position:fixed;z-index:2040;top:-100%;left:0;right:0;width:100%;height:100%;padding:10px;box-sizing:border-box}@media(min-width: 40.0625em){.modal{padding:40px 20px}}.modal-in{transition:visibility 0s linear .1s,opacity .3s linear .1s,top .3s ease-out .1s;visibility:visible;opacity:1;top:0}.modal-out{transition:visibility 0s linear .3s,opacity .3s linear,top .3s ease-in;visibility:hidden;opacity:0;top:-100%}.modal-dialog{margin:0 auto;max-width:640px}.modal-xl{max-width:940px}.modal-dialog{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-header{background-color:#005ea5;color:#fff;padding:15px}.modal-header button.close{color:#fff}.modal-title{color:#fff;margin-bottom:0}.modal-body{padding:15px 15px 0 15px;background:#fff;max-height:calc(100vh - 16em);overflow-y:scroll}.modal-footer{padding:15px 15px 15px 15px;text-align:right;background:#fff}@media(min-width: 40.0625em){.modal-button{margin-bottom:0}}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000;opacity:0;visibility:hidden}.modal-backdrop-in{transition:visibility 0s linear 0s,opacity .25s linear;visibility:visible;opacity:.5}.modal-backdrop-out{transition:visibility 0s linear .5s,opacity .25s linear .25s;visibility:hidden;opacity:0}.progress-bar{min-width:25px;width:0%}.spin{animation:1s ease-in-out 0s 1 normal spin}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.popup-container .popup-container__overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000;opacity:.5}.popup-container .popup-container__modal{position:fixed;z-index:2040;top:0;left:0;right:0;width:100%;height:100%;padding:10px;box-sizing:border-box;max-width:640px}@media(min-width: 40.0625em){.popup-container .popup-container__modal{padding:40px 20px;margin:0 auto;max-width:940px}}.popup-container .modal-footer{overflow:hidden}.popup-container .modal-footer .form-group{float:right}.popup-container .modal-footer .govuk-button-group{margin-bottom:0}.drop-zone{border:2px solid rgba(0,0,0,0)}.drop-zone.drag-active{box-shadow:0 0 0 5px #ffbf47}',""]);const l=a},53292:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(23645),a=n.n(r)()((function(e){return e[1]}));a.push([e.id,".folder,\n.file,\n.create-table {\n cursor: pointer;\n /* text-decoration: none; */\n}\n",""]);const l=a},23645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(r)for(var l=0;l{"use strict";var r=n(67294),a=n(63840);function l(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n