@micromag/viewer-build 0.3.506 → 0.3.509

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/build/asset-manifest.json +28 -25
  2. package/build/index.html +1 -1
  3. package/build/static/css/main.1e0513ee.css +3 -0
  4. package/build/static/js/104.e7b2f53b.chunk.js +1 -0
  5. package/build/static/js/119.409edb1a.chunk.js +1 -0
  6. package/build/static/js/139.4365a1df.chunk.js +1 -0
  7. package/build/static/js/165.a09e3185.chunk.js +1 -0
  8. package/build/static/js/177.d6cc3845.chunk.js +1 -0
  9. package/build/static/js/299.a106f35a.chunk.js +1 -0
  10. package/build/static/js/359.768ec35e.chunk.js +1 -0
  11. package/build/static/js/375.0bcd7609.chunk.js +2 -0
  12. package/build/static/js/{96.dbeb97ca.chunk.js.LICENSE.txt → 375.0bcd7609.chunk.js.LICENSE.txt} +2 -3
  13. package/build/static/js/462.307a7cd0.chunk.js +1 -0
  14. package/build/static/js/490.afe84570.chunk.js +1 -0
  15. package/build/static/js/50.9da80c9d.chunk.js +1 -0
  16. package/build/static/js/526.efc3b856.chunk.js +2 -0
  17. package/build/static/js/526.efc3b856.chunk.js.LICENSE.txt +10 -0
  18. package/build/static/js/567.1a366653.chunk.js +1 -0
  19. package/build/static/js/595.27131768.chunk.js +1 -0
  20. package/build/static/js/62.4749e3e9.chunk.js +2 -0
  21. package/build/static/js/62.4749e3e9.chunk.js.LICENSE.txt +5 -0
  22. package/build/static/js/625.6bcbdc63.js +2 -0
  23. package/build/static/js/{495.893e8394.js.LICENSE.txt → 625.6bcbdc63.js.LICENSE.txt} +10 -5
  24. package/build/static/js/626.c42d15c2.chunk.js +2 -0
  25. package/build/static/js/626.c42d15c2.chunk.js.LICENSE.txt +1 -0
  26. package/build/static/js/66.18614223.chunk.js +2 -0
  27. package/build/static/js/784.1708dd96.chunk.js +1 -0
  28. package/build/static/js/786.6bf1d59f.chunk.js +1 -0
  29. package/build/static/js/793.ed1b7b39.chunk.js +1 -0
  30. package/build/static/js/main.44b4d5d1.js +2 -0
  31. package/build/static/js/runtime~main.4d15fd3a.js +1 -0
  32. package/package.json +6 -6
  33. package/build/static/css/main.6ea5a00e.css +0 -3
  34. package/build/static/js/101.370dc920.chunk.js +0 -1
  35. package/build/static/js/110.f8dfd454.chunk.js +0 -1
  36. package/build/static/js/170.d58d9899.chunk.js +0 -1
  37. package/build/static/js/269.442a4a52.chunk.js +0 -1
  38. package/build/static/js/312.b144c987.chunk.js +0 -1
  39. package/build/static/js/328.0c9a66a7.chunk.js +0 -1
  40. package/build/static/js/377.09a0f1a5.chunk.js +0 -1
  41. package/build/static/js/490.5dcc394f.chunk.js +0 -1
  42. package/build/static/js/495.893e8394.js +0 -2
  43. package/build/static/js/544.c39f2028.chunk.js +0 -1
  44. package/build/static/js/66.73b6c078.chunk.js +0 -2
  45. package/build/static/js/763.2e34f58e.chunk.js +0 -1
  46. package/build/static/js/90.d13e94a4.chunk.js +0 -1
  47. package/build/static/js/939.f5cdc067.chunk.js +0 -1
  48. package/build/static/js/96.dbeb97ca.chunk.js +0 -2
  49. package/build/static/js/972.26ea9886.chunk.js +0 -1
  50. package/build/static/js/990.797c408d.chunk.js +0 -1
  51. package/build/static/js/998.310c35e6.chunk.js +0 -1
  52. package/build/static/js/main.30833371.js +0 -2
  53. package/build/static/js/runtime~main.bb1d57fa.js +0 -1
  54. /package/build/static/js/{66.73b6c078.chunk.js.LICENSE.txt → 66.18614223.chunk.js.LICENSE.txt} +0 -0
  55. /package/build/static/js/{main.30833371.js.LICENSE.txt → main.44b4d5d1.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[165],{2162:function(n){n.exports=function(){var n={},t=n._fns={};return n.emit=function(n,e,r,i,o,u,a){var f=function(n){for(var e=t[n]?t[n]:[],r=n.indexOf(":"),i=-1===r?[n]:[n.substring(0,r),n.substring(r+1)],o=Object.keys(t),u=0,a=o.length;u<a;u++){var f=o[u];if("*"===f&&(e=e.concat(t[f])),2===i.length&&i[0]===f){e=e.concat(t[f]);break}}return e}(n);f.length&&function(n,t,e){for(var r=0,i=t.length;r<i&&t[r];r++)t[r].event=n,t[r].apply(t[r],e)}(n,f,[e,r,i,o,u,a])},n.on=function(n,e){t[n]||(t[n]=[]),t[n].push(e)},n.once=function(t,e){this.on(t,(function r(){e.apply(this,arguments),n.off(t,r)}))},n.off=function(n,t){var e=[];if(n&&t)for(var r=this._fns[n],i=0,o=r?r.length:0;i<o;i++)r[i]!==t&&e.push(r[i]);e.length?this._fns[n]=e:delete this._fns[n]},n}},5647:function(n,t,e){"use strict";e.r(t),e.d(t,{BasePlugin:function(){return o.A},UIPlugin:function(){return i.A},Uppy:function(){return r.A},debugLogger:function(){return u.w},default:function(){return r.A}});var r=e(7299),i=e(7496),o=e(2729),u=e(2556)},5417:function(n,t,e){"use strict";e.d(t,{N:function(){return o}});var r=e(7623);function i(n){let t="";return n.replace(/[^A-Z0-9]/gi,(n=>(t+=`-${function(n){return n.charCodeAt(0).toString(32)}(n)}`,"/")))+t}function o(n){if(function(n){return!(!n.isRemote||!n.remote)&&new Set(["box","dropbox","drive","facebook","unsplash"]).has(n.remote.provider)}(n))return n.id;const t=(0,r.A)(n);return function(n){let t="uppy";return"string"==typeof n.name&&(t+=`-${i(n.name.toLowerCase())}`),void 0!==n.type&&(t+=`-${n.type}`),n.meta&&"string"==typeof n.meta.relativePath&&(t+=`-${i(n.meta.relativePath.toLowerCase())}`),void 0!==n.data.size&&(t+=`-${n.data.size}`),void 0!==n.data.lastModified&&(t+=`-${n.data.lastModified}`),t}({...n,type:t})}},6506:function(n,t,e){"use strict";function r(n){const t=n.lastIndexOf(".");return-1===t||t===n.length-1?{name:n,extension:void 0}:{name:n.slice(0,t),extension:n.slice(t+1)}}e.d(t,{A:function(){return r}})},7623:function(n,t,e){"use strict";e.d(t,{A:function(){return o}});var r=e(6506),i=e(7544);function o(n){var t;if(n.type)return n.type;const e=n.name?null==(t=(0,r.A)(n.name).extension)?void 0:t.toLowerCase():null;return e&&e in i.A?i.A[e]:"application/octet-stream"}},590:function(n,t,e){"use strict";e.d(t,{A:function(){return r}});let r=(n=21)=>{let t="",e=n;for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[177],{138:function(e){e.exports=function(e,t){if(e===t)return!0;for(var i in e)if(!(i in t))return!1;for(var i in t)if(e[i]!==t[i])return!1;return!0}},3177:function(e,t,i){"use strict";i.r(t),i.d(t,{Dashboard:function(){return os},DashboardModal:function(){return hs},DragDrop:function(){return fs},FileInput:function(){return Ss},ProgressBar:function(){return bs},StatusBar:function(){return ws},useUppy:function(){return ks}});var s=i(4041),n=i(9067),a=i(7496);function r(e,t,i,s){return 0===i||e===t?e:0===s?t:e+(t-e)*2**(-s/i)}var o=i(5533),l={STATE_ERROR:"error",STATE_WAITING:"waiting",STATE_PREPROCESSING:"preprocessing",STATE_UPLOADING:"uploading",STATE_POSTPROCESSING:"postprocessing",STATE_COMPLETE:"complete"},h=i(5181),p=i(3373);function d(e){const t=[];let i,s="indeterminate";for(const{progress:n}of Object.values(e)){const{preprocess:e,postprocess:a}=n;null==i&&(e||a)&&({mode:s,message:i}=e||a),"determinate"===(null==e?void 0:e.mode)&&t.push(e.value),"determinate"===(null==a?void 0:a.mode)&&t.push(a.value)}return{mode:s,message:i,value:t.reduce(((e,i)=>e+i/t.length),0)}}var u=i(9682);function c(e){const t=(i=e,{hours:Math.floor(i/3600)%24,minutes:Math.floor(i/60)%60,seconds:Math.floor(i%60)});var i;return`${0===t.hours?"":`${t.hours}h`}${0===t.minutes?"":`${0===t.hours?t.minutes:` ${t.minutes.toString(10).padStart(2,"0")}`}m`}${0!==t.hours?"":`${0===t.minutes?t.seconds:` ${t.seconds.toString(10).padStart(2,"0")}`}s`}`}const f=()=>" · ";function m(e){const{newFiles:t,isUploadStarted:i,recoveredState:s,i18n:n,uploadState:a,isSomeGhost:r,startUpload:o}=e,d=p("uppy-u-reset","uppy-c-btn","uppy-StatusBar-actionBtn","uppy-StatusBar-actionBtn--upload",{"uppy-c-btn-primary":a===l.STATE_WAITING},{"uppy-StatusBar-actionBtn--disabled":r}),u=n(t&&i&&!s?"uploadXNewFiles":"uploadXFiles",{smart_count:t});return(0,h.h)("button",{type:"button",className:d,"aria-label":n("uploadXFiles",{smart_count:t}),onClick:o,disabled:r,"data-uppy-super-focusable":!0},u)}function g(e){const{i18n:t,uppy:i}=e;return(0,h.h)("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--retry","aria-label":t("retryUpload"),onClick:()=>i.retryAll().catch((()=>{})),"data-uppy-super-focusable":!0,"data-cy":"retry"},(0,h.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"8",height:"10",viewBox:"0 0 8 10"},(0,h.h)("path",{d:"M4 2.408a2.75 2.75 0 1 0 2.75 2.75.626.626 0 0 1 1.25.018v.023a4 4 0 1 1-4-4.041V.25a.25.25 0 0 1 .389-.208l2.299 1.533a.25.25 0 0 1 0 .416l-2.3 1.533A.25.25 0 0 1 4 3.316v-.908z"})),t("retry"))}function y(e){const{i18n:t,uppy:i}=e;return(0,h.h)("button",{type:"button",className:"uppy-u-reset uppy-StatusBar-actionCircleBtn",title:t("cancel"),"aria-label":t("cancel"),onClick:()=>i.cancelAll(),"data-cy":"cancel","data-uppy-super-focusable":!0},(0,h.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"16",height:"16",viewBox:"0 0 16 16"},(0,h.h)("g",{fill:"none",fillRule:"evenodd"},(0,h.h)("circle",{fill:"#888",cx:"8",cy:"8",r:"8"}),(0,h.h)("path",{fill:"#FFF",d:"M9.283 8l2.567 2.567-1.283 1.283L8 9.283 5.433 11.85 4.15 10.567 6.717 8 4.15 5.433 5.433 4.15 8 6.717l2.567-2.567 1.283 1.283z"}))))}function b(e){const{isAllPaused:t,i18n:i,isAllComplete:s,resumableUploads:n,uppy:a}=e,r=i(t?"resume":"pause");return(0,h.h)("button",{title:r,"aria-label":r,className:"uppy-u-reset uppy-StatusBar-actionCircleBtn",type:"button",onClick:function(){s||(n?t?a.resumeAll():a.pauseAll():a.cancelAll())},"data-cy":"togglePauseResume","data-uppy-super-focusable":!0},(0,h.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"16",height:"16",viewBox:"0 0 16 16"},(0,h.h)("g",{fill:"none",fillRule:"evenodd"},(0,h.h)("circle",{fill:"#888",cx:"8",cy:"8",r:"8"}),(0,h.h)("path",{fill:"#FFF",d:t?"M6 4.25L11.5 8 6 11.75z":"M5 4.5h2v7H5v-7zm4 0h2v7H9v-7z"}))))}function v(e){const{i18n:t,doneButtonHandler:i}=e;return(0,h.h)("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--done",onClick:i,"data-uppy-super-focusable":!0},t("done"))}function w(){return(0,h.h)("svg",{className:"uppy-StatusBar-spinner","aria-hidden":"true",focusable:"false",width:"14",height:"14"},(0,h.h)("path",{d:"M13.983 6.547c-.12-2.509-1.64-4.893-3.939-5.936-2.48-1.127-5.488-.656-7.556 1.094C.524 3.367-.398 6.048.162 8.562c.556 2.495 2.46 4.52 4.94 5.183 2.932.784 5.61-.602 7.256-3.015-1.493 1.993-3.745 3.309-6.298 2.868-2.514-.434-4.578-2.349-5.153-4.84a6.226 6.226 0 0 1 2.98-6.778C6.34.586 9.74 1.1 11.373 3.493c.407.596.693 1.282.842 1.988.127.598.073 1.197.161 1.794.078.525.543 1.257 1.15.864.525-.341.49-1.05.456-1.592-.007-.15.02.3 0 0",fillRule:"evenodd"}))}function C(e){const{progress:t}=e,{value:i,mode:s,message:n}=t;return(0,h.h)("div",{className:"uppy-StatusBar-content"},(0,h.h)(w,null),"determinate"===s?`${Math.round(100*i)}% · `:"",n)}function F(e){const{numUploads:t,complete:i,totalUploadedSize:s,totalSize:n,totalETA:a,i18n:r}=e,o=t>1;return(0,h.h)("div",{className:"uppy-StatusBar-statusSecondary"},o&&r("filesUploadedOfTotal",{complete:i,smart_count:t}),(0,h.h)("span",{className:"uppy-StatusBar-additionalInfo"},o&&f(),r("dataUploadedOfTotal",{complete:u(s),total:u(n)}),f(),r("xTimeLeft",{time:c(a)})))}function P(e){const{i18n:t,complete:i,numUploads:s}=e;return(0,h.h)("div",{className:"uppy-StatusBar-statusSecondary"},t("filesUploadedOfTotal",{complete:i,smart_count:s}))}function D(e){const{i18n:t,newFiles:i,startUpload:s}=e,n=p("uppy-u-reset","uppy-c-btn","uppy-StatusBar-actionBtn","uppy-StatusBar-actionBtn--uploadNewlyAdded");return(0,h.h)("div",{className:"uppy-StatusBar-statusSecondary"},(0,h.h)("div",{className:"uppy-StatusBar-statusSecondaryHint"},t("xMoreFilesAdded",{smart_count:i})),(0,h.h)("button",{type:"button",className:n,"aria-label":t("uploadXFiles",{smart_count:i}),onClick:s},t("upload")))}function S(e){const{i18n:t,supportsUploadProgress:i,totalProgress:s,showProgressDetails:n,isUploadStarted:a,isAllComplete:r,isAllPaused:o,newFiles:l,numUploads:p,complete:d,totalUploadedSize:u,totalSize:c,totalETA:f,startUpload:m}=e,g=l&&a;if(!a||r)return null;const y=t(o?"paused":"uploading");return(0,h.h)("div",{className:"uppy-StatusBar-content","aria-label":y,title:y},o?null:(0,h.h)(w,null),(0,h.h)("div",{className:"uppy-StatusBar-status"},(0,h.h)("div",{className:"uppy-StatusBar-statusPrimary"},i?`${y}: ${s}%`:y),o||g||!n?null:i?(0,h.h)(F,{numUploads:p,complete:d,totalUploadedSize:u,totalSize:c,totalETA:f,i18n:t}):(0,h.h)(P,{i18n:t,complete:d,numUploads:p}),g?(0,h.h)(D,{i18n:t,newFiles:l,startUpload:m}):null))}function k(e){const{i18n:t}=e;return(0,h.h)("div",{className:"uppy-StatusBar-content",role:"status",title:t("complete")},(0,h.h)("div",{className:"uppy-StatusBar-status"},(0,h.h)("div",{className:"uppy-StatusBar-statusPrimary"},(0,h.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-StatusBar-statusIndicator uppy-c-icon",width:"15",height:"11",viewBox:"0 0 15 11"},(0,h.h)("path",{d:"M.414 5.843L1.627 4.63l3.472 3.472L13.202 0l1.212 1.213L5.1 10.528z"})),t("complete"))))}function T(e){const{error:t,i18n:i,complete:s,numUploads:n}=e;return(0,h.h)("div",{className:"uppy-StatusBar-content",title:i("uploadFailed")},(0,h.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-StatusBar-statusIndicator uppy-c-icon",width:"11",height:"11",viewBox:"0 0 11 11"},(0,h.h)("path",{d:"M4.278 5.5L0 1.222 1.222 0 5.5 4.278 9.778 0 11 1.222 6.722 5.5 11 9.778 9.778 11 5.5 6.722 1.222 11 0 9.778z"})),(0,h.h)("div",{className:"uppy-StatusBar-status"},(0,h.h)("div",{className:"uppy-StatusBar-statusPrimary"},i("uploadFailed"),(0,h.h)("button",{className:"uppy-u-reset uppy-StatusBar-details","aria-label":i("showErrorDetails"),"data-microtip-position":"top-right","data-microtip-size":"medium",onClick:function(){const e=`${i("uploadFailed")} \n\n ${t}`;alert(e)},type:"button"},"?")),(0,h.h)(P,{i18n:i,complete:s,numUploads:n})))}const{STATE_ERROR:A,STATE_WAITING:B,STATE_PREPROCESSING:O,STATE_UPLOADING:U,STATE_POSTPROCESSING:E,STATE_COMPLETE:I}=l;function N(e){const{newFiles:t,allowNewUpload:i,isUploadInProgress:s,isAllPaused:n,resumableUploads:a,error:r,hideUploadButton:o,hidePauseResumeButton:l,hideCancelButton:u,hideRetryButton:c,recoveredState:f,uploadState:w,totalProgress:F,files:P,supportsUploadProgress:D,hideAfterFinish:N,isSomeGhost:R,doneButtonHandler:M,isUploadStarted:L,i18n:x,startUpload:z,uppy:V,isAllComplete:q,showProgressDetails:_,numUploads:H,complete:W,totalSize:j,totalETA:$,totalUploadedSize:G}=e,K=function(){switch(w){case E:case O:{const e=d(P);return"determinate"===e.mode?100*e.value:F}case A:return null;case U:return D?F:null;default:return F}}(),X=function(){if(f)return!1;switch(w){case B:return o||0===t;case I:return N;default:return!1}}(),Y=null!=K?K:100,Q=!r&&t&&!s&&!n&&i&&!o,J=!u&&w!==B&&w!==I,Z=a&&!l&&w===U,ee=r&&!q&&!c,te=M&&w===I,ie=p("uppy-StatusBar-progress",{"is-indeterminate":function(){switch(w){case E:case O:{const{mode:e}=d(P);return"indeterminate"===e}case U:return!D;default:return!1}}()}),se=p("uppy-StatusBar",`is-${w}`,{"has-ghosts":R});return(0,h.h)("div",{className:se,"aria-hidden":X},(0,h.h)("div",{className:ie,style:{width:`${Y}%`},role:"progressbar","aria-label":`${Y}%`,"aria-valuetext":`${Y}%`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":K}),(()=>{switch(w){case O:case E:return(0,h.h)(C,{progress:d(P)});case I:return(0,h.h)(k,{i18n:x});case A:return(0,h.h)(T,{error:r,i18n:x,numUploads:H,complete:W});case U:return(0,h.h)(S,{i18n:x,supportsUploadProgress:D,totalProgress:F,showProgressDetails:_,isUploadStarted:L,isAllComplete:q,isAllPaused:n,newFiles:t,numUploads:H,complete:W,totalUploadedSize:G,totalSize:j,totalETA:$,startUpload:z});default:return null}})(),(0,h.h)("div",{className:"uppy-StatusBar-actions"},f||Q?(0,h.h)(m,{newFiles:t,isUploadStarted:L,recoveredState:f,i18n:x,isSomeGhost:R,startUpload:z,uploadState:w}):null,ee?(0,h.h)(g,{i18n:x,uppy:V}):null,Z?(0,h.h)(b,{isAllPaused:n,i18n:x,isAllComplete:q,resumableUploads:a,uppy:V}):null,J?(0,h.h)(y,{i18n:x,uppy:V}):null,te?(0,h.h)(v,{i18n:x,doneButtonHandler:M}):null))}N.defaultProps={doneButtonHandler:void 0,hideAfterFinish:!1,hideCancelButton:!1,hidePauseResumeButton:!1,hideRetryButton:!1,hideUploadButton:void 0,showProgressDetails:void 0};var R={strings:{uploading:"Uploading",complete:"Complete",uploadFailed:"Upload failed",paused:"Paused",retry:"Retry",cancel:"Cancel",pause:"Pause",resume:"Resume",done:"Done",filesUploadedOfTotal:{0:"%{complete} of %{smart_count} file uploaded",1:"%{complete} of %{smart_count} files uploaded"},dataUploadedOfTotal:"%{complete} of %{total}",xTimeLeft:"%{time} left",uploadXFiles:{0:"Upload %{smart_count} file",1:"Upload %{smart_count} files"},uploadXNewFiles:{0:"Upload +%{smart_count} file",1:"Upload +%{smart_count} files"},upload:"Upload",retryUpload:"Retry upload",xMoreFilesAdded:{0:"%{smart_count} more file added",1:"%{smart_count} more files added"},showErrorDetails:"Show error details"}};function M(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var L=0;function x(e){return"__private_"+L+++"_"+e}function z(e,t,i,s){if(e)return l.STATE_ERROR;if(t)return l.STATE_COMPLETE;if(i)return l.STATE_WAITING;let n=l.STATE_WAITING;const a=Object.keys(s);for(let e=0;e<a.length;e++){const{progress:t}=s[a[e]];if(t.uploadStarted&&!t.uploadComplete)return l.STATE_UPLOADING;t.preprocess&&(n=l.STATE_PREPROCESSING),t.postprocess&&n!==l.STATE_PREPROCESSING&&(n=l.STATE_POSTPROCESSING)}return n}const V={target:"body",hideUploadButton:!1,hideRetryButton:!1,hidePauseResumeButton:!1,hideCancelButton:!1,showProgressDetails:!1,hideAfterFinish:!0,doneButtonHandler:null};var q=x("lastUpdateTime"),_=x("previousUploadedBytes"),H=x("previousSpeed"),W=x("previousETA"),j=x("computeSmoothETA"),$=x("onUploadStart");class G extends a.A{constructor(e,t){super(e,{...V,...t}),Object.defineProperty(this,j,{value:K}),Object.defineProperty(this,q,{writable:!0,value:void 0}),Object.defineProperty(this,_,{writable:!0,value:void 0}),Object.defineProperty(this,H,{writable:!0,value:void 0}),Object.defineProperty(this,W,{writable:!0,value:void 0}),this.startUpload=()=>this.uppy.upload().catch((()=>{})),Object.defineProperty(this,$,{writable:!0,value:()=>{const{recoveredState:e}=this.uppy.getState();if(M(this,H)[H]=null,M(this,W)[W]=null,e)return M(this,_)[_]=Object.values(e.files).reduce(((e,t)=>{let{progress:i}=t;return e+i.bytesUploaded}),0),void this.uppy.emit("restore-confirmed");M(this,q)[q]=performance.now(),M(this,_)[_]=0}}),this.id=this.opts.id||"StatusBar",this.title="StatusBar",this.type="progressindicator",this.defaultLocale=R,this.i18nInit(),this.render=this.render.bind(this),this.install=this.install.bind(this)}render(e){const{capabilities:t,files:i,allowNewUpload:s,totalProgress:n,error:a,recoveredState:r}=e,{newFiles:o,startedFiles:l,completeFiles:h,isUploadStarted:p,isAllComplete:d,isAllErrored:u,isAllPaused:c,isUploadInProgress:f,isSomeGhost:m}=this.uppy.getObjectOfFilesPerState(),g=r?Object.values(i):o,y=!!t.resumableUploads,b=!1!==t.uploadProgress;let v=0,w=0;l.forEach((e=>{v+=e.progress.bytesTotal||0,w+=e.progress.bytesUploaded||0}));const C=M(this,j)[j]({uploaded:w,total:v,remaining:v-w});return N({error:a,uploadState:z(a,d,r,e.files||{}),allowNewUpload:s,totalProgress:n,totalSize:v,totalUploadedSize:w,isAllComplete:!1,isAllPaused:c,isAllErrored:u,isUploadStarted:p,isUploadInProgress:f,isSomeGhost:m,recoveredState:r,complete:h.length,newFiles:g.length,numUploads:l.length,totalETA:C,files:i,i18n:this.i18n,uppy:this.uppy,startUpload:this.startUpload,doneButtonHandler:this.opts.doneButtonHandler,resumableUploads:y,supportsUploadProgress:b,showProgressDetails:this.opts.showProgressDetails,hideUploadButton:this.opts.hideUploadButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,hideCancelButton:this.opts.hideCancelButton,hideAfterFinish:this.opts.hideAfterFinish,isTargetDOMEl:this.isTargetDOMEl})}onMount(){const e=this.el;(0,o.A)(e)||(e.dir="ltr")}install(){const{target:e}=this.opts;e&&this.mount(e,this),this.uppy.on("upload",M(this,$)[$]),M(this,q)[q]=performance.now(),M(this,_)[_]=this.uppy.getFiles().reduce(((e,t)=>e+t.progress.bytesUploaded),0)}uninstall(){this.unmount(),this.uppy.off("upload",M(this,$)[$])}}function K(e){var t;if(0===e.total||0===e.remaining)return 0;null!=(t=M(this,q))[q]||(t[q]=performance.now());const i=performance.now()-M(this,q)[q];var s;if(0===i)return Math.round((null!=(s=M(this,W)[W])?s:0)/100)/10;const n=e.uploaded-M(this,_)[_];var a;if(M(this,_)[_]=e.uploaded,n<=0)return Math.round((null!=(a=M(this,W)[W])?a:0)/100)/10;const o=n/i,l=null==M(this,H)[H]?o:r(o,M(this,H)[H],2e3,i);M(this,H)[H]=l;const h=e.remaining/l,p=Math.max(M(this,W)[W]-i,0),d=null==M(this,W)[W]?h:r(h,p,2e3,i);return M(this,W)[W]=d,M(this,q)[q]=performance.now(),Math.round(d/100)/10}G.VERSION="3.3.1";class X extends h.uA{constructor(){super(...arguments),this.ref=(0,h._3)()}componentWillEnter(e){this.ref.current.style.opacity="1",this.ref.current.style.transform="none",setTimeout(e,300)}componentWillLeave(e){this.ref.current.style.opacity="0",this.ref.current.style.transform="translateY(350%)",setTimeout(e,300)}render(){const{children:e}=this.props;return(0,h.h)("div",{className:"uppy-Informer-animated",ref:this.ref},e)}}function Y(e){const t={};for(let a=0;a<e.length;a++)null!=e[a]&&(t[(i=e[a],s=a.toString(36),void 0,null!=(n=null==i?void 0:i.key)?n:s)]=e[a]);var i,s,n;return t}function Q(e,t){e=e||{},t=t||{};const i=i=>t.hasOwnProperty(i)?t[i]:e[i],s={};let n=[];for(const i in e)t.hasOwnProperty(i)?n.length&&(s[i]=n,n=[]):n.push(i);const a={};for(const e in t){if(s.hasOwnProperty(e))for(let t=0;t<s[e].length;t++){const n=s[e][t];a[s[e][t]]=i(n)}a[e]=i(e)}for(let e=0;e<n.length;e++)a[n[e]]=i(n[e]);return a}class J extends h.uA{constructor(e,t){super(e,t),this.refs={},this.state={children:Y((0,h.v2)((0,h.v2)(this.props.children))||[])},this.performAppear=this.performAppear.bind(this),this.performEnter=this.performEnter.bind(this),this.performLeave=this.performLeave.bind(this)}componentWillMount(){this.currentlyTransitioningKeys={},this.keysToAbortLeave=[],this.keysToEnter=[],this.keysToLeave=[]}componentDidMount(){const e=this.state.children;for(const t in e)e[t]&&this.performAppear(t)}componentWillReceiveProps(e){const t=Y((0,h.v2)(e.children)||[]),i=this.state.children;let s;for(s in this.setState((e=>({children:Q(e.children,t)}))),t)if(t.hasOwnProperty(s)){const e=i&&i.hasOwnProperty(s);t[s]&&e&&this.currentlyTransitioningKeys[s]?(this.keysToEnter.push(s),this.keysToAbortLeave.push(s)):!t[s]||e||this.currentlyTransitioningKeys[s]||this.keysToEnter.push(s)}for(s in i)if(i.hasOwnProperty(s)){const e=t&&t.hasOwnProperty(s);!i[s]||e||this.currentlyTransitioningKeys[s]||this.keysToLeave.push(s)}}componentDidUpdate(){const{keysToEnter:e}=this;this.keysToEnter=[],e.forEach(this.performEnter);const{keysToLeave:t}=this;this.keysToLeave=[],t.forEach(this.performLeave)}_finishAbort(e){const t=this.keysToAbortLeave.indexOf(e);-1!==t&&this.keysToAbortLeave.splice(t,1)}performAppear(e){this.currentlyTransitioningKeys[e]=!0;const t=this.refs[e];null!=t&&t.componentWillAppear?t.componentWillAppear(this._handleDoneAppearing.bind(this,e)):this._handleDoneAppearing(e)}_handleDoneAppearing(e){const t=this.refs[e];null!=t&&t.componentDidAppear&&t.componentDidAppear(),delete this.currentlyTransitioningKeys[e],this._finishAbort(e);const i=Y((0,h.v2)(this.props.children)||[]);i&&i.hasOwnProperty(e)||this.performLeave(e)}performEnter(e){this.currentlyTransitioningKeys[e]=!0;const t=this.refs[e];null!=t&&t.componentWillEnter?t.componentWillEnter(this._handleDoneEntering.bind(this,e)):this._handleDoneEntering(e)}_handleDoneEntering(e){const t=this.refs[e];null!=t&&t.componentDidEnter&&t.componentDidEnter(),delete this.currentlyTransitioningKeys[e],this._finishAbort(e);const i=Y((0,h.v2)(this.props.children)||[]);i&&i.hasOwnProperty(e)||this.performLeave(e)}performLeave(e){if(-1!==this.keysToAbortLeave.indexOf(e))return;this.currentlyTransitioningKeys[e]=!0;const t=this.refs[e];null!=t&&t.componentWillLeave?t.componentWillLeave(this._handleDoneLeaving.bind(this,e)):this._handleDoneLeaving(e)}_handleDoneLeaving(e){if(-1!==this.keysToAbortLeave.indexOf(e))return;const t=this.refs[e];null!=t&&t.componentDidLeave&&t.componentDidLeave(),delete this.currentlyTransitioningKeys[e];const i=Y((0,h.v2)(this.props.children)||[]);if(i&&i.hasOwnProperty(e))this.performEnter(e);else{const t=(s={},n=this.state.children,Object.assign(s,n));delete t[e],this.setState({children:t})}var s,n}render(e,t){let{childFactory:i,transitionLeave:s,transitionName:n,transitionAppear:a,transitionEnter:r,transitionLeaveTimeout:o,transitionEnterTimeout:l,transitionAppearTimeout:p,component:d,...u}=e,{children:c}=t;const f=Object.entries(c).map((e=>{let[t,s]=e;if(!s)return;const n=function(e,t){const i=e._ptgLinkedRefs||(e._ptgLinkedRefs={});return i[t]||(i[t]=i=>{e.refs[t]=i})}(this,t);return(0,h.Ob)(i(s),{ref:n,key:t})})).filter(Boolean);return(0,h.h)(d,u,f)}}J.defaultProps={component:"span",childFactory:e=>e};var Z=J;class ee extends a.A{constructor(e,t){super(e,t),this.render=e=>(0,h.h)("div",{className:"uppy uppy-Informer"},(0,h.h)(Z,null,e.info.map((e=>(0,h.h)(X,{key:e.message},(0,h.h)("p",{role:"alert"},e.message," ",e.details&&(0,h.h)("span",{"aria-label":e.details,"data-microtip-position":"top-left","data-microtip-size":"medium",role:"tooltip",onClick:()=>alert(`${e.message} \n\n ${e.details}`)},"?"))))))),this.type="progressindicator",this.id=this.opts.id||"Informer",this.title="Informer"}install(){const{target:e}=this.opts;e&&this.mount(e,this)}}ee.VERSION="3.1.0";const te=/^data:([^/]+\/[^,;]+(?:[^,]*?))(;base64)?,([\s\S]*)$/;function ie(e){return e.startsWith("blob:")}var se=i(8311);function ne(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var ae="undefined"!=typeof self?self:global;const re="undefined"!=typeof navigator,oe=re&&"undefined"==typeof HTMLImageElement,le=!("undefined"==typeof global||"undefined"==typeof process||!process.versions||!process.versions.node),he=ae.Buffer,pe=!!he,de=e=>void 0!==e;function ue(e){return void 0===e||(e instanceof Map?0===e.size:0===Object.values(e).filter(de).length)}function ce(e){let t=new Error(e);throw delete t.stack,t}function fe(e){let t=function(e){let t=0;return e.ifd0.enabled&&(t+=1024),e.exif.enabled&&(t+=2048),e.makerNote&&(t+=2048),e.userComment&&(t+=1024),e.gps.enabled&&(t+=512),e.interop.enabled&&(t+=100),e.ifd1.enabled&&(t+=1024),t+2048}(e);return e.jfif.enabled&&(t+=50),e.xmp.enabled&&(t+=2e4),e.iptc.enabled&&(t+=14e3),e.icc.enabled&&(t+=6e3),t}const me=e=>String.fromCharCode.apply(null,e),ge="undefined"!=typeof TextDecoder?new TextDecoder("utf-8"):void 0;class ye{static from(e,t){return e instanceof this&&e.le===t?e:new ye(e,void 0,void 0,t)}constructor(e,t=0,i,s){if("boolean"==typeof s&&(this.le=s),Array.isArray(e)&&(e=new Uint8Array(e)),0===e)this.byteOffset=0,this.byteLength=0;else if(e instanceof ArrayBuffer){void 0===i&&(i=e.byteLength-t);let s=new DataView(e,t,i);this._swapDataView(s)}else if(e instanceof Uint8Array||e instanceof DataView||e instanceof ye){void 0===i&&(i=e.byteLength-t),(t+=e.byteOffset)+i>e.byteOffset+e.byteLength&&ce("Creating view outside of available memory in ArrayBuffer");let s=new DataView(e.buffer,t,i);this._swapDataView(s)}else if("number"==typeof e){let t=new DataView(new ArrayBuffer(e));this._swapDataView(t)}else ce("Invalid input argument for BufferView: "+e)}_swapArrayBuffer(e){this._swapDataView(new DataView(e))}_swapBuffer(e){this._swapDataView(new DataView(e.buffer,e.byteOffset,e.byteLength))}_swapDataView(e){this.dataView=e,this.buffer=e.buffer,this.byteOffset=e.byteOffset,this.byteLength=e.byteLength}_lengthToEnd(e){return this.byteLength-e}set(e,t,i=ye){return e instanceof DataView||e instanceof ye?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e instanceof Uint8Array||ce("BufferView.set(): Invalid data argument."),this.toUint8().set(e,t),new i(this,t,e.byteLength)}subarray(e,t){return t=t||this._lengthToEnd(e),new ye(this,e,t)}toUint8(){return new Uint8Array(this.buffer,this.byteOffset,this.byteLength)}getUint8Array(e,t){return new Uint8Array(this.buffer,this.byteOffset+e,t)}getString(e=0,t=this.byteLength){return i=this.getUint8Array(e,t),ge?ge.decode(i):pe?Buffer.from(i).toString("utf8"):decodeURIComponent(escape(me(i)));var i}getLatin1String(e=0,t=this.byteLength){let i=this.getUint8Array(e,t);return me(i)}getUnicodeString(e=0,t=this.byteLength){const i=[];for(let s=0;s<t&&e+s<this.byteLength;s+=2)i.push(this.getUint16(e+s));return me(i)}getInt8(e){return this.dataView.getInt8(e)}getUint8(e){return this.dataView.getUint8(e)}getInt16(e,t=this.le){return this.dataView.getInt16(e,t)}getInt32(e,t=this.le){return this.dataView.getInt32(e,t)}getUint16(e,t=this.le){return this.dataView.getUint16(e,t)}getUint32(e,t=this.le){return this.dataView.getUint32(e,t)}getFloat32(e,t=this.le){return this.dataView.getFloat32(e,t)}getFloat64(e,t=this.le){return this.dataView.getFloat64(e,t)}getFloat(e,t=this.le){return this.dataView.getFloat32(e,t)}getDouble(e,t=this.le){return this.dataView.getFloat64(e,t)}getUintBytes(e,t,i){switch(t){case 1:return this.getUint8(e,i);case 2:return this.getUint16(e,i);case 4:return this.getUint32(e,i);case 8:return this.getUint64&&this.getUint64(e,i)}}getUint(e,t,i){switch(t){case 8:return this.getUint8(e,i);case 16:return this.getUint16(e,i);case 32:return this.getUint32(e,i);case 64:return this.getUint64&&this.getUint64(e,i)}}toString(e){return this.dataView.toString(e,this.constructor.name)}ensureChunk(){}}function be(e,t){ce(`${e} '${t}' was not loaded, try using full build of exifr.`)}class ve extends Map{constructor(e){super(),this.kind=e}get(e,t){return this.has(e)||be(this.kind,e),t&&(e in t||function(e,t){ce(`Unknown ${e} '${t}'.`)}(this.kind,e),t[e].enabled||be(this.kind,e)),super.get(e)}keyList(){return Array.from(this.keys())}}var we=new ve("file parser"),Ce=new ve("segment parser"),Fe=new ve("file reader");let Pe=ae.fetch;function De(e,t){return(i=e).startsWith("data:")||i.length>1e4?ke(e,t,"base64"):le&&e.includes("://")?Se(e,t,"url",Te):le?ke(e,t,"fs"):re?Se(e,t,"url",Te):void ce("Invalid input argument");var i}async function Se(e,t,i,s){return Fe.has(i)?ke(e,t,i):s?async function(e,t){let i=await t(e);return new ye(i)}(e,s):void ce(`Parser ${i} is not loaded`)}async function ke(e,t,i){let s=new(Fe.get(i))(e,t);return await s.read(),s}const Te=e=>Pe(e).then((e=>e.arrayBuffer())),Ae=e=>new Promise(((t,i)=>{let s=new FileReader;s.onloadend=()=>t(s.result||new ArrayBuffer),s.onerror=i,s.readAsArrayBuffer(e)}));class Be extends Map{get tagKeys(){return this.allKeys||(this.allKeys=Array.from(this.keys())),this.allKeys}get tagValues(){return this.allValues||(this.allValues=Array.from(this.values())),this.allValues}}function Oe(e,t,i){let s=new Be;for(let[e,t]of i)s.set(e,t);if(Array.isArray(t))for(let i of t)e.set(i,s);else e.set(t,s);return s}function Ue(e,t,i){let s,n=e.get(t);for(s of i)n.set(s[0],s[1])}const Ee=new Map,Ie=new Map,Ne=new Map,Re=["chunked","firstChunkSize","firstChunkSizeNode","firstChunkSizeBrowser","chunkSize","chunkLimit"],Me=["jfif","xmp","icc","iptc","ihdr"],Le=["tiff",...Me],xe=["ifd0","ifd1","exif","gps","interop"],ze=[...Le,...xe],Ve=["makerNote","userComment"],qe=["translateKeys","translateValues","reviveValues","multiSegment"],_e=[...qe,"sanitize","mergeOutput","silentErrors"];class He{get translate(){return this.translateKeys||this.translateValues||this.reviveValues}}class We extends He{get needed(){return this.enabled||this.deps.size>0}constructor(e,t,i,s){if(super(),ne(this,"enabled",!1),ne(this,"skip",new Set),ne(this,"pick",new Set),ne(this,"deps",new Set),ne(this,"translateKeys",!1),ne(this,"translateValues",!1),ne(this,"reviveValues",!1),this.key=e,this.enabled=t,this.parse=this.enabled,this.applyInheritables(s),this.canBeFiltered=xe.includes(e),this.canBeFiltered&&(this.dict=Ee.get(e)),void 0!==i)if(Array.isArray(i))this.parse=this.enabled=!0,this.canBeFiltered&&i.length>0&&this.translateTagSet(i,this.pick);else if("object"==typeof i){if(this.enabled=!0,this.parse=!1!==i.parse,this.canBeFiltered){let{pick:e,skip:t}=i;e&&e.length>0&&this.translateTagSet(e,this.pick),t&&t.length>0&&this.translateTagSet(t,this.skip)}this.applyInheritables(i)}else!0===i||!1===i?this.parse=this.enabled=i:ce(`Invalid options argument: ${i}`)}applyInheritables(e){let t,i;for(t of qe)i=e[t],void 0!==i&&(this[t]=i)}translateTagSet(e,t){if(this.dict){let i,s,{tagKeys:n,tagValues:a}=this.dict;for(i of e)"string"==typeof i?(s=a.indexOf(i),-1===s&&(s=n.indexOf(Number(i))),-1!==s&&t.add(Number(n[s]))):t.add(i)}else for(let i of e)t.add(i)}finalizeFilters(){!this.enabled&&this.deps.size>0?(this.enabled=!0,Ye(this.pick,this.deps)):this.enabled&&this.pick.size>0&&Ye(this.pick,this.deps)}}var je={jfif:!1,tiff:!0,xmp:!1,icc:!1,iptc:!1,ifd0:!0,ifd1:!1,exif:!0,gps:!0,interop:!1,ihdr:void 0,makerNote:!1,userComment:!1,multiSegment:!1,skip:[],pick:[],translateKeys:!0,translateValues:!0,reviveValues:!0,sanitize:!0,mergeOutput:!0,silentErrors:!0,chunked:!0,firstChunkSize:void 0,firstChunkSizeNode:512,firstChunkSizeBrowser:65536,chunkSize:65536,chunkLimit:5},$e=new Map;class Ge extends He{static useCached(e){let t=$e.get(e);return void 0!==t||(t=new this(e),$e.set(e,t)),t}constructor(e){super(),!0===e?this.setupFromTrue():void 0===e?this.setupFromUndefined():Array.isArray(e)?this.setupFromArray(e):"object"==typeof e?this.setupFromObject(e):ce(`Invalid options argument ${e}`),void 0===this.firstChunkSize&&(this.firstChunkSize=re?this.firstChunkSizeBrowser:this.firstChunkSizeNode),this.mergeOutput&&(this.ifd1.enabled=!1),this.filterNestedSegmentTags(),this.traverseTiffDependencyTree(),this.checkLoadedPlugins()}setupFromUndefined(){let e;for(e of Re)this[e]=je[e];for(e of _e)this[e]=je[e];for(e of Ve)this[e]=je[e];for(e of ze)this[e]=new We(e,je[e],void 0,this)}setupFromTrue(){let e;for(e of Re)this[e]=je[e];for(e of _e)this[e]=je[e];for(e of Ve)this[e]=!0;for(e of ze)this[e]=new We(e,!0,void 0,this)}setupFromArray(e){let t;for(t of Re)this[t]=je[t];for(t of _e)this[t]=je[t];for(t of Ve)this[t]=je[t];for(t of ze)this[t]=new We(t,!1,void 0,this);this.setupGlobalFilters(e,void 0,xe)}setupFromObject(e){let t;for(t of(xe.ifd0=xe.ifd0||xe.image,xe.ifd1=xe.ifd1||xe.thumbnail,Object.assign(this,e),Re))this[t]=Xe(e[t],je[t]);for(t of _e)this[t]=Xe(e[t],je[t]);for(t of Ve)this[t]=Xe(e[t],je[t]);for(t of Le)this[t]=new We(t,je[t],e[t],this);for(t of xe)this[t]=new We(t,je[t],e[t],this.tiff);this.setupGlobalFilters(e.pick,e.skip,xe,ze),!0===e.tiff?this.batchEnableWithBool(xe,!0):!1===e.tiff?this.batchEnableWithUserValue(xe,e):Array.isArray(e.tiff)?this.setupGlobalFilters(e.tiff,void 0,xe):"object"==typeof e.tiff&&this.setupGlobalFilters(e.tiff.pick,e.tiff.skip,xe)}batchEnableWithBool(e,t){for(let i of e)this[i].enabled=t}batchEnableWithUserValue(e,t){for(let i of e){let e=t[i];this[i].enabled=!1!==e&&void 0!==e}}setupGlobalFilters(e,t,i,s=i){if(e&&e.length){for(let e of s)this[e].enabled=!1;let t=Ke(e,i);for(let[e,i]of t)Ye(this[e].pick,i),this[e].enabled=!0}else if(t&&t.length){let e=Ke(t,i);for(let[t,i]of e)Ye(this[t].skip,i)}}filterNestedSegmentTags(){let{ifd0:e,exif:t,xmp:i,iptc:s,icc:n}=this;this.makerNote?t.deps.add(37500):t.skip.add(37500),this.userComment?t.deps.add(37510):t.skip.add(37510),i.enabled||e.skip.add(700),s.enabled||e.skip.add(33723),n.enabled||e.skip.add(34675)}traverseTiffDependencyTree(){let{ifd0:e,exif:t,gps:i,interop:s}=this;s.needed&&(t.deps.add(40965),e.deps.add(40965)),t.needed&&e.deps.add(34665),i.needed&&e.deps.add(34853),this.tiff.enabled=xe.some((e=>!0===this[e].enabled))||this.makerNote||this.userComment;for(let e of xe)this[e].finalizeFilters()}get onlyTiff(){return!Me.map((e=>this[e].enabled)).some((e=>!0===e))&&this.tiff.enabled}checkLoadedPlugins(){for(let e of Le)this[e].enabled&&!Ce.has(e)&&be("segment parser",e)}}function Ke(e,t){let i,s,n,a,r=[];for(n of t){for(a of(i=Ee.get(n),s=[],i))(e.includes(a[0])||e.includes(a[1]))&&s.push(a[0]);s.length&&r.push([n,s])}return r}function Xe(e,t){return void 0!==e?e:void 0!==t?t:void 0}function Ye(e,t){for(let i of t)e.add(i)}ne(Ge,"default",je);class Qe{constructor(e){ne(this,"parsers",{}),ne(this,"output",{}),ne(this,"errors",[]),ne(this,"pushToErrors",(e=>this.errors.push(e))),this.options=Ge.useCached(e)}async read(e){this.file=await function(e,t){return"string"==typeof e?De(e,t):re&&!oe&&e instanceof HTMLImageElement?De(e.src,t):e instanceof Uint8Array||e instanceof ArrayBuffer||e instanceof DataView?new ye(e):re&&e instanceof Blob?Se(e,t,"blob",Ae):void ce("Invalid input argument")}(e,this.options)}setup(){if(this.fileParser)return;let{file:e}=this,t=e.getUint16(0);for(let[i,s]of we)if(s.canHandle(e,t))return this.fileParser=new s(this.options,this.file,this.parsers),e[i]=!0;this.file.close&&this.file.close(),ce("Unknown file format")}async parse(){let{output:e,errors:t}=this;return this.setup(),this.options.silentErrors?(await this.executeParsers().catch(this.pushToErrors),t.push(...this.fileParser.errors)):await this.executeParsers(),this.file.close&&this.file.close(),this.options.silentErrors&&t.length>0&&(e.errors=t),ue(i=e)?void 0:i;var i}async executeParsers(){let{output:e}=this;await this.fileParser.parse();let t=Object.values(this.parsers).map((async t=>{let i=await t.parse();t.assignToOutput(e,i)}));this.options.silentErrors&&(t=t.map((e=>e.catch(this.pushToErrors)))),await Promise.all(t)}async extractThumbnail(){this.setup();let{options:e,file:t}=this,i=Ce.get("tiff",e);var s;if(t.tiff?s={start:0,type:"tiff"}:t.jpeg&&(s=await this.fileParser.getOrFindSegment("tiff")),void 0===s)return;let n=await this.fileParser.ensureSegmentChunk(s),a=this.parsers.tiff=new i(n,e,t),r=await a.extractThumbnail();return t.close&&t.close(),r}}async function Je(e,t){let i=new Qe(t);return await i.read(e),i.parse()}var Ze=Object.freeze({__proto__:null,parse:Je,Exifr:Qe,fileParsers:we,segmentParsers:Ce,fileReaders:Fe,tagKeys:Ee,tagValues:Ie,tagRevivers:Ne,createDictionary:Oe,extendDictionary:Ue,fetchUrlAsArrayBuffer:Te,readBlobAsArrayBuffer:Ae,chunkedProps:Re,otherSegments:Me,segments:Le,tiffBlocks:xe,segmentsAndBlocks:ze,tiffExtractables:Ve,inheritables:qe,allFormatters:_e,Options:Ge});class et{static findPosition(e,t){let i=e.getUint16(t+2)+2,s="function"==typeof this.headerLength?this.headerLength(e,t,i):this.headerLength,n=t+s,a=i-s;return{offset:t,length:i,headerLength:s,start:n,size:a,end:n+a}}static parse(e,t={}){return new this(e,new Ge({[this.type]:t}),e).parse()}normalizeInput(e){return e instanceof ye?e:new ye(e)}constructor(e,t={},i){ne(this,"errors",[]),ne(this,"raw",new Map),ne(this,"handleError",(e=>{if(!this.options.silentErrors)throw e;this.errors.push(e.message)})),this.chunk=this.normalizeInput(e),this.file=i,this.type=this.constructor.type,this.globalOptions=this.options=t,this.localOptions=t[this.type],this.canTranslate=this.localOptions&&this.localOptions.translate}translate(){this.canTranslate&&(this.translated=this.translateBlock(this.raw,this.type))}get output(){return this.translated?this.translated:this.raw?Object.fromEntries(this.raw):void 0}translateBlock(e,t){let i=Ne.get(t),s=Ie.get(t),n=Ee.get(t),a=this.options[t],r=a.reviveValues&&!!i,o=a.translateValues&&!!s,l=a.translateKeys&&!!n,h={};for(let[t,a]of e)r&&i.has(t)?a=i.get(t)(a):o&&s.has(t)&&(a=this.translateValue(a,s.get(t))),l&&n.has(t)&&(t=n.get(t)||t),h[t]=a;return h}translateValue(e,t){return t[e]||t.DEFAULT||e}assignToOutput(e,t){this.assignObjectToOutput(e,this.constructor.type,t)}assignObjectToOutput(e,t,i){if(this.globalOptions.mergeOutput)return Object.assign(e,i);e[t]?Object.assign(e[t],i):e[t]=i}}function tt(e){return 192===e||194===e||196===e||219===e||221===e||218===e||254===e}function it(e){return e>=224&&e<=239}function st(e,t,i){for(let[s,n]of Ce)if(n.canHandle(e,t,i))return s}ne(et,"headerLength",4),ne(et,"type",void 0),ne(et,"multiSegment",!1),ne(et,"canHandle",(()=>!1));class nt extends class{constructor(e,t,i){ne(this,"errors",[]),ne(this,"ensureSegmentChunk",(async e=>{let t=e.start,i=e.size||65536;if(this.file.chunked)if(this.file.available(t,i))e.chunk=this.file.subarray(t,i);else try{e.chunk=await this.file.readChunk(t,i)}catch(t){ce(`Couldn't read segment: ${JSON.stringify(e)}. ${t.message}`)}else this.file.byteLength>t+i?e.chunk=this.file.subarray(t,i):void 0===e.size?e.chunk=this.file.subarray(t):ce("Segment unreachable: "+JSON.stringify(e));return e.chunk})),this.extendOptions&&this.extendOptions(e),this.options=e,this.file=t,this.parsers=i}injectSegment(e,t){this.options[e].enabled&&this.createParser(e,t)}createParser(e,t){let i=new(Ce.get(e))(t,this.options,this.file);return this.parsers[e]=i}createParsers(e){for(let t of e){let{type:e,chunk:i}=t,s=this.options[e];if(s&&s.enabled){let t=this.parsers[e];t&&t.append||t||this.createParser(e,i)}}}async readSegments(e){let t=e.map(this.ensureSegmentChunk);await Promise.all(t)}}{constructor(...e){super(...e),ne(this,"appSegments",[]),ne(this,"jpegSegments",[]),ne(this,"unknownSegments",[])}static canHandle(e,t){return 65496===t}async parse(){await this.findAppSegments(),await this.readSegments(this.appSegments),this.mergeMultiSegments(),this.createParsers(this.mergedAppSegments||this.appSegments)}setupSegmentFinderArgs(e){!0===e?(this.findAll=!0,this.wanted=new Set(Ce.keyList())):(e=void 0===e?Ce.keyList().filter((e=>this.options[e].enabled)):e.filter((e=>this.options[e].enabled&&Ce.has(e))),this.findAll=!1,this.remaining=new Set(e),this.wanted=new Set(e)),this.unfinishedMultiSegment=!1}async findAppSegments(e=0,t){this.setupSegmentFinderArgs(t);let{file:i,findAll:s,wanted:n,remaining:a}=this;if(!s&&this.file.chunked&&(s=Array.from(n).some((e=>{let t=Ce.get(e),i=this.options[e];return t.multiSegment&&i.multiSegment})),s&&await this.file.readWhole()),e=this.findAppSegmentsInRange(e,i.byteLength),!this.options.onlyTiff&&i.chunked){let t=!1;for(;a.size>0&&!t&&(i.canReadNextChunk||this.unfinishedMultiSegment);){let{nextChunkOffset:s}=i,n=this.appSegments.some((e=>!this.file.available(e.offset||e.start,e.length||e.size)));if(t=e>s&&!n?!await i.readNextChunk(e):!await i.readNextChunk(s),void 0===(e=this.findAppSegmentsInRange(e,i.byteLength)))return}}}findAppSegmentsInRange(e,t){t-=2;let i,s,n,a,r,o,{file:l,findAll:h,wanted:p,remaining:d,options:u}=this;for(;e<t;e++)if(255===l.getUint8(e))if(i=l.getUint8(e+1),it(i)){if(s=l.getUint16(e+2),n=st(l,e,s),n&&p.has(n)&&(a=Ce.get(n),r=a.findPosition(l,e),o=u[n],r.type=n,this.appSegments.push(r),!h&&(a.multiSegment&&o.multiSegment?(this.unfinishedMultiSegment=r.chunkNumber<r.chunkCount,this.unfinishedMultiSegment||d.delete(n)):d.delete(n),0===d.size)))break;u.recordUnknownSegments&&(r=et.findPosition(l,e),r.marker=i,this.unknownSegments.push(r)),e+=s+1}else if(tt(i)){if(s=l.getUint16(e+2),218===i&&!1!==u.stopAfterSos)return;u.recordJpegSegments&&this.jpegSegments.push({offset:e,length:s,marker:i}),e+=s+1}return e}mergeMultiSegments(){if(!this.appSegments.some((e=>e.multiSegment)))return;let e=function(e,t){let i,s,n,a=new Map;for(let t=0;t<e.length;t++)i=e[t],s=i.type,a.has(s)?n=a.get(s):a.set(s,n=[]),n.push(i);return Array.from(a)}(this.appSegments);this.mergedAppSegments=e.map((([e,t])=>{let i=Ce.get(e,this.options);return i.handleMultiSegments?{type:e,chunk:i.handleMultiSegments(t)}:t[0]}))}getSegment(e){return this.appSegments.find((t=>t.type===e))}async getOrFindSegment(e){let t=this.getSegment(e);return void 0===t&&(await this.findAppSegments(0,[e]),t=this.getSegment(e)),t}}ne(nt,"type","jpeg"),we.set("jpeg",nt);const at=[void 0,1,1,2,4,8,1,1,2,4,8,4,8,4];class rt extends et{parseHeader(){var e=this.chunk.getUint16();18761===e?this.le=!0:19789===e&&(this.le=!1),this.chunk.le=this.le,this.headerParsed=!0}parseTags(e,t,i=new Map){let{pick:s,skip:n}=this.options[t];s=new Set(s);let a=s.size>0,r=0===n.size,o=this.chunk.getUint16(e);e+=2;for(let l=0;l<o;l++){let o=this.chunk.getUint16(e);if(a){if(s.has(o)&&(i.set(o,this.parseTag(e,o,t)),s.delete(o),0===s.size))break}else!r&&n.has(o)||i.set(o,this.parseTag(e,o,t));e+=12}return i}parseTag(e,t,i){let{chunk:s}=this,n=s.getUint16(e+2),a=s.getUint32(e+4),r=at[n];if(r*a<=4?e+=8:e=s.getUint32(e+8),(n<1||n>13)&&ce(`Invalid TIFF value type. block: ${i.toUpperCase()}, tag: ${t.toString(16)}, type: ${n}, offset ${e}`),e>s.byteLength&&ce(`Invalid TIFF value offset. block: ${i.toUpperCase()}, tag: ${t.toString(16)}, type: ${n}, offset ${e} is outside of chunk size ${s.byteLength}`),1===n)return s.getUint8Array(e,a);if(2===n)return""===(o=function(e){for(;e.endsWith("\0");)e=e.slice(0,-1);return e}(o=s.getString(e,a)).trim())?void 0:o;var o;if(7===n)return s.getUint8Array(e,a);if(1===a)return this.parseTagValue(n,e);{let t=new(function(e){switch(e){case 1:return Uint8Array;case 3:return Uint16Array;case 4:return Uint32Array;case 5:case 10:default:return Array;case 6:return Int8Array;case 8:return Int16Array;case 9:return Int32Array;case 11:return Float32Array;case 12:return Float64Array}}(n))(a),i=r;for(let s=0;s<a;s++)t[s]=this.parseTagValue(n,e),e+=i;return t}}parseTagValue(e,t){let{chunk:i}=this;switch(e){case 1:return i.getUint8(t);case 3:return i.getUint16(t);case 4:case 13:return i.getUint32(t);case 5:return i.getUint32(t)/i.getUint32(t+4);case 6:return i.getInt8(t);case 8:return i.getInt16(t);case 9:return i.getInt32(t);case 10:return i.getInt32(t)/i.getInt32(t+4);case 11:return i.getFloat(t);case 12:return i.getDouble(t);default:ce(`Invalid tiff type ${e}`)}}}class ot extends rt{static canHandle(e,t){return 225===e.getUint8(t+1)&&1165519206===e.getUint32(t+4)&&0===e.getUint16(t+8)}async parse(){this.parseHeader();let{options:e}=this;return e.ifd0.enabled&&await this.parseIfd0Block(),e.exif.enabled&&await this.safeParse("parseExifBlock"),e.gps.enabled&&await this.safeParse("parseGpsBlock"),e.interop.enabled&&await this.safeParse("parseInteropBlock"),e.ifd1.enabled&&await this.safeParse("parseThumbnailBlock"),this.createOutput()}safeParse(e){let t=this[e]();return void 0!==t.catch&&(t=t.catch(this.handleError)),t}findIfd0Offset(){void 0===this.ifd0Offset&&(this.ifd0Offset=this.chunk.getUint32(4))}findIfd1Offset(){if(void 0===this.ifd1Offset){this.findIfd0Offset();let e=this.chunk.getUint16(this.ifd0Offset),t=this.ifd0Offset+2+12*e;this.ifd1Offset=this.chunk.getUint32(t)}}parseBlock(e,t){let i=new Map;return this[t]=i,this.parseTags(e,t,i),i}async parseIfd0Block(){if(this.ifd0)return;let{file:e}=this;this.findIfd0Offset(),this.ifd0Offset<8&&ce("Malformed EXIF data"),!e.chunked&&this.ifd0Offset>e.byteLength&&ce(`IFD0 offset points to outside of file.\nthis.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e.byteLength}`),e.tiff&&await e.ensureChunk(this.ifd0Offset,fe(this.options));let t=this.parseBlock(this.ifd0Offset,"ifd0");return 0!==t.size?(this.exifOffset=t.get(34665),this.interopOffset=t.get(40965),this.gpsOffset=t.get(34853),this.xmp=t.get(700),this.iptc=t.get(33723),this.icc=t.get(34675),this.options.sanitize&&(t.delete(34665),t.delete(40965),t.delete(34853),t.delete(700),t.delete(33723),t.delete(34675)),t):void 0}async parseExifBlock(){if(this.exif)return;if(this.ifd0||await this.parseIfd0Block(),void 0===this.exifOffset)return;this.file.tiff&&await this.file.ensureChunk(this.exifOffset,fe(this.options));let e=this.parseBlock(this.exifOffset,"exif");return this.interopOffset||(this.interopOffset=e.get(40965)),this.makerNote=e.get(37500),this.userComment=e.get(37510),this.options.sanitize&&(e.delete(40965),e.delete(37500),e.delete(37510)),this.unpack(e,41728),this.unpack(e,41729),e}unpack(e,t){let i=e.get(t);i&&1===i.length&&e.set(t,i[0])}async parseGpsBlock(){if(this.gps)return;if(this.ifd0||await this.parseIfd0Block(),void 0===this.gpsOffset)return;let e=this.parseBlock(this.gpsOffset,"gps");return e&&e.has(2)&&e.has(4)&&(e.set("latitude",lt(...e.get(2),e.get(1))),e.set("longitude",lt(...e.get(4),e.get(3)))),e}async parseInteropBlock(){if(!this.interop&&(this.ifd0||await this.parseIfd0Block(),void 0!==this.interopOffset||this.exif||await this.parseExifBlock(),void 0!==this.interopOffset))return this.parseBlock(this.interopOffset,"interop")}async parseThumbnailBlock(e=!1){if(!this.ifd1&&!this.ifd1Parsed&&(!this.options.mergeOutput||e))return this.findIfd1Offset(),this.ifd1Offset>0&&(this.parseBlock(this.ifd1Offset,"ifd1"),this.ifd1Parsed=!0),this.ifd1}async extractThumbnail(){if(this.headerParsed||this.parseHeader(),this.ifd1Parsed||await this.parseThumbnailBlock(!0),void 0===this.ifd1)return;let e=this.ifd1.get(513),t=this.ifd1.get(514);return this.chunk.getUint8Array(e,t)}get image(){return this.ifd0}get thumbnail(){return this.ifd1}createOutput(){let e,t,i,s={};for(t of xe)if(e=this[t],!ue(e))if(i=this.canTranslate?this.translateBlock(e,t):Object.fromEntries(e),this.options.mergeOutput){if("ifd1"===t)continue;Object.assign(s,i)}else s[t]=i;return this.makerNote&&(s.makerNote=this.makerNote),this.userComment&&(s.userComment=this.userComment),s}assignToOutput(e,t){if(this.globalOptions.mergeOutput)Object.assign(e,t);else for(let[i,s]of Object.entries(t))this.assignObjectToOutput(e,i,s)}}function lt(e,t,i,s){var n=e+t/60+i/3600;return"S"!==s&&"W"!==s||(n*=-1),n}ne(ot,"type","tiff"),ne(ot,"headerLength",10),Ce.set("tiff",ot),Object.freeze({__proto__:null,default:Ze,Exifr:Qe,fileParsers:we,segmentParsers:Ce,fileReaders:Fe,tagKeys:Ee,tagValues:Ie,tagRevivers:Ne,createDictionary:Oe,extendDictionary:Ue,fetchUrlAsArrayBuffer:Te,readBlobAsArrayBuffer:Ae,chunkedProps:Re,otherSegments:Me,segments:Le,tiffBlocks:xe,segmentsAndBlocks:ze,tiffExtractables:Ve,inheritables:qe,allFormatters:_e,Options:Ge,parse:Je});const ht={ifd0:!1,ifd1:!1,exif:!1,gps:!1,interop:!1,sanitize:!1,reviveValues:!0,translateKeys:!1,translateValues:!1,mergeOutput:!1};Object.assign({},ht,{firstChunkSize:4e4,gps:[1,2,3,4]}),Object.assign({},ht,{tiff:!1,ifd1:!0,mergeOutput:!1});const pt=Object.assign({},ht,{firstChunkSize:4e4,ifd0:[274]}),dt=Object.freeze({1:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:0,rad:0},2:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:0,rad:0},3:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:180,rad:180*Math.PI/180},4:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:180,rad:180*Math.PI/180},5:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:90,rad:90*Math.PI/180},6:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:90,rad:90*Math.PI/180},7:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:270,rad:270*Math.PI/180},8:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:270,rad:270*Math.PI/180}});let ut=!0,ct=!0;if("object"==typeof navigator){let e=navigator.userAgent;if(e.includes("iPad")||e.includes("iPhone")){let t=e.match(/OS (\d+)_(\d+)/);if(t){let[,e,i]=t,s=Number(e)+.1*Number(i);ut=s<13.4,ct=!1}}else if(e.includes("OS X 10")){let[,t]=e.match(/OS X 10[_.](\d+)/);ut=ct=Number(t)<15}if(e.includes("Chrome/")){let[,t]=e.match(/Chrome\/(\d+)/);ut=ct=Number(t)<81}else if(e.includes("Firefox/")){let[,t]=e.match(/Firefox\/(\d+)/);ut=ct=Number(t)<77}}class ft extends ye{constructor(...e){super(...e),ne(this,"ranges",new mt),0!==this.byteLength&&this.ranges.add(0,this.byteLength)}_tryExtend(e,t,i){if(0===e&&0===this.byteLength&&i){let e=new DataView(i.buffer||i,i.byteOffset,i.byteLength);this._swapDataView(e)}else{let i=e+t;if(i>this.byteLength){let{dataView:e}=this._extend(i);this._swapDataView(e)}}}_extend(e){let t;t=pe?he.allocUnsafe(e):new Uint8Array(e);let i=new DataView(t.buffer,t.byteOffset,t.byteLength);return t.set(new Uint8Array(this.buffer,this.byteOffset,this.byteLength),0),{uintView:t,dataView:i}}subarray(e,t,i=!1){return t=t||this._lengthToEnd(e),i&&this._tryExtend(e,t),this.ranges.add(e,t),super.subarray(e,t)}set(e,t,i=!1){i&&this._tryExtend(t,e.byteLength,e);let s=super.set(e,t);return this.ranges.add(t,s.byteLength),s}async ensureChunk(e,t){this.chunked&&(this.ranges.available(e,t)||await this.readChunk(e,t))}available(e,t){return this.ranges.available(e,t)}}class mt{constructor(){ne(this,"list",[])}get length(){return this.list.length}add(e,t,i=0){let s=e+t,n=this.list.filter((t=>gt(e,t.offset,s)||gt(e,t.end,s)));if(n.length>0){e=Math.min(e,...n.map((e=>e.offset))),s=Math.max(s,...n.map((e=>e.end))),t=s-e;let i=n.shift();i.offset=e,i.length=t,i.end=s,this.list=this.list.filter((e=>!n.includes(e)))}else this.list.push({offset:e,length:t,end:s})}available(e,t){let i=e+t;return this.list.some((t=>t.offset<=e&&i<=t.end))}}function gt(e,t,i){return e<=t&&t<=i}class yt extends ft{constructor(e,t){super(0),ne(this,"chunksRead",0),this.input=e,this.options=t}async readWhole(){this.chunked=!1,await this.readChunk(this.nextChunkOffset)}async readChunked(){this.chunked=!0,await this.readChunk(0,this.options.firstChunkSize)}async readNextChunk(e=this.nextChunkOffset){if(this.fullyRead)return this.chunksRead++,!1;let t=this.options.chunkSize,i=await this.readChunk(e,t);return!!i&&i.byteLength===t}async readChunk(e,t){if(this.chunksRead++,0!==(t=this.safeWrapAddress(e,t)))return this._readChunk(e,t)}safeWrapAddress(e,t){return void 0!==this.size&&e+t>this.size?Math.max(0,this.size-e):t}get nextChunkOffset(){if(0!==this.ranges.list.length)return this.ranges.list[0].length}get canReadNextChunk(){return this.chunksRead<this.options.chunkLimit}get fullyRead(){return void 0!==this.size&&this.nextChunkOffset===this.size}read(){return this.options.chunked?this.readChunked():this.readWhole()}close(){}}Fe.set("blob",class extends yt{async readWhole(){this.chunked=!1;let e=await Ae(this.input);this._swapArrayBuffer(e)}readChunked(){return this.chunked=!0,this.size=this.input.size,super.readChunked()}async _readChunk(e,t){let i=t?e+t:void 0,s=this.input.slice(e,i),n=await Ae(s);return this.set(n,e,!0)}});var bt={strings:{generatingThumbnails:"Generating thumbnails..."}};const vt={thumbnailWidth:null,thumbnailHeight:null,thumbnailType:"image/jpeg",waitForThumbnailsBeforeUpload:!1,lazy:!1};class wt extends a.A{constructor(e,t){if(super(e,{...vt,...t}),this.onFileAdded=e=>{!e.preview&&e.data&&(0,se.A)(e.type)&&!e.isRemote&&this.addToQueue(e.id)},this.onCancelRequest=e=>{const t=this.queue.indexOf(e.id);-1!==t&&this.queue.splice(t,1)},this.onFileRemoved=e=>{const t=this.queue.indexOf(e.id);-1!==t&&this.queue.splice(t,1),e.preview&&ie(e.preview)&&URL.revokeObjectURL(e.preview)},this.onRestored=()=>{this.uppy.getFiles().filter((e=>e.isRestored)).forEach((e=>{e.preview&&!ie(e.preview)||this.addToQueue(e.id)}))},this.onAllFilesRemoved=()=>{this.queue=[]},this.waitUntilAllProcessed=e=>{e.forEach((e=>{const t=this.uppy.getFile(e);this.uppy.emit("preprocess-progress",t,{mode:"indeterminate",message:this.i18n("generatingThumbnails")})}));const t=()=>{e.forEach((e=>{const t=this.uppy.getFile(e);this.uppy.emit("preprocess-complete",t)}))};return new Promise((e=>{this.queueProcessing?this.uppy.once("thumbnail:all-generated",(()=>{t(),e()})):(t(),e())}))},this.type="modifier",this.id=this.opts.id||"ThumbnailGenerator",this.title="Thumbnail Generator",this.queue=[],this.queueProcessing=!1,this.defaultThumbnailDimension=200,this.thumbnailType=this.opts.thumbnailType,this.defaultLocale=bt,this.i18nInit(),this.opts.lazy&&this.opts.waitForThumbnailsBeforeUpload)throw new Error("ThumbnailGenerator: The `lazy` and `waitForThumbnailsBeforeUpload` options are mutually exclusive. Please ensure at most one of them is set to `true`.")}createThumbnail(e,t,i){const s=URL.createObjectURL(e.data),n=new Promise(((e,t)=>{const i=new Image;i.src=s,i.addEventListener("load",(()=>{URL.revokeObjectURL(s),e(i)})),i.addEventListener("error",(e=>{URL.revokeObjectURL(s),t(e.error||new Error("Could not create thumbnail"))}))})),a=async function(e){let t=await async function(e){let t=new Qe(pt);await t.read(e);let i=await t.parse();if(i&&i.ifd0)return i.ifd0[274]}(e);return Object.assign({canvas:ut,css:ct},dt[t])}(e.data).catch((()=>1));return Promise.all([n,a]).then((e=>{let[s,n]=e;const a=this.getProportionalDimensions(s,t,i,n.deg),r=function(e,t){let i=e.width,s=e.height;90!==t.deg&&270!==t.deg||(i=e.height,s=e.width);const n=document.createElement("canvas");n.width=i,n.height=s;const a=n.getContext("2d");return a.translate(i/2,s/2),t.canvas&&(a.rotate(t.rad),a.scale(t.scaleX,t.scaleY)),a.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),n}(s,n);return function(e,t,i){try{e.getContext("2d").getImageData(0,0,1,1)}catch(e){if(18===e.code)return Promise.reject(new Error("cannot read image, probably an svg with external resources"))}return e.toBlob?new Promise((s=>{e.toBlob(s,t,i)})).then((e=>{if(null===e)throw new Error("cannot read image, probably an svg with external resources");return e})):Promise.resolve().then((()=>function(e,t,i){var s,n;const a=te.exec(e),r=null!=(s=null!=(n=t.mimeType)?n:null==a?void 0:a[1])?s:"plain/text";let o;if(null!=(null==a?void 0:a[2])){const e=atob(decodeURIComponent(a[3])),t=new Uint8Array(e.length);for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);o=[t]}else null!=(null==a?void 0:a[3])&&(o=[decodeURIComponent(a[3])]);return new Blob(o,{type:r})}(e.toDataURL(t,i),{}))).then((e=>{if(null===e)throw new Error("could not extract blob, probably an old browser");return e}))}(this.resizeImage(r,a.width,a.height),this.thumbnailType,80)})).then((e=>URL.createObjectURL(e)))}getProportionalDimensions(e,t,i,s){let n=e.width/e.height;return 90!==s&&270!==s||(n=e.height/e.width),null!=t?{width:t,height:Math.round(t/n)}:null!=i?{width:Math.round(i*n),height:i}:{width:this.defaultThumbnailDimension,height:Math.round(this.defaultThumbnailDimension/n)}}resizeImage(e,t,i){let s=function(e){const t=e.width/e.height,i=5e6,s=4096;let n=Math.floor(Math.sqrt(i*t)),a=Math.floor(i/Math.sqrt(i*t));if(n>s&&(n=s,a=Math.round(n/t)),a>s&&(a=s,n=Math.round(t*a)),e.width>n){const t=document.createElement("canvas");return t.width=n,t.height=a,t.getContext("2d").drawImage(e,0,0,n,a),t}return e}(e),n=Math.ceil(Math.log2(s.width/t));n<1&&(n=1);let a=t*2**(n-1),r=i*2**(n-1);for(;n--;){const e=document.createElement("canvas");e.width=a,e.height=r,e.getContext("2d").drawImage(s,0,0,a,r),s=e,a=Math.round(a/2),r=Math.round(r/2)}return s}setPreviewURL(e,t){this.uppy.setFileState(e,{preview:t})}addToQueue(e){this.queue.push(e),!1===this.queueProcessing&&this.processQueue()}processQueue(){if(this.queueProcessing=!0,this.queue.length>0){const e=this.uppy.getFile(this.queue.shift());return e?this.requestThumbnail(e).catch((()=>{})).then((()=>this.processQueue())):(this.uppy.log("[ThumbnailGenerator] file was removed before a thumbnail could be generated, but not removed from the queue. This is probably a bug","error"),Promise.resolve())}return this.queueProcessing=!1,this.uppy.log("[ThumbnailGenerator] Emptied thumbnail queue"),this.uppy.emit("thumbnail:all-generated"),Promise.resolve()}requestThumbnail(e){return(0,se.A)(e.type)&&!e.isRemote?this.createThumbnail(e,this.opts.thumbnailWidth,this.opts.thumbnailHeight).then((t=>{this.setPreviewURL(e.id,t),this.uppy.log(`[ThumbnailGenerator] Generated thumbnail for ${e.id}`),this.uppy.emit("thumbnail:generated",this.uppy.getFile(e.id),t)})).catch((t=>{this.uppy.log(`[ThumbnailGenerator] Failed thumbnail for ${e.id}:`,"warning"),this.uppy.log(t,"warning"),this.uppy.emit("thumbnail:error",this.uppy.getFile(e.id),t)})):Promise.resolve()}install(){this.uppy.on("file-removed",this.onFileRemoved),this.uppy.on("cancel-all",this.onAllFilesRemoved),this.opts.lazy?(this.uppy.on("thumbnail:request",this.onFileAdded),this.uppy.on("thumbnail:cancel",this.onCancelRequest)):(this.uppy.on("thumbnail:request",this.onFileAdded),this.uppy.on("file-added",this.onFileAdded),this.uppy.on("restored",this.onRestored)),this.opts.waitForThumbnailsBeforeUpload&&this.uppy.addPreProcessor(this.waitUntilAllProcessed)}uninstall(){this.uppy.off("file-removed",this.onFileRemoved),this.uppy.off("cancel-all",this.onAllFilesRemoved),this.opts.lazy?(this.uppy.off("thumbnail:request",this.onFileAdded),this.uppy.off("thumbnail:cancel",this.onCancelRequest)):(this.uppy.off("thumbnail:request",this.onFileAdded),this.uppy.off("file-added",this.onFileAdded),this.uppy.off("restored",this.onRestored)),this.opts.waitForThumbnailsBeforeUpload&&this.uppy.removePreProcessor(this.waitUntilAllProcessed)}}wt.VERSION="3.1.0";var Ct=i(1677),Ft=function(e){if("string"==typeof e){const t=document.querySelectorAll(e);return 0===t.length?null:Array.from(t)}return"object"==typeof e&&(0,Ct.A)(e)?[e]:null},Pt=Array.from;function Dt(e,t,i,s){let{onSuccess:n}=s;e.readEntries((s=>{const a=[...t,...s];s.length?queueMicrotask((()=>{Dt(e,a,i,{onSuccess:n})})):n(a)}),(e=>{i(e),n(t)}))}function St(e,t){return null==e?e:{kind:e.isFile?"file":e.isDirectory?"directory":void 0,name:e.name,getFile(){return new Promise(((t,i)=>e.file(t,i)))},async*values(){const i=e.createReader(),s=await new Promise((e=>{Dt(i,[],t,{onSuccess:i=>e(i.map((e=>St(e,t))))})}));yield*s},isSameEntry:void 0}}function kt(e,t,i){try{return void 0===i&&(i=void 0),async function*(){const s=()=>`${t}/${e.name}`;if("file"===e.kind){const n=await e.getFile();null!=n?(n.relativePath=t?s():null,yield n):null!=i&&(yield i)}else if("directory"===e.kind)for await(const i of e.values())yield*kt(i,t?s():e.name);else null!=i&&(yield i)}()}catch(e){return Promise.reject(e)}}async function Tt(e,t){var i;const s=null!=(i=null==t?void 0:t.logDropError)?i:Function.prototype;try{const t=[];for await(const i of async function*(e,t){const i=await Promise.all(Array.from(e.items,(async e=>{let i;return null!=i||(i=St("function"==typeof e.getAsEntry?e.getAsEntry():e.webkitGetAsEntry(),t)),{fileSystemHandle:i,lastResortFile:e.getAsFile()}})));for(const{lastResortFile:e,fileSystemHandle:s}of i)if(null!=s)try{yield*kt(s,"",e)}catch(i){null!=e?yield e:t(i)}else null!=e&&(yield e)}(e,s))t.push(i);return t}catch{return function(e){const t=Pt(e.files);return Promise.resolve(t)}(e)}}var At=i(5144),Bt=i(590),Ot=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Ut(e,t){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(!((s=e[i])===(n=t[i])||Ot(s)&&Ot(n)))return!1;var s,n;return!0}function Et(e,t){void 0===t&&(t=Ut);var i=null;function s(){for(var s=[],n=0;n<arguments.length;n++)s[n]=arguments[n];if(i&&i.lastThis===this&&t(s,i.lastArgs))return i.lastResult;var a=e.apply(this,s);return i={lastResult:a,lastArgs:s,lastThis:this},a}return s.clear=function(){i=null},s}var It=['a[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','area[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])',"input:not([disabled]):not([inert]):not([aria-hidden])","select:not([disabled]):not([inert]):not([aria-hidden])","textarea:not([disabled]):not([inert]):not([aria-hidden])","button:not([disabled]):not([inert]):not([aria-hidden])",'iframe:not([tabindex^="-"]):not([inert]):not([aria-hidden])','object:not([tabindex^="-"]):not([inert]):not([aria-hidden])','embed:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[contenteditable]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[tabindex]:not([tabindex^="-"]):not([inert]):not([aria-hidden])'];function Nt(e,t){if(t){const i=e.querySelector(`[data-uppy-paneltype="${t}"]`);if(i)return i}return e}function Rt(e,t){const i=t[0];i&&(i.focus(),e.preventDefault())}function Mt(e,t,i){const s=Nt(i,t),n=Pt(s.querySelectorAll(It)),a=n.indexOf(document.activeElement);!function(e){return e.contains(document.activeElement)}(s)?Rt(e,n):e.shiftKey&&0===a?function(e,t){const i=t[t.length-1];i&&(i.focus(),e.preventDefault())}(e,n):e.shiftKey||a!==n.length-1||Rt(e,n)}var Lt=i(2784);function xt(){const e=document.body;return"draggable"in e&&"ondragstart"in e&&"ondrop"in e&&"FormData"in window&&"FileReader"in window}var zt=i(3817),Vt=i(4414),qt=i(138);function _t(e){const t={color:"#838999",icon:(0,h.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},(0,h.h)("g",{fill:"#A7AFB7",fillRule:"nonzero"},(0,h.h)("path",{d:"M5.5 22a.5.5 0 0 1-.5-.5v-18a.5.5 0 0 1 .5-.5h10.719a.5.5 0 0 1 .367.16l3.281 3.556a.5.5 0 0 1 .133.339V21.5a.5.5 0 0 1-.5.5h-14zm.5-1h13V7.25L16 4H6v17z"}),(0,h.h)("path",{d:"M15 4v3a1 1 0 0 0 1 1h3V7h-3V4h-1z"})))};if(!e)return t;const i=e.split("/")[0],s=e.split("/")[1];return"text"===i?{color:"#5a5e69",icon:(0,h.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},(0,h.h)("path",{d:"M4.5 7h13a.5.5 0 1 1 0 1h-13a.5.5 0 0 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h10a.5.5 0 1 1 0 1h-10a.5.5 0 1 1 0-1z",fill:"#5A5E69",fillRule:"nonzero"}))}:"image"===i?{color:"#686de0",icon:(0,h.h)("svg",{"aria-hidden":"true",focusable:"false",width:"25",height:"25",viewBox:"0 0 25 25"},(0,h.h)("g",{fill:"#686DE0",fillRule:"evenodd"},(0,h.h)("path",{d:"M5 7v10h15V7H5zm0-1h15a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z",fillRule:"nonzero"}),(0,h.h)("path",{d:"M6.35 17.172l4.994-5.026a.5.5 0 0 1 .707 0l2.16 2.16 3.505-3.505a.5.5 0 0 1 .707 0l2.336 2.31-.707.72-1.983-1.97-3.505 3.505a.5.5 0 0 1-.707 0l-2.16-2.159-3.938 3.939-1.409.026z",fillRule:"nonzero"}),(0,h.h)("circle",{cx:"7.5",cy:"9.5",r:"1.5"})))}:"audio"===i?{color:"#068dbb",icon:(0,h.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},(0,h.h)("path",{d:"M9.5 18.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V7.25a.5.5 0 0 1 .379-.485l9-2.25A.5.5 0 0 1 18.5 5v11.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V8.67l-8 2v7.97zm8-11v-2l-8 2v2l8-2zM7 19.64c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1zm9-2c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1z",fill:"#049BCF",fillRule:"nonzero"}))}:"video"===i?{color:"#19af67",icon:(0,h.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},(0,h.h)("path",{d:"M16 11.834l4.486-2.691A1 1 0 0 1 22 10v6a1 1 0 0 1-1.514.857L16 14.167V17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v2.834zM15 9H5v8h10V9zm1 4l5 3v-6l-5 3z",fill:"#19AF67",fillRule:"nonzero"}))}:"application"===i&&"pdf"===s?{color:"#e25149",icon:(0,h.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},(0,h.h)("path",{d:"M9.766 8.295c-.691-1.843-.539-3.401.747-3.726 1.643-.414 2.505.938 2.39 3.299-.039.79-.194 1.662-.537 3.148.324.49.66.967 1.055 1.51.17.231.382.488.629.757 1.866-.128 3.653.114 4.918.655 1.487.635 2.192 1.685 1.614 2.84-.566 1.133-1.839 1.084-3.416.249-1.141-.604-2.457-1.634-3.51-2.707a13.467 13.467 0 0 0-2.238.426c-1.392 4.051-4.534 6.453-5.707 4.572-.986-1.58 1.38-4.206 4.914-5.375.097-.322.185-.656.264-1.001.08-.353.306-1.31.407-1.737-.678-1.059-1.2-2.031-1.53-2.91zm2.098 4.87c-.033.144-.068.287-.104.427l.033-.01-.012.038a14.065 14.065 0 0 1 1.02-.197l-.032-.033.052-.004a7.902 7.902 0 0 1-.208-.271c-.197-.27-.38-.526-.555-.775l-.006.028-.002-.003c-.076.323-.148.632-.186.8zm5.77 2.978c1.143.605 1.832.632 2.054.187.26-.519-.087-1.034-1.113-1.473-.911-.39-2.175-.608-3.55-.608.845.766 1.787 1.459 2.609 1.894zM6.559 18.789c.14.223.693.16 1.425-.413.827-.648 1.61-1.747 2.208-3.206-2.563 1.064-4.102 2.867-3.633 3.62zm5.345-10.97c.088-1.793-.351-2.48-1.146-2.28-.473.119-.564 1.05-.056 2.405.213.566.52 1.188.908 1.859.18-.858.268-1.453.294-1.984z",fill:"#E2514A",fillRule:"nonzero"}))}:"application"===i&&-1!==["zip","x-7z-compressed","x-rar-compressed","x-tar","x-gzip","x-apple-diskimage"].indexOf(s)?{color:"#00C469",icon:(0,h.h)("svg",{"aria-hidden":"true",focusable:"false",width:"25",height:"25",viewBox:"0 0 25 25"},(0,h.h)("path",{d:"M10.45 2.05h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5V2.55a.5.5 0 0 1 .5-.5zm2.05 1.024h1.05a.5.5 0 0 1 .5.5V3.6a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5v-.001zM10.45 0h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5V.5a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-2.05 3.074h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-2.05 1.024h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm-2.05 1.025h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-1.656 3.074l-.82 5.946c.52.302 1.174.458 1.976.458.803 0 1.455-.156 1.975-.458l-.82-5.946h-2.311zm0-1.025h2.312c.512 0 .946.378 1.015.885l.82 5.946c.056.412-.142.817-.501 1.026-.686.398-1.515.597-2.49.597-.974 0-1.804-.199-2.49-.597a1.025 1.025 0 0 1-.5-1.026l.819-5.946c.07-.507.503-.885 1.015-.885zm.545 6.6a.5.5 0 0 1-.397-.561l.143-.999a.5.5 0 0 1 .495-.429h.74a.5.5 0 0 1 .495.43l.143.998a.5.5 0 0 1-.397.561c-.404.08-.819.08-1.222 0z",fill:"#00C469",fillRule:"nonzero"}))}:t}function Ht(e){const{file:t}=e;if(t.preview)return(0,h.h)("img",{className:"uppy-Dashboard-Item-previewImg",alt:t.name,src:t.preview});const{color:i,icon:s}=_t(t.type);return(0,h.h)("div",{className:"uppy-Dashboard-Item-previewIconWrap"},(0,h.h)("span",{className:"uppy-Dashboard-Item-previewIcon",style:{color:i}},s),(0,h.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-Dashboard-Item-previewIconBg",width:"58",height:"76",viewBox:"0 0 58 76"},(0,h.h)("rect",{fill:"#FFF",width:"58",height:"76",rx:"3",fillRule:"evenodd"})))}const Wt=(e,t)=>{const i=("function"==typeof t?t():t).filter((t=>t.id===e));return i[0].name};function jt(e){const{file:t,toggleFileCard:i,i18n:s,metaFields:n}=e,{missingRequiredMetaFields:a}=t;if(null==a||!a.length)return null;const r=a.map((e=>Wt(e,n))).join(", ");return(0,h.h)("div",{className:"uppy-Dashboard-Item-errorMessage"},s("missingRequiredMetaFields",{smart_count:a.length,fields:r})," ",(0,h.h)("button",{type:"button",class:"uppy-u-reset uppy-Dashboard-Item-errorMessageBtn",onClick:()=>i(!0,t.id)},s("editFile")))}function $t(e){const{file:t,i18n:i,toggleFileCard:s,metaFields:n,showLinkToFileUploadResult:a}=e,r=t.preview?"rgba(255, 255, 255, 0.5)":_t(t.type).color;return(0,h.h)("div",{className:"uppy-Dashboard-Item-previewInnerWrap",style:{backgroundColor:r}},a&&t.uploadURL&&(0,h.h)("a",{className:"uppy-Dashboard-Item-previewLink",href:t.uploadURL,rel:"noreferrer noopener",target:"_blank","aria-label":t.meta.name},(0,h.h)("span",{hidden:!0},t.meta.name)),(0,h.h)(Ht,{file:t}),(0,h.h)(jt,{file:t,i18n:i,toggleFileCard:s,metaFields:n}))}function Gt(e){return e.isUploaded?e.i18n("uploadComplete"):e.error?e.i18n("retryUpload"):e.resumableUploads?e.file.isPaused?e.i18n("resumeUpload"):e.i18n("pauseUpload"):e.individualCancellation?e.i18n("cancelUpload"):""}function Kt(e){return(0,h.h)("div",{className:"uppy-Dashboard-Item-progress"},(0,h.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-progressIndicator",type:"button","aria-label":Gt(e),title:Gt(e),onClick:()=>function(e){e.isUploaded||(!e.error||e.hideRetryButton?e.resumableUploads&&!e.hidePauseResumeButton?e.uppy.pauseResume(e.file.id):e.individualCancellation&&!e.hideCancelButton&&e.uppy.removeFile(e.file.id):e.uppy.retryUpload(e.file.id))}(e)},e.children))}function Xt(e){let{children:t}=e;return(0,h.h)("svg",{"aria-hidden":"true",focusable:"false",width:"70",height:"70",viewBox:"0 0 36 36",className:"uppy-c-icon uppy-Dashboard-Item-progressIcon--circle"},t)}function Yt(e){let{progress:t}=e;const i=2*Math.PI*15;return(0,h.h)("g",null,(0,h.h)("circle",{className:"uppy-Dashboard-Item-progressIcon--bg",r:"15",cx:"18",cy:"18","stroke-width":"2",fill:"none"}),(0,h.h)("circle",{className:"uppy-Dashboard-Item-progressIcon--progress",r:"15",cx:"18",cy:"18",transform:"rotate(-90, 18, 18)",fill:"none","stroke-width":"2","stroke-dasharray":i,"stroke-dashoffset":i-i/100*t}))}function Qt(e){return e.file.progress.uploadStarted?e.isUploaded?(0,h.h)("div",{className:"uppy-Dashboard-Item-progress"},(0,h.h)("div",{className:"uppy-Dashboard-Item-progressIndicator"},(0,h.h)(Xt,null,(0,h.h)("circle",{r:"15",cx:"18",cy:"18",fill:"#1bb240"}),(0,h.h)("polygon",{className:"uppy-Dashboard-Item-progressIcon--check",transform:"translate(2, 3)",points:"14 22.5 7 15.2457065 8.99985857 13.1732815 14 18.3547104 22.9729883 9 25 11.1005634"})))):e.recoveredState?void 0:e.error&&!e.hideRetryButton?(0,h.h)(Kt,e,(0,h.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-Dashboard-Item-progressIcon--retry",width:"28",height:"31",viewBox:"0 0 16 19"},(0,h.h)("path",{d:"M16 11a8 8 0 1 1-8-8v2a6 6 0 1 0 6 6h2z"}),(0,h.h)("path",{d:"M7.9 3H10v2H7.9z"}),(0,h.h)("path",{d:"M8.536.5l3.535 3.536-1.414 1.414L7.12 1.914z"}),(0,h.h)("path",{d:"M10.657 2.621l1.414 1.415L8.536 7.57 7.12 6.157z"}))):e.resumableUploads&&!e.hidePauseResumeButton?(0,h.h)(Kt,e,(0,h.h)(Xt,null,(0,h.h)(Yt,{progress:e.file.progress.percentage}),e.file.isPaused?(0,h.h)("polygon",{className:"uppy-Dashboard-Item-progressIcon--play",transform:"translate(3, 3)",points:"12 20 12 10 20 15"}):(0,h.h)("g",{className:"uppy-Dashboard-Item-progressIcon--pause",transform:"translate(14.5, 13)"},(0,h.h)("rect",{x:"0",y:"0",width:"2",height:"10",rx:"0"}),(0,h.h)("rect",{x:"5",y:"0",width:"2",height:"10",rx:"0"})))):e.resumableUploads||!e.individualCancellation||e.hideCancelButton?(0,h.h)("div",{className:"uppy-Dashboard-Item-progress"},(0,h.h)("div",{className:"uppy-Dashboard-Item-progressIndicator"},(0,h.h)(Xt,null,(0,h.h)(Yt,{progress:e.file.progress.percentage})))):(0,h.h)(Kt,e,(0,h.h)(Xt,null,(0,h.h)(Yt,{progress:e.file.progress.percentage}),(0,h.h)("polygon",{className:"cancel",transform:"translate(2, 2)",points:"19.8856516 11.0625 16 14.9481516 12.1019737 11.0625 11.0625 12.1143484 14.9481516 16 11.0625 19.8980263 12.1019737 20.9375 16 17.0518484 19.8856516 20.9375 20.9375 19.8980263 17.0518484 16 20.9375 12"}))):null}const Jt="...";function Zt(e,t){if(0===t)return"";if(e.length<=t)return e;if(t<=4)return`${e.slice(0,t-1)}…`;const i=t-3,s=Math.ceil(i/2),n=Math.floor(i/2);return e.slice(0,s)+Jt+e.slice(-n)}const ei=e=>{let{file:t,onClick:i}=e;return t.error?(0,h.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-errorDetails","aria-label":t.error,"data-microtip-position":"bottom","data-microtip-size":"medium",onClick:i,type:"button"},"?"):null};function ti(e){const{file:t}=e;return(0,h.h)("div",{className:"uppy-Dashboard-Item-fileInfo","data-uppy-file-source":t.source},(0,h.h)("div",{className:"uppy-Dashboard-Item-fileName"},(e=>{const{author:t,name:i}=e.file.meta;return(0,h.h)("div",{className:"uppy-Dashboard-Item-name",title:i},Zt(i,e.isSingleFile&&e.containerHeight>=350?90:e.containerWidth<=352?35:e.containerWidth<=576?60:t?20:30))})(e),(0,h.h)(ei,{file:e.file,onClick:()=>alert(e.file.error)})),(0,h.h)("div",{className:"uppy-Dashboard-Item-status"},(e=>{var t;const{author:i}=e.file.meta,s=null==(t=e.file.remote)?void 0:t.providerName;return i?(0,h.h)("div",{className:"uppy-Dashboard-Item-author"},(0,h.h)("a",{href:`${i.url}?utm_source=Companion&utm_medium=referral`,target:"_blank",rel:"noopener noreferrer"},Zt(i.name,13)),s?(0,h.h)(h.FK,null," · ",s," · "):null):null})(e),(e=>e.file.size&&(0,h.h)("div",{className:"uppy-Dashboard-Item-statusSize"},u(e.file.size)))(e),(e=>e.file.isGhost&&(0,h.h)("span",null," • ",(0,h.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-reSelect",type:"button",onClick:e.toggleAddFilesPanel},e.i18n("reSelect"))))(e)),(0,h.h)(jt,{file:e.file,i18n:e.i18n,toggleFileCard:e.toggleFileCard,metaFields:e.metaFields}))}function ii(e){let{file:t,uploadInProgressOrComplete:i,metaFields:s,canEditFile:n,i18n:a,onClick:r}=e;return!i&&s&&s.length>0||!i&&n(t)?(0,h.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-action uppy-Dashboard-Item-action--edit",type:"button","aria-label":a("editFileWithFilename",{file:t.meta.name}),title:a("editFileWithFilename",{file:t.meta.name}),onClick:()=>r()},(0,h.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"14",height:"14",viewBox:"0 0 14 14"},(0,h.h)("g",{fillRule:"evenodd"},(0,h.h)("path",{d:"M1.5 10.793h2.793A1 1 0 0 0 5 10.5L11.5 4a1 1 0 0 0 0-1.414L9.707.793a1 1 0 0 0-1.414 0l-6.5 6.5A1 1 0 0 0 1.5 8v2.793zm1-1V8L9 1.5l1.793 1.793-6.5 6.5H2.5z",fillRule:"nonzero"}),(0,h.h)("rect",{x:"1",y:"12.293",width:"11",height:"1",rx:".5"}),(0,h.h)("path",{fillRule:"nonzero",d:"M6.793 2.5L9.5 5.207l.707-.707L7.5 1.793z"})))):null}function si(e){let{i18n:t,onClick:i,file:s}=e;return(0,h.h)("button",{className:"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--remove",type:"button","aria-label":t("removeFile",{file:s.meta.name}),title:t("removeFile",{file:s.meta.name}),onClick:()=>i()},(0,h.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"18",height:"18",viewBox:"0 0 18 18"},(0,h.h)("path",{d:"M9 0C4.034 0 0 4.034 0 9s4.034 9 9 9 9-4.034 9-9-4.034-9-9-9z"}),(0,h.h)("path",{fill:"#FFF",d:"M13 12.222l-.778.778L9 9.778 5.778 13 5 12.222 8.222 9 5 5.778 5.778 5 9 8.222 12.222 5l.778.778L9.778 9z"})))}const ni=(e,t)=>{var i,s;(i=t.file.uploadURL,s=t.i18n("copyLinkToClipboardFallback"),void 0===s&&(s="Copy the URL below"),new Promise((e=>{const t=document.createElement("textarea");t.setAttribute("style",{position:"fixed",top:0,left:0,width:"2em",height:"2em",padding:0,border:"none",outline:"none",boxShadow:"none",background:"transparent"}),t.value=i,document.body.appendChild(t),t.select();const n=n=>{document.body.removeChild(t),window.prompt(s,i),e()};try{return document.execCommand("copy")?(document.body.removeChild(t),e()):n()}catch(e){return document.body.removeChild(t),n()}}))).then((()=>{t.uppy.log("Link copied to clipboard."),t.uppy.info(t.i18n("copyLinkToClipboardSuccess"),"info",3e3)})).catch(t.uppy.log).then((()=>e.target.focus({preventScroll:!0})))};function ai(e){const{i18n:t}=e;return(0,h.h)("button",{className:"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--copyLink",type:"button","aria-label":t("copyLink"),title:t("copyLink"),onClick:t=>ni(t,e)},(0,h.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"14",height:"14",viewBox:"0 0 14 12"},(0,h.h)("path",{d:"M7.94 7.703a2.613 2.613 0 0 1-.626 2.681l-.852.851a2.597 2.597 0 0 1-1.849.766A2.616 2.616 0 0 1 2.764 7.54l.852-.852a2.596 2.596 0 0 1 2.69-.625L5.267 7.099a1.44 1.44 0 0 0-.833.407l-.852.851a1.458 1.458 0 0 0 1.03 2.486c.39 0 .755-.152 1.03-.426l.852-.852c.231-.231.363-.522.406-.824l1.04-1.038zm4.295-5.937A2.596 2.596 0 0 0 10.387 1c-.698 0-1.355.272-1.849.766l-.852.851a2.614 2.614 0 0 0-.624 2.688l1.036-1.036c.041-.304.173-.6.407-.833l.852-.852c.275-.275.64-.426 1.03-.426a1.458 1.458 0 0 1 1.03 2.486l-.852.851a1.442 1.442 0 0 1-.824.406l-1.04 1.04a2.596 2.596 0 0 0 2.683-.628l.851-.85a2.616 2.616 0 0 0 0-3.697zm-6.88 6.883a.577.577 0 0 0 .82 0l3.474-3.474a.579.579 0 1 0-.819-.82L5.355 7.83a.579.579 0 0 0 0 .819z"})))}function ri(e){const{uppy:t,file:i,uploadInProgressOrComplete:s,canEditFile:n,metaFields:a,showLinkToFileUploadResult:r,showRemoveButton:o,i18n:l,toggleFileCard:p,openFileEditor:d}=e;return(0,h.h)("div",{className:"uppy-Dashboard-Item-actionWrapper"},(0,h.h)(ii,{i18n:l,file:i,uploadInProgressOrComplete:s,canEditFile:n,metaFields:a,onClick:()=>{a&&a.length>0?p(!0,i.id):d(i)}}),r&&i.uploadURL?(0,h.h)(ai,{file:i,uppy:t,i18n:l}):null,o?(0,h.h)(si,{i18n:l,file:i,uppy:t,onClick:()=>t.removeFile(i.id,"removed-by-user")}):null)}class oi extends h.uA{componentDidMount(){const{file:e}=this.props;e.preview||this.props.handleRequestThumbnail(e)}shouldComponentUpdate(e){return!qt(this.props,e)}componentDidUpdate(){const{file:e}=this.props;e.preview||this.props.handleRequestThumbnail(e)}componentWillUnmount(){const{file:e}=this.props;e.preview||this.props.handleCancelThumbnail(e)}render(){const{file:e}=this.props,t=e.progress.preprocess||e.progress.postprocess,i=e.progress.uploadComplete&&!t&&!e.error,s=e.progress.uploadStarted||t,n=e.progress.uploadStarted&&!e.progress.uploadComplete||t,a=e.error||!1,{isGhost:r}=e;let o=(this.props.individualCancellation||!n)&&!i;i&&this.props.showRemoveButtonAfterComplete&&(o=!0);const l=p({"uppy-Dashboard-Item":!0,"is-inprogress":n&&!this.props.recoveredState,"is-processing":t,"is-complete":i,"is-error":!!a,"is-resumable":this.props.resumableUploads,"is-noIndividualCancellation":!this.props.individualCancellation,"is-ghost":r});return(0,h.h)("div",{className:l,id:`uppy_${e.id}`,role:this.props.role},(0,h.h)("div",{className:"uppy-Dashboard-Item-preview"},(0,h.h)($t,{file:e,showLinkToFileUploadResult:this.props.showLinkToFileUploadResult,i18n:this.props.i18n,toggleFileCard:this.props.toggleFileCard,metaFields:this.props.metaFields}),(0,h.h)(Qt,{uppy:this.props.uppy,file:e,error:a,isUploaded:i,hideRetryButton:this.props.hideRetryButton,hideCancelButton:this.props.hideCancelButton,hidePauseResumeButton:this.props.hidePauseResumeButton,recoveredState:this.props.recoveredState,showRemoveButtonAfterComplete:this.props.showRemoveButtonAfterComplete,resumableUploads:this.props.resumableUploads,individualCancellation:this.props.individualCancellation,i18n:this.props.i18n})),(0,h.h)("div",{className:"uppy-Dashboard-Item-fileInfoAndButtons"},(0,h.h)(ti,{file:e,id:this.props.id,acquirers:this.props.acquirers,containerWidth:this.props.containerWidth,containerHeight:this.props.containerHeight,i18n:this.props.i18n,toggleAddFilesPanel:this.props.toggleAddFilesPanel,toggleFileCard:this.props.toggleFileCard,metaFields:this.props.metaFields,isSingleFile:this.props.isSingleFile}),(0,h.h)(ri,{file:e,metaFields:this.props.metaFields,showLinkToFileUploadResult:this.props.showLinkToFileUploadResult,showRemoveButton:o,canEditFile:this.props.canEditFile,uploadInProgressOrComplete:s,toggleFileCard:this.props.toggleFileCard,openFileEditor:this.props.openFileEditor,uppy:this.props.uppy,i18n:this.props.i18n})))}}function li(e){let{id:t,error:i,i18n:s,uppy:n,files:a,acquirers:r,resumableUploads:o,hideRetryButton:l,hidePauseResumeButton:p,hideCancelButton:d,showLinkToFileUploadResult:u,showRemoveButtonAfterComplete:c,isWide:f,metaFields:m,isSingleFile:g,toggleFileCard:y,handleRequestThumbnail:b,handleCancelThumbnail:v,recoveredState:w,individualCancellation:C,itemsPerRow:F,openFileEditor:P,canEditFile:D,toggleAddFilesPanel:S,containerWidth:k,containerHeight:T}=e;const A=1===F?71:200,B=(0,zt.Kr)((()=>{const e=Object.keys(a);return w&&e.sort(((e,t)=>a[t].isGhost-a[e].isGhost)),function(e,t){const i=[];let s=[];return e.forEach((e=>{s.length<t?s.push(e):(i.push(s),s=[e])})),s.length&&i.push(s),i}(e,F)}),[a,F,w]),O=e=>(0,h.h)("div",{class:"uppy-Dashboard-filesInner",role:"presentation",key:e[0]},e.map((e=>(0,h.h)(oi,{key:e,uppy:n,id:t,error:i,i18n:s,acquirers:r,resumableUploads:o,individualCancellation:C,hideRetryButton:l,hidePauseResumeButton:p,hideCancelButton:d,showLinkToFileUploadResult:u,showRemoveButtonAfterComplete:c,isWide:f,metaFields:m,recoveredState:w,isSingleFile:g,containerWidth:k,containerHeight:T,toggleFileCard:y,handleRequestThumbnail:b,handleCancelThumbnail:v,role:"listitem",openFileEditor:P,canEditFile:D,toggleAddFilesPanel:S,file:a[e]}))));return g?(0,h.h)("div",{class:"uppy-Dashboard-files"},O(B[0])):(0,h.h)(Vt.A,{class:"uppy-Dashboard-files",role:"list",data:B,renderRow:O,rowHeight:A})}let hi;hi=Symbol.for("uppy test: disable unused locale key warning");class pi extends h.uA{constructor(){super(...arguments),this.triggerFileInputClick=()=>{this.fileInput.click()},this.triggerFolderInputClick=()=>{this.folderInput.click()},this.triggerVideoCameraInputClick=()=>{this.mobileVideoFileInput.click()},this.triggerPhotoCameraInputClick=()=>{this.mobilePhotoFileInput.click()},this.onFileInputChange=e=>{this.props.handleInputChange(e),e.target.value=null},this.renderHiddenInput=(e,t)=>(0,h.h)("input",{className:"uppy-Dashboard-input",hidden:!0,"aria-hidden":"true",tabIndex:-1,webkitdirectory:e,type:"file",name:"files[]",multiple:1!==this.props.maxNumberOfFiles,onChange:this.onFileInputChange,accept:this.props.allowedFileTypes,ref:t}),this.renderHiddenCameraInput=(e,t,i)=>{const s={photo:"image/*",video:"video/*"}[e];return(0,h.h)("input",{className:"uppy-Dashboard-input",hidden:!0,"aria-hidden":"true",tabIndex:-1,type:"file",name:`camera-${e}`,onChange:this.onFileInputChange,capture:t,accept:s,ref:i})},this.renderMyDeviceAcquirer=()=>(0,h.h)("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":"MyDevice"},(0,h.h)("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn",role:"tab",tabIndex:0,"data-uppy-super-focusable":!0,onClick:this.triggerFileInputClick},(0,h.h)("div",{className:"uppy-DashboardTab-inner"},(0,h.h)("svg",{className:"uppy-DashboardTab-iconMyDevice","aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32"},(0,h.h)("path",{d:"M8.45 22.087l-1.305-6.674h17.678l-1.572 6.674H8.45zm4.975-12.412l1.083 1.765a.823.823 0 00.715.386h7.951V13.5H8.587V9.675h4.838zM26.043 13.5h-1.195v-2.598c0-.463-.336-.75-.798-.75h-8.356l-1.082-1.766A.823.823 0 0013.897 8H7.728c-.462 0-.815.256-.815.718V13.5h-.956a.97.97 0 00-.746.37.972.972 0 00-.19.81l1.724 8.565c.095.44.484.755.933.755H24c.44 0 .824-.3.929-.727l2.043-8.568a.972.972 0 00-.176-.825.967.967 0 00-.753-.38z",fill:"currentcolor","fill-rule":"evenodd"}))),(0,h.h)("div",{className:"uppy-DashboardTab-name"},this.props.i18n("myDevice")))),this.renderPhotoCamera=()=>(0,h.h)("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":"MobilePhotoCamera"},(0,h.h)("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn",role:"tab",tabIndex:0,"data-uppy-super-focusable":!0,onClick:this.triggerPhotoCameraInputClick},(0,h.h)("div",{className:"uppy-DashboardTab-inner"},(0,h.h)("svg",{"aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32"},(0,h.h)("path",{d:"M23.5 9.5c1.417 0 2.5 1.083 2.5 2.5v9.167c0 1.416-1.083 2.5-2.5 2.5h-15c-1.417 0-2.5-1.084-2.5-2.5V12c0-1.417 1.083-2.5 2.5-2.5h2.917l1.416-2.167C13 7.167 13.25 7 13.5 7h5c.25 0 .5.167.667.333L20.583 9.5H23.5zM16 11.417a4.706 4.706 0 00-4.75 4.75 4.704 4.704 0 004.75 4.75 4.703 4.703 0 004.75-4.75c0-2.663-2.09-4.75-4.75-4.75zm0 7.825c-1.744 0-3.076-1.332-3.076-3.074 0-1.745 1.333-3.077 3.076-3.077 1.744 0 3.074 1.333 3.074 3.076s-1.33 3.075-3.074 3.075z",fill:"#02B383","fill-rule":"nonzero"}))),(0,h.h)("div",{className:"uppy-DashboardTab-name"},this.props.i18n("takePictureBtn")))),this.renderVideoCamera=()=>(0,h.h)("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":"MobileVideoCamera"},(0,h.h)("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn",role:"tab",tabIndex:0,"data-uppy-super-focusable":!0,onClick:this.triggerVideoCameraInputClick},(0,h.h)("div",{className:"uppy-DashboardTab-inner"},(0,h.h)("svg",{"aria-hidden":"true",width:"32",height:"32",viewBox:"0 0 32 32"},(0,h.h)("path",{fill:"#FF675E",fillRule:"nonzero",d:"m21.254 14.277 2.941-2.588c.797-.313 1.243.818 1.09 1.554-.01 2.094.02 4.189-.017 6.282-.126.915-1.145 1.08-1.58.34l-2.434-2.142c-.192.287-.504 1.305-.738.468-.104-1.293-.028-2.596-.05-3.894.047-.312.381.823.426 1.069.063-.384.206-.744.362-1.09zm-12.939-3.73c3.858.013 7.717-.025 11.574.02.912.129 1.492 1.237 1.351 2.217-.019 2.412.04 4.83-.03 7.239-.17 1.025-1.166 1.59-2.029 1.429-3.705-.012-7.41.025-11.114-.019-.913-.129-1.492-1.237-1.352-2.217.018-2.404-.036-4.813.029-7.214.136-.82.83-1.473 1.571-1.454z "}))),(0,h.h)("div",{className:"uppy-DashboardTab-name"},this.props.i18n("recordVideoBtn")))),this.renderBrowseButton=(e,t)=>{const i=this.props.acquirers.length;return(0,h.h)("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-Dashboard-browse",onClick:t,"data-uppy-super-focusable":0===i},e)},this.renderDropPasteBrowseTagline=e=>{const t=this.renderBrowseButton(this.props.i18n("browseFiles"),this.triggerFileInputClick),i=this.renderBrowseButton(this.props.i18n("browseFolders"),this.triggerFolderInputClick),s=this.props.fileManagerSelectionType,n=s.charAt(0).toUpperCase()+s.slice(1);return(0,h.h)("div",{class:"uppy-Dashboard-AddFiles-title"},this.props.disableLocalFiles?this.props.i18n("importFiles"):e>0?this.props.i18nArray(`dropPasteImport${n}`,{browseFiles:t,browseFolders:i,browse:t}):this.props.i18nArray(`dropPaste${n}`,{browseFiles:t,browseFolders:i,browse:t}))},this.renderAcquirer=e=>{var t;return(0,h.h)("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":e.id},(0,h.h)("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn",role:"tab",tabIndex:0,"data-cy":e.id,"aria-controls":`uppy-DashboardContent-panel--${e.id}`,"aria-selected":(null==(t=this.props.activePickerPanel)?void 0:t.id)===e.id,"data-uppy-super-focusable":!0,onClick:()=>this.props.showPanel(e.id)},(0,h.h)("div",{className:"uppy-DashboardTab-inner"},e.icon()),(0,h.h)("div",{className:"uppy-DashboardTab-name"},e.name)))},this.renderAcquirers=e=>{const t=[...e],i=t.splice(e.length-2,e.length);return(0,h.h)(h.FK,null,t.map((e=>this.renderAcquirer(e))),(0,h.h)("span",{role:"presentation",style:{"white-space":"nowrap"}},i.map((e=>this.renderAcquirer(e)))))},this.renderSourcesList=(e,t)=>{const{showNativePhotoCameraButton:i,showNativeVideoCameraButton:s}=this.props;let n=[];const a="myDevice";t||n.push({key:a,elements:this.renderMyDeviceAcquirer()}),i&&n.push({key:"nativePhotoCameraButton",elements:this.renderPhotoCamera()}),s&&n.push({key:"nativePhotoCameraButton",elements:this.renderVideoCamera()}),n.push(...e.map((e=>({key:e.id,elements:this.renderAcquirer(e)})))),1===n.length&&n[0].key===a&&(n=[]);const r=[...n],o=r.splice(n.length-2,n.length),l=e=>e.map((e=>{let{key:t,elements:i}=e;return(0,h.h)(h.FK,{key:t},i)}));return(0,h.h)(h.FK,null,this.renderDropPasteBrowseTagline(n.length),(0,h.h)("div",{className:"uppy-Dashboard-AddFiles-list",role:"tablist"},l(r),(0,h.h)("span",{role:"presentation",style:{"white-space":"nowrap"}},l(o))))}}[hi](){this.props.i18nArray("dropPasteBoth"),this.props.i18nArray("dropPasteFiles"),this.props.i18nArray("dropPasteFolders"),this.props.i18nArray("dropPasteImportBoth"),this.props.i18nArray("dropPasteImportFiles"),this.props.i18nArray("dropPasteImportFolders")}renderPoweredByUppy(){const{i18nArray:e}=this.props,t=e("poweredBy",{uppy:(0,h.h)("span",null,(0,h.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-Dashboard-poweredByIcon",width:"11",height:"11",viewBox:"0 0 11 11"},(0,h.h)("path",{d:"M7.365 10.5l-.01-4.045h2.612L5.5.806l-4.467 5.65h2.604l.01 4.044h3.718z",fillRule:"evenodd"})),(0,h.h)("span",{className:"uppy-Dashboard-poweredByUppy"},"Uppy"))});return(0,h.h)("a",{tabIndex:-1,href:"https://uppy.io",rel:"noreferrer noopener",target:"_blank",className:"uppy-Dashboard-poweredBy"},t)}render(){const{showNativePhotoCameraButton:e,showNativeVideoCameraButton:t,nativeCameraFacingMode:i}=this.props;return(0,h.h)("div",{className:"uppy-Dashboard-AddFiles"},this.renderHiddenInput(!1,(e=>{this.fileInput=e})),this.renderHiddenInput(!0,(e=>{this.folderInput=e})),e&&this.renderHiddenCameraInput("photo",i,(e=>{this.mobilePhotoFileInput=e})),t&&this.renderHiddenCameraInput("video",i,(e=>{this.mobileVideoFileInput=e})),this.renderSourcesList(this.props.acquirers,this.props.disableLocalFiles),(0,h.h)("div",{className:"uppy-Dashboard-AddFiles-info"},this.props.note&&(0,h.h)("div",{className:"uppy-Dashboard-note"},this.props.note),this.props.proudlyDisplayPoweredByUppy&&this.renderPoweredByUppy(this.props)))}}var di=pi,ui=e=>(0,h.h)("div",{className:p("uppy-Dashboard-AddFilesPanel",e.className),"data-uppy-panelType":"AddFiles","aria-hidden":!e.showAddFilesPanel},(0,h.h)("div",{className:"uppy-DashboardContent-bar"},(0,h.h)("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},e.i18n("addingMoreFiles")),(0,h.h)("button",{className:"uppy-DashboardContent-back",type:"button",onClick:()=>e.toggleAddFilesPanel(!1)},e.i18n("back"))),(0,h.h)(di,e)),ci=function(e){const{tagName:t}=e.target;"INPUT"!==t&&"TEXTAREA"!==t?(e.preventDefault(),e.stopPropagation()):e.stopPropagation()},fi=function(e){let{activePickerPanel:t,className:i,hideAllPanels:s,i18n:n,state:a,uppy:r}=e;return(0,h.h)("div",{className:p("uppy-DashboardContent-panel",i),role:"tabpanel","data-uppy-panelType":"PickerPanel",id:`uppy-DashboardContent-panel--${t.id}`,onDragOver:ci,onDragLeave:ci,onDrop:ci,onPaste:ci},(0,h.h)("div",{className:"uppy-DashboardContent-bar"},(0,h.h)("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},n("importFrom",{name:t.name})),(0,h.h)("button",{className:"uppy-DashboardContent-back",type:"button",onClick:s},n("cancel"))),(0,h.h)("div",{className:"uppy-DashboardContent-panelBody"},r.getPlugin(t.id).render(a)))},mi=function(e){const t=e.files[e.fileCardFor];return(0,h.h)("div",{className:p("uppy-DashboardContent-panel",e.className),role:"tabpanel","data-uppy-panelType":"FileEditor",id:"uppy-DashboardContent-panel--editor"},(0,h.h)("div",{className:"uppy-DashboardContent-bar"},(0,h.h)("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},e.i18nArray("editing",{file:(0,h.h)("span",{className:"uppy-DashboardContent-titleFile"},t.meta?t.meta.name:t.name)})),(0,h.h)("button",{className:"uppy-DashboardContent-back",type:"button",onClick:()=>{e.uppy.emit("file-editor:cancel",t),e.closeFileEditor()}},e.i18n("cancel")),(0,h.h)("button",{className:"uppy-DashboardContent-save",type:"button",onClick:e.saveFileEditor},e.i18n("save"))),(0,h.h)("div",{className:"uppy-DashboardContent-panelBody"},e.editors.map((t=>e.uppy.getPlugin(t.id).render(e.state)))))};const gi="error",yi="waiting",bi="preprocessing",vi="uploading",wi="postprocessing",Ci="complete",Fi="paused";function Pi(e){let{files:t,i18n:i,isAllComplete:s,isAllErrored:n,isAllPaused:a,inProgressNotPausedFiles:r,newFiles:o,processingFiles:l}=e;const h=function(e,t,i,s){if(void 0===s&&(s={}),e)return gi;if(t)return Ci;if(i)return Fi;let n=yi;const a=Object.keys(s);for(let e=0;e<a.length;e++){const{progress:t}=s[a[e]];if(t.uploadStarted&&!t.uploadComplete)return vi;t.preprocess&&n!==vi&&(n=bi),t.postprocess&&n!==vi&&n!==bi&&(n=wi)}return n}(n,s,a,t);switch(h){case"uploading":return i("uploadingXFiles",{smart_count:r.length});case"preprocessing":case"postprocessing":return i("processingXFiles",{smart_count:l.length});case"paused":return i("uploadPaused");case"waiting":return i("xFilesSelected",{smart_count:o.length});case"complete":return i("uploadComplete");case"error":return i("error")}}var Di=function(e){const{i18n:t,isAllComplete:i,hideCancelButton:s,maxNumberOfFiles:n,toggleAddFilesPanel:a,uppy:r}=e;let{allowNewUpload:o}=e;return o&&n&&(o=e.totalFileCount<e.maxNumberOfFiles),(0,h.h)("div",{className:"uppy-DashboardContent-bar"},i||s?(0,h.h)("div",null):(0,h.h)("button",{className:"uppy-DashboardContent-back",type:"button",onClick:()=>r.cancelAll()},t("cancel")),(0,h.h)("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},(0,h.h)(Pi,e)),o?(0,h.h)("button",{className:"uppy-DashboardContent-addMore",type:"button","aria-label":t("addMoreFiles"),title:t("addMoreFiles"),onClick:()=>a(!0)},(0,h.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"15",height:"15",viewBox:"0 0 15 15"},(0,h.h)("path",{d:"M8 6.5h6a.5.5 0 0 1 .5.5v.5a.5.5 0 0 1-.5.5H8v6a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V8h-6a.5.5 0 0 1-.5-.5V7a.5.5 0 0 1 .5-.5h6v-6A.5.5 0 0 1 7 0h.5a.5.5 0 0 1 .5.5v6z"})),(0,h.h)("span",{className:"uppy-DashboardContent-addMoreCaption"},t("addMore"))):(0,h.h)("div",null))};function Si(e){const{computedMetaFields:t,requiredMetaFields:i,updateMeta:s,form:n,formState:a}=e,r={text:"uppy-u-reset uppy-c-textInput uppy-Dashboard-FileCard-input"};return t.map((e=>{const t=`uppy-Dashboard-FileCard-input-${e.id}`,o=i.includes(e.id);return(0,h.h)("fieldset",{key:e.id,className:"uppy-Dashboard-FileCard-fieldset"},(0,h.h)("label",{className:"uppy-Dashboard-FileCard-label",htmlFor:t},e.name),void 0!==e.render?e.render({value:a[e.id],onChange:t=>s(t,e.id),fieldCSSClasses:r,required:o,form:n.id},h.h):(0,h.h)("input",{className:r.text,id:t,form:n.id,type:e.type||"text",required:o,value:a[e.id],placeholder:e.placeholder,onInput:t=>s(t.target.value,e.id),"data-uppy-super-focusable":!0}))}))}function ki(e){var t;const{files:i,fileCardFor:s,toggleFileCard:n,saveFileCard:a,metaFields:r,requiredMetaFields:o,openFileEditor:l,i18n:d,i18nArray:u,className:c,canEditFile:f}=e,m=i[s],g=null!=(t="function"==typeof r?r(i[s]):r)?t:[],y=f(m),b={};g.forEach((e=>{var t;b[e.id]=null!=(t=m.meta[e.id])?t:""}));const[v,w]=(0,zt.J0)(b),C=(0,zt.hb)((e=>{e.preventDefault(),a(v,s)}),[a,v,s]),F=()=>{n(!1)},[P]=(0,zt.J0)((()=>{const e=document.createElement("form");return e.setAttribute("tabindex","-1"),e.id=(0,Bt.A)(),e}));return(0,zt.vJ)((()=>(document.body.appendChild(P),P.addEventListener("submit",C),()=>{P.removeEventListener("submit",C),document.body.removeChild(P)})),[P,C]),(0,h.h)("div",{className:p("uppy-Dashboard-FileCard",c),"data-uppy-panelType":"FileCard",onDragOver:ci,onDragLeave:ci,onDrop:ci,onPaste:ci},(0,h.h)("div",{className:"uppy-DashboardContent-bar"},(0,h.h)("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},u("editing",{file:(0,h.h)("span",{className:"uppy-DashboardContent-titleFile"},m.meta?m.meta.name:m.name)})),(0,h.h)("button",{className:"uppy-DashboardContent-back",type:"button",form:P.id,title:d("finishEditingFile"),onClick:F},d("cancel"))),(0,h.h)("div",{className:"uppy-Dashboard-FileCard-inner"},(0,h.h)("div",{className:"uppy-Dashboard-FileCard-preview",style:{backgroundColor:_t(m.type).color}},(0,h.h)(Ht,{file:m}),y&&(0,h.h)("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-Dashboard-FileCard-edit",onClick:e=>{C(e),l(m)}},d("editImage"))),(0,h.h)("div",{className:"uppy-Dashboard-FileCard-info"},(0,h.h)(Si,{computedMetaFields:g,requiredMetaFields:o,updateMeta:(e,t)=>{w({...v,[t]:e})},form:P,formState:v})),(0,h.h)("div",{className:"uppy-Dashboard-FileCard-actions"},(0,h.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Dashboard-FileCard-actionsBtn",type:"submit",form:P.id},d("saveChanges")),(0,h.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-link uppy-Dashboard-FileCard-actionsBtn",type:"button",onClick:F,form:P.id},d("cancel")))))}const Ti="uppy-transition-slideDownUp";var Ai=function(e){let{children:t}=e;const[i,s]=(0,zt.J0)(null),[n,a]=(0,zt.J0)(""),r=(0,zt.li)(),o=(0,zt.li)(),l=(0,zt.li)();return(0,zt.vJ)((()=>{const e=(0,h.v2)(t)[0];i!==e&&(e&&!i?(a(`${Ti}-enter`),cancelAnimationFrame(l.current),clearTimeout(o.current),o.current=void 0,l.current=requestAnimationFrame((()=>{a(`${Ti}-enter ${Ti}-enter-active`),r.current=setTimeout((()=>{a("")}),250)}))):!i||e||o.current||(a(`${Ti}-leave`),cancelAnimationFrame(l.current),clearTimeout(r.current),r.current=void 0,l.current=requestAnimationFrame((()=>{a(`${Ti}-leave ${Ti}-leave-active`),o.current=setTimeout((()=>{s(null),a("")}),250)}))),s(e))}),[t,i]),(0,zt.vJ)((()=>()=>{clearTimeout(r.current),clearTimeout(o.current),cancelAnimationFrame(l.current)}),[]),i?(0,h.Ob)(i,{className:p(n,i.props.className)}):null};function Bi(){return Bi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Bi.apply(this,arguments)}var Oi={strings:{closeModal:"Close Modal",addMoreFiles:"Add more files",addingMoreFiles:"Adding more files",importFrom:"Import from %{name}",dashboardWindowTitle:"Uppy Dashboard Window (Press escape to close)",dashboardTitle:"Uppy Dashboard",copyLinkToClipboardSuccess:"Link copied to clipboard.",copyLinkToClipboardFallback:"Copy the URL below",copyLink:"Copy link",back:"Back",removeFile:"Remove file",editFile:"Edit file",editImage:"Edit image",editing:"Editing %{file}",error:"Error",finishEditingFile:"Finish editing file",saveChanges:"Save changes",myDevice:"My Device",dropHint:"Drop your files here",uploadComplete:"Upload complete",uploadPaused:"Upload paused",resumeUpload:"Resume upload",pauseUpload:"Pause upload",retryUpload:"Retry upload",cancelUpload:"Cancel upload",xFilesSelected:{0:"%{smart_count} file selected",1:"%{smart_count} files selected"},uploadingXFiles:{0:"Uploading %{smart_count} file",1:"Uploading %{smart_count} files"},processingXFiles:{0:"Processing %{smart_count} file",1:"Processing %{smart_count} files"},poweredBy:"Powered by %{uppy}",addMore:"Add more",editFileWithFilename:"Edit file %{file}",save:"Save",cancel:"Cancel",dropPasteFiles:"Drop files here or %{browseFiles}",dropPasteFolders:"Drop files here or %{browseFolders}",dropPasteBoth:"Drop files here, %{browseFiles} or %{browseFolders}",dropPasteImportFiles:"Drop files here, %{browseFiles} or import from:",dropPasteImportFolders:"Drop files here, %{browseFolders} or import from:",dropPasteImportBoth:"Drop files here, %{browseFiles}, %{browseFolders} or import from:",importFiles:"Import files from:",browseFiles:"browse files",browseFolders:"browse folders",recoveredXFiles:{0:"We could not fully recover 1 file. Please re-select it and resume the upload.",1:"We could not fully recover %{smart_count} files. Please re-select them and resume the upload."},recoveredAllFiles:"We restored all files. You can now resume the upload.",sessionRestored:"Session restored",reSelect:"Re-select",missingRequiredMetaFields:{0:"Missing required meta field: %{fields}.",1:"Missing required meta fields: %{fields}."},takePictureBtn:"Take Picture",recordVideoBtn:"Record Video"}};function Ui(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Ei=0;function Ii(e){return"__private_"+Ei+++"_"+e}const Ni=Et.default||Et;function Ri(){const e={};return e.promise=new Promise(((t,i)=>{e.resolve=t,e.reject=i})),e}const Mi={target:"body",metaFields:[],inline:!1,width:750,height:550,thumbnailWidth:280,thumbnailType:"image/jpeg",waitForThumbnailsBeforeUpload:!1,defaultPickerIcon:At.ZY,showLinkToFileUploadResult:!1,showProgressDetails:!1,hideUploadButton:!1,hideCancelButton:!1,hideRetryButton:!1,hidePauseResumeButton:!1,hideProgressAfterFinish:!1,note:null,closeModalOnClickOutside:!1,closeAfterFinish:!1,singleFileFullScreen:!0,disableStatusBar:!1,disableInformer:!1,disableThumbnailGenerator:!1,disablePageScrollWhenModalOpen:!0,animateOpenClose:!0,fileManagerSelectionType:"files",proudlyDisplayPoweredByUppy:!0,showSelectedFiles:!0,showRemoveButtonAfterComplete:!1,browserBackButtonClose:!1,showNativePhotoCameraButton:!1,showNativeVideoCameraButton:!1,theme:"light",autoOpen:null,autoOpenFileEditor:!1,disabled:!1,disableLocalFiles:!1,doneButtonHandler:null,onRequestCloseModal:null};var Li=Ii("disabledNodes"),xi=Ii("generateLargeThumbnailIfSingleFile"),zi=Ii("openFileEditorWhenFilesAdded"),Vi=Ii("attachRenderFunctionToTarget"),qi=Ii("isTargetSupported"),_i=Ii("getAcquirers"),Hi=Ii("getProgressIndicators"),Wi=Ii("getEditors"),ji=Ii("addSpecifiedPluginsFromOptions"),$i=Ii("autoDiscoverPlugins"),Gi=Ii("addSupportedPluginIfNoTarget");class Ki extends a.A{constructor(e,t){var i,s;let n;n=t?void 0===t.autoOpen?t.autoOpenFileEditor?"imageEditor":null:t.autoOpen:null,super(e,{...Mi,...t,autoOpen:n}),Object.defineProperty(this,Li,{writable:!0,value:void 0}),this.modalName=`uppy-Dashboard-${(0,Bt.A)()}`,this.superFocus=function(){let e=!1;return Lt(((t,i)=>{const s=Nt(t,i),n=s.contains(document.activeElement);if(n&&e)return;const a=s.querySelector("[data-uppy-super-focusable]");if(!n||a)if(a)a.focus({preventScroll:!0}),e=!0;else{const t=s.querySelector(It);null==t||t.focus({preventScroll:!0}),e=!1}}),260)}(),this.ifFocusedOnUppyRecently=!1,this.removeTarget=e=>{const t=this.getPluginState().targets.filter((t=>t.id!==e.id));this.setPluginState({targets:t})},this.addTarget=e=>{const t=e.id||e.constructor.name,i=e.title||t,s=e.type;if("acquirer"!==s&&"progressindicator"!==s&&"editor"!==s){const e="Dashboard: can only be targeted by plugins of types: acquirer, progressindicator, editor";return this.uppy.log(e,"error"),null}const n={id:t,name:i,type:s},a=this.getPluginState().targets.slice();return a.push(n),this.setPluginState({targets:a}),this.el},this.hideAllPanels=()=>{var e;const t=this.getPluginState(),i={activePickerPanel:void 0,showAddFilesPanel:!1,activeOverlayType:null,fileCardFor:null,showFileEditor:!1};t.activePickerPanel===i.activePickerPanel&&t.showAddFilesPanel===i.showAddFilesPanel&&t.showFileEditor===i.showFileEditor&&t.activeOverlayType===i.activeOverlayType||(this.setPluginState(i),this.uppy.emit("dashboard:close-panel",null==(e=t.activePickerPanel)?void 0:e.id))},this.showPanel=e=>{const{targets:t}=this.getPluginState(),i=t.find((t=>"acquirer"===t.type&&t.id===e));this.setPluginState({activePickerPanel:i,activeOverlayType:"PickerPanel"}),this.uppy.emit("dashboard:show-panel",e)},this.canEditFile=e=>{const{targets:t}=this.getPluginState();return Ui(this,Wi)[Wi](t).some((t=>this.uppy.getPlugin(t.id).canEditFile(e)))},this.openFileEditor=e=>{const{targets:t}=this.getPluginState(),i=Ui(this,Wi)[Wi](t);this.setPluginState({showFileEditor:!0,fileCardFor:e.id||null,activeOverlayType:"FileEditor"}),i.forEach((t=>{this.uppy.getPlugin(t.id).selectFile(e)}))},this.closeFileEditor=()=>{const{metaFields:e}=this.getPluginState();e&&e.length>0?this.setPluginState({showFileEditor:!1,activeOverlayType:"FileCard"}):this.setPluginState({showFileEditor:!1,fileCardFor:null,activeOverlayType:"AddFiles"})},this.saveFileEditor=()=>{const{targets:e}=this.getPluginState();Ui(this,Wi)[Wi](e).forEach((e=>{this.uppy.getPlugin(e.id).save()})),this.closeFileEditor()},this.openModal=()=>{const{promise:e,resolve:t}=Ri();if(this.savedScrollPosition=window.pageYOffset,this.savedActiveElement=document.activeElement,this.opts.disablePageScrollWhenModalOpen&&document.body.classList.add("uppy-Dashboard-isFixed"),this.opts.animateOpenClose&&this.getPluginState().isClosing){const e=()=>{this.setPluginState({isHidden:!1}),this.el.removeEventListener("animationend",e,!1),t()};this.el.addEventListener("animationend",e,!1)}else this.setPluginState({isHidden:!1}),t();return this.opts.browserBackButtonClose&&this.updateBrowserHistory(),document.addEventListener("keydown",this.handleKeyDownInModal),this.uppy.emit("dashboard:modal-open"),e},this.closeModal=e=>{var t;const i=null==(t=null==e?void 0:e.manualClose)||t,{isHidden:s,isClosing:n}=this.getPluginState();if(s||n)return;const{promise:a,resolve:r}=Ri();if(this.opts.disablePageScrollWhenModalOpen&&document.body.classList.remove("uppy-Dashboard-isFixed"),this.opts.animateOpenClose){this.setPluginState({isClosing:!0});const e=()=>{this.setPluginState({isHidden:!0,isClosing:!1}),this.superFocus.cancel(),this.savedActiveElement.focus(),this.el.removeEventListener("animationend",e,!1),r()};this.el.addEventListener("animationend",e,!1)}else this.setPluginState({isHidden:!0}),this.superFocus.cancel(),this.savedActiveElement.focus(),r();var o;return document.removeEventListener("keydown",this.handleKeyDownInModal),i&&this.opts.browserBackButtonClose&&null!=(o=history.state)&&o[this.modalName]&&history.back(),this.uppy.emit("dashboard:modal-closed"),a},this.isModalOpen=()=>!this.getPluginState().isHidden||!1,this.requestCloseModal=()=>this.opts.onRequestCloseModal?this.opts.onRequestCloseModal():this.closeModal(),this.setDarkModeCapability=e=>{const{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:{...t,darkMode:e}})},this.handleSystemDarkModeChange=e=>{const t=e.matches;this.uppy.log("[Dashboard] Dark mode is "+(t?"on":"off")),this.setDarkModeCapability(t)},this.toggleFileCard=(e,t)=>{const i=this.uppy.getFile(t);e?this.uppy.emit("dashboard:file-edit-start",i):this.uppy.emit("dashboard:file-edit-complete",i),this.setPluginState({fileCardFor:e?t:null,activeOverlayType:e?"FileCard":null})},this.toggleAddFilesPanel=e=>{this.setPluginState({showAddFilesPanel:e,activeOverlayType:e?"AddFiles":null})},this.addFiles=e=>{const t=e.map((e=>({source:this.id,name:e.name,type:e.type,data:e,meta:{relativePath:e.relativePath||e.webkitRelativePath||null}})));try{this.uppy.addFiles(t)}catch(e){this.uppy.log(e)}},this.startListeningToResize=()=>{this.resizeObserver=new ResizeObserver((e=>{const t=e[0],{width:i,height:s}=t.contentRect;this.setPluginState({containerWidth:i,containerHeight:s,areInsidesReadyToBeVisible:!0})})),this.resizeObserver.observe(this.el.querySelector(".uppy-Dashboard-inner")),this.makeDashboardInsidesVisibleAnywayTimeout=setTimeout((()=>{const e=this.getPluginState(),t=!this.opts.inline&&e.isHidden;e.areInsidesReadyToBeVisible||t||(this.uppy.log("[Dashboard] resize event didn’t fire on time: defaulted to mobile layout","warning"),this.setPluginState({areInsidesReadyToBeVisible:!0}))}),1e3)},this.stopListeningToResize=()=>{this.resizeObserver.disconnect(),clearTimeout(this.makeDashboardInsidesVisibleAnywayTimeout)},this.recordIfFocusedOnUppyRecently=e=>{this.el.contains(e.target)?this.ifFocusedOnUppyRecently=!0:(this.ifFocusedOnUppyRecently=!1,this.superFocus.cancel())},this.disableInteractiveElements=e=>{var t;const i=null!=(t=Ui(this,Li)[Li])?t:Pt(this.el.querySelectorAll(["a[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])",'[role="button"]:not([disabled])'])).filter((e=>!e.classList.contains("uppy-Dashboard-close")));for(const t of i)"A"===t.tagName?t.setAttribute("aria-disabled",e):t.disabled=e;Ui(this,Li)[Li]=e?i:null,this.dashboardIsDisabled=e},this.updateBrowserHistory=()=>{var e;null!=(e=history.state)&&e[this.modalName]||history.pushState({...history.state,[this.modalName]:!0},""),window.addEventListener("popstate",this.handlePopState,!1)},this.handlePopState=e=>{var t;!this.isModalOpen()||e.state&&e.state[this.modalName]||this.closeModal({manualClose:!1}),!this.isModalOpen()&&null!=(t=e.state)&&t[this.modalName]&&history.back()},this.handleKeyDownInModal=e=>{27===e.keyCode&&this.requestCloseModal(),9===e.keyCode&&Mt(e,this.getPluginState().activeOverlayType,this.el)},this.handleClickOutside=()=>{this.opts.closeModalOnClickOutside&&this.requestCloseModal()},this.handlePaste=e=>{this.uppy.iteratePlugins((t=>{"acquirer"===t.type&&(null==t.handleRootPaste||t.handleRootPaste(e))}));const t=Pt(e.clipboardData.files);t.length>0&&(this.uppy.log("[Dashboard] Files pasted"),this.addFiles(t))},this.handleInputChange=e=>{e.preventDefault();const t=Pt(e.target.files);t.length>0&&(this.uppy.log("[Dashboard] Files selected through input"),this.addFiles(t))},this.handleDragOver=e=>{var t,i;e.preventDefault(),e.stopPropagation();const s=(()=>{let t=!0;return this.uppy.iteratePlugins((i=>{null!=i.canHandleRootDrop&&i.canHandleRootDrop(e)&&(t=!0)})),t})(),n=(()=>{const{types:t}=e.dataTransfer;return t.some((e=>"Files"===e))})();if(!s&&!n||this.opts.disabled||this.opts.disableLocalFiles&&(n||!s)||!this.uppy.getState().allowNewUpload)return e.dataTransfer.dropEffect="none",void clearTimeout(this.removeDragOverClassTimeout);e.dataTransfer.dropEffect="copy",clearTimeout(this.removeDragOverClassTimeout),this.setPluginState({isDraggingOver:!0}),null==(t=(i=this.opts).onDragOver)||t.call(i,e)},this.handleDragLeave=e=>{var t,i;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.removeDragOverClassTimeout=setTimeout((()=>{this.setPluginState({isDraggingOver:!1})}),50),null==(t=(i=this.opts).onDragLeave)||t.call(i,e)},this.handleDrop=async e=>{var t,i;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.setPluginState({isDraggingOver:!1}),this.uppy.iteratePlugins((t=>{"acquirer"===t.type&&(null==t.handleRootDrop||t.handleRootDrop(e))}));let s=!1;this.uppy.log("[Dashboard] Processing dropped files");const n=await Tt(e.dataTransfer,{logDropError:e=>{this.uppy.log(e,"error"),s||(this.uppy.info(e.message,"error"),s=!0)}});n.length>0&&(this.uppy.log("[Dashboard] Files dropped"),this.addFiles(n)),null==(t=(i=this.opts).onDrop)||t.call(i,e)},this.handleRequestThumbnail=e=>{this.opts.waitForThumbnailsBeforeUpload||this.uppy.emit("thumbnail:request",e)},this.handleCancelThumbnail=e=>{this.opts.waitForThumbnailsBeforeUpload||this.uppy.emit("thumbnail:cancel",e)},this.handleKeyDownInInline=e=>{9===e.keyCode&&function(e,t,i){null===t||Mt(e,t,i)}(e,this.getPluginState().activeOverlayType,this.el)},this.handlePasteOnBody=e=>{this.el.contains(document.activeElement)&&this.handlePaste(e)},this.handleComplete=e=>{let{failed:t}=e;!this.opts.closeAfterFinish||null!=t&&t.length||this.requestCloseModal()},this.handleCancelRestore=()=>{this.uppy.emit("restore-canceled")},Object.defineProperty(this,xi,{writable:!0,value:()=>{if(this.opts.disableThumbnailGenerator)return;const e=this.uppy.getFiles();if(1===e.length){const t=this.uppy.getPlugin(`${this.id}:ThumbnailGenerator`);null==t||t.setOptions({thumbnailWidth:600});const i={...e[0],preview:void 0};null==t||t.requestThumbnail(i).then((()=>{null==t||t.setOptions({thumbnailWidth:this.opts.thumbnailWidth})}))}}}),Object.defineProperty(this,zi,{writable:!0,value:e=>{const t=e[0],{metaFields:i}=this.getPluginState(),s=i&&i.length>0,n=this.canEditFile(t);s&&"metaEditor"===this.opts.autoOpen?this.toggleFileCard(!0,t.id):n&&"imageEditor"===this.opts.autoOpen&&this.openFileEditor(t)}}),this.initEvents=()=>{if(this.opts.trigger&&!this.opts.inline){const e=Ft(this.opts.trigger);e?e.forEach((e=>e.addEventListener("click",this.openModal))):this.uppy.log("Dashboard modal trigger not found. Make sure `trigger` is set in Dashboard options, unless you are planning to call `dashboard.openModal()` method yourself","warning")}this.startListeningToResize(),document.addEventListener("paste",this.handlePasteOnBody),this.uppy.on("plugin-added",Ui(this,Gi)[Gi]),this.uppy.on("plugin-remove",this.removeTarget),this.uppy.on("file-added",this.hideAllPanels),this.uppy.on("dashboard:modal-closed",this.hideAllPanels),this.uppy.on("complete",this.handleComplete),this.uppy.on("files-added",Ui(this,xi)[xi]),this.uppy.on("file-removed",Ui(this,xi)[xi]),document.addEventListener("focus",this.recordIfFocusedOnUppyRecently,!0),document.addEventListener("click",this.recordIfFocusedOnUppyRecently,!0),this.opts.inline&&this.el.addEventListener("keydown",this.handleKeyDownInInline),this.opts.autoOpen&&this.uppy.on("files-added",Ui(this,zi)[zi])},this.removeEvents=()=>{const e=Ft(this.opts.trigger);!this.opts.inline&&e&&e.forEach((e=>e.removeEventListener("click",this.openModal))),this.stopListeningToResize(),document.removeEventListener("paste",this.handlePasteOnBody),window.removeEventListener("popstate",this.handlePopState,!1),this.uppy.off("plugin-added",Ui(this,Gi)[Gi]),this.uppy.off("plugin-remove",this.removeTarget),this.uppy.off("file-added",this.hideAllPanels),this.uppy.off("dashboard:modal-closed",this.hideAllPanels),this.uppy.off("complete",this.handleComplete),this.uppy.off("files-added",Ui(this,xi)[xi]),this.uppy.off("file-removed",Ui(this,xi)[xi]),document.removeEventListener("focus",this.recordIfFocusedOnUppyRecently),document.removeEventListener("click",this.recordIfFocusedOnUppyRecently),this.opts.inline&&this.el.removeEventListener("keydown",this.handleKeyDownInInline),this.opts.autoOpen&&this.uppy.off("files-added",Ui(this,zi)[zi])},this.superFocusOnEachUpdate=()=>{const e=this.el.contains(document.activeElement),t=document.activeElement===document.body||null===document.activeElement,i=0===this.uppy.getState().info.length,s=!this.opts.inline;i&&(s||e||t&&this.ifFocusedOnUppyRecently)?this.superFocus(this.el,this.getPluginState().activeOverlayType):this.superFocus.cancel()},this.afterUpdate=()=>{!this.opts.disabled||this.dashboardIsDisabled?(!this.opts.disabled&&this.dashboardIsDisabled&&this.disableInteractiveElements(!1),this.superFocusOnEachUpdate()):this.disableInteractiveElements(!0)},this.saveFileCard=(e,t)=>{this.uppy.setFileMeta(t,e),this.toggleFileCard(!1,t)},Object.defineProperty(this,Vi,{writable:!0,value:e=>{const t=this.uppy.getPlugin(e.id);return{...e,icon:t.icon||this.opts.defaultPickerIcon,render:t.render}}}),Object.defineProperty(this,qi,{writable:!0,value:e=>{const t=this.uppy.getPlugin(e.id);return"function"!=typeof t.isSupported||t.isSupported()}}),Object.defineProperty(this,_i,{writable:!0,value:Ni((e=>e.filter((e=>"acquirer"===e.type&&Ui(this,qi)[qi](e))).map(Ui(this,Vi)[Vi])))}),Object.defineProperty(this,Hi,{writable:!0,value:Ni((e=>e.filter((e=>"progressindicator"===e.type)).map(Ui(this,Vi)[Vi])))}),Object.defineProperty(this,Wi,{writable:!0,value:Ni((e=>e.filter((e=>"editor"===e.type)).map(Ui(this,Vi)[Vi])))}),this.render=e=>{const t=this.getPluginState(),{files:i,capabilities:s,allowNewUpload:n}=e,{newFiles:a,uploadStartedFiles:r,completeFiles:o,erroredFiles:l,inProgressFiles:d,inProgressNotPausedFiles:u,processingFiles:c,isUploadStarted:f,isAllComplete:m,isAllErrored:g,isAllPaused:y}=this.uppy.getObjectOfFilesPerState(),b=Ui(this,_i)[_i](t.targets),v=Ui(this,Hi)[Hi](t.targets),w=Ui(this,Wi)[Wi](t.targets);let C;return C="auto"===this.opts.theme?s.darkMode?"dark":"light":this.opts.theme,["files","folders","both"].indexOf(this.opts.fileManagerSelectionType)<0&&(this.opts.fileManagerSelectionType="files",console.warn(`Unsupported option for "fileManagerSelectionType". Using default of "${this.opts.fileManagerSelectionType}".`)),function(e){const t=0===e.totalFileCount,i=1===e.totalFileCount,s=e.containerWidth>576,n=e.containerHeight>330,a=p({"uppy-Dashboard":!0,"uppy-Dashboard--isDisabled":e.disabled,"uppy-Dashboard--animateOpenClose":e.animateOpenClose,"uppy-Dashboard--isClosing":e.isClosing,"uppy-Dashboard--isDraggingOver":e.isDraggingOver,"uppy-Dashboard--modal":!e.inline,"uppy-size--md":e.containerWidth>576,"uppy-size--lg":e.containerWidth>700,"uppy-size--xl":e.containerWidth>900,"uppy-size--height-md":e.containerHeight>330,"uppy-Dashboard--isAddFilesPanelVisible":e.showAddFilesPanel,"uppy-Dashboard--isInnerWrapVisible":e.areInsidesReadyToBeVisible,"uppy-Dashboard--singleFile":e.singleFileFullScreen&&i&&n});let r=1;e.containerWidth>900?r=5:e.containerWidth>700?r=4:e.containerWidth>576&&(r=3);const o=e.showSelectedFiles&&!t,l=e.recoveredState?Object.keys(e.recoveredState.files).length:null,d=e.files?Object.keys(e.files).filter((t=>e.files[t].isGhost)).length:null;return(0,h.h)("div",{className:a,"data-uppy-theme":e.theme,"data-uppy-num-acquirers":e.acquirers.length,"data-uppy-drag-drop-supported":!e.disableLocalFiles&&xt(),"aria-hidden":e.inline?"false":e.isHidden,"aria-disabled":e.disabled,"aria-label":e.inline?e.i18n("dashboardTitle"):e.i18n("dashboardWindowTitle"),onPaste:e.handlePaste,onDragOver:e.handleDragOver,onDragLeave:e.handleDragLeave,onDrop:e.handleDrop},(0,h.h)("div",{"aria-hidden":"true",className:"uppy-Dashboard-overlay",tabIndex:-1,onClick:e.handleClickOutside}),(0,h.h)("div",{className:"uppy-Dashboard-inner","aria-modal":!e.inline&&"true",role:e.inline?void 0:"dialog",style:{width:e.inline&&e.width?e.width:"",height:e.inline&&e.height?e.height:""}},e.inline?null:(0,h.h)("button",{className:"uppy-u-reset uppy-Dashboard-close",type:"button","aria-label":e.i18n("closeModal"),title:e.i18n("closeModal"),onClick:e.closeModal},(0,h.h)("span",{"aria-hidden":"true"},"×")),(0,h.h)("div",{className:"uppy-Dashboard-innerWrap"},(0,h.h)("div",{className:"uppy-Dashboard-dropFilesHereHint"},e.i18n("dropHint")),o&&(0,h.h)(Di,e),l&&(0,h.h)("div",{className:"uppy-Dashboard-serviceMsg"},(0,h.h)("svg",{className:"uppy-Dashboard-serviceMsg-icon","aria-hidden":"true",focusable:"false",width:"21",height:"16",viewBox:"0 0 24 19"},(0,h.h)("g",{transform:"translate(0 -1)",fill:"none",fillRule:"evenodd"},(0,h.h)("path",{d:"M12.857 1.43l10.234 17.056A1 1 0 0122.234 20H1.766a1 1 0 01-.857-1.514L11.143 1.429a1 1 0 011.714 0z",fill:"#FFD300"}),(0,h.h)("path",{fill:"#000",d:"M11 6h2l-.3 8h-1.4z"}),(0,h.h)("circle",{fill:"#000",cx:"12",cy:"17",r:"1"}))),(0,h.h)("strong",{className:"uppy-Dashboard-serviceMsg-title"},e.i18n("sessionRestored")),(0,h.h)("div",{className:"uppy-Dashboard-serviceMsg-text"},d>0?e.i18n("recoveredXFiles",{smart_count:d}):e.i18n("recoveredAllFiles"))),o?(0,h.h)(li,{id:e.id,error:e.error,i18n:e.i18n,uppy:e.uppy,files:e.files,acquirers:e.acquirers,resumableUploads:e.resumableUploads,hideRetryButton:e.hideRetryButton,hidePauseResumeButton:e.hidePauseResumeButton,hideCancelButton:e.hideCancelButton,showLinkToFileUploadResult:e.showLinkToFileUploadResult,showRemoveButtonAfterComplete:e.showRemoveButtonAfterComplete,isWide:e.isWide,metaFields:e.metaFields,toggleFileCard:e.toggleFileCard,handleRequestThumbnail:e.handleRequestThumbnail,handleCancelThumbnail:e.handleCancelThumbnail,recoveredState:e.recoveredState,individualCancellation:e.individualCancellation,openFileEditor:e.openFileEditor,canEditFile:e.canEditFile,toggleAddFilesPanel:e.toggleAddFilesPanel,isSingleFile:i,itemsPerRow:r}):(0,h.h)(di,Bi({},e,{isSizeMD:s})),(0,h.h)(Ai,null,e.showAddFilesPanel?(0,h.h)(ui,Bi({key:"AddFiles"},e,{isSizeMD:s})):null),(0,h.h)(Ai,null,e.fileCardFor?(0,h.h)(ki,Bi({key:"FileCard"},e)):null),(0,h.h)(Ai,null,e.activePickerPanel?(0,h.h)(fi,Bi({key:"Picker"},e)):null),(0,h.h)(Ai,null,e.showFileEditor?(0,h.h)(mi,Bi({key:"Editor"},e)):null),(0,h.h)("div",{className:"uppy-Dashboard-progressindicators"},e.progressindicators.map((t=>e.uppy.getPlugin(t.id).render(e.state)))))))}({state:e,isHidden:t.isHidden,files:i,newFiles:a,uploadStartedFiles:r,completeFiles:o,erroredFiles:l,inProgressFiles:d,inProgressNotPausedFiles:u,processingFiles:c,isUploadStarted:f,isAllComplete:m,isAllErrored:g,isAllPaused:y,totalFileCount:Object.keys(i).length,totalProgress:e.totalProgress,allowNewUpload:n,acquirers:b,theme:C,disabled:this.opts.disabled,disableLocalFiles:this.opts.disableLocalFiles,direction:this.opts.direction,activePickerPanel:t.activePickerPanel,showFileEditor:t.showFileEditor,saveFileEditor:this.saveFileEditor,closeFileEditor:this.closeFileEditor,disableInteractiveElements:this.disableInteractiveElements,animateOpenClose:this.opts.animateOpenClose,isClosing:t.isClosing,progressindicators:v,editors:w,autoProceed:this.uppy.opts.autoProceed,id:this.id,closeModal:this.requestCloseModal,handleClickOutside:this.handleClickOutside,handleInputChange:this.handleInputChange,handlePaste:this.handlePaste,inline:this.opts.inline,showPanel:this.showPanel,hideAllPanels:this.hideAllPanels,i18n:this.i18n,i18nArray:this.i18nArray,uppy:this.uppy,note:this.opts.note,recoveredState:e.recoveredState,metaFields:t.metaFields,resumableUploads:s.resumableUploads||!1,individualCancellation:s.individualCancellation,isMobileDevice:s.isMobileDevice,fileCardFor:t.fileCardFor,toggleFileCard:this.toggleFileCard,toggleAddFilesPanel:this.toggleAddFilesPanel,showAddFilesPanel:t.showAddFilesPanel,saveFileCard:this.saveFileCard,openFileEditor:this.openFileEditor,canEditFile:this.canEditFile,width:this.opts.width,height:this.opts.height,showLinkToFileUploadResult:this.opts.showLinkToFileUploadResult,fileManagerSelectionType:this.opts.fileManagerSelectionType,proudlyDisplayPoweredByUppy:this.opts.proudlyDisplayPoweredByUppy,hideCancelButton:this.opts.hideCancelButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,showRemoveButtonAfterComplete:this.opts.showRemoveButtonAfterComplete,containerWidth:t.containerWidth,containerHeight:t.containerHeight,areInsidesReadyToBeVisible:t.areInsidesReadyToBeVisible,isTargetDOMEl:this.isTargetDOMEl,parentElement:this.el,allowedFileTypes:this.uppy.opts.restrictions.allowedFileTypes,maxNumberOfFiles:this.uppy.opts.restrictions.maxNumberOfFiles,requiredMetaFields:this.uppy.opts.restrictions.requiredMetaFields,showSelectedFiles:this.opts.showSelectedFiles,showNativePhotoCameraButton:this.opts.showNativePhotoCameraButton,showNativeVideoCameraButton:this.opts.showNativeVideoCameraButton,nativeCameraFacingMode:this.opts.nativeCameraFacingMode,singleFileFullScreen:this.opts.singleFileFullScreen,handleCancelRestore:this.handleCancelRestore,handleRequestThumbnail:this.handleRequestThumbnail,handleCancelThumbnail:this.handleCancelThumbnail,isDraggingOver:t.isDraggingOver,handleDragOver:this.handleDragOver,handleDragLeave:this.handleDragLeave,handleDrop:this.handleDrop})},Object.defineProperty(this,ji,{writable:!0,value:()=>{(this.opts.plugins||[]).forEach((e=>{const t=this.uppy.getPlugin(e);t?t.mount(this,t):this.uppy.log(`[Uppy] Dashboard could not find plugin '${e}', make sure to uppy.use() the plugins you are specifying`,"warning")}))}}),Object.defineProperty(this,$i,{writable:!0,value:()=>{this.uppy.iteratePlugins(Ui(this,Gi)[Gi])}}),Object.defineProperty(this,Gi,{writable:!0,value:e=>{var t;!e||null!=(t=e.opts)&&t.target||!["acquirer","editor"].includes(e.type)||this.getPluginState().targets.some((t=>e.id===t.id))||e.mount(this,e)}}),this.install=()=>{this.setPluginState({isHidden:!0,fileCardFor:null,activeOverlayType:null,showAddFilesPanel:!1,activePickerPanel:void 0,showFileEditor:!1,metaFields:this.opts.metaFields,targets:[],areInsidesReadyToBeVisible:!1,isDraggingOver:!1});const{inline:e,closeAfterFinish:t}=this.opts;if(e&&t)throw new Error("[Dashboard] `closeAfterFinish: true` cannot be used on an inline Dashboard, because an inline Dashboard cannot be closed at all. Either set `inline: false`, or disable the `closeAfterFinish` option.");const{allowMultipleUploads:i,allowMultipleUploadBatches:s}=this.uppy.opts;(i||s)&&t&&this.uppy.log("[Dashboard] When using `closeAfterFinish`, we recommended setting the `allowMultipleUploadBatches` option to `false` in the Uppy constructor. See https://uppy.io/docs/uppy/#allowMultipleUploads-true","warning");const{target:n}=this.opts;n&&this.mount(n,this),this.opts.disableStatusBar||this.uppy.use(G,{id:`${this.id}:StatusBar`,target:this,hideUploadButton:this.opts.hideUploadButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,hideCancelButton:this.opts.hideCancelButton,showProgressDetails:this.opts.showProgressDetails,hideAfterFinish:this.opts.hideProgressAfterFinish,locale:this.opts.locale,doneButtonHandler:this.opts.doneButtonHandler}),this.opts.disableInformer||this.uppy.use(ee,{id:`${this.id}:Informer`,target:this}),this.opts.disableThumbnailGenerator||this.uppy.use(wt,{id:`${this.id}:ThumbnailGenerator`,thumbnailWidth:this.opts.thumbnailWidth,thumbnailHeight:this.opts.thumbnailHeight,thumbnailType:this.opts.thumbnailType,waitForThumbnailsBeforeUpload:this.opts.waitForThumbnailsBeforeUpload,lazy:!this.opts.waitForThumbnailsBeforeUpload}),this.darkModeMediaQuery="undefined"!=typeof window&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null;const a=!!this.darkModeMediaQuery&&this.darkModeMediaQuery.matches;var r;this.uppy.log("[Dashboard] Dark mode is "+(a?"on":"off")),this.setDarkModeCapability(a),"auto"===this.opts.theme&&(null==(r=this.darkModeMediaQuery)||r.addListener(this.handleSystemDarkModeChange)),Ui(this,ji)[ji](),Ui(this,$i)[$i](),this.initEvents()},this.uninstall=()=>{if(!this.opts.disableInformer){const e=this.uppy.getPlugin(`${this.id}:Informer`);e&&this.uppy.removePlugin(e)}if(!this.opts.disableStatusBar){const e=this.uppy.getPlugin(`${this.id}:StatusBar`);e&&this.uppy.removePlugin(e)}if(!this.opts.disableThumbnailGenerator){const e=this.uppy.getPlugin(`${this.id}:ThumbnailGenerator`);e&&this.uppy.removePlugin(e)}var e;(this.opts.plugins||[]).forEach((e=>{const t=this.uppy.getPlugin(e);t&&t.unmount()})),"auto"===this.opts.theme&&(null==(e=this.darkModeMediaQuery)||e.removeListener(this.handleSystemDarkModeChange)),this.opts.disablePageScrollWhenModalOpen&&document.body.classList.remove("uppy-Dashboard-isFixed"),this.unmount(),this.removeEvents()},this.id=this.opts.id||"Dashboard",this.title="Dashboard",this.type="orchestrator",this.defaultLocale=Oi,null!=(i=this.opts).doneButtonHandler||(i.doneButtonHandler=()=>{this.uppy.clearUploadedFiles(),this.requestCloseModal()}),null!=(s=this.opts).onRequestCloseModal||(s.onRequestCloseModal=()=>this.closeModal()),this.i18nInit()}}Ki.VERSION="3.8.0";var Xi=i(7299);const Yi=n.instanceOf(Xi.A),Qi=n.arrayOf(n.string),Ji=n.shape({strings:n.object,pluralize:n.func}),Zi=n.shape({id:n.string.isRequired,name:n.string.isRequired,placeholder:n.string}),es=n.oneOfType([n.arrayOf(Zi),n.func]),ts=n.oneOfType([n.string,n.number]),is=["defaultChecked","defaultValue","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML","accessKey","className","contentEditable","contextMenu","dir","draggable","hidden","id","lang","placeholder","slot","spellCheck","style","tabIndex","title","translate","radioGroup","role","about","datatype","inlist","prefix","property","resource","typeof","vocab","autoCapitalize","autoCorrect","autoSave","color","itemProp","itemScope","itemType","itemID","itemRef","results","security","unselectable","inputMode","is","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],ss=/^(aria-|data-)/;var ns=e=>Object.fromEntries(Object.entries(e).filter((e=>{let[t]=e;return ss.test(t)||is.includes(t)})));function as(e,t){return Object.keys(e).some((i=>!Object.hasOwn(e,i)&&e[i]!==t[i]))}class rs extends s.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){if(e.uppy!==this.props.uppy)this.uninstallPlugin(e),this.installPlugin();else if(as(this.props,e)){const{uppy:e,...t}={...this.props,target:this.container};this.plugin.setOptions(t)}}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:e,...t}={id:"react:Dashboard",inline:!0,...this.props,target:this.container};e.use(Ki,t),this.plugin=e.getPlugin(t.id)}uninstallPlugin(e){void 0===e&&(e=this.props);const{uppy:t}=e;t.removePlugin(this.plugin)}render(){return(0,s.createElement)("div",{className:"uppy-Container",ref:e=>{this.container=e},...ns(this.props)})}}rs.propsTypes={uppy:Yi,disableInformer:n.bool,disableStatusBar:n.bool,disableThumbnailGenerator:n.bool,height:ts,hideProgressAfterFinish:n.bool,hideUploadButton:n.bool,locale:Ji,metaFields:es,note:n.string,plugins:Qi,proudlyDisplayPoweredByUppy:n.bool,showProgressDetails:n.bool,width:ts,thumbnailType:n.string,thumbnailWidth:n.number};var os=rs;class ls extends s.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){const{uppy:t,open:i,onRequestClose:s}=this.props;if(e.uppy!==t)this.uninstallPlugin(e),this.installPlugin();else if(as(this.props,e)){const{uppy:e,...t}={...this.props,inline:!1,onRequestCloseModal:s};this.plugin.setOptions(t)}e.open&&!i?this.plugin.closeModal():!e.open&&i&&this.plugin.openModal()}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{target:e=this.container,open:t,onRequestClose:i,uppy:s,...n}=this.props,a={...n,id:"react:DashboardModal",inline:!1,target:e,open:t,onRequestCloseModal:i};s.use(Ki,a),this.plugin=s.getPlugin(a.id),t&&this.plugin.openModal()}uninstallPlugin(e){void 0===e&&(e=this.props);const{uppy:t}=e;t.removePlugin(this.plugin)}render(){return(0,s.createElement)("div",{className:"uppy-Container",ref:e=>{this.container=e},...ns(this.props)})}}ls.propTypes={uppy:Yi.isRequired,target:"undefined"!=typeof window?n.instanceOf(window.HTMLElement):n.any,open:n.bool,onRequestClose:n.func,closeModalOnClickOutside:n.bool,disablePageScrollWhenModalOpen:n.bool,plugins:Qi,width:ts,height:ts,showProgressDetails:n.bool,note:n.string,metaFields:es,proudlyDisplayPoweredByUppy:n.bool,autoOpenFileEditor:n.bool,animateOpenClose:n.bool,browserBackButtonClose:n.bool,closeAfterFinish:n.bool,disableStatusBar:n.bool,disableInformer:n.bool,disableThumbnailGenerator:n.bool,disableLocalFiles:n.bool,disabled:n.bool,hideCancelButton:n.bool,hidePauseResumeButton:n.bool,hideProgressAfterFinish:n.bool,hideRetryButton:n.bool,hideUploadButton:n.bool,showLinkToFileUploadResult:n.bool,showRemoveButtonAfterComplete:n.bool,showSelectedFiles:n.bool,waitForThumbnailsBeforeUpload:n.bool,fileManagerSelectionType:n.string,theme:n.string,thumbnailType:n.string,thumbnailWidth:n.number,locale:Ji},ls.defaultProps={metaFields:[],plugins:[],width:750,height:550,thumbnailWidth:280,thumbnailType:"image/jpeg",waitForThumbnailsBeforeUpload:!1,showLinkToFileUploadResult:!1,showProgressDetails:!1,hideUploadButton:!1,hideCancelButton:!1,hideRetryButton:!1,hidePauseResumeButton:!1,hideProgressAfterFinish:!1,note:null,closeModalOnClickOutside:!1,closeAfterFinish:!1,disableStatusBar:!1,disableInformer:!1,disableThumbnailGenerator:!1,disablePageScrollWhenModalOpen:!0,animateOpenClose:!0,fileManagerSelectionType:"files",proudlyDisplayPoweredByUppy:!0,showSelectedFiles:!0,showRemoveButtonAfterComplete:!1,browserBackButtonClose:!1,theme:"light",autoOpenFileEditor:!1,disabled:!1,disableLocalFiles:!1,open:void 0,target:void 0,locale:null,onRequestClose:void 0};var hs=ls,ps={strings:{dropHereOr:"Drop here or %{browse}",browse:"browse"}};const ds={inputName:"files[]",width:"100%",height:"100%"};class us extends a.A{constructor(e,t){super(e,{...ds,...t}),this.isDragDropSupported=xt(),this.addFiles=e=>{const t=e.map((e=>({source:this.id,name:e.name,type:e.type,data:e,meta:{relativePath:e.relativePath||null}})));try{this.uppy.addFiles(t)}catch(e){this.uppy.log(e)}},this.onInputChange=e=>{const t=Pt(e.target.files);t.length>0&&(this.uppy.log("[DragDrop] Files selected through input"),this.addFiles(t)),e.target.value=null},this.handleDragOver=e=>{var t,i;e.preventDefault(),e.stopPropagation();const{types:s}=e.dataTransfer,n=s.some((e=>"Files"===e)),{allowNewUpload:a}=this.uppy.getState();if(!n||!a)return e.dataTransfer.dropEffect="none",void clearTimeout(this.removeDragOverClassTimeout);e.dataTransfer.dropEffect="copy",clearTimeout(this.removeDragOverClassTimeout),this.setPluginState({isDraggingOver:!0}),null==(t=(i=this.opts).onDragOver)||t.call(i,e)},this.handleDragLeave=e=>{var t,i;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.removeDragOverClassTimeout=setTimeout((()=>{this.setPluginState({isDraggingOver:!1})}),50),null==(t=(i=this.opts).onDragLeave)||t.call(i,e)},this.handleDrop=async e=>{var t,i;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.setPluginState({isDraggingOver:!1});const s=await Tt(e.dataTransfer,{logDropError:e=>{this.uppy.log(e,"error")}});s.length>0&&(this.uppy.log("[DragDrop] Files dropped"),this.addFiles(s)),null==(t=(i=this.opts).onDrop)||t.call(i,e)},this.type="acquirer",this.id=this.opts.id||"DragDrop",this.title="Drag & Drop",this.defaultLocale=ps,this.i18nInit()}renderHiddenFileInput(){const{restrictions:e}=this.uppy.opts;return(0,h.h)("input",{className:"uppy-DragDrop-input",type:"file",hidden:!0,ref:e=>{this.fileInputRef=e},name:this.opts.inputName,multiple:1!==e.maxNumberOfFiles,accept:e.allowedFileTypes,onChange:this.onInputChange})}static renderArrowSvg(){return(0,h.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-DragDrop-arrow",width:"16",height:"16",viewBox:"0 0 16 16"},(0,h.h)("path",{d:"M11 10V0H5v10H2l6 6 6-6h-3zm0 0",fillRule:"evenodd"}))}renderLabel(){return(0,h.h)("div",{className:"uppy-DragDrop-label"},this.i18nArray("dropHereOr",{browse:(0,h.h)("span",{className:"uppy-DragDrop-browse"},this.i18n("browse"))}))}renderNote(){return(0,h.h)("span",{className:"uppy-DragDrop-note"},this.opts.note)}render(){const e=`uppy-u-reset\n uppy-DragDrop-container\n ${this.isDragDropSupported?"uppy-DragDrop--isDragDropSupported":""}\n ${this.getPluginState().isDraggingOver?"uppy-DragDrop--isDraggingOver":""}\n `,t={width:this.opts.width,height:this.opts.height};return(0,h.h)("button",{type:"button",className:e,style:t,onClick:()=>this.fileInputRef.click(),onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop},this.renderHiddenFileInput(),(0,h.h)("div",{className:"uppy-DragDrop-inner"},us.renderArrowSvg(),this.renderLabel(),this.renderNote()))}install(){const{target:e}=this.opts;this.setPluginState({isDraggingOver:!1}),e&&this.mount(e,this)}uninstall(){this.unmount()}}us.VERSION="3.1.0";class cs extends s.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){if(e.uppy!==this.props.uppy)this.uninstallPlugin(e),this.installPlugin();else if(as(this.props,e)){const{uppy:e,...t}={...this.props,target:this.container};this.plugin.setOptions(t)}}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:e,locale:t,inputName:i,width:s,height:n,note:a}=this.props,r={id:"react:DragDrop",locale:t,inputName:i,width:s,height:n,note:a,target:this.container};e.use(us,r),this.plugin=e.getPlugin(r.id)}uninstallPlugin(e){void 0===e&&(e=this.props);const{uppy:t}=e;t.removePlugin(this.plugin)}render(){return(0,s.createElement)("div",{className:"uppy-Container",ref:e=>{this.container=e},...ns(this.props)})}}cs.propTypes={uppy:Yi.isRequired,locale:Ji,inputName:n.string,width:n.string,height:n.string,note:n.string},cs.defaultProps={locale:null,inputName:"files[]",width:"100%",height:"100%",note:null};var fs=cs;const ms={target:"body",fixed:!1,hideAfterFinish:!0};class gs extends a.A{constructor(e,t){super(e,{...ms,...t}),this.id=this.opts.id||"ProgressBar",this.title="Progress Bar",this.type="progressindicator",this.render=this.render.bind(this)}render(e){const t=e.totalProgress||0,i=(0===t||100===t)&&this.opts.hideAfterFinish;return(0,h.h)("div",{className:"uppy uppy-ProgressBar",style:{position:this.opts.fixed?"fixed":"initial"},"aria-hidden":i},(0,h.h)("div",{className:"uppy-ProgressBar-inner",style:{width:`${t}%`}}),(0,h.h)("div",{className:"uppy-ProgressBar-percentage"},t))}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}}gs.VERSION="3.1.1";class ys extends s.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){if(e.uppy!==this.props.uppy)this.uninstallPlugin(e),this.installPlugin();else if(as(this.props,e)){const{uppy:e,...t}={...this.props,target:this.container};this.plugin.setOptions(t)}}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:e,fixed:t,hideAfterFinish:i}=this.props,s={id:"react:ProgressBar",fixed:t,hideAfterFinish:i,target:this.container};e.use(gs,s),this.plugin=e.getPlugin(s.id)}uninstallPlugin(e){void 0===e&&(e=this.props);const{uppy:t}=e;t.removePlugin(this.plugin)}render(){return(0,s.createElement)("div",{className:"uppy-Container",ref:e=>{this.container=e},...ns(this.props)})}}ys.propTypes={uppy:Yi.isRequired,fixed:n.bool,hideAfterFinish:n.bool},ys.defaultProps={fixed:!1,hideAfterFinish:!0};var bs=ys;class vs extends s.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){if(e.uppy!==this.props.uppy)this.uninstallPlugin(e),this.installPlugin();else if(as(this.props,e)){const{uppy:e,...t}={...this.props,target:this.container};this.plugin.setOptions(t)}}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:e,hideUploadButton:t,hideRetryButton:i,hidePauseResumeButton:s,hideCancelButton:n,showProgressDetails:a,hideAfterFinish:r,doneButtonHandler:o}=this.props,l={id:"react:StatusBar",hideUploadButton:t,hideRetryButton:i,hidePauseResumeButton:s,hideCancelButton:n,showProgressDetails:a,hideAfterFinish:r,doneButtonHandler:o,target:this.container};e.use(G,l),this.plugin=e.getPlugin(l.id)}uninstallPlugin(e){void 0===e&&(e=this.props);const{uppy:t}=e;t.removePlugin(this.plugin)}render(){return(0,s.createElement)("div",{className:"uppy-Container",ref:e=>{this.container=e},...ns(this.props)})}}vs.propTypes={uppy:Yi.isRequired,hideUploadButton:n.bool,hideRetryButton:n.bool,hidePauseResumeButton:n.bool,hideCancelButton:n.bool,showProgressDetails:n.bool,hideAfterFinish:n.bool,doneButtonHandler:n.func},vs.defaultProps={hideUploadButton:!1,hideRetryButton:!1,hidePauseResumeButton:!1,hideCancelButton:!1,showProgressDetails:!1,hideAfterFinish:!0,doneButtonHandler:null};var ws=vs,Cs={strings:{chooseFiles:"Choose files"}};const Fs={pretty:!0,inputName:"files[]"};class Ps extends a.A{constructor(e,t){super(e,{...Fs,...t}),this.id=this.opts.id||"FileInput",this.title="File Input",this.type="acquirer",this.defaultLocale=Cs,this.i18nInit(),this.render=this.render.bind(this),this.handleInputChange=this.handleInputChange.bind(this),this.handleClick=this.handleClick.bind(this)}addFiles(e){const t=e.map((e=>({source:this.id,name:e.name,type:e.type,data:e})));try{this.uppy.addFiles(t)}catch(e){this.uppy.log(e)}}handleInputChange(e){this.uppy.log("[FileInput] Something selected through input...");const t=Pt(e.target.files);this.addFiles(t),e.target.value=null}handleClick(){this.input.click()}render(){const{restrictions:e}=this.uppy.opts,t=e.allowedFileTypes?e.allowedFileTypes.join(","):void 0;return(0,h.h)("div",{className:"uppy-FileInput-container"},(0,h.h)("input",{className:"uppy-FileInput-input",style:this.opts.pretty?{width:"0.1px",height:"0.1px",opacity:0,overflow:"hidden",position:"absolute",zIndex:-1}:void 0,type:"file",name:this.opts.inputName,onChange:this.handleInputChange,multiple:1!==e.maxNumberOfFiles,accept:t,ref:e=>{this.input=e}}),this.opts.pretty&&(0,h.h)("button",{className:"uppy-FileInput-btn",type:"button",onClick:this.handleClick},this.i18n("chooseFiles")))}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}}Ps.VERSION="3.1.1";class Ds extends s.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){e.uppy!==this.props.uppy&&(this.uninstallPlugin(e),this.installPlugin())}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:e,locale:t,pretty:i,inputName:s}=this.props,n={id:"react:FileInput",locale:t,pretty:i,inputName:s,target:this.container};e.use(Ps,n),this.plugin=e.getPlugin(n.id)}uninstallPlugin(e){void 0===e&&(e=this.props);const{uppy:t}=e;t.removePlugin(this.plugin)}render(){return(0,s.createElement)("div",{className:"uppy-Container",ref:e=>{this.container=e}})}}Ds.propTypes={uppy:Yi.isRequired,locale:Ji,pretty:n.bool,inputName:n.string},Ds.defaultProps={locale:void 0,pretty:!0,inputName:"files[]"};var Ss=Ds;function ks(e){if("function"!=typeof e)throw new TypeError("useUppy: expected a function that returns a new Uppy instance");const t=(0,s.useRef)(void 0);if(void 0===t.current&&(t.current=e(),!(t.current instanceof Xi.A)))throw new TypeError("useUppy: factory function must return an Uppy instance, got "+typeof t.current);return(0,s.useEffect)((()=>()=>{var e;null==(e=t.current)||e.close({reason:"unmount"}),t.current=void 0}),[t]),t.current}}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[299],{9682:function(e){"use strict";e.exports=function(e){if("number"!=typeof e||Number.isNaN(e))throw new TypeError("Expected a number, got "+typeof e);const t=e<0,s=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(t&&(e=-e),e<1)return(t?"-":"")+e+" B";const i=Math.min(Math.floor(Math.log(e)/Math.log(1024)),s.length-1);e=Number(e/1024**i);const r=s[i];return e>=10||e%1==0?`${(t?"-":"")+e.toFixed(0)} ${r}`:`${(t?"-":"")+e.toFixed(1)} ${r}`}},1566:function(e,t,s){var i=s(7764),r=/[\/\+\.]/;e.exports=function(e,t){function s(t){var s=i(t,e,r);return s&&s.length>=2}return t?s(t.split(";")[0]):s}},7764:function(e){"use strict";function t(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}t.prototype.match=function(e){var t,s,i=!0,r=this.parts,o=r.length;if("string"==typeof e||e instanceof String)if(this.hasWild||this.text==e){for(s=(e||"").split(this.separator),t=0;i&&t<o;t++)"*"!==r[t]&&(i=t<s.length&&r[t]===s[t]);i=i&&s}else i=!1;else if("function"==typeof e.splice)for(i=[],t=e.length;t--;)this.match(e[t])&&(i[i.length]=e[t]);else if("object"==typeof e)for(var l in i={},e)this.match(l)&&(i[l]=e[l]);return i},e.exports=function(e,s,i){var r=new t(e,i||/[\/\.]/);return void 0!==s?r.match(s):r}},7299:function(e,t,s){"use strict";s.d(t,{A:function(){return ce}});var i=s(9491),r=s(2162),o=s(590),l=s(7331);function n(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var a=0;function d(e){return"__private_"+a+++"_"+e}var h=d("callbacks"),u=d("publish");class c{constructor(){Object.defineProperty(this,u,{value:p}),this.state={},Object.defineProperty(this,h,{writable:!0,value:new Set})}getState(){return this.state}setState(e){const t={...this.state},s={...this.state,...e};this.state=s,n(this,u)[u](t,s,e)}subscribe(e){return n(this,h)[h].add(e),()=>{n(this,h)[h].delete(e)}}}function p(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];n(this,h)[h].forEach((e=>{e(...t)}))}c.VERSION="3.2.2";var f=c,g=s(7623),m=s(6506),w=s(5417);function v(e){if(null==e&&"undefined"!=typeof navigator&&(e=navigator.userAgent),!e)return!0;const t=/Edge\/(\d+\.\d+)/.exec(e);if(!t)return!0;const s=t[1].split(".",2),i=parseInt(s[0],10),r=parseInt(s[1],10);return i<15||15===i&&r<15063||i>18||18===i&&r>=18218}var y=s(2556),b=s(9682),S=s(1566);const F={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};class O extends Error{constructor(e,t){var s;super(e),this.isRestriction=!0,this.isUserFacing=null==(s=null==t?void 0:t.isUserFacing)||s,null!=t&&t.file&&(this.file=t.file)}}class P{constructor(e,t){this.i18n=t,this.getOpts=()=>{var t;const s=e();if(null!=(null==(t=s.restrictions)?void 0:t.allowedFileTypes)&&!Array.isArray(s.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return s}}validateAggregateRestrictions(e,t){const{maxTotalFileSize:s,maxNumberOfFiles:i}=this.getOpts().restrictions;if(i&&e.filter((e=>!e.isGhost)).length+t.length>i)throw new O(`${this.i18n("youCanOnlyUploadX",{smart_count:i})}`);if(s){let i=e.reduce(((e,t)=>{var s;return e+(null!=(s=t.size)?s:0)}),0);for(const e of t)if(null!=e.size&&(i+=e.size,i>s))throw new O(this.i18n("exceedsSize",{size:b(s),file:e.name}))}}validateSingleFile(e){const{maxFileSize:t,minFileSize:s,allowedFileTypes:i}=this.getOpts().restrictions;if(i&&!i.some((t=>t.includes("/")?!!e.type&&S(e.type.replace(/;.*?$/,""),t):!("."!==t[0]||!e.extension)&&e.extension.toLowerCase()===t.slice(1).toLowerCase()))){const t=i.join(", ");throw new O(this.i18n("youCanOnlyUploadFileTypes",{types:t}),{file:e})}if(t&&null!=e.size&&e.size>t)throw new O(this.i18n("exceedsSize",{size:b(t),file:e.name}),{file:e});if(s&&null!=e.size&&e.size<s)throw new O(this.i18n("inferiorSize",{size:b(s)}),{file:e})}validate(e,t){t.forEach((e=>{this.validateSingleFile(e)})),this.validateAggregateRestrictions(e,t)}validateMinNumberOfFiles(e){const{minNumberOfFiles:t}=this.getOpts().restrictions;if(t&&Object.keys(e).length<t)throw new O(this.i18n("youHaveToAtLeastSelectX",{smart_count:t}))}getMissingRequiredMetaFields(e){const t=new O(this.i18n("missingRequiredMetaFieldOnFile",{fileName:e.name})),{requiredMetaFields:s}=this.getOpts().restrictions,i=[];for(const t of s)Object.hasOwn(e.meta,t)&&""!==e.meta[t]||i.push(t);return{missingFields:i,error:t}}}var U={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",noSearchResults:"Unfortunately, there are no results for this search",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",loadedXFiles:"Loaded %{numFiles} files",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",search:"Search",resetSearch:"Reset search",emptyFolderAdded:"No files were added from empty folder",addedNumFiles:"Added %{numFiles} file(s)",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"},additionalRestrictionsFailed:"%{count} additional restrictions were not fulfilled"}};let A,E;function j(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var T=0;function $(e){return"__private_"+T+++"_"+e}const N={totalProgress:0,allowNewUpload:!0,error:null,recoveredState:null};var I=$("plugins"),C=$("restricter"),R=$("storeUnsubscribe"),x=$("emitter"),M=$("preProcessors"),z=$("uploaders"),k=$("postProcessors"),_=$("informAndEmit"),B=$("checkRequiredMetaFieldsOnFile"),q=$("checkRequiredMetaFields"),L=$("assertNewUploadAllowed"),D=$("transformFile"),G=$("startIfAutoProceed"),Y=$("checkAndUpdateFileState"),W=$("addListeners"),X=$("updateOnlineStatus"),V=$("requestClientById"),H=$("createUpload"),K=$("getUpload"),Z=$("removeUpload"),J=$("runUpload");A=Symbol.for("uppy test: getPlugins"),E=Symbol.for("uppy test: createUpload");class Q{constructor(e){Object.defineProperty(this,J,{value:ue}),Object.defineProperty(this,Z,{value:he}),Object.defineProperty(this,K,{value:de}),Object.defineProperty(this,H,{value:ae}),Object.defineProperty(this,W,{value:ne}),Object.defineProperty(this,Y,{value:le}),Object.defineProperty(this,G,{value:oe}),Object.defineProperty(this,D,{value:re}),Object.defineProperty(this,L,{value:ie}),Object.defineProperty(this,q,{value:se}),Object.defineProperty(this,B,{value:te}),Object.defineProperty(this,_,{value:ee}),Object.defineProperty(this,I,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,C,{writable:!0,value:void 0}),Object.defineProperty(this,R,{writable:!0,value:void 0}),Object.defineProperty(this,x,{writable:!0,value:r()}),Object.defineProperty(this,M,{writable:!0,value:new Set}),Object.defineProperty(this,z,{writable:!0,value:new Set}),Object.defineProperty(this,k,{writable:!0,value:new Set}),this.scheduledAutoProceed=null,this.wasOffline=!1,this.calculateProgress=l(((e,t)=>{const s=this.getFile(null==e?void 0:e.id);if(null==e||!s)return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);if(100===s.progress.percentage)return void this.log(`Not setting progress for a file that has been already uploaded: ${e.id}`);const i=Number.isFinite(t.bytesTotal)&&t.bytesTotal>0;this.setFileState(e.id,{progress:{...s.progress,bytesUploaded:t.bytesUploaded,bytesTotal:t.bytesTotal,percentage:i?Math.round(t.bytesUploaded/t.bytesTotal*100):0}}),this.calculateTotalProgress()}),500,{leading:!0,trailing:!0}),Object.defineProperty(this,X,{writable:!0,value:this.updateOnlineStatus.bind(this)}),Object.defineProperty(this,V,{writable:!0,value:new Map}),this.defaultLocale=U;const t={id:"uppy",autoProceed:!1,allowMultipleUploadBatches:!0,debug:!1,restrictions:F,meta:{},onBeforeFileAdded:(e,t)=>!Object.hasOwn(t,e.id),onBeforeUpload:e=>e,store:new f,logger:y.I,infoTimeout:5e3},s={...t,...e};this.opts={...s,restrictions:{...t.restrictions,...e&&e.restrictions}},e&&e.logger&&e.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):e&&e.debug&&(this.opts.logger=y.w),this.log(`Using Core v${Q.VERSION}`),this.i18nInit(),this.store=this.opts.store,this.setState({...N,plugins:{},files:{},currentUploads:{},capabilities:{uploadProgress:v(),individualCancellation:!0,resumableUploads:!1},meta:{...this.opts.meta},info:[]}),j(this,C)[C]=new P((()=>this.opts),this.i18n),j(this,R)[R]=this.store.subscribe(((e,t,s)=>{this.emit("state-update",e,t,s),this.updateAll(t)})),this.opts.debug&&"undefined"!=typeof window&&(window[this.opts.id]=this),j(this,W)[W]()}emit(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];j(this,x)[x].emit(e,...s)}on(e,t){return j(this,x)[x].on(e,t),this}once(e,t){return j(this,x)[x].once(e,t),this}off(e,t){return j(this,x)[x].off(e,t),this}updateAll(e){this.iteratePlugins((t=>{t.update(e)}))}setState(e){this.store.setState(e)}getState(){return this.store.getState()}patchFilesState(e){const t=this.getState().files;this.setState({files:{...t,...Object.fromEntries(Object.entries(e).map((e=>{let[s,i]=e;return[s,{...t[s],...i}]})))}})}setFileState(e,t){if(!this.getState().files[e])throw new Error(`Can’t set state for ${e} (the file could have been removed)`);this.patchFilesState({[e]:t})}i18nInit(){const e=new i.A([this.defaultLocale,this.opts.locale],{onMissingKey:e=>this.log(`Missing i18n string: ${e}`,"error")});this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.locale=e.locale}setOptions(e){this.opts={...this.opts,...e,restrictions:{...this.opts.restrictions,...null==e?void 0:e.restrictions}},e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins((t=>{t.setOptions(e)})),this.setState(void 0)}resetProgress(){const e={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},t={...this.getState().files},s={};Object.keys(t).forEach((i=>{s[i]={...t[i],progress:{...t[i].progress,...e}}})),this.setState({files:s,...N}),this.emit("reset-progress")}clearUploadedFiles(){this.setState({...N,files:{}})}addPreProcessor(e){j(this,M)[M].add(e)}removePreProcessor(e){return j(this,M)[M].delete(e)}addPostProcessor(e){j(this,k)[k].add(e)}removePostProcessor(e){return j(this,k)[k].delete(e)}addUploader(e){j(this,z)[z].add(e)}removeUploader(e){return j(this,z)[z].delete(e)}setMeta(e){const t={...this.getState().meta,...e},s={...this.getState().files};Object.keys(s).forEach((t=>{s[t]={...s[t],meta:{...s[t].meta,...e}}})),this.log("Adding metadata:"),this.log(e),this.setState({meta:t,files:s})}setFileMeta(e,t){const s={...this.getState().files};if(!s[e])return void this.log("Was trying to set metadata for a file that has been removed: ",e);const i={...s[e].meta,...t};s[e]={...s[e],meta:i},this.setState({files:s})}getFile(e){return this.getState().files[e]}getFiles(){const{files:e}=this.getState();return Object.values(e)}getFilesByIds(e){return e.map((e=>this.getFile(e)))}getObjectOfFilesPerState(){const{files:e,totalProgress:t,error:s}=this.getState(),i=Object.values(e),r=i.filter((e=>{let{progress:t}=e;return!t.uploadComplete&&t.uploadStarted})),o=i.filter((e=>!e.progress.uploadStarted)),l=i.filter((e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess)),n=i.filter((e=>e.progress.uploadStarted)),a=i.filter((e=>e.isPaused)),d=i.filter((e=>e.progress.uploadComplete)),h=i.filter((e=>e.error)),u=r.filter((e=>!e.isPaused)),c=i.filter((e=>e.progress.preprocess||e.progress.postprocess));return{newFiles:o,startedFiles:l,uploadStartedFiles:n,pausedFiles:a,completeFiles:d,erroredFiles:h,inProgressFiles:r,inProgressNotPausedFiles:u,processingFiles:c,isUploadStarted:n.length>0,isAllComplete:100===t&&d.length===i.length&&0===c.length,isAllErrored:!!s&&h.length===i.length,isAllPaused:0!==r.length&&a.length===r.length,isUploadInProgress:r.length>0,isSomeGhost:i.some((e=>e.isGhost))}}validateRestrictions(e,t){void 0===t&&(t=this.getFiles());try{j(this,C)[C].validate(t,[e])}catch(e){return e}return null}checkIfFileAlreadyExists(e){const{files:t}=this.getState();return!(!t[e]||t[e].isGhost)}addFile(e){j(this,L)[L](e);const{nextFilesState:t,validFilesToAdd:s,errors:i}=j(this,Y)[Y]([e]),r=i.filter((e=>e.isRestriction));if(j(this,_)[_](r),i.length>0)throw i[0];this.setState({files:t});const[o]=s;return this.emit("file-added",o),this.emit("files-added",s),this.log(`Added file: ${o.name}, ${o.id}, mime type: ${o.type}`),j(this,G)[G](),o.id}addFiles(e){j(this,L)[L]();const{nextFilesState:t,validFilesToAdd:s,errors:i}=j(this,Y)[Y](e),r=i.filter((e=>e.isRestriction));j(this,_)[_](r);const o=i.filter((e=>!e.isRestriction));if(o.length>0){let e="Multiple errors occurred while adding files:\n";if(o.forEach((t=>{e+=`\n * ${t.message}`})),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:o.length}),details:e},"error",this.opts.infoTimeout),"function"==typeof AggregateError)throw new AggregateError(o,e);{const t=new Error(e);throw t.errors=o,t}}this.setState({files:t}),s.forEach((e=>{this.emit("file-added",e)})),this.emit("files-added",s),s.length>5?this.log(`Added batch of ${s.length} files`):Object.values(s).forEach((e=>{this.log(`Added file: ${e.name}\n id: ${e.id}\n type: ${e.type}`)})),s.length>0&&j(this,G)[G]()}removeFiles(e,t){const{files:s,currentUploads:i}=this.getState(),r={...s},o={...i},l=Object.create(null);function n(e){return void 0===l[e]}e.forEach((e=>{s[e]&&(l[e]=s[e],delete r[e])})),Object.keys(o).forEach((e=>{const t=i[e].fileIDs.filter(n);if(0===t.length)return void delete o[e];const{capabilities:s}=this.getState();if(t.length!==i[e].fileIDs.length&&!s.individualCancellation)throw new Error("individualCancellation is disabled");o[e]={...i[e],fileIDs:t}}));const a={currentUploads:o,files:r};0===Object.keys(r).length&&(a.allowNewUpload=!0,a.error=null,a.recoveredState=null),this.setState(a),this.calculateTotalProgress();const d=Object.keys(l);d.forEach((e=>{this.emit("file-removed",l[e],t)})),d.length>5?this.log(`Removed ${d.length} files`):this.log(`Removed files: ${d.join(", ")}`)}removeFile(e,t){this.removeFiles([e],t)}pauseResume(e){if(!this.getState().capabilities.resumableUploads||this.getFile(e).progress.uploadComplete)return;const t=!this.getFile(e).isPaused;return this.setFileState(e,{isPaused:t}),this.emit("upload-pause",e,t),t}pauseAll(){const e={...this.getState().files};Object.keys(e).filter((t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted)).forEach((t=>{const s={...e[t],isPaused:!0};e[t]=s})),this.setState({files:e}),this.emit("pause-all")}resumeAll(){const e={...this.getState().files};Object.keys(e).filter((t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted)).forEach((t=>{const s={...e[t],isPaused:!1,error:null};e[t]=s})),this.setState({files:e}),this.emit("resume-all")}retryAll(){const e={...this.getState().files},t=Object.keys(e).filter((t=>e[t].error));if(t.forEach((t=>{const s={...e[t],isPaused:!1,error:null};e[t]=s})),this.setState({files:e,error:null}),this.emit("retry-all",t),0===t.length)return Promise.resolve({successful:[],failed:[]});const s=j(this,H)[H](t,{forceAllowNewUpload:!0});return j(this,J)[J](s)}cancelAll(e){let{reason:t="user"}=void 0===e?{}:e;if(this.emit("cancel-all",{reason:t}),"user"===t){const{files:e}=this.getState(),t=Object.keys(e);t.length&&this.removeFiles(t,"cancel-all"),this.setState(N)}}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit("upload-retry",e);const t=j(this,H)[H]([e],{forceAllowNewUpload:!0});return j(this,J)[J](t)}logout(){this.iteratePlugins((e=>{var t;null==(t=e.provider)||null==t.logout||t.logout()}))}calculateTotalProgress(){const e=this.getFiles().filter((e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess));if(0===e.length)return this.emit("progress",0),void this.setState({totalProgress:0});const t=e.filter((e=>null!=e.progress.bytesTotal)),s=e.filter((e=>null==e.progress.bytesTotal));if(0===t.length){const t=100*e.length,i=s.reduce(((e,t)=>e+t.progress.percentage),0),r=Math.round(i/t*100);return void this.setState({totalProgress:r})}let i=t.reduce(((e,t)=>{var s;return e+(null!=(s=t.progress.bytesTotal)?s:0)}),0);const r=i/t.length;i+=r*s.length;let o=0;t.forEach((e=>{o+=e.progress.bytesUploaded})),s.forEach((e=>{o+=r*(e.progress.percentage||0)/100}));let l=0===i?0:Math.round(o/i*100);l>100&&(l=100),this.setState({totalProgress:l}),this.emit("progress",l)}updateOnlineStatus(){var e;null==(e=window.navigator.onLine)||e?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}getID(){return this.opts.id}use(e,t){if("function"!=typeof e)throw new TypeError(`Expected a plugin class, but got ${null===e?"null":typeof e}. Please verify that the plugin was imported and spelled correctly.`);const s=new e(this,t),i=s.id;if(!i)throw new Error("Your plugin must have an id");if(!s.type)throw new Error("Your plugin must have a type");const r=this.getPlugin(i);if(r){const e=`Already found a plugin named '${r.id}'. Tried to use: '${i}'.\nUppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id.`;throw new Error(e)}return e.VERSION&&this.log(`Using ${i} v${e.VERSION}`),s.type in j(this,I)[I]?j(this,I)[I][s.type].push(s):j(this,I)[I][s.type]=[s],s.install(),this.emit("plugin-added",s),this}getPlugin(e){for(const t of Object.values(j(this,I)[I])){const s=t.find((t=>t.id===e));if(null!=s)return s}}[A](e){return j(this,I)[I][e]}iteratePlugins(e){Object.values(j(this,I)[I]).flat(1).forEach(e)}removePlugin(e){this.log(`Removing plugin ${e.id}`),this.emit("plugin-remove",e),e.uninstall&&e.uninstall();const t=j(this,I)[I][e.type],s=t.findIndex((t=>t.id===e.id));-1!==s&&t.splice(s,1);const i={plugins:{...this.getState().plugins,[e.id]:void 0}};this.setState(i)}close(e){let{reason:t}=void 0===e?{}:e;this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.cancelAll({reason:t}),j(this,R)[R](),this.iteratePlugins((e=>{this.removePlugin(e)})),"undefined"!=typeof window&&window.removeEventListener&&(window.removeEventListener("online",j(this,X)[X]),window.removeEventListener("offline",j(this,X)[X]))}hideInfo(){const{info:e}=this.getState();this.setState({info:e.slice(1)}),this.emit("info-hidden")}info(e,t,s){void 0===t&&(t="info"),void 0===s&&(s=3e3);const i="object"==typeof e;this.setState({info:[...this.getState().info,{type:t,message:i?e.message:e,details:i?e.details:null}]}),setTimeout((()=>this.hideInfo()),s),this.emit("info-visible")}log(e,t){const{logger:s}=this.opts;switch(t){case"error":s.error(e);break;case"warning":s.warn(e);break;default:s.debug(e)}}registerRequestClient(e,t){j(this,V)[V].set(e,t)}getRequestClientForFile(e){if(!e.remote)throw new Error(`Tried to get RequestClient for a non-remote file ${e.id}`);const t=j(this,V)[V].get(e.remote.requestClientId);if(null==t)throw new Error(`requestClientId "${e.remote.requestClientId}" not registered for file "${e.id}"`);return t}restore(e){return this.log(`Core: attempting to restore upload "${e}"`),this.getState().currentUploads[e]?j(this,J)[J](e):(j(this,Z)[Z](e),Promise.reject(new Error("Nonexistent upload")))}[E](){return j(this,H)[H](...arguments)}addResultData(e,t){if(!j(this,K)[K](e))return void this.log(`Not setting result for an upload that has been removed: ${e}`);const{currentUploads:s}=this.getState(),i={...s[e],result:{...s[e].result,...t}};this.setState({currentUploads:{...s,[e]:i}})}upload(){var e;null!=(e=j(this,I)[I].uploader)&&e.length||this.log("No uploader type plugins are used","warning");let{files:t}=this.getState();const s=this.opts.onBeforeUpload(t);return!1===s?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(s&&"object"==typeof s&&(t=s,this.setState({files:t})),Promise.resolve().then((()=>j(this,C)[C].validateMinNumberOfFiles(t))).catch((e=>{throw j(this,_)[_]([e]),e})).then((()=>{if(!j(this,q)[q](t))throw new O(this.i18n("missingRequiredMetaField"))})).catch((e=>{throw e})).then((()=>{const{currentUploads:e}=this.getState(),s=Object.values(e).flatMap((e=>e.fileIDs)),i=[];Object.keys(t).forEach((e=>{const t=this.getFile(e);t.progress.uploadStarted||-1!==s.indexOf(e)||i.push(t.id)}));const r=j(this,H)[H](i);return j(this,J)[J](r)})).catch((e=>{throw this.emit("error",e),this.log(e,"error"),e})))}}function ee(e){for(const t of e)t.isRestriction?this.emit("restriction-failed",t.file,t):this.emit("error",t,t.file),this.log(t,"warning");const t=e.filter((e=>e.isUserFacing)),s=t.slice(0,4),i=t.slice(4);s.forEach((e=>{let{message:t,details:s=""}=e;this.info({message:t,details:s},"error",this.opts.infoTimeout)})),i.length>0&&this.info({message:this.i18n("additionalRestrictionsFailed",{count:i.length})})}function te(e){const{missingFields:t,error:s}=j(this,C)[C].getMissingRequiredMetaFields(e);return!(t.length>0&&(this.setFileState(e.id,{missingRequiredMetaFields:t}),this.log(s.message),this.emit("restriction-failed",e,s),1))}function se(e){let t=!0;for(const s of Object.values(e))j(this,B)[B](s)||(t=!1);return t}function ie(e){const{allowNewUpload:t}=this.getState();if(!1===t){const t=new O(this.i18n("noMoreFilesAllowed"),{file:e});throw j(this,_)[_]([t]),t}}function re(e){const t=e instanceof File?{name:e.name,type:e.type,size:e.size,data:e}:e,s=(0,g.A)(t),i=function(e,t){return t.name?t.name:"image"===e.split("/")[0]?`${e.split("/")[0]}.${e.split("/")[1]}`:"noname"}(s,t),r=(0,m.A)(i).extension,o=(0,w.N)(t),l=t.meta||{};l.name=i,l.type=s;const n=Number.isFinite(t.data.size)?t.data.size:null;return{source:t.source||"",id:o,name:i,extension:r||"",meta:{...this.getState().meta,...l},type:s,data:t.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:n,uploadComplete:!1,uploadStarted:null},size:n,isGhost:!1,isRemote:t.isRemote||!1,remote:t.remote||"",preview:t.preview}}function oe(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout((()=>{this.scheduledAutoProceed=null,this.upload().catch((e=>{e.isRestriction||this.log(e.stack||e.message||e)}))}),4))}function le(e){const{files:t}=this.getState(),s={...t},i=[],r=[];for(const l of e)try{var o;let e=j(this,D)[D](l);const r=null==(o=t[e.id])?void 0:o.isGhost;r&&(e={...t[e.id],isGhost:!1,data:l.data},this.log(`Replaced the blob in the restored ghost file: ${e.name}, ${e.id}`));const n=this.opts.onBeforeFileAdded(e,s);if(!n&&this.checkIfFileAlreadyExists(e.id))throw new O(this.i18n("noDuplicates",{fileName:e.name}),{file:l});if(!1===n&&!r)throw new O("Cannot add the file because onBeforeFileAdded returned false.",{isUserFacing:!1,file:l});"object"==typeof n&&null!==n&&(e=n),j(this,C)[C].validateSingleFile(e),s[e.id]=e,i.push(e)}catch(e){r.push(e)}try{j(this,C)[C].validateAggregateRestrictions(Object.values(t),i)}catch(e){return r.push(e),{nextFilesState:t,validFilesToAdd:[],errors:r}}return{nextFilesState:s,validFilesToAdd:i,errors:r}}function ne(){const e=(e,t,s)=>{let i=e.message||"Unknown error";e.details&&(i+=` ${e.details}`),this.setState({error:i}),null!=t&&t.id in this.getState().files&&this.setFileState(t.id,{error:i,response:s})};this.on("error",e),this.on("upload-error",((t,s,i)=>{if(e(s,t,i),"object"==typeof s&&s.message){var r;this.log(s.message,"error");const e=new Error(this.i18n("failedToUpload",{file:null!=(r=null==t?void 0:t.name)?r:""}));e.isUserFacing=!0,e.details=s.message,s.details&&(e.details+=` ${s.details}`),j(this,_)[_]([e])}else j(this,_)[_]([s])}));let t=null;this.on("upload-stalled",((e,s)=>{const{message:i}=e,r=s.map((e=>e.meta.name)).join(", ");t||(this.info({message:i,details:r},"warning",this.opts.infoTimeout),t=setTimeout((()=>{t=null}),this.opts.infoTimeout)),this.log(`${i} ${r}`.trim(),"warning")})),this.on("upload",(()=>{this.setState({error:null})}));const s=e=>{const t=e.filter((e=>{const t=null!=e&&this.getFile(e.id);return t||this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`),t})),s=Object.fromEntries(t.map((e=>[e.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:e.size}}])));this.patchFilesState(s)};this.on("upload-start",(e=>{e.forEach((e=>{this.emit("upload-started",e)})),s(e)})),this.on("upload-progress",this.calculateProgress),this.on("upload-success",((e,t)=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const s=this.getFile(e.id).progress;this.setFileState(e.id,{progress:{...s,postprocess:j(this,k)[k].size>0?{mode:"indeterminate"}:void 0,uploadComplete:!0,percentage:100,bytesUploaded:s.bytesTotal},response:t,uploadURL:t.uploadURL,isPaused:!1}),null==e.size&&this.setFileState(e.id,{size:t.bytesUploaded||s.bytesTotal}),this.calculateTotalProgress()})),this.on("preprocess-progress",((e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,preprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)})),this.on("preprocess-complete",(e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.preprocess,this.setState({files:t})})),this.on("postprocess-progress",((e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getState().files[e.id].progress,postprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)})),this.on("postprocess-complete",(e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.postprocess,this.setState({files:t})})),this.on("restored",(()=>{this.calculateTotalProgress()})),this.on("dashboard:file-edit-complete",(e=>{e&&j(this,B)[B](e)})),"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("online",j(this,X)[X]),window.addEventListener("offline",j(this,X)[X]),setTimeout(j(this,X)[X],3e3))}function ae(e,t){void 0===t&&(t={});const{forceAllowNewUpload:s=!1}=t,{allowNewUpload:i,currentUploads:r}=this.getState();if(!i&&!s)throw new Error("Cannot create a new upload: already uploading.");const l=(0,o.A)();return this.emit("upload",{id:l,fileIDs:e}),this.setState({allowNewUpload:!1!==this.opts.allowMultipleUploadBatches&&!1!==this.opts.allowMultipleUploads,currentUploads:{...r,[l]:{fileIDs:e,step:0,result:{}}}}),l}function de(e){const{currentUploads:t}=this.getState();return t[e]}function he(e){const t={...this.getState().currentUploads};delete t[e],this.setState({currentUploads:t})}async function ue(e){const t=()=>{const{currentUploads:t}=this.getState();return t[e]};let s=t();const i=[...j(this,M)[M],...j(this,z)[z],...j(this,k)[k]];try{for(let r=s.step||0;r<i.length&&s;r++){const o=i[r];this.setState({currentUploads:{...this.getState().currentUploads,[e]:{...s,step:r}}});const{fileIDs:l}=s;await o(l,e),s=t()}}catch(t){throw j(this,Z)[Z](e),t}if(s){s.fileIDs.forEach((e=>{const t=this.getFile(e);t&&t.progress.postprocess&&this.emit("postprocess-complete",t)}));const i=s.fileIDs.map((e=>this.getFile(e))),r=i.filter((e=>!e.error)),o=i.filter((e=>e.error));this.addResultData(e,{successful:r,failed:o,uploadID:e}),s=t()}let r;return s&&(r=s.result,this.emit("complete",r),j(this,Z)[Z](e)),null==r&&this.log(`Not setting result for an upload that has been removed: ${e}`),r}Q.VERSION="3.10.0";var ce=Q},2556:function(e,t,s){"use strict";function i(e){return e<10?`0${e}`:e.toString()}function r(){const e=new Date;return`${i(e.getHours())}:${i(e.getMinutes())}:${i(e.getSeconds())}`}s.d(t,{w:function(){return l},I:function(){return o}});const o={debug:()=>{},warn:()=>{},error:function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return console.error(`[Uppy] [${r()}]`,...t)}},l={debug:function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return console.debug(`[Uppy] [${r()}]`,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return console.warn(`[Uppy] [${r()}]`,...t)},error:function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return console.error(`[Uppy] [${r()}]`,...t)}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[359],{8359:function(e,o,r){r.r(o);const i={strings:{},pluralize(e){return 1===e?0:1}};i.strings={addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},addedNumFiles:"Added %{numFiles} file(s)",addingMoreFiles:"Adding more files",additionalRestrictionsFailed:"%{count} additional restrictions were not fulfilled",addMore:"Add more",addMoreFiles:"Add more files",allFilesFromFolderNamed:"All files from folder %{name}",allowAccessDescription:"In order to take pictures or record video with your camera, please allow camera access for this site.",allowAccessTitle:"Please allow access to your camera",allowAudioAccessDescription:"In order to record audio, please allow microphone access for this site.",allowAudioAccessTitle:"Please allow access to your microphone",aspectRatioLandscape:"Crop landscape (16:9)",aspectRatioPortrait:"Crop portrait (9:16)",aspectRatioSquare:"Crop square",authAborted:"Authentication aborted",authenticateWith:"Connect to %{pluginName}",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",back:"Back",browse:"browse",browseFiles:"browse files",browseFolders:"browse folders",cancel:"Cancel",cancelUpload:"Cancel upload",chooseFiles:"Choose files",closeModal:"Close Modal",companionError:"Connection with Companion failed",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",complete:"Complete",compressedX:"Saved %{size} by compressing images",compressingImages:"Compressing images...",connectedToInternet:"Connected to the Internet",copyLink:"Copy link",copyLinkToClipboardFallback:"Copy the URL below",copyLinkToClipboardSuccess:"Link copied to clipboard.",creatingAssembly:"Preparing upload...",creatingAssemblyFailed:"Transloadit: Could not create Assembly",dashboardTitle:"Uppy Dashboard",dashboardWindowTitle:"Uppy Dashboard Window (Press escape to close)",dataUploadedOfTotal:"%{complete} of %{total}",discardRecordedFile:"Discard recorded file",done:"Done",dropHereOr:"Drop here or %{browse}",dropHint:"Drop your files here",dropPasteBoth:"Drop files here, %{browseFiles} or %{browseFolders}",dropPasteFiles:"Drop files here or %{browseFiles}",dropPasteFolders:"Drop files here or %{browseFolders}",dropPasteImportBoth:"Drop files here, %{browseFiles}, %{browseFolders} or import from:",dropPasteImportFiles:"Drop files here, %{browseFiles} or import from:",dropPasteImportFolders:"Drop files here, %{browseFolders} or import from:",editFile:"Edit file",editImage:"Edit image",editFileWithFilename:"Edit file %{file}",editing:"Editing %{file}",emptyFolderAdded:"No files were added from empty folder",encoding:"Encoding...",enterCorrectUrl:"Incorrect URL: Please make sure you are entering a direct link to a file",enterTextToSearch:"Enter text to search for images",enterUrlToImport:"Enter URL to import a file",error:"Error",exceedsSize:"%{file} exceeds maximum allowed size of %{size}",failedToFetch:"Companion failed to fetch this URL, please make sure it’s correct",failedToUpload:"Failed to upload %{file}",filesUploadedOfTotal:{0:"%{complete} of %{smart_count} file uploaded",1:"%{complete} of %{smart_count} files uploaded"},filter:"Filter",finishEditingFile:"Finish editing file",flipHorizontal:"Flip horizontal",folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"},folderAlreadyAdded:'The folder "%{folder}" was already added',generatingThumbnails:"Generating thumbnails...",import:"Import",importFiles:"Import files from:",importFrom:"Import from %{name}",inferiorSize:"This file is smaller than the allowed size of %{size}",loadedXFiles:"Loaded %{numFiles} files",loading:"Loading...",logOut:"Log out",micDisabled:"Microphone access denied by user",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",missingRequiredMetaFields:{0:"Missing required meta field: %{fields}.",1:"Missing required meta fields: %{fields}."},myDevice:"My Device",noAudioDescription:"In order to record audio, please connect a microphone or another audio input device",noAudioTitle:"Microphone Not Available",noCameraDescription:"In order to take pictures or record video, please connect a camera device",noCameraTitle:"Camera Not Available",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",noFilesFound:"You have no files or folders here",noInternetConnection:"No Internet connection",noMoreFilesAllowed:"Cannot add more files",noSearchResults:"Unfortunately, there are no results for this search",openFolderNamed:"Open folder %{name}",pause:"Pause",paused:"Paused",pauseUpload:"Pause upload",pluginNameAudio:"Audio",pluginNameBox:"Box",pluginNameCamera:"Camera",pluginNameDropbox:"Dropbox",pluginNameFacebook:"Facebook",pluginNameGoogleDrive:"Google Drive",pluginNameInstagram:"Instagram",pluginNameOneDrive:"OneDrive",pluginNameZoom:"Zoom",poweredBy:"Powered by %{uppy}",processingXFiles:{0:"Processing %{smart_count} file",1:"Processing %{smart_count} files"},recording:"Recording",recordingLength:"Recording length %{recording_length}",recordingStoppedMaxSize:"Recording stopped because the file size is about to exceed the limit",recordVideoBtn:"Record Video",recoveredAllFiles:"We restored all files. You can now resume the upload.",recoveredXFiles:{0:"We could not fully recover 1 file. Please re-select it and resume the upload.",1:"We could not fully recover %{smart_count} files. Please re-select them and resume the upload."},removeFile:"Remove file",reSelect:"Re-select",resetFilter:"Reset filter",resetSearch:"Reset search",resume:"Resume",resumeUpload:"Resume upload",retry:"Retry",retryUpload:"Retry upload",revert:"Revert",rotate:"Rotate",save:"Save",saveChanges:"Save changes",search:"Search",searchImages:"Search for images",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},sessionRestored:"Session restored",showErrorDetails:"Show error details",signInWithGoogle:"Sign in with Google",smile:"Smile!",startAudioRecording:"Begin audio recording",startCapturing:"Begin screen capturing",startRecording:"Begin video recording",stopAudioRecording:"Stop audio recording",stopCapturing:"Stop screen capturing",stopRecording:"Stop video recording",streamActive:"Stream active",streamPassive:"Stream passive",submitRecordedFile:"Submit recorded file",takePicture:"Take a picture",takePictureBtn:"Take Picture",timedOut:"Upload stalled for %{seconds} seconds, aborting.",upload:"Upload",uploadComplete:"Upload complete",uploadFailed:"Upload failed",uploading:"Uploading",uploadingXFiles:{0:"Uploading %{smart_count} file",1:"Uploading %{smart_count} files"},uploadPaused:"Upload paused",uploadStalled:"Upload has not made any progress for %{seconds} seconds. You may want to retry it.",uploadXFiles:{0:"Upload %{smart_count} file",1:"Upload %{smart_count} files"},uploadXNewFiles:{0:"Upload +%{smart_count} file",1:"Upload +%{smart_count} files"},xFilesSelected:{0:"%{smart_count} file selected",1:"%{smart_count} files selected"},xMoreFilesAdded:{0:"%{smart_count} more file added",1:"%{smart_count} more files added"},xTimeLeft:"%{time} left",youCanOnlyUploadFileTypes:"You can only upload: %{types}",youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},zoomIn:"Zoom in",zoomOut:"Zoom out"},"undefined"!=typeof Uppy&&(globalThis.Uppy.locales.en_US=i),o.default=i}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 375.0bcd7609.chunk.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[375],{5181:function(t,e,n){n.d(e,{FK:function(){return y},Ob:function(){return H},XX:function(){return F},_3:function(){return g},fF:function(){return i},h:function(){return m},uA:function(){return b},v2:function(){return A}});var o,i,r,l,_,u,s,a={},p=[],c=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,f=Array.isArray;function d(t,e){for(var n in e)t[n]=e[n];return t}function h(t){var e=t.parentNode;e&&e.removeChild(t)}function m(t,e,n){var i,r,l,_={};for(l in e)"key"==l?i=e[l]:"ref"==l?r=e[l]:_[l]=e[l];if(arguments.length>2&&(_.children=arguments.length>3?o.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(l in t.defaultProps)void 0===_[l]&&(_[l]=t.defaultProps[l]);return v(t,_,i,r,null)}function v(t,e,n,o,l){var _={type:t,props:e,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==l?++r:l,__i:-1,__u:0};return null==l&&null!=i.vnode&&i.vnode(_),_}function g(){return{current:null}}function y(t){return t.children}function b(t,e){this.props=t,this.context=e}function x(t,e){if(null==e)return t.__?x(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?x(t):null}function w(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return w(t)}}function k(t){(!t.__d&&(t.__d=!0)&&l.push(t)&&!P.__r++||_!==i.debounceRendering)&&((_=i.debounceRendering)||u)(P)}function P(){var t,e,n,o,r,_,u,a,p;for(l.sort(s);t=l.shift();)t.__d&&(e=l.length,o=void 0,_=(r=(n=t).__v).__e,a=[],p=[],(u=n.__P)&&((o=d({},r)).__v=r.__v+1,i.vnode&&i.vnode(o),$(u,o,r,n.__n,void 0!==u.ownerSVGElement,32&r.__u?[_]:null,a,null==_?x(r):_,!!(32&r.__u),p),o.__v=r.__v,o.__.__k[o.__i]=o,I(a,o,p),o.__e!=_&&w(o)),l.length>e&&l.sort(s));P.__r=0}function E(t,e,n,o,i,r,l,_,u,s,c){var f,d,h,m,v,g=o&&o.__k||p,y=e.length;for(n.__d=u,S(n,e,g),u=n.__d,f=0;f<y;f++)null!=(h=n.__k[f])&&"boolean"!=typeof h&&"function"!=typeof h&&(d=-1===h.__i?a:g[h.__i]||a,h.__i=f,$(t,h,d,i,r,l,_,u,s,c),m=h.__e,h.ref&&d.ref!=h.ref&&(d.ref&&j(d.ref,null,h),c.push(h.ref,h.__c||m,h)),null==v&&null!=m&&(v=m),65536&h.__u||d.__k===h.__k?(m||d.__e!=u||(u=x(d)),u=T(h,u,t)):"function"==typeof h.type&&void 0!==h.__d?u=h.__d:m&&(u=m.nextSibling),h.__d=void 0,h.__u&=-196609);n.__d=u,n.__e=v}function S(t,e,n){var o,i,r,l,_,u=e.length,s=n.length,a=s,p=0;for(t.__k=[],o=0;o<u;o++)l=o+p,null!=(i=t.__k[o]=null==(i=e[o])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?v(null,i,null,null,null):f(i)?v(y,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?v(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=t,i.__b=t.__b+1,_=C(i,n,l,a),i.__i=_,r=null,-1!==_&&(a--,(r=n[_])&&(r.__u|=131072)),null==r||null===r.__v?(-1==_&&p--,"function"!=typeof i.type&&(i.__u|=65536)):_!==l&&(_===l+1?p++:_>l?a>u-l?p+=_-l:p--:_<l?_==l-1&&(p=_-l):p=0,_!==o+p&&(i.__u|=65536))):(r=n[l])&&null==r.key&&r.__e&&!(131072&r.__u)&&(r.__e==t.__d&&(t.__d=x(r)),z(r,r,!1),n[l]=null,a--);if(a)for(o=0;o<s;o++)null!=(r=n[o])&&!(131072&r.__u)&&(r.__e==t.__d&&(t.__d=x(r)),z(r,r))}function T(t,e,n){var o,i;if("function"==typeof t.type){for(o=t.__k,i=0;o&&i<o.length;i++)o[i]&&(o[i].__=t,e=T(o[i],e,n));return e}t.__e!=e&&(n.insertBefore(t.__e,e||null),e=t.__e);do{e=e&&e.nextSibling}while(null!=e&&8===e.nodeType);return e}function A(t,e){return e=e||[],null==t||"boolean"==typeof t||(f(t)?t.some((function(t){A(t,e)})):e.push(t)),e}function C(t,e,n,o){var i=t.key,r=t.type,l=n-1,_=n+1,u=e[n];if(null===u||u&&i==u.key&&r===u.type&&!(131072&u.__u))return n;if(o>(null==u||131072&u.__u?0:1))for(;l>=0||_<e.length;){if(l>=0){if((u=e[l])&&!(131072&u.__u)&&i==u.key&&r===u.type)return l;l--}if(_<e.length){if((u=e[_])&&!(131072&u.__u)&&i==u.key&&r===u.type)return _;_++}}return-1}function M(t,e,n){"-"===e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||c.test(e)?n:n+"px"}function U(t,e,n,o,i){var r;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof o&&(t.style.cssText=o=""),o)for(e in o)n&&e in n||M(t.style,e,"");if(n)for(e in n)o&&n[e]===o[e]||M(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])r=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in t||"onFocusOut"===e||"onFocusIn"===e?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+r]=n,n?o?n.u=o.u:(n.u=Date.now(),t.addEventListener(e,r?O:D,r)):t.removeEventListener(e,r?O:D,r);else{if(i)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==e&&"height"!==e&&"href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&"rowSpan"!==e&&"colSpan"!==e&&"role"!==e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null==n||!1===n&&"-"!==e[4]?t.removeAttribute(e):t.setAttribute(e,n))}}function D(t){if(this.l){var e=this.l[t.type+!1];if(t.t){if(t.t<=e.u)return}else t.t=Date.now();return e(i.event?i.event(t):t)}}function O(t){if(this.l)return this.l[t.type+!0](i.event?i.event(t):t)}function $(t,e,n,o,r,l,_,u,s,a){var p,c,h,m,v,g,x,w,k,P,S,T,A,C,M,U=e.type;if(void 0!==e.constructor)return null;128&n.__u&&(s=!!(32&n.__u),l=[u=e.__e=n.__e]),(p=i.__b)&&p(e);t:if("function"==typeof U)try{if(w=e.props,k=(p=U.contextType)&&o[p.__c],P=p?k?k.props.value:p.__:o,n.__c?x=(c=e.__c=n.__c).__=c.__E:("prototype"in U&&U.prototype.render?e.__c=c=new U(w,P):(e.__c=c=new b(w,P),c.constructor=U,c.render=N),k&&k.sub(c),c.props=w,c.state||(c.state={}),c.context=P,c.__n=o,h=c.__d=!0,c.__h=[],c._sb=[]),null==c.__s&&(c.__s=c.state),null!=U.getDerivedStateFromProps&&(c.__s==c.state&&(c.__s=d({},c.__s)),d(c.__s,U.getDerivedStateFromProps(w,c.__s))),m=c.props,v=c.state,c.__v=e,h)null==U.getDerivedStateFromProps&&null!=c.componentWillMount&&c.componentWillMount(),null!=c.componentDidMount&&c.__h.push(c.componentDidMount);else{if(null==U.getDerivedStateFromProps&&w!==m&&null!=c.componentWillReceiveProps&&c.componentWillReceiveProps(w,P),!c.__e&&(null!=c.shouldComponentUpdate&&!1===c.shouldComponentUpdate(w,c.__s,P)||e.__v===n.__v)){for(e.__v!==n.__v&&(c.props=w,c.state=c.__s,c.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),S=0;S<c._sb.length;S++)c.__h.push(c._sb[S]);c._sb=[],c.__h.length&&_.push(c);break t}null!=c.componentWillUpdate&&c.componentWillUpdate(w,c.__s,P),null!=c.componentDidUpdate&&c.__h.push((function(){c.componentDidUpdate(m,v,g)}))}if(c.context=P,c.props=w,c.__P=t,c.__e=!1,T=i.__r,A=0,"prototype"in U&&U.prototype.render){for(c.state=c.__s,c.__d=!1,T&&T(e),p=c.render(c.props,c.state,c.context),C=0;C<c._sb.length;C++)c.__h.push(c._sb[C]);c._sb=[]}else do{c.__d=!1,T&&T(e),p=c.render(c.props,c.state,c.context),c.state=c.__s}while(c.__d&&++A<25);c.state=c.__s,null!=c.getChildContext&&(o=d(d({},o),c.getChildContext())),h||null==c.getSnapshotBeforeUpdate||(g=c.getSnapshotBeforeUpdate(m,v)),E(t,f(M=null!=p&&p.type===y&&null==p.key?p.props.children:p)?M:[M],e,n,o,r,l,_,u,s,a),c.base=e.__e,e.__u&=-161,c.__h.length&&_.push(c),x&&(c.__E=c.__=null)}catch(t){e.__v=null,s||null!=l?(e.__e=u,e.__u|=s?160:32,l[l.indexOf(u)]=null):(e.__e=n.__e,e.__k=n.__k),i.__e(t,e,n)}else null==l&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=L(n.__e,e,n,o,r,l,_,s,a);(p=i.diffed)&&p(e)}function I(t,e,n){e.__d=void 0;for(var o=0;o<n.length;o++)j(n[o],n[++o],n[++o]);i.__c&&i.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){i.__e(t,e.__v)}}))}function L(t,e,n,i,r,l,_,u,s){var p,c,d,m,v,g,y,b=n.props,w=e.props,k=e.type;if("svg"===k&&(r=!0),null!=l)for(p=0;p<l.length;p++)if((v=l[p])&&"setAttribute"in v==!!k&&(k?v.localName===k:3===v.nodeType)){t=v,l[p]=null;break}if(null==t){if(null===k)return document.createTextNode(w);t=r?document.createElementNS("http://www.w3.org/2000/svg",k):document.createElement(k,w.is&&w),l=null,u=!1}if(null===k)b===w||u&&t.data===w||(t.data=w);else{if(l=l&&o.call(t.childNodes),b=n.props||a,!u&&null!=l)for(b={},p=0;p<t.attributes.length;p++)b[(v=t.attributes[p]).name]=v.value;for(p in b)v=b[p],"children"==p||("dangerouslySetInnerHTML"==p?d=v:"key"===p||p in w||U(t,p,null,v,r));for(p in w)v=w[p],"children"==p?m=v:"dangerouslySetInnerHTML"==p?c=v:"value"==p?g=v:"checked"==p?y=v:"key"===p||u&&"function"!=typeof v||b[p]===v||U(t,p,v,b[p],r);if(c)u||d&&(c.__html===d.__html||c.__html===t.innerHTML)||(t.innerHTML=c.__html),e.__k=[];else if(d&&(t.innerHTML=""),E(t,f(m)?m:[m],e,n,i,r&&"foreignObject"!==k,l,_,l?l[0]:n.__k&&x(n,0),u,s),null!=l)for(p=l.length;p--;)null!=l[p]&&h(l[p]);u||(p="value",void 0!==g&&(g!==t[p]||"progress"===k&&!g||"option"===k&&g!==b[p])&&U(t,p,g,b[p],!1),p="checked",void 0!==y&&y!==t[p]&&U(t,p,y,b[p],!1))}return t}function j(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){i.__e(t,n)}}function z(t,e,n){var o,r;if(i.unmount&&i.unmount(t),(o=t.ref)&&(o.current&&o.current!==t.__e||j(o,null,e)),null!=(o=t.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(t){i.__e(t,e)}o.base=o.__P=null,t.__c=void 0}if(o=t.__k)for(r=0;r<o.length;r++)o[r]&&z(o[r],e,n||"function"!=typeof t.type);n||null==t.__e||h(t.__e),t.__=t.__e=t.__d=void 0}function N(t,e,n){return this.constructor(t,n)}function F(t,e,n){var r,l,_,u;i.__&&i.__(t,e),l=(r="function"==typeof n)?null:n&&n.__k||e.__k,_=[],u=[],$(e,t=(!r&&n||e).__k=m(y,null,[t]),l||a,a,void 0!==e.ownerSVGElement,!r&&n?[n]:l?null:e.firstChild?o.call(e.childNodes):null,_,!r&&n?n:l?l.__e:e.firstChild,r,u),I(_,t,u)}function H(t,e,n){var i,r,l,_,u=d({},t.props);for(l in t.type&&t.type.defaultProps&&(_=t.type.defaultProps),e)"key"==l?i=e[l]:"ref"==l?r=e[l]:u[l]=void 0===e[l]&&void 0!==_?_[l]:e[l];return arguments.length>2&&(u.children=arguments.length>3?o.call(arguments,2):n),v(t.type,u,i||t.key,r||t.ref,null)}o=p.slice,i={__e:function(t,e,n,o){for(var i,r,l;e=e.__;)if((i=e.__c)&&!i.__)try{if((r=i.constructor)&&null!=r.getDerivedStateFromError&&(i.setState(r.getDerivedStateFromError(t)),l=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(t,o||{}),l=i.__d),l)return i.__E=i}catch(e){t=e}throw t}},r=0,b.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=d({},this.state),"function"==typeof t&&(t=t(d({},n),this.props)),t&&d(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),k(this))},b.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),k(this))},b.prototype.render=y,l=[],u="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,s=function(t,e){return t.__v.__b-e.__v.__b},P.__r=0},2729:function(t,e,n){n.d(e,{A:function(){return i}});var o=n(9491);class i{constructor(t,e){this.uppy=t,this.opts=null!=e?e:{}}getPluginState(){const{plugins:t}=this.uppy.getState();return(null==t?void 0:t[this.id])||{}}setPluginState(t){if(!t)return;const{plugins:e}=this.uppy.getState();this.uppy.setState({plugins:{...e,[this.id]:{...e[this.id],...t}}})}setOptions(t){this.opts={...this.opts,...t},this.setPluginState(void 0),this.i18nInit()}i18nInit(){const t=new o.A([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.setPluginState(void 0)}addTarget(t){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}update(t){}afterUpdate(){}}},7496:function(t,e,n){n.d(e,{A:function(){return c}});var o=n(5181),i=n(1677),r=n(5533),l=n(2729);function _(t,e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}var u=0;function s(t){return"__private_"+u+++"_"+t}var a=s("updateUI");class p extends l.A{constructor(){super(...arguments),Object.defineProperty(this,a,{writable:!0,value:void 0})}getTargetPlugin(t){let e;if("function"==typeof(null==t?void 0:t.addTarget))e=t,e instanceof p||console.warn(new Error("The provided plugin is not an instance of UIPlugin. This is an indication of a bug with the way Uppy is bundled.",{cause:{targetPlugin:e,UIPlugin:p}}));else if("function"==typeof t){const n=t;this.uppy.iteratePlugins((t=>{t instanceof n&&(e=t)}))}return e}mount(t,e){const n=e.id,l=(u=t,void 0===s&&(s=document),"string"==typeof u?s.querySelector(u):(0,i.A)(u)?u:null);var u,s;if(l){this.isTargetDOMEl=!0;const e=document.createElement("div");return e.classList.add("uppy-Root"),_(this,a)[a]=function(t){let e,n=null;return function(){for(var o=arguments.length,i=new Array(o),r=0;r<o;r++)i[r]=arguments[r];return e=i,n||(n=Promise.resolve().then((()=>(n=null,t(...e))))),n}}((t=>{this.uppy.getPlugin(this.id)&&((0,o.XX)(this.render(t),e),this.afterUpdate())})),this.uppy.log(`Installing ${n} to a DOM element '${t}'`),this.opts.replaceTargetContent&&(l.innerHTML=""),(0,o.XX)(this.render(this.uppy.getState()),e),this.el=e,l.appendChild(e),e.dir=this.opts.direction||(0,r.A)(e)||"ltr",this.onMount(),this.el}const p=this.getTargetPlugin(t);if(p)return this.uppy.log(`Installing ${n} to ${p.id}`),this.parent=p,this.el=p.addTarget(e),this.onMount(),this.el;this.uppy.log(`Not installing ${n}`);let c=`Invalid target option given to ${n}.`;throw c+="function"==typeof t?" The given target is not a Plugin class. Please check that you're not specifying a React Component instead of a plugin. If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.":"If you meant to target an HTML element, please make sure that the element exists. Check that the <script> tag initializing Uppy is right before the closing </body> tag at the end of the page. (see https://github.com/transloadit/uppy/issues/1042)\n\nIf you meant to target a plugin, please confirm that your `import` statements or `require` calls are correct.",new Error(c)}render(t){throw new Error("Extend the render method to add your plugin to a DOM element")}update(t){var e,n;null!=this.el&&(null==(e=(n=_(this,a))[a])||e.call(n,t))}unmount(){var t;this.isTargetDOMEl&&(null==(t=this.el)||t.remove()),this.onUnmount()}onMount(){}onUnmount(){}}var c=p},9491:function(t,e,n){function o(t,e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}n.d(e,{A:function(){return p}});var i=0;function r(t){return"__private_"+i+++"_"+t}function l(t,e,n){const o=[];return t.forEach((t=>"string"!=typeof t?o.push(t):e[Symbol.split](t).forEach(((t,e,i)=>{""!==t&&o.push(t),e<i.length-1&&o.push(n)})))),o}function _(t,e){const n=/\$/g;let o=[t];if(null==e)return o;for(const t of Object.keys(e))if("_"!==t){let i=e[t];"string"==typeof i&&(i=n[Symbol.replace](i,"$$$$")),o=l(o,new RegExp(`%\\{${t}\\}`,"g"),i)}return o}const u=t=>{throw new Error(`missing string: ${t}`)};var s=r("onMissingKey"),a=r("apply");class p{constructor(t,e){let{onMissingKey:n=u}=void 0===e?{}:e;Object.defineProperty(this,a,{value:c}),Object.defineProperty(this,s,{writable:!0,value:void 0}),this.locale={strings:{},pluralize(t){return 1===t?0:1}},Array.isArray(t)?t.forEach(o(this,a)[a],this):o(this,a)[a](t),o(this,s)[s]=n}translate(t,e){return this.translateArray(t,e).join("")}translateArray(t,e){let n=this.locale.strings[t];if(null==n&&(o(this,s)[s](t),n=t),"object"==typeof n){if(e&&void 0!==e.smart_count)return _(n[this.locale.pluralize(e.smart_count)],e);throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}if("string"!=typeof n)throw new Error("string was not a string");return _(n,e)}}function c(t){if(null==t||!t.strings)return;const e=this.locale;Object.assign(this.locale,{strings:{...e.strings,...t.strings},pluralize:t.pluralize||e.pluralize})}},5533:function(t,e){e.A=function(t){for(var e;t&&!t.dir;)t=t.parentNode;return null==(e=t)?void 0:e.dir}},1677:function(t,e,n){function o(t){return"object"==typeof t&&null!==t&&"nodeType"in t&&t.nodeType===Node.ELEMENT_NODE}n.d(e,{A:function(){return o}})},7544:function(t,e){e.A={__proto__:null,md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",webp:"image/webp",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"}}}]);
@@ -5,7 +5,6 @@
5
5
  * @license https://github.com/airbnb/polyglot.js/blob/master/LICENSE
6
6
  * taken from https://github.com/airbnb/polyglot.js/blob/master/lib/polyglot.js#L299
7
7
  *
8
- * @param {string} phrase that needs interpolation, with placeholders
9
- * @param {object} options with values that will be used to replace placeholders
10
- * @returns {any[]} interpolated
8
+ * @param phrase that needs interpolation, with placeholders
9
+ * @param options with values that will be used to replace placeholders
11
10
  */
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[462],{5462:function(e,t,s){s.r(t),s.d(t,{default:function(){return A}});var o=s(2729),r=s(590),i=s(4528);function a(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var n=0;function p(e){return"__private_"+n+++"_"+e}var d=p("aliveTimer"),l=p("isDone"),u=p("onTimedOut"),h=p("timeout"),c=class{constructor(e,t){Object.defineProperty(this,d,{writable:!0,value:void 0}),Object.defineProperty(this,l,{writable:!0,value:!1}),Object.defineProperty(this,u,{writable:!0,value:void 0}),Object.defineProperty(this,h,{writable:!0,value:void 0}),a(this,h)[h]=e,a(this,u)[u]=t}progress(){a(this,l)[l]||a(this,h)[h]>0&&(clearTimeout(a(this,d)[d]),a(this,d)[d]=setTimeout(a(this,u)[u],a(this,h)[h]))}done(){a(this,l)[l]||(clearTimeout(a(this,d)[d]),a(this,d)[d]=void 0,a(this,l)[l]=!0)}},m=s(1422),y=s(6681),f=s(7853),w=s(8284),b={strings:{uploadStalled:"Upload has not made any progress for %{seconds} seconds. You may want to retry it."}};function g(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var v=0;function E(e){return"__private_"+v+++"_"+e}function U(e,t){let s=t;return s||(s=new Error("Upload error")),"string"==typeof s&&(s=new Error(s)),s instanceof Error||(s=Object.assign(new Error("Upload error"),{data:s})),(0,f.A)(e)?(s=new y.A(s,e),s):(s.request=e,s)}function O(e){return e.data.slice(0,e.data.size,e.meta.type)}const F={formData:!0,fieldName:"file",method:"post",allowedMetaFields:null,responseUrlFieldName:"url",bundle:!1,headers:{},timeout:3e4,limit:5,withCredentials:!1,responseType:"",getResponseData(e){let t={};try{t=JSON.parse(e)}catch{}return t},getResponseError(e,t){let s=new Error("Upload error");return(0,f.A)(t)&&(s=new y.A(s,t)),s},validateStatus(e){return e>=200&&e<300}};var R=E("uploadLocalFile"),T=E("uploadBundle"),j=E("getCompanionClientArgs"),S=E("uploadFiles"),C=E("handleUpload");class A extends o.A{constructor(e,t){if(super(e,{...F,fieldName:t.bundle?"files[]":"file",...t}),Object.defineProperty(this,S,{value:P}),Object.defineProperty(this,j,{value:M}),Object.defineProperty(this,T,{value:x}),Object.defineProperty(this,R,{value:D}),Object.defineProperty(this,C,{writable:!0,value:async e=>{if(0===e.length)return void this.uppy.log("[XHRUpload] No files to upload!");0!==this.opts.limit||this.opts[m.$]||this.uppy.log("[XHRUpload] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/xhr-upload/#limit-0","warning"),this.uppy.log("[XHRUpload] Uploading...");const t=this.uppy.getFilesByIds(e),s=(0,w.Y)(t),o=(0,w.S)(s);if(this.uppy.emit("upload-start",o),this.opts.bundle){if(s.some((e=>e.isRemote)))throw new Error("Can’t upload remote files when the `bundle: true` option is set");if("function"==typeof this.opts.headers)throw new TypeError("`headers` may not be a function when the `bundle: true` option is set");await g(this,T)[T](s)}else await g(this,S)[S](s)}}),this.type="uploader",this.id=this.opts.id||"XHRUpload",this.defaultLocale=b,this.i18nInit(),m.$ in this.opts?this.requests=this.opts[m.$]:this.requests=new m.i(this.opts.limit),this.opts.bundle&&!this.opts.formData)throw new Error("`opts.formData` must be true when `opts.bundle` is enabled.");if(this.opts.bundle&&"function"==typeof this.opts.headers)throw new Error("`opts.headers` can not be a function when the `bundle: true` option is set.");if(void 0===(null==t?void 0:t.allowedMetaFields)&&"metaFields"in this.opts)throw new Error("The `metaFields` option has been renamed to `allowedMetaFields`.");this.uploaderEvents=Object.create(null)}getOptions(e){const t=this.uppy.getState().xhrUpload,{headers:s}=this.opts,o={...this.opts,...t||{},...e.xhrUpload||{},headers:{}};return"function"==typeof s?o.headers=s(e):Object.assign(o.headers,this.opts.headers),t&&Object.assign(o.headers,t.headers),e.xhrUpload&&Object.assign(o.headers,e.xhrUpload.headers),o}addMetadata(e,t,s){(Array.isArray(s.allowedMetaFields)?s.allowedMetaFields:Object.keys(t)).forEach((s=>{const o=t[s];Array.isArray(o)?o.forEach((t=>e.append(s,t))):e.append(s,o)}))}createFormDataUpload(e,t){const s=new FormData;this.addMetadata(s,e.meta,t);const o=O(e);return e.name?s.append(t.fieldName,o,e.meta.name):s.append(t.fieldName,o),s}createBundledUpload(e,t){const s=new FormData,{meta:o}=this.uppy.getState();return this.addMetadata(s,o,t),e.forEach((e=>{const t=this.getOptions(e),o=O(e);e.name?s.append(t.fieldName,o,e.name):s.append(t.fieldName,o)})),s}install(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!1}})}this.uppy.addUploader(g(this,C)[C])}uninstall(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!0}})}this.uppy.removeUploader(g(this,C)[C])}}async function D(e,t,s){const o=this.getOptions(e),a=Date.now();return this.uppy.log(`uploading ${t} of ${s}`),new Promise(((t,s)=>{const n=o.formData?this.createFormDataUpload(e,o):e.data,p=new XMLHttpRequest,d=new i.A(this.uppy);let l;this.uploaderEvents[e.id]=d;const u=new c(o.timeout,(()=>{const t=new Error(this.i18n("uploadStalled",{seconds:Math.ceil(o.timeout/1e3)}));this.uppy.emit("upload-stalled",t,[e])})),h=(0,r.A)();p.upload.addEventListener("loadstart",(()=>{this.uppy.log(`[XHRUpload] ${h} started`)})),p.upload.addEventListener("progress",(t=>{this.uppy.log(`[XHRUpload] ${h} progress: ${t.loaded} / ${t.total}`),u.progress(),t.lengthComputable&&this.uppy.emit("upload-progress",this.uppy.getFile(e.id),{uploader:this,uploadStarted:a,bytesUploaded:t.loaded,bytesTotal:t.total})})),p.addEventListener("load",(()=>{if(this.uppy.log(`[XHRUpload] ${h} finished`),u.done(),l.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null),o.validateStatus(p.status,p.responseText,p)){const s=o.getResponseData(p.responseText,p),r=null==s?void 0:s[o.responseUrlFieldName],i={status:p.status,body:s,uploadURL:r};return this.uppy.emit("upload-success",this.uppy.getFile(e.id),i),r&&this.uppy.log(`Download ${e.name} from ${r}`),t(e)}const r=o.getResponseData(p.responseText,p),i=U(p,o.getResponseError(p.responseText,p)),a={status:p.status,body:r};return this.uppy.emit("upload-error",e,i,a),s(i)})),p.addEventListener("error",(()=>{this.uppy.log(`[XHRUpload] ${h} errored`),u.done(),l.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null);const t=U(p,o.getResponseError(p.responseText,p));return this.uppy.emit("upload-error",e,t),s(t)})),p.open(o.method.toUpperCase(),o.endpoint,!0),p.withCredentials=o.withCredentials,""!==o.responseType&&(p.responseType=o.responseType),l=this.requests.run((()=>{const t=this.getOptions(e);return Object.keys(t.headers).forEach((e=>{p.setRequestHeader(e,t.headers[e])})),p.send(n),()=>{u.done(),p.abort()}})),d.onFileRemove(e.id,(()=>{l.abort(),s(new Error("File removed"))})),d.onCancelAll(e.id,(e=>{let{reason:t}=e;"user"===t&&l.abort(),s(new Error("Upload cancelled"))}))}))}function x(e){return new Promise(((t,s)=>{const{endpoint:o}=this.opts,{method:r}=this.opts,i=Date.now(),a=this.uppy.getState().xhrUpload,n=this.createBundledUpload(e,{...this.opts,...a||{}}),p=new XMLHttpRequest,d=t=>{e.forEach((e=>{this.uppy.emit("upload-error",e,t)}))},l=new c(this.opts.timeout,(()=>{const t=new Error(this.i18n("uploadStalled",{seconds:Math.ceil(this.opts.timeout/1e3)}));this.uppy.emit("upload-stalled",t,e)}));p.upload.addEventListener("loadstart",(()=>{this.uppy.log("[XHRUpload] started uploading bundle"),l.progress()})),p.upload.addEventListener("progress",(t=>{l.progress(),t.lengthComputable&&e.forEach((e=>{this.uppy.emit("upload-progress",this.uppy.getFile(e.id),{uploader:this,uploadStarted:i,bytesUploaded:t.loaded/t.total*e.size,bytesTotal:e.size})}))})),p.addEventListener("load",(()=>{if(l.done(),this.opts.validateStatus(p.status,p.responseText,p)){const s=this.opts.getResponseData(p.responseText,p),o={status:p.status,body:s};return e.forEach((e=>{this.uppy.emit("upload-success",this.uppy.getFile(e.id),o)})),t()}const o=this.opts.getResponseError(p.responseText,p)||new y.A("Upload error",p);return d(o),s(o)})),p.addEventListener("error",(()=>{l.done();const e=this.opts.getResponseError(p.responseText,p)||new Error("Upload error");return d(e),s(e)})),this.uppy.on("cancel-all",(function(e){let{reason:t}=void 0===e?{}:e;"user"===t&&(l.done(),p.abort())})),p.open(r.toUpperCase(),o,!0),p.withCredentials=this.opts.withCredentials,""!==this.opts.responseType&&(p.responseType=this.opts.responseType);const u=this.opts.headers;Object.keys(u).forEach((e=>{p.setRequestHeader(e,u[e])})),p.send(n)}))}function M(e){var t;const s=this.getOptions(e),o=Array.isArray(s.allowedMetaFields)?s.allowedMetaFields:Object.keys(e.meta);return{...null==(t=e.remote)?void 0:t.body,protocol:"multipart",endpoint:s.endpoint,size:e.data.size,fieldname:s.fieldName,metadata:Object.fromEntries(o.map((t=>[t,e.meta[t]]))),httpMethod:s.method,useFormData:s.formData,headers:s.headers}}async function P(e){await Promise.allSettled(e.map(((t,s)=>{const o=s+1,r=e.length;if(t.isRemote){const e=()=>this.requests,s=new AbortController,o=e=>{e.id===t.id&&s.abort()};this.uppy.on("file-removed",o);const r=this.uppy.getRequestClientForFile(t).uploadRemoteFile(t,g(this,j)[j](t),{signal:s.signal,getQueue:e});return this.requests.wrapSyncFunction((()=>{this.uppy.off("file-removed",o)}),{priority:-1})(),r}return g(this,R)[R](t,o,r)})))}A.VERSION="3.6.4"},590:function(e,t,s){s.d(t,{A:function(){return o}});let o=(e=21)=>{let t="",s=e;for(;s--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}}}]);