PageSourceSearch

https://cdn.overleaf.com/js/7025-155e4ba2a88ad8655bba.js

js overleaf.com collected 2026-09-24 08:32:43 UTC 248,711 bytes, 2 lines download raw bytes

vendor: 9,942 bytes, lines 1-2
1/*! For license information please see 7025-155e4ba2a88ad8655bba.js.LICENSE.txt */
2(self.webpackChunk_overleaf_web=self.webpackChunk_overleaf_web||[]).push([[7025],{58693(e,t,i){"use strict";i.d(t,{xh:()=>ho});var s,n,r,o,a,l,u,h,d,p,c,f,m,g,y=i(66485),b=(i(36650),i(36342),i(8922),i(18527),i(71124),i(43080),{}),v=[],w=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,P=Array.isArray;function _(e,t){for(var i in t)e[i]=t[i];return e}function F(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function S(e,t,i){var n,r,o,a={};for(o in t)"key"==o?n=t[o]:"ref"==o?r=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?s.call(arguments,2):i),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return C(e,a,n,r,null)}function C(e,t,i,s,o){var a={type:e,props:t,key:i,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++r:o,__i:-1,__u:0};return null==o&&null!=n.vnode&&n.vnode(a),a}function T(e){return e.children}function k(e,t){this.props=e,this.context=t}function O(e,t){if(null==t)return e.__?O(e.__,e.__i+1):null;for(var i;t<e.__k.length;t++)if(null!=(i=e.__k[t])&&null!=i.__e)return i.__e;return"function"==typeof e.type?O(e):null}function E(e){if(e.__P&&e.__d){var t=e.__v,i=t.__e,s=[],r=[],o=_({},t);o.__v=t.__v+1,n.vnode&&n.vnode(o),j(e.__P,o,t,e.__n,e.__P.namespaceURI,32&t.__u?[i]:null,s,null==i?O(t):i,!!(32&t.__u),r),o.__v=t.__v,o.__.__k[o.__i]=o,$(s,o,r),t.__e=t.__=null,o.__e!=i&&D(o)}}function D(e){if(null!=(e=e.__)&&null!=e.__c)return e.__e=e.__c.base=null,e.__k.some(function(t){if(null!=t&&null!=t.__e)return e.__e=e.__c.base=t.__e}),D(e)}function A(e){(!e.__d&&(e.__d=!0)&&o.push(e)&&!x.__r++||a!=n.debounceRendering)&&((a=n.debounceRendering)||l)(x)}function x(){try{for(var e,t=1;o.length;)o.length>t&&o.sort(u),e=o.shift(),t=o.length,E(e)}finally{o.length=x.__r=0}}function N(e,t,i,s,n,r,o,a,l,u,h){var d,p,c,f,m,g,y,w=s&&s.__k||v,P=t.length;for(l=I(i,t,w,l,P),d=0;d<P;d++)null!=(c=i.__k[d])&&(p=-1!=c.__i&&w[c.__i]||b,c.__i=d,g=j(e,c,p,n,r,o,a,l,u,h),f=c.__e,c.ref&&p.ref!=c.ref&&(p.ref&&W(p.ref,null,c),h.push(c.ref,c.__c||f,c)),null==m&&null!=f&&(m=f),(y=!!(4&c.__u))||p.__k===c.__k?(l=U(c,l,e,y),y&&p.__e&&(p.__e=null)):"function"==typeof c.type&&void 0!==g?l=g:f&&(l=f.nextSibling),c.__u&=-7);return i.__e=m,l}function I(e,t,i,s,n){var r,o,a,l,u,h=i.length,d=h,p=0;for(e.__k=new Array(n),r=0;r<n;r++)null!=(o=t[r])&&"boolean"!=typeof o&&"function"!=typeof o?("string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?o=e.__k[r]=C(null,o,null,null,null):P(o)?o=e.__k[r]=C(T,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?o=e.__k[r]=C(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[r]=o,l=r+p,o.__=e,o.__b=e.__b+1,a=null,-1!=(u=o.__i=R(o,i,l,d))&&(d--,(a=i[u])&&(a.__u|=2)),null==a||null==a.__v?(-1==u&&(n>h?p--:n<h&&p++),"function"!=typeof o.type&&(o.__u|=4)):u!=l&&(u==l-1?p--:u==l+1?p++:(u>l?p--:p++,o.__u|=4))):e.__k[r]=null;if(d)for(r=0;r<h;r++)null!=(a=i[r])&&!(2&a.__u)&&(a.__e==s&&(s=O(a)),G(a,a));return s}function U(e,t,i,s){var n,r;if("function"==typeof e.type){for(n=e.__k,r=0;n&&r<n.length;r++)n[r]&&(n[r].__=e,t=U(n[r],t,i,s));return t}e.__e!=t&&(s&&(t&&e.type&&!t.parentNode&&(t=O(e)),i.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function B(e,t){return t=t||[],null==e||"boolean"==typeof e||(P(e)?e.some(function(e){B(e,t)}):t.push(e)),t}function R(e,t,i,s){var n,r,o,a=e.key,l=e.type,u=t[i],h=null!=u&&!(2&u.__u);if(null===u&&null==a||h&&a==u.key&&l==u.type)return i;if(s>(h?1:0))for(n=i-1,r=i+1;n>=0||r<t.length;)if(null!=(u=t[o=n>=0?n--:r++])&&!(2&u.__u)&&a==u.key&&l==u.type)return o;return-1}function M(e,t,i){"-"==t[0]?e.setProperty(t,null==i?"":i):e[t]=null==i?"":"number"!=typeof i||w.test(t)?i:i+"px"}function L(e,t,i,s,n){var r,o;e:if("style"==t)if("string"==typeof i)e.style.cssText=i;else{if("string"==typeof s&&(e.style.cssText=s=""),s)for(t in s)i&&t in i||M(e.style,t,"");if(i)for(t in i)s&&i[t]==s[t]||M(e.style,t,i[t])}else if("o"==t[0]&&"n"==t[1])r=t!=(t=t.replace(c,"$1")),o=t.toLowerCase(),t=o in e||"onFocusOut"==t||"onFocusIn"==t?o.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+r]=i,i?s?i[p]=s[p]:(i[p]=f,e.addEventListener(t,r?g:m,r)):e.removeEventListener(t,r?g:m,r);else{if("http://www.w3.org/2000/svg"==n)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==i?"":i;break e}catch(e){}"function"==typeof i||(null==i||!1===i&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==i?"":i))}}function z(e){return function(t){if(this.l){var i=this.l[t.type+e];if(null==t[d])t[d]=f++;else if(t[d]<i[p])return;return i(n.event?n.event(t):t)}}}function j(e,t,i,s,r,o,a,l,u,h){var d,p,c,f,m,g,y,b,w,S,C,O,E,D,A,x=t.type;if(void 0!==t.constructor)return null;128&i.__u&&(u=!!(32&i.__u),o=[l=t.__e=i.__e]),(d=n.__b)&&d(t);e:if("function"==typeof x)try{if(b=t.props,w=x.prototype&&x.prototype.render,S=(d=x.contextType)&&s[d.__c],C=d?S?S.props.value:d.__:s,i.__c?y=(p=t.__c=i.__c).__=p.__E:(w?t.__c=p=new x(b,C):(t.__c=p=new k(b,C),p.constructor=x,p.render=K),S&&S.sub(p),p.state||(p.state={}),p.__n=s,c=p.__d=!0,p.__h=[],p._sb=[]),w&&null==p.__s&&(p.__s=p.state),w&&null!=x.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=_({},p.__s)),_(p.__s,x.getDerivedStateFromProps(b,p.__s))),f=p.props,m=p.state,p.__v=t,c)w&&null==x.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),w&&null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(w&&null==x.getDerivedStateFromProps&&b!==f&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(b,C),t.__v==i.__v||!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(b,p.__s,C)){t.__v!=i.__v&&(p.props=b,p.state=p.__s,p.__d=!1),t.__e=i.__e,t.__k=i.__k,t.__k.some(function(e){e&&(e.__=t)}),v.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&a.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(b,p.__s,C),w&&null!=p.componentDidUpdate&&p.__h.push(function(){p.componentDidUpdate(f,m,g)})}if(p.context=C,p.props=b,p.__P=e,p.__e=!1,O=n.__r,E=0,w)p.state=p.__s,p.__d=!1,O&&O(t),d=p.render(p.props,p.state,p.context),v.push.apply(p.__h,p._sb),p._sb=[];else do{p.__d=!1,O&&O(t),d=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++E<25);p.state=p.__s,null!=p.getChildContext&&(s=_(_({},s),p.getChildContext())),w&&!c&&null!=p.getSnapshotBeforeUpdate&&(g=p.getSnapshotBeforeUpdate(f,m)),D=null!=d&&d.type===T&&null==d.key?H(d.props.children):d,l=N(e,P(D)?D:[D],t,i,s,r,o,a,l,u,h),p.base=t.__e,t.__u&=-161,p.__h.length&&a.push(p),y&&(p.__E=p.__=null)}catch(e){if(t.__v=null,u||null!=o)if(e.then){for(t.__u|=u?160:128;l&&8==l.nodeType&&l.nextSibling;)l=l.nextSibling;o[o.indexOf(l)]=null,t.__e=l}else{for(A=o.length;A--;)F(o[A]);q(t)}else t.__e=i.__e,t.__k=i.__k,e.then||q(t);n.__e(e,t,i)}else null==o&&t.__v==i.__v?(t.__k=i.__k,t.__e=i.__e):l=t.__e=V(i.__e,t,i,s,r,o,a,u,h);return(d=n.diffed)&&d(t),128&t.__u?void 0:l}function q(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(q))}function $(e,t,i){for(var s=0;s<i.length;s++)W(i[s],i[++s],i[++s]);n.__c&&n.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){n.__e(e,t.__v)}})}function H(e){return"object"!=typeof e||null==e||e.__b>0?e:P(e)?e.map(H):_({},e)}function V(e,t,i,r,o,a,l,u,h){var d,p,c,f,m,g,y,v=i.props||b,w=t.props,_=t.type;if("svg"==_?o="http://www.w3.org/2000/svg":"math"==_?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=a)for(d=0;d<a.length;d++)if((m=a[d])&&"setAttribute"in m==!!_&&(_?m.localName==_:3==m.nodeType)){e=m,a[d]=null;break}if(null==e){if(null==_)return document.createTextNode(w);e=document.createElementNS(o,_,w.is&&w),u&&(n.__m&&n.__m(t,a),u=!1),a=null}if(null==_)v===w||u&&e.data==w||(e.data=w);else{if(a=a&&s.call(e.childNodes),!u&&null!=a)for(v={},d=0;d<e.attributes.length;d++)v[(m=e.attributes[d]).name]=m.value;for(d in v)m=v[d],"dangerouslySetInnerHTML"==d?c=m:"children"==d||d in w||"value"==d&&"defaultValue"in w||"checked"==d&&"defaultChecked"in w||L(e,d,null,m,o);for(d in w)m=w[d],"children"==d?f=m:"dangerouslySetInnerHTML"==d?p=m:"value"==d?g=m:"checked"==d?y=m:u&&"function"!=typeof m||v[d]===m||L(e,d,m,v[d],o);if(p)u||c&&(p.__html==c.__html||p.__html==e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(c&&(e.innerHTML=""),N("template"==t.type?e.content:e,P(f)?f:[f],t,i,r,"foreignObject"==_?"http://www.w3.org/1999/xhtml":o,a,l,a?a[0]:i.__k&&O(i,0),u,h),null!=a)for(d=a.length;d--;)F(a[d]);u||(d="value","progress"==_&&null==g?e.removeAttribute("value"):null!=g&&(g!==e[d]||"progress"==_&&!g||"option"==_&&g!=v[d])&&L(e,d,g,v[d],o),d="checked",null!=y&&y!=e[d]&&L(e,d,y,v[d],o))}return e}function W(e,t,i){try{if("function"==typeof e){var s="function"==typeof e.__u;s&&e.__u(),s&&null==t||(e.__u=e(t))}else e.current=t}catch(e){n.__e(e,i)}}function G(e,t,i){var s,r;if(n.unmount&&n.unmount(e),(s=e.ref)&&(s.current&&s.current!=e.__e||W(s,null,t)),null!=(s=e.__c)){if(s.componentWillUnmount)try{s.componentWillUnmount()}catch(e){n.__e(e,t)}s.base=s.__P=null}if(s=e.__k)for(r=0;r<s.length;r++)s[r]&&G(s[r],t,i||"function"!=typeof e.type);i||F(e.__e),e.__c=e.__=e.__e=void 0}function K(e,t,i){return this.constructor(e,i)}function X(e,t,i){var r,o,a,l;t==document&&(t=document.documentElement),n.__&&n.__(e,t),o=(r="function"==typeof i)?null:i&&i.__k||t.__k,a=[],l=[],j(t,e=(!r&&i||t).__k=S(T,null,[e]),o||b,b,t.namespaceURI,!r&&i?[i]:o?null:t.firstChild?s.call(t.childNodes):null,a,!r&&i?i:o?o.__e:t.firstChild,r,l),$(a,e,l)}function Y(e,t,i){var n,r,o,a,l=_({},e.props);for(o in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==o?n=t[o]:"ref"==o?r=t[o]:l[o]=void 0===t[o]&&null!=a?a[o]:t[o
2];return arguments.length>2&&(l.children=arguments.length>3?s.call(arguments,2):i),C(e.type,l,n||e.key,r||e.ref,null)}function Q(e){return"object"==typeof e&&null!==e&&("nodeType"in e&&e.nodeType===Node.ELEMENT_NODE)}s=v.slice,n={__e:function(e,t,i,s){for(var n,r,o;t=t.__;)if((n=t.__c)&&!n.__)try{if((r=n.constructor)&&null!=r.getDerivedStateFromError&&(n.setState(r.getDerivedStateFromError(e)),o=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e,s||{}),o=n.__d),o)return n.__E=n}catch(t){e=t}throw e}},r=0,k.prototype.setState=function(e,t){var i;i=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=_({},this.state),"function"==typeof e&&(e=e(_({},i),this.props)),e&&_(i,e),null!=e&&this.__v&&(t&&this._sb.push(t),A(this))},k.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),A(this))},k.prototype.render=T,o=[],l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,u=function(e,t){return e.__v.__b-t.__v.__b},x.__r=0,h=Math.random().toString(8),d="__d"+h,p="__a"+h,c=/(PointerCapture)$|Capture$/i,f=0,m=z(!1),g=z(!0);const J=function(e,t){return void 0===t&&(t=document),"string"==typeof e?t.querySelector(e):Q(e)?e:null};const Z=function(e){for(var t;e&&!e.dir;)e=e.parentNode;return null==(t=e)?void 0:t.dir};var ee=i(87138);function te(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var ie=0;function se(e){return"__private_"+ie+++"_"+e}var ne=se("updateUI");class re extends ee.A{constructor(){super(...arguments),Object.defineProperty(this,ne,{writable:!0,value:void 0})}getTargetPlugin(e){let t;if("function"==typeof(null==e?void 0:e.addTarget))t=e,t instanceof re||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:t,UIPlugin:re}}));else if("function"==typeof e){const i=e;this.uppy.iteratePlugins(e=>{e instanceof i&&(t=e)})}return t}mount(e,t){const i=t.id,s=J(e);if(s){this.isTargetDOMEl=!0;const t=document.createElement("div");return t.classList.add("uppy-Root"),te(this,ne)[ne]=function(e){let t,i=null;return function(){for(var s=arguments.length,n=new Array(s),r=0;r<s;r++)n[r]=arguments[r];return t=n,i||(i=Promise.resolve().then(()=>(i=null,e(...t)))),i}}(e=>{this.uppy.getPlugin(this.id)&&(X(this.render(e),t),this.afterUpdate())}),this.uppy.log(`Installing ${i} to a DOM element '${e}'`),this.opts.replaceTargetContent&&(s.innerHTML=""),X(this.render(this.uppy.getState()),t),this.el=t,s.appendChild(t),t.dir=this.opts.direction||Z(t)||"ltr",this.onMount(),this.el}const n=this.getTargetPlugin(e);
2if(n)return this.uppy.log(`Installing ${i} to ${n.id}`),this.parent=n,this.el=n.addTarget(t),this.onMount(),this.el;this.uppy.log(`Not installing ${i}`);let r=`Invalid target option given to ${i}.`;throw r+="function"==typeof e?" 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(r)}render(e){throw new Error("Extend the render method to add your plugin to a DOM element")}update(e){var t,i;null!=this.el&&(null==(t=(i=te(this,ne))[ne])||t.call(i,e))}unmount(){var e;this.isTargetDOMEl&&(null==(e=this.el)||e.remove());this.onUnmount()}onMount(){}onUnmount(){}}const oe=re;i(70034);function ae(e,t,i,s){return 0===i||e===t?e:0===s?t:e+(t-e)*2**(-s/i)}const le={STATE_ERROR:"error",STATE_WAITING:"waiting",STATE_PREPROCESSING:"preprocessing",STATE_UPLOADING:"uploading",STATE_POSTPROCESSING:"postprocessing",STATE_COMPLETE:"complete"};var ue=i(83764),he=i.n(ue);function de(e){const t=[];let i,s="indeterminate";for(const{progress:n}of Object.values(e)){const{preprocess:e,postprocess:r}=n;null==i&&(e||r)&&({mode:s,message:i}=e||r),"determinate"===(null==e?void 0:e.mode)&&t.push(e.value),"determinate"===(null==r?void 0:r.mode)&&t.push(r.value)}return{mode:s,message:i,value:t.reduce((e,i)=>e+i/t.length,0)}}var pe=i(7360),ce=i.n(pe);function fe(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`}`}function me(e){const{newFiles:t,isUploadStarted:i,recoveredState:s,i18n:n,uploadState:r,isSomeGhost:o,startUpload:a}=e,l=he()("uppy-u-reset","uppy-c-btn","uppy-StatusBar-actionBtn","uppy-StatusBar-actionBtn--upload",{"uppy-c-btn-primary":r===le.STATE_WAITING},{"uppy-StatusBar-actionBtn--disabled":o}),u=n(t&&i&&!s?"uploadXNewFiles":"uploadXFiles",{smart_count:t});return S("button",{type:"button",className:l,"aria-label":n("uploadXFiles",{smart_count:t}),onClick:a,disabled:o,"data-uppy-super-focusable":!0},u)}function ge(e){const{i18n:t,uppy:i}=e;return S("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"},S("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"8",height:"10",viewBox:"0 0 8 10"},S("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 ye(e){const{i18n:t,uppy:i}=e;return S("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},S("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"16",height:"16",viewBox:"0 0 16 16"},S("g",{fill:"none",fillRule:"evenodd"},S("circle",{fill:"#888",cx:"8",cy:"8",r:"8"}),S("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 be(e){const{isAllPaused:t,i18n:i,isAllComplete:s,resumableUploads:n,uppy:r}=e,o=i(t?"resume":"pause");return S("button",{title:o,"aria-label":o,className:"uppy-u-reset uppy-StatusBar-actionCircleBtn",type:"button",onClick:function(){s||(n?t?r.resumeAll():r.pauseAll():r.cancelAll())},"data-cy":"togglePauseResume","data-uppy-super-focusable":!0},S("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"16",height:"16",viewBox:"0 0 16 16"},S("g",{fill:"none",fillRule:"evenodd"},S("circle",{fill:"#888",cx:"8",cy:"8",r:"8"}),S("path",{fill:"#FFF",d:t?"M6 4.25L11.5 8 6 11.75z":"M5 4.5h2v7H5v-7zm4 0h2v7H9v-7z"}))))}function ve(e){const{i18n:t,doneButtonHandler:i}=e;return S("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 we(){return S("svg",{className:"uppy-StatusBar-spinner","aria-hidden":"true",focusable:"false",width:"14",height:"14"},S("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 Pe(e){const{progress:t}=e,{value:i,mode:s,message:n}=t;return S("div",{className:"uppy-StatusBar-content"},S(we,null),"determinate"===s?`${Math.round(100*i)}% · `:"",n)}function _e(e){const{numUploads:t,complete:i,totalUploadedSize:s,totalSize:n,totalETA:r,i18n:o}=e,a=t>1;return S("div",{className:"uppy-StatusBar-statusSecondary"},a&&o("filesUploadedOfTotal",{complete:i,smart_count:t}),S("span",{className:"uppy-StatusBar-additionalInfo"},a&&" · ",o("dataUploadedOfTotal",{complete:ce()(s),total:ce()(n)})," · ",o("xTimeLeft",{time:fe(r)})))}function Fe(e){const{i18n:t,complete:i,numUploads:s}=e;return S("div",{className:"uppy-StatusBar-statusSecondary"},t("filesUploadedOfTotal",{complete:i,smart_count:s}))}function Se(e){const{i18n:t,newFiles:i,startUpload:s}=e,n=he()("uppy-u-reset","uppy-c-btn","uppy-StatusBar-actionBtn","uppy-StatusBar-actionBtn--uploadNewlyAdded");return S("div",{className:"uppy-StatusBar-statusSecondary"},S("div",{className:"uppy-StatusBar-statusSecondaryHint"},t("xMoreFilesAdded",{smart_count:i})),S("button",{type:"button",className:n,"aria-label":t("uploadXFiles",{smart_count:i}),onClick:s},t("upload")))}
2function Ce(e){const{i18n:t,supportsUploadProgress:i,totalProgress:s,showProgressDetails:n,isUploadStarted:r,isAllComplete:o,isAllPaused:a,newFiles:l,numUploads:u,complete:h,totalUploadedSize:d,totalSize:p,totalETA:c,startUpload:f}=e,m=l&&r;if(!r||o)return null;const g=t(a?"paused":"uploading");return S("div",{className:"uppy-StatusBar-content","aria-label":g,title:g},a?null:S(we,null),S("div",{className:"uppy-StatusBar-status"},S("div",{className:"uppy-StatusBar-statusPrimary"},i?`${g}: ${s}%`:g),a||m||!n?null:i?S(_e,{numUploads:u,complete:h,totalUploadedSize:d,totalSize:p,totalETA:c,i18n:t}):S(Fe,{i18n:t,complete:h,numUploads:u}),m?S(Se,{i18n:t,newFiles:l,startUpload:f}):null))}function Te(e){const{i18n:t}=e;return S("div",{className:"uppy-StatusBar-content",role:"status",title:t("complete")},S("div",{className:"uppy-StatusBar-status"},S("div",{className:"uppy-StatusBar-statusPrimary"},S("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-StatusBar-statusIndicator uppy-c-icon",width:"15",height:"11",viewBox:"0 0 15 11"},S("path",{d:"M.414 5.843L1.627 4.63l3.472 3.472L13.202 0l1.212 1.213L5.1 10.528z"})),t("complete"))))}function ProgressBarError(e){const{error:t,i18n:i,complete:s,numUploads:n}=e;return S("div",{className:"uppy-StatusBar-content",title:i("uploadFailed")},S("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-StatusBar-statusIndicator uppy-c-icon",width:"11",height:"11",viewBox:"0 0 11 11"},S("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"})),S("div",{className:"uppy-StatusBar-status"},S("div",{className:"uppy-StatusBar-statusPrimary"},i("uploadFailed"),S("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"},"?")),S(Fe,{i18n:i,complete:s,numUploads:n})))}const{STATE_ERROR:ke,STATE_WAITING:Oe,STATE_PREPROCESSING:Ee,STATE_UPLOADING:De,STATE_POSTPROCESSING:Ae,STATE_COMPLETE:xe}=le;function Ne(e){const{newFiles:t,allowNewUpload:i,isUploadInProgress:s,isAllPaused:n,resumableUploads:r,error:o,hideUploadButton:a,hidePauseResumeButton:l,hideCancelButton:u,hideRetryButton:h,recoveredState:d,uploadState:p,totalProgress:c,files:f,supportsUploadProgress:m,hideAfterFinish:g,isSomeGhost:y,doneButtonHandler:b,isUploadStarted:v,i18n:w,startUpload:P,uppy:_,isAllComplete:F,showProgressDetails:C,numUploads:T,complete:k,totalSize:O,totalETA:E,totalUploadedSize:D}=e;const A=function(){switch(p){case Ae:case Ee:{const e=de(f);return"determinate"===e.mode?100*e.value:c}case ke:return null;case De:return m?c:null;default:return c}}(),x=function(){if(d)return!1;switch(p){case Oe:return a||0===t;case xe:return g;default:return!1}}(),N=null!=A?A:100,I=!o&&t&&!s&&!n&&i&&!a,U=!u&&p!==Oe&&p!==xe,B=r&&!l&&p===De,R=o&&!F&&!h,M=b&&p===xe,L=he()("uppy-StatusBar-progress",{"is-indeterminate":function(){switch(p){case Ae:case Ee:{const{mode:e}=de(f);return"indeterminate"===e}case De:return!m;default:return!1}}()});return S("div",{className:he()("uppy-StatusBar",`is-${p}`,{"has-ghosts":y}),"aria-hidden":x},S("div",{className:L,style:{width:`${N}%`},role:"progressbar","aria-label":`${N}%`,"aria-valuetext":`${N}%`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":A}),(()=>{switch(p){case Ee:case Ae:return S(Pe,{progress:de(f)});case xe:return S(Te,{i18n:w});case ke:return S(ProgressBarError,{error:o,i18n:w,numUploads:T,complete:k});case De:return S(Ce,{i18n:w,supportsUploadProgress:m,totalProgress:c,showProgressDetails:C,isUploadStarted:v,isAllComplete:F,isAllPaused:n,newFiles:t,numUploads:T,complete:k,totalUploadedSize:D,totalSize:O,totalETA:E,startUpload:P});default:return null}})(),S("div",{className:"uppy-StatusBar-actions"},d||I?S(me,{newFiles:t,isUploadStarted:v,recoveredState:d,i18n:w,isSomeGhost:y,startUpload:P,uploadState:p}):null,R?S(ge,{i18n:w,uppy:_}):null,B?S(be,{isAllPaused:n,i18n:w,isAllComplete:F,resumableUploads:r,uppy:_}):null,U?S(ye,{i18n:w,uppy:_}):null,M?S(ve,{i18n:w,doneButtonHandler:b}):null))}Ne.defaultProps={doneButtonHandler:void 0,hideAfterFinish:!1,hideCancelButton:!1,hidePauseResumeButton:!1,hideRetryButton:!1,hideUploadButton:void 0,showProgressDetail
2s:void 0};const Ie={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 Ue(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Be=0;function Re(e){return"__private_"+Be+++"_"+e}function Me(e,t,i,s){if(e)return le.STATE_ERROR;if(t)return le.STATE_COMPLETE;if(i)return le.STATE_WAITING;let n=le.STATE_WAITING;const r=Object.keys(s);for(let e=0;e<r.length;e++){const{progress:t}=s[r[e]];if(t.uploadStarted&&!t.uploadComplete)return le.STATE_UPLOADING;t.preprocess&&(n=le.STATE_PREPROCESSING),t.postprocess&&n!==le.STATE_PREPROCESSING&&(n=le.STATE_POSTPROCESSING)}return n}const Le={target:"body",hideUploadButton:!1,hideRetryButton:!1,hidePauseResumeButton:!1,hideCancelButton:!1,showProgressDetails:!1,hideAfterFinish:!0,doneButtonHandler:null};var ze=Re("lastUpdateTime"),je=Re("previousUploadedBytes"),qe=Re("previousSpeed"),$e=Re("previousETA"),He=Re("computeSmoothETA"),Ve=Re("onUploadStart");class We extends oe{constructor(e,t){super(e,{...Le,...t}),Object.defineProperty(this,He,{value:Ge}),Object.defineProperty(this,ze,{writable:!0,value:void 0}),Object.defineProperty(this,je,{writable:!0,value:void 0}),Object.defineProperty(this,qe,{writable:!0,value:void 0}),Object.defineProperty(this,$e,{writable:!0,value:void 0}),this.startUpload=()=>this.uppy.upload().catch(()=>{}),Object.defineProperty(this,Ve,{writable:!0,value:()=>{const{recoveredState:e}=this.uppy.getState();if(Ue(this,qe)[qe]=null,Ue(this,$e)[$e]=null,e)return Ue(this,je)[je]=Object.values(e.files).reduce((e,t)=>{let{progress:i}=t;return e+i.bytesUploaded},0),void this.uppy.emit("restore-confirmed");Ue(this,ze)[ze]=performance.now(),Ue(this,je)[je]=0}}),this.id=this.opts.id||"StatusBar",this.title="StatusBar",this.type="progressindicator",this.defaultLocale=Ie,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:r,recoveredState:o}=e,{newFiles:a,startedFiles:l,completeFiles:u,isUploadStarted:h,isAllComplete:d,isAllErrored:p,isAllPaused:c,isUploadInProgress:f,isSomeGhost:m}=this.uppy.getObjectOfFilesPerState(),g=o?Object.values(i):a,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 P=Ue(this,He)[He]({uploaded:w,total:v,remaining:v-w});return Ne({error:r,uploadState:Me(r,d,o,e.files||{}),allowNewUpload:s,totalProgress:n,totalSize:v,totalUploadedSize:w,isAllComplete:!1,isAllPaused:c,isAllErrored:p,isUploadStarted:h,isUploadInProgress:f,isSomeGhost:m,recoveredState:o,complete:u.length,newFiles:g.length,numUploads:l.length,totalETA:P,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;Z(e)||(e.dir="ltr")}install(){const{target:e}=this.opts;e&&this.mount(e,this),this.uppy.on("upload",Ue(this,Ve)[Ve]),Ue(this,ze)[ze]=performance.now(),Ue(this,je)[je]=this.uppy.getFiles().reduce((e,t)=>e+t.progress.bytesUploaded,0)}uninstall(){this.unmount(),this.uppy.off("upload",Ue(this,Ve)[Ve])}}function Ge(e){var t;if(0===e.total||0===e.remaining)return 0;null!=(t=Ue(this,ze))[ze]||(t[ze]=performance.now());const i=performance.now()-Ue(this,ze)[ze];var s;if(0===i)return Math.round((null!=(s=Ue(this,$e)[$e])?s:0)/100)/10;const n=e.uploaded-Ue(this,je)[je];var r;if(Ue(this,je)[je]=e.uploaded,n<=0)return Math.round((null!=(r=Ue(this,$e)[$e])?r:0)/100)/10;const o=n/i,a=null==Ue(this,qe)[qe]?o:ae(o,Ue(this,qe)[qe],2e3,i);Ue(this,qe)[qe]=a;
2const l=e.remaining/a,u=Math.max(Ue(this,$e)[$e]-i,0),h=null==Ue(this,$e)[$e]?l:ae(l,u,2e3,i);return Ue(this,$e)[$e]=h,Ue(this,ze)[ze]=performance.now(),Math.round(h/100)/10}We.VERSION="3.3.3";class Ke extends k{constructor(){super(...arguments),this.ref={current:null}}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 S("div",{className:"uppy-Informer-animated",ref:this.ref},e)}}function Xe(e,t){var i;return null!=(i=null==e?void 0:e.key)?i:t}function Ye(e){const t={};for(let i=0;i<e.length;i++)if(null!=e[i]){t[Xe(e[i],i.toString(36))]=e[i]}return t}function Qe(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 r={};for(const e in t){if(s.hasOwnProperty(e))for(let t=0;t<s[e].length;t++){const n=s[e][t];r[s[e][t]]=i(n)}r[e]=i(e)}for(let e=0;e<n.length;e++)r[n[e]]=i(n[e]);return r}class Je extends k{constructor(e,t){super(e,t),this.refs={},this.state={children:Ye(B(B(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=Ye(B(e.children)||[]),i=this.state.children;let s;for(s in this.setState(e=>({children:Qe(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=Ye(B(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=Ye(B(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=Ye(B(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:r,transitionEnter:o,transitionLeaveTimeout:a,transitionEnterTimeout:l,transitionAppearTimeout:u,component:h,...d}=e,{children:p}=t;const c=Object.entries(p).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 Y(i(s),{ref:n,key:t})}
2).filter(Boolean);return S(h,d,c)}}Je.defaultProps={component:"span",childFactory:e=>e};const Ze=Je;class et extends oe{constructor(e,t){super(e,t),this.render=e=>S("div",{className:"uppy uppy-Informer"},S(Ze,null,e.info.map(e=>S(Ke,{key:e.message},S("p",{role:"alert"},e.message," ",e.details&&S("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)}}et.VERSION="3.1.0";i(96660),i(64219),i(42142),i(46834),i(64139),i(1203),i(49489),i(76676),i(64149),i(70060),i(7051),i(70504),i(47646),i(54040),i(56416),i(68970),i(50062);const tt=/^data:([^/]+\/[^,;]+(?:[^,]*?))(;base64)?,([\s\S]*)$/;const it=function(e,t,i){var s,n;const r=tt.exec(e),o=null!=(s=null!=(n=t.mimeType)?n:null==r?void 0:r[1])?s:"plain/text";let a;if(null!=(null==r?void 0:r[2])){const e=atob(decodeURIComponent(r[3])),t=new Uint8Array(e.length);for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);a=[t]}else null!=(null==r?void 0:r[3])&&(a=[decodeURIComponent(r[3])]);return i?new File(a,t.name||"",{type:o}):new Blob(a,{type:o})};function st(e){return e.startsWith("blob:")}function nt(e){return!!e&&/^[^/]+\/(jpe?g|gif|png|svg|svg\+xml|bmp|webp|avif)$/.test(e)}function rt(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var ot="undefined"!=typeof self?self:i.g;const at="undefined"!=typeof navigator,lt=at&&"undefined"==typeof HTMLImageElement,ut=!(void 0===i.g||"undefined"==typeof process||!process.versions||!process.versions.node),ht=ot.Buffer,dt=!!ht,pt=e=>void 0!==e;function ct(e){return void 0===e||(e instanceof Map?0===e.size:0===Object.values(e).filter(pt).length)}function ft(e){let t=new Error(e);throw delete t.stack,t}function mt(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 gt=e=>String.fromCharCode.apply(null,e),yt="undefined"!=typeof TextDecoder?new TextDecoder("utf-8"):void 0;class bt{static from(e,t){return e instanceof this&&e.le===t?e:new bt(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 bt){void 0===i&&(i=e.byteLength-t),(t+=e.byteOffset)+i>e.byteOffset+e.byteLength&&ft("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 ft("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=bt){return e instanceof DataView||e instanceof bt?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e instanceof Uint8Array||ft("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 bt(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),yt?yt.decode(i):dt?Buffer.from(i).toString("utf8"):decodeURIComponent(escape(gt(i)));var i}getLatin1String(e=0,t=this.byteLength){let i=this.getUint8Array(e,t);return gt(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 gt(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)}
2getFloat(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 vt(e,t){ft(`${e} '${t}' was not loaded, try using full build of exifr.`)}class wt extends Map{constructor(e){super(),this.kind=e}get(e,t){return this.has(e)||vt(this.kind,e),t&&(e in t||function(e,t){ft(`Unknown ${e} '${t}'.`)}(this.kind,e),t[e].enabled||vt(this.kind,e)),super.get(e)}keyList(){return Array.from(this.keys())}}var Pt=new wt("file parser"),_t=new wt("segment parser"),Ft=new wt("file reader");let St=ot.fetch;function Ct(e,t){return(i=e).startsWith("data:")||i.length>1e4?kt(e,t,"base64"):ut&&e.includes("://")?Tt(e,t,"url",Ot):ut?kt(e,t,"fs"):at?Tt(e,t,"url",Ot):void ft("Invalid input argument");var i}async function Tt(e,t,i,s){return Ft.has(i)?kt(e,t,i):s?async function(e,t){let i=await t(e);return new bt(i)}(e,s):void ft(`Parser ${i} is not loaded`)}async function kt(e,t,i){let s=new(Ft.get(i))(e,t);return await s.read(),s}const Ot=e=>St(e).then(e=>e.arrayBuffer()),Et=e=>new Promise((t,i)=>{let s=new FileReader;s.onloadend=()=>t(s.result||new ArrayBuffer),s.onerror=i,s.readAsArrayBuffer(e)});class Dt 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 At(e,t,i){let s=new Dt;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 xt(e,t,i){let s,n=e.get(t);for(s of i)n.set(s[0],s[1])}const Nt=new Map,It=new Map,Ut=new Map,Bt=["chunked","firstChunkSize","firstChunkSizeNode","firstChunkSizeBrowser","chunkSize","chunkLimit"],Rt=["jfif","xmp","icc","iptc","ihdr"],Mt=["tiff",...Rt],Lt=["ifd0","ifd1","exif","gps","interop"],zt=[...Mt,...Lt],jt=["makerNote","userComment"],qt=["translateKeys","translateValues","reviveValues","multiSegment"],$t=[...qt,"sanitize","mergeOutput","silentErrors"];class Ht{get translate(){return this.translateKeys||this.translateValues||this.reviveValues}}class Vt extends Ht{get needed(){return this.enabled||this.deps.size>0}constructor(e,t,i,s){if(super(),rt(this,"enabled",!1),rt(this,"skip",new Set),rt(this,"pick",
vendor: 22,045 bytes, line 2
2new Set),rt(this,"deps",new Set),rt(this,"translateKeys",!1),rt(this,"translateValues",!1),rt(this,"reviveValues",!1),this.key=e,this.enabled=t,this.parse=this.enabled,this.applyInheritables(s),this.canBeFiltered=Lt.includes(e),this.canBeFiltered&&(this.dict=Nt.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:ft(`Invalid options argument: ${i}`)}applyInheritables(e){let t,i;for(t of qt)i=e[t],void 0!==i&&(this[t]=i)}translateTagSet(e,t){if(this.dict){let i,s,{tagKeys:n,tagValues:r}=this.dict;for(i of e)"string"==typeof i?(s=r.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,Qt(this.pick,this.deps)):this.enabled&&this.pick.size>0&&Qt(this.pick,this.deps)}}var Wt={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},Gt=new Map;class Kt extends Ht{static useCached(e){let t=Gt.get(e);return void 0!==t||(t=new this(e),Gt.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):ft(`Invalid options argument ${e}`),void 0===this.firstChunkSize&&(this.firstChunkSize=at?this.firstChunkSizeBrowser:this.firstChunkSizeNode),this.mergeOutput&&(this.ifd1.enabled=!1),this.filterNestedSegmentTags(),this.traverseTiffDependencyTree(),this.checkLoadedPlugins()}setupFromUndefined(){let e;for(e of Bt)this[e]=Wt[e];for(e of $t)this[e]=Wt[e];for(e of jt)this[e]=Wt[e];for(e of zt)this[e]=new Vt(e,Wt[e],void 0,this)}setupFromTrue(){let e;for(e of Bt)this[e]=Wt[e];for(e of $t)this[e]=Wt[e];for(e of jt)this[e]=!0;for(e of zt)this[e]=new Vt(e,!0,void 0,this)}setupFromArray(e){let t;for(t of Bt)this[t]=Wt[t];for(t of $t)this[t]=Wt[t];for(t of jt)this[t]=Wt[t];for(t of zt)this[t]=new Vt(t,!1,void 0,this);this.setupGlobalFilters(e,void 0,Lt)}setupFromObject(e){let t;for(t of(Lt.ifd0=Lt.ifd0||Lt.image,Lt.ifd1=Lt.ifd1||Lt.thumbnail,Object.assign(this,e),Bt))this[t]=Yt(e[t],Wt[t]);for(t of $t)this[t]=Yt(e[t],Wt[t]);for(t of jt)this[t]=Yt(e[t],Wt[t]);for(t of Mt)this[t]=new Vt(t,Wt[t],e[t],this);for(t of Lt)this[t]=new Vt(t,Wt[t],e[t],this.tiff);this.setupGlobalFilters(e.pick,e.skip,Lt,zt),!0===e.tiff?this.batchEnableWithBool(Lt,!0):!1===e.tiff?this.batchEnableWithUserValue(Lt,e):Array.isArray(e.tiff)?this.setupGlobalFilters(e.tiff,void 0,Lt):"object"==typeof e.tiff&&this.setupGlobalFilters(e.tiff.pick,e.tiff.skip,Lt)}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=Xt(e,i);for(let[e,i]of t)Qt(this[e].pick,i),this[e].enabled=!0}else if(t&&t.length){let e=Xt(t,i);for(let[t,i]of e)Qt(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=Lt.some(e=>!0===this[e].enabled)||this.makerNote||this.userComment;for(let e of Lt)this[e].finalizeFilters()}get onlyTiff(){return!Rt.map(e=>this[e].enabled).some(e=>!0===e)&&this.tiff.enabled}checkLoadedPlugins(){for(let e of Mt)this[e].enabled&&!_t.has(e)&&vt("segment parser",e)}}function Xt(e,t){let i,s,n,r,o=[];for(n of t){for(r of(i=Nt.get(n),s=[],i))(e.includes(r[0])||e.includes(r[1]))&&s.push(r[0]);s.length&&o.push([n,s])}return o}function Yt(e,t){return void 0!==e?e:void 0!==t?t:void 0}function Qt(e,t){for(let i of t)e.add(i)}rt(Kt,"default",Wt);class Jt{constructor(e){rt(this,"parsers",{}),rt(this,"output",{}),rt(this,"errors",[]),rt(this,"pushToErrors",e=>this.errors.push(e)),this.options=Kt.useCached(e)}async read(e){this.file=await function(e,t){return"string"==typeof e?Ct(e,t):at&&!lt&&e instanceof HTMLImageElement?Ct(e.src,t):e instanceof Uint8Array||e instanceof ArrayBuffer||e instanceof DataView?new bt(e):at&&e instanceof Blob?Tt(e,t,"blob",Et):void ft("Invalid input argument")}(e,this.options)}setup(){if(this.fileParser)return;let{file:e}=this,t=e.getUint16(0);for(let[i,s]of Pt)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(),ft("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),ct(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=_t.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),r=this.parsers.tiff=new i(n,e,t),o=await r.extractThumbnail();return t.close&&t.close(),o}}async function Zt(e,t){let i=new Jt(t);return await i.read(e),i.parse()}var ei=Object.freeze({__proto__:null,parse:Zt,Exifr:Jt,fileParsers:Pt,segmentParsers:_t,fileReaders:Ft,tagKeys:Nt,tagValues:It,tagRevivers:Ut,createDictionary:At,extendDictionary:xt,fetchUrlAsArrayBuffer:Ot,readBlobAsArrayBuffer:Et,chunkedProps:Bt,otherSegments:Rt,segments:Mt,tiffBlocks:Lt,segmentsAndBlocks:zt,tiffExtractables:jt,inheritables:qt,allFormatters:$t,Options:Kt});class ti{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,r=i-s;return{offset:t,length:i,headerLength:s,start:n,size:r,end:n+r}}static parse(e,t={}){return new this(e,new Kt({[this.type]:t}),e).parse()}normalizeInput(e){return e instanceof bt?e:new bt(e)}constructor(e,t={},i){rt(this,"errors",[]),rt(this,"raw",new Map),rt(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=Ut.get(t),s=It.get(t),n=Nt.get(t),r=this.options[t],o=r.reviveValues&&!!i,a=r.translateValues&&!!s,l=r.translateKeys&&!!n,u={};for(let[t,r]of e)o&&i.has(t)?r=i.get(t)(r):a&&s.has(t)&&(r=this.translateValue(r,s.get(t))),l&&n.has(t)&&(t=n.get(t)||t),u[t]=r;return u}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 ii(e){return 192===e||194===e||196===e||219===e||221===e||218===e||254===e}function si(e){return e>=224&&e<=239}function ni(e,t,i){for(let[s,n]of _t)if(n.canHandle(e,t,i))return s}rt(ti,"headerLength",4),rt(ti,"type",void 0),rt(ti,"multiSegment",!1),rt(ti,"canHandle",()=>!1);class ri extends class{constructor(e,t,i){rt(this,"errors",[]),rt(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){ft(`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):ft("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(_t.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),rt(this,"appSegments",[]),rt(this,"jpegSegments",[]),rt(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(_t.keyList())):(e=void 0===e?_t.keyList().filter(e=>this.options[e].enabled):e.filter(e=>this.options[e].enabled&&_t.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:r}=this;if(!s&&this.file.chunked&&(s=Array.from(n).some(e=>{let t=_t.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(;r.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,r,o,a,{file:l,findAll:u,wanted:h,remaining:d,options:p}=this;for(;e<t;e++)if(255===l.getUint8(e))if(i=l.getUint8(e+1),si(i)){if(s=l.getUint16(e+2),n=ni(l,e,s),n&&h.has(n)&&(r=_t.get(n),o=r.findPosition(l,e),a=p[n],o.type=n,this.appSegments.push(o),!u&&(r.multiSegment&&a.multiSegment?(this.unfinishedMultiSegment=o.chunkNumber<o.chunkCount,this.unfinishedMultiSegment||d.delete(n)):d.delete(n),0===d.size)))break;p.recordUnknownSegments&&(o=ti.findPosition(l,e),o.marker=i,this.unknownSegments.push(o)),e+=s+1}else if(ii(i)){if(s=l.getUint16(e+2),218===i&&!1!==p.stopAfterSos)return;p.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){let t,i,s,n=new Map;for(let r=0;r<e.length;r++)t=e[r],i=t.type,n.has(i)?s=n.get(i):n.set(i,s=[]),s.push(t);return Array.from(n)}(this.appSegments);this.mergedAppSegments=e.map(([e,t])=>{let i=_t.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}}rt(ri,"type","jpeg"),Pt.set("jpeg",ri);const oi=[void 0,1,1,2,4,8,1,1,2,4,8,4,8,4];class ai extends ti{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 r=s.size>0,o=0===n.size,a=this.chunk.getUint16(e);e+=2;for(let l=0;l<a;l++){let a=this.chunk.getUint16(e);if(r){if(s.has(a)&&(i.set(a,this.parseTag(e,a,t)),s.delete(a),0===s.size))break}else!o&&n.has(a)||i.set(a,this.parseTag(e,a,t));e+=12}return i}parseTag(e,t,i){let{chunk:s}=this,n=s.getUint16(e+2),r=s.getUint32(e+4),o=oi[n];if(o*r<=4?e+=8:e=s.getUint32(e+8),(n<1||n>13)&&ft(`Invalid TIFF value type. block: ${i.toUpperCase()}, tag: ${t.toString(16)}, type: ${n}, offset ${e}`),e>s.byteLength&&ft(`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,r);if(2===n)return""===(a=function(e){for(;e.endsWith("\0");)e=e.slice(0,-1);return e}(a=s.getString(e,r)).trim())?void 0:a;var a;if(7===n)return s.getUint8Array(e,r);if(1===r)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))(r),i=o;for(let s=0;s<r;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:ft(`Invalid tiff type ${e}`)}}}class li extends ai{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&&ft("Malformed EXIF data"),!e.chunked&&this.ifd0Offset>e.byteLength&&ft(`IFD0 offset points to outside of file.\nthis.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e.byteLength}`),e.tiff&&await e.ensureChunk(this.ifd0Offset,mt(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,mt(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",ui(...e.get(2),e.get(1))),e.set("longitude",ui(...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 Lt)if(e=this[t],!ct(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 ui(e,t,i,s){var n=e+t/60+i/3600;return"S"!==s&&"W"!==s||(n*=-1),n}rt(li,"type","tiff"),rt(li,"headerLength",10),_t.set("tiff",li);Object.freeze({__proto__:null,default:ei,Exifr:Jt,fileParsers:Pt,segmentParsers:_t,fileReaders:Ft,tagKeys:Nt,tagValues:It,tagRevivers:Ut,createDictionary:At,extendDictionary:xt,fetchUrlAsArrayBuffer:Ot,readBlobAsArrayBuffer:Et,chunkedProps:Bt,otherSegments:Rt,segments:Mt,tiffBlocks:Lt,segmentsAndBlocks:zt,tiffExtractables:jt,inheritables:qt,allFormatters:$t,Options:Kt,parse:Zt});const hi={ifd0:!1,ifd1:!1,exif:!1,gps:!1,interop:!1,sanitize:!1,reviveValues:!0,translateKeys:!1,translateValues:!1,mergeOutput:!1};Object.assign({},hi,{firstChunkSize:4e4,gps:[1,2,3,4]});Object.assign({},hi,{tiff:!1,ifd1:!0,mergeOutput:!1});const di=Object.assign({},hi,{firstChunkSize:4e4,ifd0:[274]});const pi=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 ci=!0,fi=!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);ci=s<13.4,fi=!1}}else if(e.includes("OS X 10")){let[,t]=e.match(/OS X 10[_.](\d+)/);ci=fi=Number(t)<15}if(e.includes("Chrome/")){let[,t]=e.match(/Chrome\/(\d+)/);ci=fi=Number(t)<81}else if(e.includes("Firefox/")){let[,t]=e.match(/Firefox\/(\d+)/);ci=fi=Number(t)<77}}async function mi(e){let t=await async function(e){let t=new Jt(di);await t.read(e);let i=await t.parse();if(i&&i.ifd0)return i.ifd0[274]}(e);return Object.assign({canvas:ci,css:fi},pi[t])}class gi extends bt{constructor(...e){super(...e),rt(this,"ranges",new yi),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=dt?ht.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 yi{constructor(){rt(this,"list",[])}get length(){return this.list.length}add(e,t,i=0){let s=e+t,n=this.list.filter(t=>bi(e,t.offset,s)||bi(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 bi(e,t,i){return e<=t&&t<=i}class vi extends gi{constructor(e,t){super(0),rt(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(){}}Ft.set("blob",class extends vi{async readWhole(){this.chunked=!1;let e=await Et(this.input);this._swapArrayBuffer(e)}readChunked(){return this.chunked=!0,this.size=this.input.size,super.readChunked()}
2async _readChunk(e,t){let i=t?e+t:void 0,s=this.input.slice(e,i),n=await Et(s);return this.set(n,e,!0)}});const wi={strings:{generatingThumbnails:"Generating thumbnails..."}};const Pi={thumbnailWidth:null,thumbnailHeight:null,thumbnailType:"image/jpeg",waitForThumbnailsBeforeUpload:!1,lazy:!1};class _i extends oe{constructor(e,t){if(super(e,{...Pi,...t}),this.onFileAdded=e=>{!e.preview&&e.data&&nt(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&&st(e.preview)&&URL.revokeObjectURL(e.preview)},this.onRestored=()=>{this.uppy.getFiles().filter(e=>e.isRestored).forEach(e=>{e.preview&&!st(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=wi,this.i18nInit(),this.opts.lazy&&this.opts.waitForThumbnailsBeforeUpload)throw new Error("Thumbn
2ailGenerator: 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"))})}),r=mi(e.data).catch(()=>1);return Promise.all([n,r]).then(e=>{let[s,n]=e;const r=this.getProportionalDimensions(s,t,i,n.deg),o=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 r=n.getContext("2d");return r.translate(i/2,s/2),t.canvas&&(r.rotate(t.rad),r.scale(t.scaleX,t.scaleY)),r.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(()=>it(e.toDataURL(t,i),{})).then(e=>{if(null===e)throw new Error("could not extract blob, probably an old browser");return e})}(this.resizeImage(o,r.width,r.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)),r=Math.floor(i/Math.sqrt(i*t));if(n>s&&(n=s,r=Math.round(n/t)),r>s&&(r=s,n=Math.round(t*r)),e.width>n){const t=document.createElement("canvas");return t.width=n,t.height=r,t.getContext("2d").drawImage(e,0,0,n,r),t}return e}(e),n=Math.ceil(Math.log2(s.width/t));n<1&&(n=1);let r=t*2**(n-1),o=i*2**(n-1);for(;n--;){const e=document.createElement("canvas");e.width=r,e.height=o,e.getContext("2d").drawImage(s,0,0,r,o),s=e,r=Math.round(r/2),o=Math.round(o/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 nt(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)}}_i.VERSION="3.1.0";const Fi=function(e){if("string"==typeof e){const t=document.querySelectorAll(e);return 0===t.length?null:Array.from(t)}return"object"==typeof e&&Q(e)?[e]:null};var Si=i(71666),Ci=i(87874),Ti=i(89870);
2class TimeoutError extends Error{constructor(e){super(e),this.name="TimeoutError"}}class AbortError extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const getDOMException=e=>void 0===globalThis.DOMException?new AbortError(e):new DOMException(e),ki=e=>{const t=void 0===e.reason?getDOMException("This operation was aborted."):e.reason;return t instanceof Error?t:getDOMException(t)};var Oi,Ei=function(e,t,i,s){if("a"===i&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(e):s?s.value:t.get(e)};Oi=new WeakMap;const Di=class{constructor(){Oi.set(this,[])}enqueue(e,t){const i={priority:(t={priority:0,...t}).priority,run:e};if(this.size&&Ei(this,Oi,"f")[this.size-1].priority>=t.priority)return void Ei(this,Oi,"f").push(i);const s=function(e,t,i){let s=0,n=e.length;for(;n>0;){const r=Math.trunc(n/2);let o=s+r;i(e[o],t)<=0?(s=++o,n-=r+1):n=r}return s}(Ei(this,Oi,"f"),i,(e,t)=>t.priority-e.priority);Ei(this,Oi,"f").splice(s,0,i)}dequeue(){const e=Ei(this,Oi,"f").shift();return null==e?void 0:e.run}filter(e){return Ei(this,Oi,"f").filter(t=>t.priority===e.priority).map(e=>e.run)}get size(){return Ei(this,Oi,"f").length}};var Ai,xi,Ni,Ii,Ui,Bi,Ri,Mi,Li,zi,ji,qi,$i,Hi,Vi,Wi,Gi,Ki,Xi,Yi,Qi,Ji,Zi,es,ts,is,ss=function(e,t,i,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,i):n?n.value=i:t.set(e,i),i},ns=function(e,t,i,s){if("a"===i&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(e):s?s.value:t.get(e)};class dist_AbortError extends Error{}class rs extends Ti.b{constructor(e){var t,i,s,n;if(super(),Ai.add(this),xi.set(this,void 0),Ni.set(this,void 0),Ii.set(this,0),Ui.set(this,void 0),Bi.set(this,void 0),Ri.set(this,0),Mi.set(this,void 0),Li.set(this,void 0),zi.set(this,void 0),ji.set(this,void 0),qi.set(this,0),$i.set(this,void 0),Hi.set(this,void 0),Vi.set(this,void 0),Object.defineProperty(this,"timeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),!("number"==typeof(e={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:Di,...e}).intervalCap&&e.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${null!==(i=null===(t=e.intervalCap)||void 0===t?void 0:t.toString())&&void 0!==i?i:""}\` (${typeof e.intervalCap})`);if(void 0===e.interval||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${null!==(n=null===(s=e.interval)||void 0===s?void 0:s.toString())&&void 0!==n?n:""}\` (${typeof e.interval})`);ss(this,xi,e.carryoverConcurrencyCount,"f"),ss(this,Ni,e.intervalCap===Number.POSITIVE_INFINITY||0===e.interval,"f"),ss(this,Ui,e.intervalCap,"f"),ss(this,Bi,e.interval,"f"),ss(this,zi,new e.queueClass,"f"),ss(this,ji,e.queueClass,"f"),this.concurrency=e.concurrency,this.timeout=e.timeout,ss(this,Vi,!0===e.throwOnTimeout,"f"),ss(this,Hi,!1===e.autoStart,"f")}get concurrency(){return ns(this,$i,"f")}set concurrency(e){if(!("number"==typeof e&&e>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);ss(this,$i,e,"f"),ns(this,Ai,"m",es).call(this)}async add(e,t={}){return t={timeout:this.timeout,throwOnTimeout:ns(this,Vi,"f"),...t},new Promise((i,s)=>{ns(this,zi,"f").enqueue(async()=>{var n,r,o;ss(this,qi,(r=ns(this,qi,"f"),++r),"f"),ss(this,Ii,(o=ns(this,Ii,"f"),++o),"f");try{if(null===(n=t.signal)||void 0===n?void 0:n.aborted)throw new dist_AbortError("The task was aborted.");let s=e({signal:t.signal});t.timeout&&(s=function(e,t,i,s){let n;const r=new Promise((r,o)=>{if("number"!=typeof t||1!==Math.sign(t))throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${t}\``);if(t!==Number.POSITIVE_INFINITY){if((s={customTimers:{setTimeout,clearTimeout},...s}).signal){const{signal:e}=s;e.aborted&&o(ki(e)),e.addEventListener("abort",()=>{o(ki(e))})}n=s.customTimers.setTimeout.call(void 0,()=>{if("function"==typeof i){try{r(i())}catch(e){o(e)}return}const s=i instanceof Error?i:new TimeoutError("string"==typeof i?i:`Promise timed out after ${t} milliseconds`);"function"==typeof e.cancel&&e.cancel(),o(s)},t),(async()=>{try{r(await e)}catch(e){o(e)}finally{s.customTimers.clearTimeout.call(void 0,n)}})()}else r(e)});return r.clear=()=>{clearTimeout(n),n=void 0},r}
2(Promise.resolve(s),t.timeout)),t.signal&&(s=Promise.race([s,ns(this,Ai,"m",ts).call(this,t.signal)]));const r=await s;i(r),this.emit("completed",r)}catch(e){if(e instanceof TimeoutError&&!t.throwOnTimeout)return void i();s(e),this.emit("error",e)}finally{ns(this,Ai,"m",Ki).call(this)}},t),this.emit("add"),ns(this,Ai,"m",Qi).call(this)})}async addAll(e,t){return Promise.all(e.map(async e=>this.add(e,t)))}start(){return ns(this,Hi,"f")?(ss(this,Hi,!1,"f"),ns(this,Ai,"m",es).call(this),this):this}pause(){ss(this,Hi,!0,"f")}clear(){ss(this,zi,new(ns(this,ji,"f")),"f")}async onEmpty(){0!==ns(this,zi,"f").size&&await ns(this,Ai,"m",is).call(this,"empty")}async onSizeLessThan(e){ns(this,zi,"f").size<e||await ns(this,Ai,"m",is).call(this,"next",()=>ns(this,zi,"f").size<e)}async onIdle(){0===ns(this,qi,"f")&&0===ns(this,zi,"f").size||await ns(this,Ai,"m",is).call(this,"idle")}get size(){return ns(this,zi,"f").size}sizeBy(e){return ns(this,zi,"f").filter(e).length}get pending(){return ns(this,qi,"f")}get isPaused(){return ns(this,Hi,"f")}}xi=new WeakMap,Ni=new WeakMap,Ii=new WeakMap,Ui=new WeakMap,Bi=new WeakMap,Ri=new WeakMap,Mi=new WeakMap,Li=new WeakMap,zi=new WeakMap,ji=new WeakMap,qi=new WeakMap,$i=new WeakMap,Hi=new WeakMap,Vi=new WeakMap,Ai=new WeakSet,Wi=function(){return ns(this,Ni,"f")||ns(this,Ii,"f")<ns(this,Ui,"f")},Gi=function(){return ns(this,qi,"f")<ns(this,$i,"f")},Ki=function(){var e;ss(this,qi,(e=ns(this,qi,"f"),--e),"f"),ns(this,Ai,"m",Qi).call(this),this.emit("next")},Xi=function(){ns(this,Ai,"m",Zi).call(this),ns(this,Ai,"m",Ji).call(this),ss(this,Li,void 0,"f")},Yi=function(){const e=Date.now();if(void 0===ns(this,Mi,"f")){const t=ns(this,Ri,"f")-e;if(!(t<0))return void 0===ns(this,Li,"f")&&ss(this,Li,setTimeout(()=>{ns(this,Ai,"m",Xi).call(this)},t),"f"),!0;ss(this,Ii,ns(this,xi,"f")?ns(this,qi,"f"):0,"f")}return!1},Qi=function(){if(0===ns(this,zi,"f").size)return ns(this,Mi,"f")&&clearInterval(ns(this,Mi,"f")),ss(this,Mi,void 0,"f"),this.emit("empty"),0===ns(this,qi,"f")&&this.emit("idle"),!1;if(!ns(this,Hi,"f")){const e=!ns(this,Ai,"a",Yi);if(ns(this,Ai,"a",Wi)&&ns(this,Ai,"a",Gi)){const t=ns(this,zi,"f").dequeue();
2return!!t&&(this.emit("active"),t(),e&&ns(this,Ai,"m",Ji).call(this),!0)}}return!1},Ji=function(){ns(this,Ni,"f")||void 0!==ns(this,Mi,"f")||(ss(this,Mi,setInterval(()=>{ns(this,Ai,"m",Zi).call(this)},ns(this,Bi,"f")),"f"),ss(this,Ri,Date.now()+ns(this,Bi,"f"),"f"))},Zi=function(){0===ns(this,Ii,"f")&&0===ns(this,qi,"f")&&ns(this,Mi,"f")&&(clearInterval(ns(this,Mi,"f")),ss(this,Mi,void 0,"f")),ss(this,Ii,ns(this,xi,"f")?ns(this,qi,"f"):0,"f"),ns(this,Ai,"m",es).call(this)},es=function(){for(;ns(this,Ai,"m",Qi).call(this););},ts=async function(e){return new Promise((t,i)=>{e.addEventListener("abort",()=>{i(new dist_AbortError("The task was aborted."))},{once:!0})})},is=async function(e,t){return new Promise(i=>{const s=()=>{t&&!t()||(this.off(e,s),i())};this.on(e,s)})};const os=rs;var as,ls,us,hs,ds=i(73354),ps=0,cs=[],fs=n,ms=fs.__b,gs=fs.__r,ys=fs.diffed,bs=fs.__c,vs=fs.unmount,ws=fs.__;function Ps(e,t){fs.__h&&fs.__h(ls,e,ps||t),ps=0;var i=ls.__H||(ls.__H={__:[],__h:[]});return e>=i.__.length&&i.__.push({}),i.__[e]}function _s(e){return ps=1,function(e,t,i){var s=Ps(as++,2);if(s.t=e,!s.__c&&(s.__=[i?i(t):xs(void 0,t),function(e){var t=s.__N?s.__N[0]:s.__[0],i=s.t(t,e);t!==i&&(s.__N=[i,s.__[1]],s.__c.setState({}))}],s.__c=ls,!ls.__f)){var n=function(e,t,i){if(!s.__c.__H)return!0;var n=s.__c.__H.__.filter(function(e){return e.__c});if(n.every(function(e){return!e.__N}))return!r||r.call(this,e,t,i);var o=s.__c.props!==e;return n.some(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),r&&r.call(this,e,t,i)||o};ls.__f=!0;var r=ls.shouldComponentUpdate,o=ls.componentWillUpdate;ls.componentWillUpdate=function(e,t,i){if(this.__e){var s=r;r=void 0,n(e,t,i),r=s}o&&o.call(this,e,t,i)},ls.shouldComponentUpdate=n}return s.__N||s.__}(xs,e)}function Fs(e,t){var i=Ps(as++,3);!fs.__s&&As(i.__H,t)&&(i.__=e,i.u=t,ls.__H.__h.push(i))}function Ss(e,t){var i=Ps(as++,7);return As(i.__H,t)&&(i.__=e(),i.__H=t,i.__h=e),i.__}function Cs(e,t){return ps=8,Ss(function(){return e},t)}function Ts(){for(var e;e=cs.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Es),t.__h.some(Ds),t.__h=[]}catch(i){t.__h=[],fs.__e(i,e.__v)}}}fs.__b=function(e){ls=null,ms&&ms(e)},fs.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ws&&ws(e,t)},fs.__r=function(e){gs&&gs(e),as=0;var t=(ls=e.__c).__H;t&&(us===ls?(t.__h=[],ls.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(Es),t.__h.some(Ds),t.__h=[],as=0)),us=ls},fs.diffed=function(e){ys&&ys(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==cs.push(t)&&hs===fs.requestAnimationFrame||((hs=fs.requestAnimationFrame)||Os)(Ts)),t.__H.__.some(function(e){e.u&&(e.__H=e.u),e.u=void 0})),us=ls=null},fs.__c=function(e,t){t.some(function(e){try{e.__h.some(Es),e.__h=e.__h.filter(function(e){return!e.__||Ds(e)})}catch(i){t.some(function(e){e.__h&&(e.__h=[])}),t=[],fs.__e(i,e.__v)}}),bs&&bs(e,t)},fs.unmount=function(e){vs&&vs(e);var t,i=e.__c;i&&i.__H&&(i.__H.__.some(function(e){try{Es(e)}catch(e){t=e}}),i.__H=void 0,t&&fs.__e(t,i.__v))};var ks="function"==typeof requestAnimationFrame;function Os(e){var t,i=function(){clearTimeout(s),ks&&cancelAnimationFrame(t),setTimeout(e)},s=setTimeout(i,35);ks&&(t=requestAnimationFrame(i))}function Es(e){var t=ls,i=e.__c;"function"==typeof i&&(e.__c=void 0,i()),ls=t}function Ds(e){var t=ls;e.__c=e.__(),ls=t}function As(e,t){return!e||e.length!==t.length||t.some(function(t,i){return t!==e[i]})}function xs(e,t){return"function"==typeof t?t(e):t}function Ns(){return S("svg",{width:"26",height:"26",viewBox:"0 0 26 26",xmlns:"http://www.w3.org/2000/svg"},S("g",{fill:"none","fill-rule":"evenodd"},S("circle",{fill:"#FFF",cx:"13",cy:"13",r:"13"}),S("path",{d:"M21.64 13.205c0-.639-.057-1.252-.164-1.841H13v3.481h4.844a4.14 4.14 0 01-1.796 2.716v2.259h2.908c1.702-1.567 2.684-3.875 2.684-6.615z",fill:"#4285F4","fill-rule":"nonzero"}),S("path",{d:"M13 22c2.43 0 4.467-.806 5.956-2.18l-2.908-2.259c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H4.957v2.332A8.997 8.997 0 0013 22z",fill:"#34A853","fill-rule":"nonzero"}),S("path",{d:"M7.964 14.71A5.41 5.41 0 017.682 13c0-.593.102-1.17.282-1.71V8.958H4.957A8.99
26 8.996 0 004 13c0 1.452.348 2.827.957 4.042l3.007-2.332z",fill:"#FBBC05","fill-rule":"nonzero"}),S("path",{d:"M13 7.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C17.463 4.891 15.426 4 13 4a8.997 8.997 0 00-8.043 4.958l3.007 2.332C8.672 9.163 10.656 7.58 13 7.58z",fill:"#EA4335","fill-rule":"nonzero"}),S("path",{d:"M4 4h18v18H4z"})))}function Is(e){let{pluginName:t,i18n:i,onAuth:s}=e;const n="Google Drive"===t,r=Cs(e=>{e.preventDefault(),s()},[s]);return S("form",{onSubmit:r},n?S("button",{type:"submit",className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Provider-authBtn uppy-Provider-btn-google","data-uppy-super-focusable":!0},S(Ns,null),i("signInWithGoogle")):S("button",{type:"submit",className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Provider-authBtn","data-uppy-super-focusable":!0},i("authenticateWith",{pluginName:t})))}const Us=e=>{let{pluginName:t,i18n:i,onAuth:s}=e;return S(Is,{pluginName:t,i18n:i,onAuth:s})};function Bs(e){const{loading:t,pluginName:i,pluginIcon:s,i18n:n,handleAuth:r,renderForm:o=Us}=e;return S("div",{className:"uppy-Provider-auth"},S("div",{className:"uppy-Provider-authIcon"},s()),S("div",{className:"uppy-Provider-authTitle"},n("authenticateWithTitle",{pluginName:i})),S("div",{className:"uppy-Provider-authForm"},o({pluginName:i,i18n:n,loading:t,onAuth:r})))}function Rs(e){let{i18n:t,logout:i,username:s}=e;return S(T,null,S("span",{className:"uppy-ProviderBrowser-user",key:"username"},s),S("button",{type:"button",onClick:i,className:"uppy-u-reset uppy-c-btn uppy-ProviderBrowser-userLogout",key:"logout"},t("logOut")))}const Ms=e=>{const{getFolder:t,title:i,isLast:s}=e;return S(T,null,S("button",{type:"button",className:"uppy-u-reset uppy-c-btn",onClick:t},i),s?"":" / ")};function Ls(e){const{getFolder:t,title:i,breadcrumbsIcon:s,breadcrumbs:n}=e;return S("div",{className:"uppy-Provider-breadcrumbs"},S("div",{className:"uppy-Provider-breadcrumbsIcon"},s),n.map((e,s)=>S(Ms,{key:e.id,getFolder:()=>t(e.requestPath,e.name),title:0===s?i:e.name,isLast:s+1===n.length})))}function zs(e){return S(T,null,e.showBreadcrumbs&&S(Ls,{getFolder:e.getFolder,breadcrumbs:e.breadcrumbs,breadcrumbsIcon:e.pluginIcon&&e.pluginIcon(),title:e.title}),S(Rs,{logout:e.logout,username:e.username,i18n:e.i18n}))}var js=i(44355);function qs(e){return{...e,type:e.mimeType,extension:e.name?(0,js.A)(e.name).extension:null}}function $s(){return $s=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},$s.apply(this,arguments)}const Hs={position:"relative",width:"100%",minHeight:"100%"},Vs={position:"absolute",top:0,left:0,width:"100%",overflow:"visible"};const Ws=class extends k{constructor(e){super(e),this.handleScroll=()=>{this.setState({offset:this.base.scrollTop})},this.handleResize=()=>{this.resize()},this.focusElement=null,this.state={offset:0,height:0}}componentDidMount(){this.resize(),window.addEventListener("resize",this.handleResize)}componentWillUpdate(){this.base.contains(document.activeElement)&&(this.focusElement=document.activeElement)}componentDidUpdate(){this.focusElement&&this.focusElement.parentNode&&document.activeElement!==this.focusElement&&this.focusElement.focus(),this.focusElement=null,this.resize()}componentWillUnmount(){window.removeEventListener("resize",this.handleResize)}resize(){const{height:e}=this.state;e!==this.base.offsetHeight&&this.setState({height:this.base.offsetHeight})}render(e){let{data:t,rowHeight:i,renderRow:s,overscanCount:n=10,...r}=e;const{offset:o,height:a}=this.state;let l=Math.floor(o/i),u=Math.floor(a/i);n&&(l=Math.max(0,l-l%n),u+=n);const h=l+u+4,d=t.slice(l,h),p={...Hs,height:t.length*i},c={...Vs,top:l*i};return S("div",$s({onScroll:this.handleScroll},r),S("div",{role:"presentation",style:p},S("div",{role:"presentation",style:c},d.map(s))))}};var Gs=i(15475);function Ks(e){const{search:t,searchOnInput:i,searchTerm:s,showButton:n,inputLabel:r,clearSearchLabel:o,buttonLabel:a,clearSearch:l,inputClassName:u,buttonCSSClassName:h}=e,[d,p]=_s(null!=s?s:""),c=Cs(e=>{e.preventDefault(),t(d)},[t,d]),f=Cs(e=>{const s=e.target.value;p(s),i&&t(s)},[p,i,t]),[m]=_s(()=>{const e=document.createElement("form");return e.setAttribute("tabindex","-1"),e.id=(0,Gs.A)(),e});return Fs(()=>(document.body.appendChild(m),m.addEventListener("submit",c),()=>{m.removeEventListener("submit",c),document.body.removeChild(m)}),[m,c]),S(T,null,S("input",{className:`uppy-u-reset ${u}`,type:"search","aria-label":r,placeholder:r,value:d,onInput:f,form:m.id,"data-uppy-super-focusable":!0}),!n&&S("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-ProviderBrowser-searchFilterIcon",width:"12",height:"12",viewBox:"0 0 12 12"},S("path",{d:"M8.638 7.99l3.172 3.172a.492.492 0 1 1-.697.697L7.91 8.656a4.977 4.977 0 0 1-2.983.983C2.206 9.639 0 7.481 0 4.819 0 2.158 2.206 0 4.927 0c2.721 0 4.927 2.158 4.927 4.82a4.74 4.74 0 0 1-1.216 3.17zm-3.71.685c2.176 0 3.94-1.726 3.94-3.856 0-2.129-1.764-3.855-3.94-3.855C2.75.964.984 2.69.984 4.819c0 2.13 1.765 3.856 3.942 3.856z"})),!n&&d&&S("button",{className:"uppy-u-reset uppy-ProviderBrowser-searchFilterReset",type:"button","aria-label":o,title:o,onClick:()=>{p(""),l&&l()}},S("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",viewBox:"0 0 19 19"},S("path",{d:"M17.318 17.232L9.94 9.854 9.586 9.5l-.354.354-7.378 7.378h.707l-.62-.62v.706L9.318 9.94l.354-.354-.354-.354L1.94 1.854v.707l.62-.62h-.706l7.378 7.378.354.354.354-.354 7.378-7.378h-.707l.622.62v-.706L9.854 9.232l-.354.354.354.354 7.378 7.378.708-.707-7.38-7.378v.708l7.38-7.38.353-.353-.353-.353-.622-.622-.353-.353-.354.352-7.378 7.38h.708L2.56 1.23 2.208.88l-.353.353-.622.62-.353.355.352.353 7.38 7.38v-.708l-7.38 7.38-.353.353.352.353.622.622.353.353.354-.353 7.38-7.38h-.708l7.38 7.38z"}))),n&&S("button",{className:`uppy-u-reset uppy-c-btn uppy-c-btn-primary ${h}`,type:"submit",form:m.id},a))}function Xs(e){let{cancel:t,done:i,i18n:s,selected:n}=e;return S("div",{className:"uppy-ProviderBrowser-footer"},S("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary",onClick:i,type:"button"},s("selectX",{smart_count:n})),S("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-link",onClick:t,type:"button"},s("cancel")))}function Ys(){return S("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:11,height:14.5,viewBox:"0 0 44 58"},S("path",{d:"M27.437.517a1 1 0 0 0-.094.03H4.25C2.037.548.217 2.368.217 4.58v48.405c0 2.212 1.82 4.03 4.03 4.03H39.03c2.21 0 4.03-1.818 4.03-4.03V15.61a1 1 0 0 0-.03-.28 1 1 0 0 0 0-.093 1 1 0 0 0-.03-.032 1 1 0 0 0 0-.03 1 1 0 0 0-.032-.063 1 1 0 0 0-.03-.063 1 1 0 0 0-.032 0 1 1 0 0 0-.03-.063 1 1 0 0 0-.032-.03 1 1 0 0 0-.03-.063 1 1 0 0 0-.063-.062l-14.593-14a1 1 0 0 0-.062-.062A1 1 0 0 0 28 .708a1 1 0 0 0-.374-.157 1 1 0 0 0-.156 0 1 1 0 0 0-.03-.03l-.003-.003zM4.25 2.547h22.218v9.97c0 2.21 1.82 4.03 4.03 4.03h10.564v36.438a2.02 2.02 0 0 1-2.032 2.032H4.25c-1.13 0-2.032-.9-2.032-2.032V4.58c0-1.13.902-2.032 2.03-2.032zm24.218 1.345l10.375 9.937.75.718H30.5c-1.13 0-2.032-.9-2.032-2.03V3.89z"}))}function Qs(){return S("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",style:{minWidth:16,marginRight:3},viewBox:"0 0 276.157 276.157"}
2,S("path",{d:"M273.08 101.378c-3.3-4.65-8.86-7.32-15.254-7.32h-24.34V67.59c0-10.2-8.3-18.5-18.5-18.5h-85.322c-3.63 0-9.295-2.875-11.436-5.805l-6.386-8.735c-4.982-6.814-15.104-11.954-23.546-11.954H58.73c-9.292 0-18.638 6.608-21.737 15.372l-2.033 5.752c-.958 2.71-4.72 5.37-7.596 5.37H18.5C8.3 49.09 0 57.39 0 67.59v167.07c0 .886.16 1.73.443 2.52.152 3.306 1.18 6.424 3.053 9.064 3.3 4.652 8.86 7.32 15.255 7.32h188.487c11.395 0 23.27-8.425 27.035-19.18l40.677-116.188c2.11-6.035 1.43-12.164-1.87-16.816zM18.5 64.088h8.864c9.295 0 18.64-6.607 21.738-15.37l2.032-5.75c.96-2.712 4.722-5.373 7.597-5.373h29.565c3.63 0 9.295 2.876 11.437 5.806l6.386 8.735c4.982 6.815 15.104 11.954 23.546 11.954h85.322c1.898 0 3.5 1.602 3.5 3.5v26.47H69.34c-11.395 0-23.27 8.423-27.035 19.178L15 191.23V67.59c0-1.898 1.603-3.5 3.5-3.5zm242.29 49.15l-40.676 116.188c-1.674 4.78-7.812 9.135-12.877 9.135H18.75c-1.447 0-2.576-.372-3.02-.997-.442-.625-.422-1.814.057-3.18l40.677-116.19c1.674-4.78 7.812-9.134 12.877-9.134h188.487c1.448 0 2.577.372 3.02.997.443.625.423 1.814-.056 3.18z"}))}function Js(){return S("svg",{"aria-hidden":"true",focusable:"false",style:{width:16,marginRight:4},viewBox:"0 0 58 58"},S("path",{d:"M36.537 28.156l-11-7a1.005 1.005 0 0 0-1.02-.033C24.2 21.3 24 21.635 24 22v14a1 1 0 0 0 1.537.844l11-7a1.002 1.002 0 0 0 0-1.688zM26 34.18V23.82L34.137 29 26 34.18z"}),S("path",{d:"M57 6H1a1 1 0 0 0-1 1v44a1 1 0 0 0 1 1h56a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1zM10 28H2v-9h8v9zm-8 2h8v9H2v-9zm10 10V8h34v42H12V40zm44-12h-8v-9h8v9zm-8 2h8v9h-8v-9zm8-22v9h-8V8h8zM2 8h8v9H2V8zm0 42v-9h8v9H2zm54 0h-8v-9h8v9z"}))}function Zs(e){const{itemIconString:t}=e;if(null===t)return null;switch(t){case"file":return S(Ys,null);case"folder":return S(Qs,null);case"video":return S(Js,null);default:{const{alt:i}=e;return S("img",{src:t,alt:i,referrerPolicy:"no-referrer",loading:"lazy",width:16,height:16})}}}const en=function(e){const{className:t,isDisabled:i,restrictionError:s,isChecked:n,title:r,itemIconEl:o,showTitles:a,toggleCheckbox:l,recordShiftKeyPress:u,id:h,children:d}=e,p=he()("uppy-u-reset","uppy-ProviderBrowserItem-checkbox","uppy-ProviderBrowserItem-checkbox--grid",{"uppy-ProviderBrowserItem-checkbox--is-checked":n});return S("li",{className:t,title:i?null==s?void 0:s.message:void 0},S("input",{type:"checkbox",className:p,onChange:l,onKeyDown:u,onMouseDown:u,name:"listitem",id:h,checked:n,disabled:i,"data-uppy-super-focusable":!0}),S("label",{htmlFor:h,"aria-label":r,className:"uppy-u-reset uppy-ProviderBrowserItem-inner"},o,a&&r,d))};function tn(e){const{className:t,isDisabled:i,restrictionError:s,isCheckboxDisabled:n,isChecked:r,toggleCheckbox:o,recordShiftKeyPress:a,type:l,id:u,itemIconEl:h,title:d,handleFolderClick:p,showTitles:c,i18n:f}=e;return S("li",{className:t,title:i?null==s?void 0:s.message:void 0},n?null:S("input",{type:"checkbox",className:"uppy-u-reset uppy-ProviderBrowserItem-checkbox "+(r?"uppy-ProviderBrowserItem-checkbox--is-checked":""),onChange:o,onKeyDown:a,onMouseDown:a,name:"listitem",id:u,checked:r,"aria-label":"file"===l?null:f("allFilesFromFolderNamed",{name:d}),disabled:i,"data-uppy-super-focusable":!0}),"file"===l?S("label",{htmlFor:u,className:"uppy-u-reset uppy-ProviderBrowserItem-inner"},S("div",{className:"uppy-ProviderBrowserItem-iconWrap"},h),c&&d):S("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-ProviderBrowserItem-inner",onClick:p,"aria-label":f("openFolderNamed",{name:d})},S("div",{className:"uppy-ProviderBrowserItem-iconWrap"},h),c&&d?S("span",null,d):f("unnamed")))}function sn(){return sn=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},sn.apply(this,arguments)}function nn(e){const{author:t,getItemIcon:i,isChecked:s,isDisabled:n,viewType:r}=e,o=i(),a=he()("uppy-ProviderBrowserItem",{"uppy-ProviderBrowserItem--selected":s},{"uppy-ProviderBrowserItem--disabled":n},{"uppy-ProviderBrowserItem--noPreview":"video"===o}),l=S(Zs,{itemIconString:o});switch(r){case"grid":return S(en,sn({},e,{className:a,itemIconEl:l}));case"list":return S(tn,sn({},e,{className:a,itemIconEl:l}));case"unsplash":return S(en,sn({},e,{className:a,itemIconEl:l}),S("a",{href:`${t.url}?utm_source=Companion&utm_medium=referral`,target:"_blank",rel:"noopener noreferrer",className:"uppy-ProviderBrowserItem-author",tabIndex:-1},t.name));default:throw new Error(`There is no such type ${r}`)}}function rn(e){const{currentSelection:t,uppyFiles:i,viewType:s,isChecked:n,toggleCheckbox:r,recordShiftKeyPress:o,showTitles:a,i18n:l,validateRestrictions:u,getNextFolder:h,f:d}=e;if(d.isFolder)return nn({showTitles:a,viewType:s,i18n:l,id:d.id,title:d.name,getItemIcon:()=>d.icon,isChecked:n(d),toggleCheckbox:e=>r(e,d),recordShiftKeyPress:o,type:"folder",isDisabled:!1,isCheckboxDisabled:"shared-with-me"===d.id,handleFolderClick:()=>h(d)});const p=u(qs(d),[...i,...t]);return nn({id:d.id,title:d.name,author:d.author,getItemIcon:()=>"grid"===s&&d.thumbnail?d.thumbnail:d.icon,isChecked:n(d),toggleCheckbox:e=>r(e,d),isCheckboxDisabled:!1,recordShiftKeyPress:o,showTitles:a,viewType:s,i18n:l,type:"file",isDisabled:Boolean(p)&&!n(d),restrictionError:p})}const on=function(e){const{currentSelection:t,folders:i,files:s,uppyFiles:n,viewType:r,headerComponent:o,showBreadcrumbs:a,isChecked:l,toggleCheckbox:u,recordShiftKeyPress:h,handleScroll:d,showTitles:p,i18n:c,validateRestrictions:f,isLoading:m,showSearchFilter:g,search:y,searchTerm:b,clearSearch:v,searchOnInput:w,searchInputLabel:P,clearSearchLabel:_,getNextFolder:F,cancel:C,done:T,noResultsLabel:k,virtualList:O}=e,E=t.length,D=Ss(()=>[...i,...s],[i,s]);
2return S("div",{className:he()("uppy-ProviderBrowser",`uppy-ProviderBrowser-viewType--${r}`)},o&&S("div",{className:"uppy-ProviderBrowser-header"},S("div",{className:he()("uppy-ProviderBrowser-headerBar",!a&&"uppy-ProviderBrowser-headerBar--simple")},o)),g&&S("div",{class:"uppy-ProviderBrowser-searchFilter"},S(Ks,{search:y,searchTerm:b,clearSearch:v,inputLabel:P,clearSearchLabel:_,inputClassName:"uppy-ProviderBrowser-searchFilterInput",searchOnInput:w})),m?S("div",{className:"uppy-Provider-loading"},S("span",null,"string"==typeof m?m:c("loading"))):i.length||s.length?S("div",{className:"uppy-ProviderBrowser-body"},O?S("ul",{className:"uppy-ProviderBrowser-list"},S(Ws,{data:D,renderRow:e=>S(rn,{currentSelection:t,uppyFiles:n,viewType:r,isChecked:l,toggleCheckbox:u,recordShiftKeyPress:h,showTitles:p,i18n:c,validateRestrictions:f,getNextFolder:F,f:e}),rowHeight:31})):S("ul",{className:"uppy-ProviderBrowser-list",onScroll:d,role:"listbox",tabIndex:-1},D.map(e=>S(rn,{currentSelection:t,uppyFiles:n,viewType:r,isChecked:l,toggleCheckbox:u,recordShiftKeyPress:h,showTitles:p,i18n:c,validateRestrictions:f,getNextFolder:F,f:e})))):S("div",{className:"uppy-Provider-empty"},k),E>0&&S(Xs,{selected:E,done:T,cancel:C,i18n:c}))};class an extends k{componentWillUnmount(){const{onUnmount:e}=this.props;e()}render(){const{children:e}=this.props;return B(e)[0]}}i(79929),i(79063),i(25226),i(19031),i(64144),i(66663),i(70091);class ln{constructor(e,t){this.filterItems=e=>{const t=this.plugin.getPluginState();return t.filterInput&&""!==t.filterInput?e.filter(e=>-1!==e.name.toLowerCase().indexOf(t.filterInput.toLowerCase())):e},this.recordShiftKeyPress=e=>{this.isShiftKeyPressed=e.shiftKey},this.isChecked=e=>{const{currentSelection:t}=this.plugin.getPluginState();return t.some(t=>t.id===e.id)},this.plugin=e,this.provider=t.provider,this.opts=t,this.isHandlingScroll=!1,this.preFirstRender=this.preFirstRender.bind(this),this.handleError=this.handleError.bind(this),this.clearSelection=this.clearSelection.bind(this),this.cancelPicking=this.cancelPicking.bind(this)}preFirstRender(){this.plugin.setPluginState({didFirstRender:!0}),this.plugin.onFirstRender()}shouldHandleScroll(e){const{scrollHeight:t,scrollTop:i,offsetHeight:s}=e.target;return t-(i+s)<50&&!this.isHandlingScroll}clearSelection(){this.plugin.setPluginState({currentSelection:[],filterInput:""})}cancelPicking(){this.clearSelection();const e=this.plugin.uppy.getPlugin("Dashboard");e&&e.hideAllPanels()}handleError(e){var t;const{uppy:i}=this.plugin,s=i.i18n("companionError");i.log(e.toString()),e.isAuthError||"AbortError"===(null==(t=e.cause)?void 0:t.name)||i.info({message:s,details:e.toString()},"error",5e3)}registerRequestClient(){this.requestClientId=this.provider.provider,this.plugin.uppy.registerRequestClient(this.requestClientId,this.provider)}getTagFile(e){const t={id:e.id,source:this.plugin.id,name:e.name||e.id,type:e.mimeType,isRemote:!0,data:e,meta:{},body:{fileId:e.id},remote:{companionUrl:this.plugin.opts.companionUrl,url:`${this.provider.fileUrl(e.requestPath)}`,body:{fileId:e.id},providerName:this.provider.name,provider:this.provider.provider,requestClientId:this.requestClientId}};return e.thumbnail&&(t.preview=e.thumbnail),e.author&&(null!=e.author.name&&(t.meta.authorName=String(e.author.name)),e.author.url&&(t.meta.authorUrl=e.author.url)),null!=e.relDirPath&&(t.meta.relativePath=e.relDirPath?`${e.relDirPath}/${t.name}`:null),null!=e.absDirPath&&(t.meta.absolutePath=e.absDirPath?`/${e.absDirPath}/${t.name}`:`/${t.name}`),t}toggleCheckbox(e,t){e.stopPropagation(),e.preventDefault(),e.currentTarget.focus();const{folders:i,files:s}=this.plugin.getPluginState(),n=this.filterItems(i.concat(s));if(this.lastCheckbox&&this.isShiftKeyPressed){const{currentSelection:e}=this.plugin.getPluginState(),i=n.indexOf(this.lastCheckbox),s=n.indexOf(t),r=i<s?n.slice(i,s+1):n.slice(s,i+1),o=[];for(const e of r){const{uppy:t}=this.plugin,i=t.validateRestrictions(qs(e),[...t.getFiles(),...o]);i?t.info({message:i.message},"error",t.opts.infoTimeout):o.push(e)}return void this.plugin.setPluginState({currentSelection:[...new Set([...e,...o])]})}this.lastCheckbox=t;const{currentSelection:r}=this.plugin.getPluginState();this.isChecked(t)?this.plugin.setPluginState({currentSelection:r.filter(e=>e.id!==t.id)}):this.plugin.setPluginState({currentSelection:r.concat([t])})}setLoading(e){this.plugin.setPluginState({loading:e})}}function un(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var hn=0;function dn(e){return"__private_"+hn+++"_"+e}function pn(e,t){return e?`${e}/${t}`:t}function cn(){return S("svg",{"aria-hidden":"true",focusable:"false",width:"30",height:"30",viewBox:"0 0 30 30"},S("path",{d:"M15 30c8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15C6.716 0 0 6.716 0 15c0 8.284 6.716 15 15 15zm4.258-12.676v6.846h-8.426v-6.846H5.204l9.82-12.364 9.82 12.364H19.26z"}))}
2const fn={viewType:"list",showTitles:!0,showFilter:!0,showBreadcrumbs:!0,loadAllFiles:!1,virtualList:!1};var mn=dn("abortController"),gn=dn("withAbort"),yn=dn("list"),bn=dn("listFilesAndFolders"),vn=dn("recursivelyListAllFiles");async function wn(e){var t;null==(t=un(this,mn)[mn])||t.abort();const i=new AbortController;un(this,mn)[mn]=i;const s=()=>{i.abort(),this.clearSelection()};try{this.plugin.uppy.on("dashboard:close-panel",s),this.plugin.uppy.on("cancel-all",s),await e(i.signal)}finally{this.plugin.uppy.off("dashboard:close-panel",s),this.plugin.uppy.off("cancel-all",s),un(this,mn)[mn]=void 0}}async function Pn(e){let{requestPath:t,absDirPath:i,signal:s}=e;const{username:n,nextPagePath:r,items:o}=await this.provider.list(t,{signal:s});return this.username=n||this.username,{items:o.map(e=>({...e,absDirPath:i})),nextPagePath:r}}async function _n(e){let{breadcrumbs:t,signal:i}=e;const s=function(e){return e.slice(1).map(e=>e.name).join("/")}(t),{items:n,nextPagePath:r}=await un(this,yn)[yn]({requestPath:this.nextPagePath,absDirPath:s,signal:i});this.nextPagePath=r;const o=[],a=[];return n.forEach(e=>{e.isFolder?a.push(e):o.push(e)}),{files:o,folders:a}}async function Fn(e){let{requestPath:t,absDirPath:i,relDirPath:s,queue:n,onFiles:r,signal:o}=e,a=t;for(;a;){const e=await un(this,yn)[yn]({requestPath:a,absDirPath:i,signal:o});a=e.nextPagePath;const t=e.items.filter(e=>!e.isFolder),l=e.items.filter(e=>e.isFolder);r(t);const u=l.map(async e=>n.add(async()=>un(this,vn)[vn]({requestPath:e.requestPath,absDirPath:pn(i,e.name),relDirPath:pn(s,e.name),queue:n,onFiles:r,signal:o})));await Promise.all(u)}}function Sn(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}(class extends ln{constructor(e,t){super(e,{...fn,...t}),Object.defineProperty(this,vn,{value:Fn}),Object.defineProperty(this,bn,{value:_n}),Object.defineProperty(this,yn,{value:Pn}),Object.defineProperty(this,gn,{value:wn}),Object.defineProperty(this,mn,{writable:!0,value:void 0}),this.filterQuery=this.filterQuery.bind(this),this.clearFilter=this.clearFilter.bind(this),this.getFolder=this.getFolder.bind(this),this.getNextFolder=this.getNextFolder.bind(this),this.logout=this.logout.bind(this),this.handleAuth=this.handleAuth.bind(this),this.handleScroll=this.handleScroll.bind(this),this.donePicking=this.donePicking.bind(this),this.render=this.render.bind(this),this.plugin.setPluginState({authenticated:void 0,files:[],folders:[],breadcrumbs:[],filterInput:"",isSearchVisible:!1,currentSelection:[]}),this.registerRequestClient()}tearDown(){}async getFolder(e,t){this.setLoading(!0);try{await un(this,gn)[gn](async i=>{this.lastCheckbox=void 0;let{breadcrumbs:s}=this.plugin.getPluginState();const n=s.findIndex(t=>e===t.requestPath);
2s=-1!==n?s.slice(0,n+1):[...s,{requestPath:e,name:t}],this.nextPagePath=e;let r=[],o=[];do{const{files:e,folders:t}=await un(this,bn)[bn]({breadcrumbs:s,signal:i});r=r.concat(e),o=o.concat(t),this.setLoading(this.plugin.uppy.i18n("loadedXFiles",{numFiles:r.length+o.length}))}while(this.opts.loadAllFiles&&this.nextPagePath);this.plugin.setPluginState({folders:o,files:r,breadcrumbs:s,filterInput:""})})}catch(e){if("UserFacingApiError"===(null==e?void 0:e.name))return void this.plugin.uppy.info({message:this.plugin.uppy.i18n(e.message)},"warning",5e3);this.handleError(e)}finally{this.setLoading(!1)}}getNextFolder(e){this.getFolder(e.requestPath,e.name),this.lastCheckbox=void 0}async logout(){try{await un(this,gn)[gn](async e=>{const t=await this.provider.logout({signal:e});if(t.ok){if(!t.revoked){const e=this.plugin.uppy.i18n("companionUnauthorizeHint",{provider:this.plugin.title,url:t.manual_revoke_url});this.plugin.uppy.info(e,"info",7e3)}const e={authenticated:!1,files:[],folders:[],breadcrumbs:[],filterInput:""};this.plugin.setPluginState(e)}})}catch(e){this.handleError(e)}}filterQuery(e){this.plugin.setPluginState({filterInput:e})}clearFilter(){this.plugin.setPluginState({filterInput:""})}async handleAuth(e){try{await un(this,gn)[gn](async t=>{this.setLoading(!0),await this.provider.login({authFormData:e,signal:t}),this.plugin.setPluginState({authenticated:!0}),this.preFirstRender()})}catch(e){if("UserFacingApiError"===e.name)return void this.plugin.uppy.info({message:this.plugin.uppy.i18n(e.message)},"warning",5e3);this.plugin.uppy.log(`login failed: ${e.message}`)}finally{this.setLoading(!1)}}async handleScroll(e){if(this.shouldHandleScroll(e)&&this.nextPagePath){this.isHandlingScroll=!0;try{await un(this,gn)[gn](async e=>{const{files:t,folders:i,breadcrumbs:s}=this.plugin.getPluginState(),{files:n,folders:r}=await un(this,bn)[bn]({breadcrumbs:s,signal:e}),o=t.concat(n),a=i.concat(r);this.plugin.setPluginState({folders:a,files:o})})}catch(e){this.handleError(e)}finally{this.isHandlingScroll=!1}}}async donePicking(){this.setLoading(!0);try{await un(this,gn)[gn](async e=>{const{currentSelection:t}=this.plugin.getPluginState(),i=[],s=[];for(const n of t){const{requestPath:t}=n,r=e=>({...e,relDirPath:e.absDirPath.replace(n.absDirPath,"").replace(/^\//,"")});if(n.isFolder){let o=!0,a=0;const l=new os({concurrency:6}),u=e=>{for(const t of e){const e=this.getTagFile(t),i=(0,ds.N)(e,this.plugin.uppy.getID());this.plugin.uppy.checkIfFileAlreadyExists(i)||(s.push(r(t)),a++,this.setLoading(this.plugin.uppy.i18n("addedNumFiles",{numFiles:a}))),o=!1}};let h;await un(this,vn)[vn]({requestPath:t,absDirPath:pn(n.absDirPath,n.name),relDirPath:n.name,queue:l,onFiles:u,signal:e}),await l.onIdle(),h=o?this.plugin.uppy.i18n("emptyFolderAdded"):0===a?this.plugin.uppy.i18n("folderAlreadyAdded",{folder:n.name}):this.plugin.uppy.i18n("folderAdded",{smart_count:a,folder:n.name}),i.push(h)}else s.push(r(n))}this.plugin.uppy.log("Adding files from a remote provider"),this.plugin.uppy.addFiles(s.map(e=>this.getTagFile(e,this.requestClientId))),this.plugin.setPluginState({filterInput:""}),i.forEach(e=>this.plugin.uppy.info(e)),this.clearSelection()})}catch(e){this.handleError(e)}finally{this.setLoading(!1)}}render(e,t){var i=this;void 0===t&&(t={});const{authenticated:s,didFirstRender:n}=this.plugin.getPluginState(),{i18n:r}=this.plugin.uppy;n||this.preFirstRender();const o={...this.opts,...t},{files:a,folders:l,filterInput:u,loading:h,currentSelection:d}=this.plugin.getPluginState(),{isChecked:p,recordShiftKeyPress:c,filterItems:f}=this,m=""!==u,g=this.plugin.icon||cn,y={showBreadcrumbs:o.showBreadcrumbs,getFolder:this.getFolder,breadcrumbs:this.plugin.getPluginState().breadcrumbs,pluginIcon:g,title:this.plugin.title,logout:this.logout,username:this.username,i18n:r},b={isChecked:p,toggleCheckbox:this.toggleCheckbox.bind(this),recordShiftKeyPress:c,currentSelection:d,files:m?f(a):a,folders:m?f(l):l,getNextFolder:this.getNextFolder,getFolder:this.getFolder,loadAllFiles:this.opts.loadAllFiles,virtualList:this.opts.virtualList,showSearchFilter:o.showFilter,search:this.filterQuery,clearSearch:this.clearFilter,searchTerm:u,searchOnInput:!0,searchInputLabel:r("filter"),clearSearchLabel:r("resetFilter"),noResultsLabel:r("noFilesFound"),logout:this.logout,handleScroll:this.handleScroll,done:this.donePicking,cancel:this.cancelPicking,headerComponent:S(zs,y),title:this.plugin.title,viewType:o.viewType,showTitles:o.showTitles,showBreadcrumbs:o.showBreadcrumbs,pluginIcon:g,i18n:this.plugin.uppy.i18n,uppyFiles:this.plugin.uppy.getFiles(),validateRestrictions:function(){return i.plugin.uppy.validateRestrictions(...arguments)},isLoading:h};return S(an,{onUnmount:this.clearSelection},!1===s?S(Bs,{pluginName:this.plugin.title,pluginIcon:g,handleAuth:this.handleAuth,i18n:this.plugin.uppy.i18nArray,renderForm:this.opts.renderAuthForm,loading:h}):S(on,b))}}).VERSION="3.13.0";var Cn=0;function Tn(e){return"__private_"+Cn+++"_"+e}const kn={isInputMode:!0,files:[],folders:[],breadcrumbs:[],filterInput:"",currentSelection:[],searchTerm:null}
2,On={viewType:"grid",showTitles:!0,showFilter:!0,showBreadcrumbs:!0};var En=Tn("updateFilesAndInputMode");function Dn(e,t){this.nextPageQuery=e.nextPageQuery,e.items.forEach(e=>{t.push(e)}),this.plugin.setPluginState({currentSelection:[],isInputMode:!1,files:t,searchTerm:e.searchedFor})}(class extends ln{constructor(e,t){super(e,{...On,...t}),Object.defineProperty(this,En,{value:Dn}),this.nextPageQuery=null,this.search=this.search.bind(this),this.clearSearch=this.clearSearch.bind(this),this.resetPluginState=this.resetPluginState.bind(this),this.handleScroll=this.handleScroll.bind(this),this.donePicking=this.donePicking.bind(this),this.render=this.render.bind(this),this.plugin.setPluginState(kn),this.registerRequestClient()}tearDown(){}resetPluginState(){this.plugin.setPluginState(kn)}async search(e){const{searchTerm:t}=this.plugin.getPluginState();if(!e||e!==t){this.setLoading(!0);try{const t=await this.provider.search(e);Sn(this,En)[En](t,[])}catch(e){this.handleError(e)}finally{this.setLoading(!1)}}}clearSearch(){this.plugin.setPluginState({currentSelection:[],files:[],searchTerm:null})}async handleScroll(e){const t=this.nextPageQuery||null;if(this.shouldHandleScroll(e)&&t){this.isHandlingScroll=!0;try{const{files:e,searchTerm:i}=this.plugin.getPluginState(),s=await this.provider.search(i,t);Sn(this,En)[En](s,e)}catch(e){this.handleError(e)}finally{this.isHandlingScroll=!1}}}donePicking(){const{currentSelection:e}=this.plugin.getPluginState();this.plugin.uppy.log("Adding remote search provider files"),this.plugin.uppy.addFiles(e.map(e=>this.getTagFile(e))),this.resetPluginState()}render(e,t){var i=this;void 0===t&&(t={});const{didFirstRender:s,isInputMode:n,searchTerm:r}=this.plugin.getPluginState(),{i18n:o}=this.plugin.uppy;s||this.preFirstRender();const a={...this.opts,...t},{files:l,folders:u,filterInput:h,loading:d,currentSelection:p}=this.plugin.getPluginState(),{isChecked:c,filterItems:f,recordShiftKeyPress:m}=this,g=""!==h,y={isChecked:c,toggleCheckbox:this.toggleCheckbox.bind(this),recordShiftKeyPress:m,currentSelection:p,files:g?f(l):l,folders:g?f(u):u,handleScroll:this.handleScroll,done:this.donePicking,cancel:this.cancelPicking,showSearchFilter:a.showFilter,search:this.search,clearSearch:this.clearSearch,searchTerm:r,searchOnInput:!1,searchInputLabel:o("search"),clearSearchLabel:o("resetSearch"),noResultsLabel:o("noSearchResults"),title:this.plugin.title,viewType:a.viewType,showTitles:a.showTitles,showFilter:a.showFilter,isLoading:d,showBreadcrumbs:a.showBreadcrumbs,pluginIcon:this.plugin.icon,i18n:o,uppyFiles:this.plugin.uppy.getFiles(),validateRestrictions:function(){return i.plugin.uppy.validateRestrictions(...arguments)}};return S(an,{onUnmount:this.resetPluginState},n?S("div",{className:"uppy-SearchProvider"},S(Ks,{search:this.search,inputLabel:o("enterTextToSearch"),buttonLabel:o("searchImages"),inputClassName:"uppy-c-textInput uppy-SearchProvider-input",buttonCSSClassName:"uppy-SearchProvider-searchButton",showButton:!0})):S(on,y))}}).VERSION="3.13.0";var An=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function xn(e,t){return e===t||!(!An(e)||!An(t))}function Nn(e,t){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(!xn(e[i],t[i]))return!1;return!0}function In(e,t){void 0===t&&(t=Nn);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 r=e.apply(this,s);return i={lastResult:r,lastArgs:s,lastThis:this},r}return s.clear=function(){i=null},s}const Un=['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
2([tabindex^="-"]):not([inert]):not([aria-hidden])'];function Bn(e,t){if(t){const i=e.querySelector(`[data-uppy-paneltype="${t}"]`);if(i)return i}return e}function Rn(e,t){const i=t[0];i&&(i.focus(),e.preventDefault())}function Mn(e,t,i){const s=Bn(i,t),n=(0,Si.A)(s.querySelectorAll(Un)),r=n.indexOf(document.activeElement);!function(e){return e.contains(document.activeElement)}(s)?Rn(e,n):e.shiftKey&&0===r?function(e,t){const i=t[t.length-1];i&&(i.focus(),e.preventDefault())}(e,n):e.shiftKey||r!==n.length-1||Rn(e,n)}var Ln=i(66900),zn=i.n(Ln);function jn(){const e=document.body;return"draggable"in e&&"ondragstart"in e&&"ondrop"in e&&("FormData"in window&&"FileReader"in window)}var qn=i(57546),$n=i.n(qn);function Hn(e){const t={color:"#838999",icon:S("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},S("g",{fill:"#A7AFB7",fillRule:"nonzero"},S("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"}),S("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];if("text"===i)return{color:"#5a5e69",icon:S("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},S("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"}))};if("image"===i)return{color:"#686de0",icon:S("svg",{"aria-hidden":"true",focusable:"false",width:"25",height:"25",viewBox:"0 0 25 25"},S("g",{fill:"#686DE0",fillRule:"evenodd"},S("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"}),S("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"}),S("circle",{cx:"7.5",cy:"9.5",r:"1.5"})))};if("audio"===i)return{color:"#068dbb",icon:S("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},S("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"}))};if("video"===i)return{color:"#19af67",icon:S("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},S("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"}))};if("application"===i&&"pdf"===s)return{color:"#e25149",icon:S("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},S("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"}))};return"application"===i&&-1!==["zip","x-7z-compressed","x-rar-compressed","x-tar","x-gzip","x-apple-diskimage"].indexOf(s)?{color:"#00C469",icon:S("svg",{"aria-hidden":"true",focusable:"false",width:"25",height:"25",viewBox:"0 0 25 25"},S("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 Vn(e){const{file:t}=e;if(t.preview)return S("img",{className:"uppy-Dashboard-Item-previewImg",alt:t.name,src:t.preview});const{color:i,icon:s}=Hn(t.type);return S("div",{className:"uppy-Dashboard-Item-previewIconWrap"},S("span",{className:"uppy-Dashboard-Item-previewIcon",style:{color:i}},s),S("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-Dashboard-Item-previewIconBg",width:"58",height:"76",viewBox:"0 0 58 76"},S("rect",{fill:"#FFF",width:"58",height:"76",rx:"3",fillRule:"evenodd"})))}function renderMissingMetaFieldsError(e){const{file:t,toggleFileCard:i,i18n:s,metaFields:n}=e,{missingRequiredMetaFields:r}=t;if(null==r||!r.length)return null;const o=r.map(e=>((e,t)=>{const i=("function"==typeof t?t():t).filter(t=>t.id===e);return i[0].name}
2)(e,n)).join(", ");return S("div",{className:"uppy-Dashboard-Item-errorMessage"},s("missingRequiredMetaFields",{smart_count:r.length,fields:o})," ",S("button",{type:"button",class:"uppy-u-reset uppy-Dashboard-Item-errorMessageBtn",onClick:()=>i(!0,t.id)},s("editFile")))}function Wn(e){const{file:t,i18n:i,toggleFileCard:s,metaFields:n,showLinkToFileUploadResult:r}=e;return S("div",{className:"uppy-Dashboard-Item-previewInnerWrap",style:{backgroundColor:t.preview?"rgba(255, 255, 255, 0.5)":Hn(e.file.type).color}},r&&t.uploadURL&&S("a",{className:"uppy-Dashboard-Item-previewLink",href:t.uploadURL,rel:"noreferrer noopener",target:"_blank","aria-label":t.meta.name},S("span",{hidden:!0},t.meta.name)),S(Vn,{file:t}),S(renderMissingMetaFieldsError,{file:t,i18n:i,toggleFileCard:s,metaFields:n}))}function Gn(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 Kn(e){return S("div",{className:"uppy-Dashboard-Item-progress"},S("button",{className:"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-progressIndicator",type:"button","aria-label":Gn(e),title:Gn(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 Xn(e){let{children:t}=e;return S("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 Yn(e){let{progress:t}=e;const i=2*Math.PI*15;return S("g",null,S("circle",{className:"uppy-Dashboard-Item-progressIcon--bg",r:"15",cx:"18",cy:"18","stroke-width":"2",fill:"none"}),S("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 Qn(e){return e.file.progress.uploadStarted?e.isUploaded?S("div",{className:"uppy-Dashboard-Item-progress"},S("div",{className:"uppy-Dashboard-Item-progressIndicator"},S(Xn,null,S("circle",{r:"15",cx:"18",cy:"18",fill:"#1bb240"}),S("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?S(Kn,e,S("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-Dashboard-Item-progressIcon--retry",width:"28",height:"31",viewBox:"0 0 16 19"},S("path",{d:"M16 11a8 8 0 1 1-8-8v2a6 6 0 1 0 6 6h2z"}),S("path",{d:"M7.9 3H10v2H7.9z"}),S("path",{d:"M8.536.5l3.535 3.536-1.414 1.414L7.12 1.914z"}),S("path",{d:"M10.657 2.621l1.414 1.415L8.536 7.57 7.12 6.157z"}))):e.resumableUploads&&!e.hidePauseResumeButton?S(Kn,e,S(Xn,null,S(Yn,{progress:e.file.progress.percentage}),e.file.isPaused?S("polygon",{className:"uppy-Dashboard-Item-progressIcon--play",transform:"translate(3, 3)",points:"12 20 12 10 20 15"}):S("g",{className:"uppy-Dashboard-Item-progressIcon--pause",transform:"translate(14.5, 13)"},S("rect",{x:"0",y:"0",width:"2",height:"10",rx:"0"}),S("rect",{x:"5",y:"0",width:"2",height:"10",rx:"0"})))):e.resumableUploads||!e.individualCancellation||e.hideCancelButton?S("div",{className:"uppy-Dashboard-Item-progress"},S("div",{className:"uppy-Dashboard-Item-progressIndicator"},S(Xn,null,S(Yn,{progress:e.file.progress.percentage})))):S(Kn,e,S(Xn,null,S(Yn,{progress:e.file.progress.percentage}),S("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}var Jn=i(93700),Zn=i.n(Jn);const er="...";function tr(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)+er+e.slice(-n)}const ir=e=>{let{file:t,onClick:i}=e;return t.error?S("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 sr(e){const{file:t}=e;return S("div",{className:"uppy-Dashboard-Item-fileInfo","data-uppy-file-source":t.source},S("div",{className:"uppy-Dashboard-Item-fileName"},(e=>{const{author:t,name:i}=e.file.meta;return S("div",{className:"uppy-Dashboard-Item-name",title:i},tr(i,e.isSingleFile&&e.containerHeight>=350?90:e.containerWidth<=352?35:e.containerWidth<=576?60:t?20:30))})(e),S(ir,{file:e.file,onClick:()=>alert(e.file.error)})),S("div",{className:"uppy-Dashboard-Item-status"},(e=>{const{author:t}=e.file.meta,{providerName:i}=e.file.remote;return t?S("div",{className:"uppy-Dashboard-Item-author"},S("a",{href:`${t.url}?utm_source=Companion&utm_medium=referral`,target:"_blank",rel:"noopener noreferrer"},tr(t.name,13)),i?S(T,null," · ",i," · "):null):null})(e),(e=>e.file.size&&S("div",{className:"uppy-Dashboard-Item-statusSize"},Zn()(e.file.size)))(e),(e=>e.file.isGhost&&S("span",null," • ",S("button",{className:"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-reSelect",type:"button",onClick:e.toggleAddFilesPanel},e.i18n("reSelect"))))(e)),S(renderMissingMetaFieldsError,{file:e.file,i18n:e.i18n,toggleFileCard:e.toggleFileCard,metaFields:e.metaFields}))}function nr(e){let{file:t,uploadInProgressOrComplete:i,metaFields:s,canEditFile:n,i18n:r,onClick:o}=e;return!i&&s&&s.length>0||!i&&n(t)?S("button",{className:"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-action uppy-Dashboard-Item-action--edit",type:"button","aria-label":r("editFileWithFilename",{file:t.meta.name}),title:r("editFileWithFilename",{file:t.meta.name}),onClick:()=>o()},S("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"14",height:"14",viewBox:"0 0 14 14"},S("g",{fillRule:"evenodd"},S("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"}),S("rect",{x:"1",y:"12.293",width:"11",height:"1",rx:".5"}),S("path",{fillRule:"nonzero",d:"M6.793 2.5L9.5 5.207l.707-.707L7.5 1.793z"})))):null}function rr(e){let{i18n:t,onClick:i,file:s}=e;return S("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()},S("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"18",height:"18",viewBox:"0 0 18 18"},S("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"}),S("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 or=(e,t)=>
2{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=()=>{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 ar(e){const{i18n:t}=e;return S("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=>or(t,e)},S("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"14",height:"14",viewBox:"0 0 14 12"},S("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 lr(e){const{uppy:t,file:i,uploadInProgressOrComplete:s,canEditFile:n,metaFields:r,showLinkToFileUploadResult:o,showRemoveButton:a,i18n:l,toggleFileCard:u,openFileEditor:h}=e;return S("div",{className:"uppy-Dashboard-Item-actionWrapper"},S(nr,{i18n:l,file:i,uploadInProgressOrComplete:s,canEditFile:n,metaFields:r,onClick:()=>{r&&r.length>0?u(!0,i.id):h(i)}}),o&&i.uploadURL?S(ar,{file:i,uppy:t,i18n:l}):null,a?S(rr,{i18n:l,file:i,uppy:t,onClick:()=>e.uppy.removeFile(i.id,"removed-by-user")}):null)}class ur extends k{componentDidMount(){const{file:e}=this.props;
2e.preview||this.props.handleRequestThumbnail(e)}shouldComponentUpdate(e){return!$n()(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,r=e.error||!1,{isGhost:o}=e;let a=(this.props.individualCancellation||!n)&&!i;i&&this.props.showRemoveButtonAfterComplete&&(a=!0);return S("div",{className:he()({"uppy-Dashboard-Item":!0,"is-inprogress":n&&!this.props.recoveredState,"is-processing":t,"is-complete":i,"is-error":!!r,"is-resumable":this.props.resumableUploads,"is-noIndividualCancellation":!this.props.individualCancellation,"is-ghost":o}),id:`uppy_${e.id}`,role:this.props.role},S("div",{className:"uppy-Dashboard-Item-preview"},S(Wn,{file:e,showLinkToFileUploadResult:this.props.showLinkToFileUploadResult,i18n:this.props.i18n,toggleFileCard:this.props.toggleFileCard,metaFields:this.props.metaFields}),S(Qn,{uppy:this.props.uppy,file:e,error:r,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})),S("div",{className:"uppy-Dashboard-Item-fileInfoAndButtons"},S(sr,{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}),S(lr,{file:e,metaFields:this.props.metaFields,showLinkToFileUploadResult:this.props.showLinkToFileUploadResult,showRemoveButton:a,canEditFile:this.props.canEditFile,uploadInProgressOrComplete:s,toggleFileCard:this.props.toggleFileCard,openFileEditor:this.props.openFileEditor,uppy:this.props.uppy,i18n:this.props.i18n})))}}const hr=e=>{let{id:t,error:i,i18n:s,uppy:n,files:r,acquirers:o,resumableUploads:a,hideRetryButton:l,hidePauseResumeButton:u,hideCancelButton:h,showLinkToFileUploadResult:d,showRemoveButtonAfterComplete:p,isWide:c,metaFields:f,isSingleFile:m,toggleFileCard:g,handleRequestThumbn
2ail:y,handleCancelThumbnail:b,recoveredState:v,individualCancellation:w,itemsPerRow:P,openFileEditor:_,canEditFile:F,toggleAddFilesPanel:C,containerWidth:T,containerHeight:k}=e;const O=1===P?71:200,E=Ss(()=>{const e=Object.keys(r);return v&&e.sort((e,t)=>r[t].isGhost-r[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,P)},[r,P,v]),D=e=>S("div",{class:"uppy-Dashboard-filesInner",role:"presentation",key:e[0]},e.map(e=>S(ur,{key:e,uppy:n,id:t,error:i,i18n:s,acquirers:o,resumableUploads:a,individualCancellation:w,hideRetryButton:l,hidePauseResumeButton:u,hideCancelButton:h,showLinkToFileUploadResult:d,showRemoveButtonAfterComplete:p,isWide:c,metaFields:f,recoveredState:v,isSingleFile:m,containerWidth:T,containerHeight:k,toggleFileCard:g,handleRequestThumbnail:y,handleCancelThumbnail:b,role:"listitem",openFileEditor:_,canEditFile:F,toggleAddFilesPanel:C,file:r[e]})));return m?S("div",{class:"uppy-Dashboard-files"},D(E[0])):S(Ws,{class:"uppy-Dashboard-files",role:"list",data:E,renderRow:D,rowHeight:O})};let dr;i.dn(hr),dr=Symbol.for("uppy test: disable unused locale key warning");const pr=class extends k{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)=>S("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 S("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=()=>S("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":"MyDevice"},S("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},S("div",{className:"uppy-DashboardTab-inner"},S("svg",{className:"uppy-DashboardTab-iconMyDevice","aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32"},S("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"}))),S("div",{className:"uppy-DashboardTab-name"},this.props.i18n("myDevice")))),this.renderPhotoCamera=()=>S("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":"MobilePhotoCamera"},S("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},S("div",{className:"uppy-DashboardTab-inner"},S("svg",{"aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32"},S("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"}))),S("div",{className:"uppy-DashboardTab-name"},this.props.i18n("takePictureBtn")))),this.renderVideoCamera=()=>S("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":"MobileVideoCamera"},S("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},S("div",{className:"uppy-DashboardTab-inner"},S("svg",{"aria-hidden":"true",width:"32",height:"32",viewBox:"0 0 32 32"},S("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 "}))),S("div",{className:"uppy-DashboardTab-name"},this.props.i18n("recordVideoBtn")))),this.renderBrowseButton=(e,t)=>S("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-Dashboard-browse",onClick:t,"data-uppy-super-focusable":0===this.props.acquirers.length},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 S("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=>S("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":e.id},S("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":this.props.activePickerPanel.id===e.id,"data-uppy-super-focusable":!0,onClick:()=>this.props.showPanel(e.id)},S("div",{className:"uppy-DashboardTab-inner"},e.icon()),S("div",{className:"uppy-DashboardTab-name"},e.name))),this.renderAcquirers=e=>{const t=[...e],i=t.splice(e.length-2,e.length);return S(T,null,t.map(e=>this.renderAcquirer(e)),S("span",{role:"presentation",style:{"white-space":"nowrap"}},i.map(e=>this.renderAcquirer(e))))},this.renderSourcesList=(e,t)=>
2{const{showNativePhotoCameraButton:i,showNativeVideoCameraButton:s}=this.props;let n=[];const r="myDevice";t||(n.push({key:r,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===r&&(n=[]);const o=[...n],a=o.splice(n.length-2,n.length),l=e=>e.map(e=>{let{key:t,elements:i}=e;return S(T,{key:t},i)});return S(T,null,this.renderDropPasteBrowseTagline(n.length),S("div",{className:"uppy-Dashboard-AddFiles-list",role:"tablist"},l(o),S("span",{role:"presentation",style:{"white-space":"nowrap"}},l(a))))}}[dr](){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=S("span",null,S("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-Dashboard-poweredByIcon",width:"11",height:"11",viewBox:"0 0 11 11"},S("path",{d:"M7.365 10.5l-.01-4.045h2.612L5.5.806l-4.467 5.65h2.604l.01 4.044h3.718z",fillRule:"evenodd"})),S("span",{className:"uppy-Dashboard-poweredByUppy"},"Uppy"));return S("a",{tabIndex:"-1",href:"https://uppy.io",rel:"noreferrer noopener",target:"_blank",className:"uppy-Dashboard-poweredBy"},e("poweredBy",{uppy:t}))}render(){const{showNativePhotoCameraButton:e,showNativeVideoCameraButton:t,nativeCameraFacingMode:i}=this.props;return S("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),S("div",{className:"uppy-Dashboard-AddFiles-info"},this.props.note&&S("div",{className:"uppy-Dashboard-note"},this.props.note),this.props.proudlyDisplayPoweredByUppy&&this.renderPoweredByUppy(this.props)))}},cr=e=>S("div",{className:he()("uppy-Dashboard-AddFilesPanel",e.className),"data-uppy-panelType":"AddFiles","aria-hidden":!e.showAddFilesPanel},S("div",{className:"uppy-DashboardContent-bar"},S("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},e.i18n("addingMoreFiles")),S("button",{className:"uppy-DashboardContent-back",type:"button",onClick:()=>e.toggleAddFilesPanel(!1)},e.i18n("back"))),S(pr,e));const fr=function(e){const{tagName:t}=e.target;"INPUT"!==t&&"TEXTAREA"!==t?(e.preventDefault(),e.stopPropagation()):e.stopPropagation()};const mr=function(e){let{activePickerPanel:t,className:i,hideAllPanels:s,i18n:n,state:r,uppy:o}=e;return S("div",{className:he()("uppy-DashboardContent-panel",i),role:"tabpanel","data-uppy-panelType":"PickerPanel",id:`uppy-DashboardContent-panel--${t.id}`,onDragOver:fr,onDragLeave:fr,onDrop:fr,onPaste:fr},S("div",{className:"uppy-DashboardContent-bar"},S("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},n("importFrom",{name:t.name})),S("button",{className:"uppy-DashboardContent-back",type:"button",onClick:s},n("cancel"))),S("div",{className:"uppy-DashboardContent-panelBody"},o.getPlugin(t.id).render(r)))};const gr=function(e){const t=e.files[e.fileCardFor];return S("div",{className:he()("uppy-DashboardContent-panel",e.className),role:"tabpanel","data-uppy-panelType":"FileEditor",id:"uppy-DashboardContent-panel--editor"},S("div",{className:"uppy-DashboardContent-bar"},S("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},e.i18nArray("editing",{file:S("span",{className:"uppy-DashboardContent-titleFile"},t.meta?t.meta.name:t.name)})),S("button",{className:"uppy-DashboardContent-back",type:"button",onClick:()=>{e.uppy.emit("file-editor:cancel",t),e.hideAllPanels()}},e.i18n("cancel")),S("button",{className:"uppy-DashboardContent-save",type:"button",onClick:e.saveFileEditor},e.i18n("save"))),S("div",{className:"uppy-DashboardContent-panelBody"},e.editors.map(t=>e.uppy.getPlugin(t.id).render(e.state))))},yr="error",br="waiting",vr="preprocessing",wr="uploading",Pr="postprocessing",_r="complete",Fr="paused";function Sr(e){let{files:t,i18n:i,isAllComplete:s,isAllErrored:n,isAllPaused:r,inProgressNotPausedFiles:o,newFiles:a,processingFiles:l}=e;const u=function(e,t,i,s){if(void 0===s&&(s={}),e)return yr;if(t)return _r;if(i)return Fr;let n=br;const r=Object.keys(s);for(let e=0;e<r.length;e++){const{progress:t}=s[r[e]];if(t.uploadStarted&&!t.uploadComplete)return wr;t.preprocess&&n!==wr&&(n=vr),t.postprocess&&n!==wr&&n!==vr&&(n=Pr)}return n}(n,s,r,t);switch(u){case"uploading":return i("uploadingXFiles",{smart_count:o.length});case"preprocessing":case"postprocessing":return i("processingXFiles",{smart_count:l.length});case"paused":return i("uploadPaused");case"waiting":return i("xFilesSelected",{smart_count:a.length});case"complete":return i("uploadComplete");case"error":return i("error")}}const Cr=function(e){const{i18n:t,isAllComplete:i,hideCancelButton:s,maxNumberOfFiles:n,toggleAddFilesPanel:r,uppy:o}=e;let{allowNewUpload:a}=e;return a&&n&&(a=e.totalFileCount<e.maxNumberOfFiles),S("div",{className:"uppy-DashboardContent-bar"},i||s?S("div",null):S("button",{className:"uppy-DashboardContent-back",type:"button",onClick:()=>o.cancelAll()},t("cancel")),S("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},S(Sr,e)),a?S("button",{className:"uppy-DashboardContent-addMore",type:"button","aria-label":t("addM
2oreFiles"),title:t("addMoreFiles"),onClick:()=>r(!0)},S("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"15",height:"15",viewBox:"0 0 15 15"},S("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"})),S("span",{className:"uppy-DashboardContent-addMoreCaption"},t("addMore"))):S("div",null))};function Tr(e){const{computedMetaFields:t,requiredMetaFields:i,updateMeta:s,form:n,formState:r}=e,o={text:"uppy-u-reset uppy-c-textInput uppy-Dashboard-FileCard-input"};return t.map(e=>{const t=`uppy-Dashboard-FileCard-input-${e.id}`,a=i.includes(e.id);return S("fieldset",{key:e.id,className:"uppy-Dashboard-FileCard-fieldset"},S("label",{className:"uppy-Dashboard-FileCard-label",htmlFor:t},e.name),void 0!==e.render?e.render({value:r[e.id],onChange:t=>s(t,e.id),fieldCSSClasses:o,required:a,form:n.id},S):S("input",{className:o.text,id:t,form:n.id,type:e.type||"text",required:a,value:r[e.id],placeholder:e.placeholder,onInput:t=>s(t.target.value,e.id),"data-uppy-super-focusable":!0}))})}function kr(e){var t;const{files:i,fileCardFor:s,toggleFileCard:n,saveFileCard:r,metaFields:o,requiredMetaFields:a,openFileEditor:l,i18n:u,i18nArray:h,className:d,canEditFile:p}=e,c=i[s],f=null!=(t="function"==typeof o?o(i[s]):o)?t:[],m=p(c),g={};f.forEach(e=>{var t;g[e.id]=null!=(t=c.meta[e.id])?t:""});const[y,b]=_s(g),v=Cs(e=>{e.preventDefault(),r(y,s)},[r,y,s]),w=()=>{n(!1)},[P]=_s(()=>{const e=document.createElement("form");return e.setAttribute("tabindex","-1"),e.id=(0,Gs.A)(),e});return Fs(()=>(document.body.appendChild(P),P.addEventListener("submit",v),()=>{P.removeEventListener("submit",v),document.body.removeChild(P)}),[P,v]),S("div",{className:he()("uppy-Dashboard-FileCard",d),"data-uppy-panelType":"FileCard",onDragOver:fr,onDragLeave:fr,onDrop:fr,onPaste:fr},S("div",{className:"uppy-DashboardContent-bar"},S("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},h("editing",{file:S("span",{className:"uppy-DashboardContent-titleFile"},c.meta?c.meta.name:c.name)})),S("button",{className:"uppy-DashboardContent-back",type:"button",form:P.id,title:u("finishEditingFile"),onClick:w},u("cancel"))),S("div",{className:"uppy-Dashboard-FileCard-inner"},S("div",{className:"uppy-Dashboard-FileCard-preview",style:{backgroundColor:Hn(c.type).color}},S(Vn,{file:c}),m&&S("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-Dashboard-FileCard-edit",onClick:e=>{v(e),l(c)}},u("editFile"))),S("div",{className:"uppy-Dashboard-FileCard-info"},S(Tr,{computedMetaFields:f,requiredMetaFields:a,updateMeta:(e,t)=>{b({...y,[t]:e})},form:P,formState:y})),S("div",{className:"uppy-Dashboard-FileCard-actions"},S("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Dashboard-FileCard-actionsBtn",type:"submit",form:P.id},u("saveChanges")),S("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-link uppy-Dashboard-FileCard-actionsBtn",type:"button",onClick:w,form:P.id},u("cancel")))))}
2const Or="uppy-transition-slideDownUp";const Er=class extends k{constructor(e){super(e),this.state={cachedChildren:null,className:""}}componentWillUpdate(e){const{cachedChildren:t}=this.state,i=B(e.children)[0];if(t===i)return null;const s={cachedChildren:i};i&&!t&&(s.className=`${Or}-enter`,cancelAnimationFrame(this.animationFrame),clearTimeout(this.leaveTimeout),this.leaveTimeout=void 0,this.animationFrame=requestAnimationFrame(()=>{this.setState({className:`${Or}-enter ${Or}-enter-active`}),this.enterTimeout=setTimeout(()=>{this.setState({className:""})},250)})),t&&!i&&void 0===this.leaveTimeout&&(s.cachedChildren=t,s.className=`${Or}-leave`,cancelAnimationFrame(this.animationFrame),clearTimeout(this.enterTimeout),this.enterTimeout=void 0,this.animationFrame=requestAnimationFrame(()=>{this.setState({className:`${Or}-leave ${Or}-leave-active`}),this.leaveTimeout=setTimeout(()=>{this.setState({cachedChildren:null,className:""})},250)})),this.setState(s)}render(){const{cachedChildren:e,className:t}=this.state;return e?Y(e,{className:he()(t,e.props.className)}):null}};function Dr(){return Dr=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},Dr.apply(this,arguments)}const Ar={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",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 xr(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Nr=0;function Ir(e){return"__private_"+Nr+++"_"+e}const Ur=In.default||In;function Br(){const e={};return e.promise=new Promise((t,i)=>{e.resolve=t,e.reject=i}),e}var Rr=Ir("disabledNodes"),Mr=Ir("generateLargeThumbnailIfSingleFile"),Lr=Ir("openFileEditorWhenFilesAdded"),zr=Ir("attachRenderFunctionToTarget"),jr=Ir("isTargetSupported"),qr=Ir("getAcquirers"),$r=Ir("getProgressIndicators"),Hr=Ir("getEditors"),Vr=Ir("addSpecifiedPluginsFromOptions"),Wr=Ir("autoDiscoverPlugins"),Gr=Ir("addSupportedPluginIfNoTarget");class Kr extends oe{constructor(e,t){var i;super(e,t),i=this,Object.defineProperty(this,Rr,{writable:!0,value:null}),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";
2return void this.uppy.log(e,"error")}const n={id:t,name:i,type:s},r=this.getPluginState().targets.slice();return r.push(n),this.setPluginState({targets:r}),this.el},this.hideAllPanels=()=>{const e=this.getPluginState(),t={activePickerPanel:!1,showAddFilesPanel:!1,activeOverlayType:null,fileCardFor:null,showFileEditor:!1};e.activePickerPanel===t.activePickerPanel&&e.showAddFilesPanel===t.showAddFilesPanel&&e.showFileEditor===t.showFileEditor&&e.activeOverlayType===t.activeOverlayType||(this.setPluginState(t),this.uppy.emit("dashboard:close-panel",e.activePickerPanel.id))},this.showPanel=e=>{const{targets:t}=this.getPluginState(),i=t.filter(t=>"acquirer"===t.type&&t.id===e)[0];this.setPluginState({activePickerPanel:i,activeOverlayType:"PickerPanel"}),this.uppy.emit("dashboard:show-panel",e)},this.canEditFile=e=>{const{targets:t}=this.getPluginState();return xr(this,Hr)[Hr](t).some(t=>this.uppy.getPlugin(t.id).canEditFile(e))},this.openFileEditor=e=>{const{targets:t}=this.getPluginState(),i=xr(this,Hr)[Hr](t);this.setPluginState({showFileEditor:!0,fileCardFor:e.id||null,activeOverlayType:"FileEditor"}),i.forEach(t=>{this.uppy.getPlugin(t.id).selectFile(e)})},this.saveFileEditor=()=>{const{targets:e}=this.getPluginState();xr(this,Hr)[Hr](e).forEach(e=>{this.uppy.getPlugin(e.id).save()}),this.hideAllPanels()},this.openModal=()=>{const{promise:e,resolve:t}=Br();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=function(e){void 0===e&&(e={});const{manualClose:t=!0}=e,{isHidden:s,isClosing:n}=i.getPluginState();if(s||n)return;const{promise:r,resolve:o}=Br();if(i.opts.disablePageScrollWhenModalOpen&&document.body.classList.remove("uppy-Dashboard-isFixed"),i.opts.animateOpenClose){i.setPluginState({isClosing:!0});const e=()=>{i.setPluginState({isHidden:!0,isClosing:!1}),i.superFocus.cancel(),i.savedActiveElement.focus(),i.el.removeEventListener("animationend",e,!1),o()};i.el.addEventListener("animationend",e,!1)}else i.setPluginState({isHidden:!0}),i.superFocus.cancel(),i.savedActiveElement.focus(),o();var a;(document.removeEventListener("keydown",i.handleKeyDownInModal),t)&&(i.opts.browserBackButtonClose&&null!=(a=history.state)&&a[i.modalName]&&history.back());return i.uppy.emit("dashboard:modal-closed"),r},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=xr(this,Rr)[Rr])?t:(0,Si.A)(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;xr(this,Rr)[Rr]=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=>
2{27===e.keyCode&&this.requestCloseModal(e),9===e.keyCode&&Mn(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=(0,Si.A)(e.clipboardData.files);t.length>0&&(this.uppy.log("[Dashboard] Files pasted"),this.addFiles(t))},this.handleInputChange=e=>{e.preventDefault();const t=(0,Si.A)(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(0,Ci.A)(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)}
2,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||Mn(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&&0===t.length&&this.requestCloseModal()},this.handleCancelRestore=()=>{this.uppy.emit("restore-canceled")},Object.defineProperty(this,Mr,{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};t.requestThumbnail(i).then(()=>{null==t||t.setOptions({thumbnailWidth:this.opts.thumbnailWidth})})}}}),Object.defineProperty(this,Lr,{writable:!0,value:e=>{const t=e[0];this.canEditFile(t)&&this.openFileEditor(t)}}),this.initEvents=()=>{if(this.opts.trigger&&!this.opts.inline){const e=Fi(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.openM
2odal()` method yourself","warning")}this.startListeningToResize(),document.addEventListener("paste",this.handlePasteOnBody),this.uppy.on("plugin-added",xr(this,Gr)[Gr]),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("file-editor:complete",this.hideAllPanels),this.uppy.on("complete",this.handleComplete),this.uppy.on("files-added",xr(this,Mr)[Mr]),this.uppy.on("file-removed",xr(this,Mr)[Mr]),document.addEventListener("focus",this.recordIfFocusedOnUppyRecently,!0),document.addEventListener("click",this.recordIfFocusedOnUppyRecently,!0),this.opts.inline&&this.el.addEventListener("keydown",this.handleKeyDownInInline),this.opts.autoOpenFileEditor&&this.uppy.on("files-added",xr(this,Lr)[Lr])},this.removeEvents=()=>{const e=Fi(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",xr(this,Gr)[Gr]),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("file-editor:complete",this.hideAllPanels),this.uppy.off("complete",this.handleComplete),this.uppy.off("files-added",xr(this,Mr)[Mr]),this.uppy.off("file-removed",xr(this,Mr)[Mr]),document.removeEventListener("focus",this.recordIfFocusedOnUppyRecently),document.removeEventListener("click",this.recordIfFocusedOnUppyRecently),this.opts.inline&&this.el.removeEventListener("keydown",this.handleKeyDownInInline),this.opts.autoOpenFileEditor&&this.uppy.off("files-added",xr(this,Lr)[Lr])},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,zr,{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,jr,{writable:!0,value:e=>{const t=this.uppy.getPlugin(e.id);return"function"!=typeof t.isSupported||t.isSupported()}}),Object.defineProperty(this,qr,{writable:!0,value:Ur(e=>e.filter(e=>"acquirer"===e.type&&xr(this,jr)[jr](e)).map(xr(this,zr)[zr]))}),Object.defineProperty(this,$r,{writable:!0,value:Ur(e=>e.filter(e=>"progressindicator"===e.type).map(xr(this,zr)[zr]))}),Object.defineProperty(this,Hr,{writable:!0,value:Ur(e=>e.filter(e=>"editor"===e.type).map(xr(this,zr)[zr]))}),this.render=e=>{const t=this.getPluginState(),{files:i,capabilities:s,allowNewUpload:n}=e,{newFiles:r,uploadStartedFiles:o,completeFiles:a,erroredFiles:l,inProgressFiles:u,inProgressNotPausedFiles:h,processingFiles:d,isUploadStarted:p,isAllComplete:c,isAllErrored:f,isAllPaused:m}=this.uppy.getObjectOfFilesPerState(),g=xr(this,qr)[qr](t.targets),y=xr(this,$r)[$r](t.targets),b=xr(this,Hr)[Hr](t.targets);let v;return v="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,r=he()({"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 o=1;e.containerWidth>900?o=5:e.containerWidth>700?o=4:e.containerWidth>576&&(o=3);const a=e.showSelectedFiles&&!t,l=e.recoveredState?Object.keys(e.recoveredState.files).length:null,u=e.files?Object.keys(e.files).filter(t=>e.files[t].isGhost).length:null;return S("div",{className:r,"data-uppy-theme":e.theme,"data-uppy-num-acquirers":e.acquirers.length,"data-uppy-drag-drop-supported":!e.disableLocalFiles&&jn(),"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},S("div",{"aria-hidden":"true",className:"uppy-Dashboard-overlay",tabIndex:-1,onClick:e.handleClickOutside}),S("div",{className:"uppy-Dashboard-inner","aria-modal":!e.inline&&"true",role:!e.inline&&"dialog",style:{width:e.inline&&e.width?e.width:"",height:e.inline&&e.height?e.height:""}},e.inline?null:S("button",{className:"uppy-u-reset uppy-Dashboard-close",type:"button","aria-label":e.i18n("closeModal"),title:e.i18n("closeModal"),onClick:e.closeModal},S("span",{"aria-hidden":"true"},"×")),S("div",{className:"uppy-Dashboard-innerWrap"},S("div",{className:"uppy-Dashboard-dropFilesHereHint"},e.i18n("dropHint")),a&&S(Cr,e),l&&S("div",{className:"uppy-Dashboard-serviceMsg"},S("svg",{className:"uppy-Dashboard-serviceMsg-icon","aria-hidden":"true",focusable:"false",width:"21",height:"16",viewBox:"0 0 24 19"},S("g",{transform:"translate(0 -1)",fill:"none",fillRule:"evenodd"},S("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"}),S("path",{fill:"#000",d:"M11 6h2l-.3 8h-1.4z"}),S("circle",{fill:"#000",cx:"12",cy:"17",r:"1"}))),S("strong",{className:"uppy-Dashboard-serviceMsg-title"},e.i18n("sessionRestored")),S("div",{className:"uppy-Dashboard-serviceMsg-text"},u>0?e.i18n("recoveredXFiles",{smart_count:u}):e.i18n("recoveredAllFiles"))),a?S(hr,{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,handleRequestThumbn
2ail:e.handleRequestThumbnail,handleCancelThumbnail:e.handleCancelThumbnail,recoveredState:e.recoveredState,individualCancellation:e.individualCancellation,openFileEditor:e.openFileEditor,canEditFile:e.canEditFile,toggleAddFilesPanel:e.toggleAddFilesPanel,isSingleFile:i,itemsPerRow:o}):S(pr,Dr({},e,{isSizeMD:s})),S(Er,null,e.showAddFilesPanel?S(cr,Dr({key:"AddFiles"},e,{isSizeMD:s})):null),S(Er,null,e.fileCardFor?S(kr,Dr({key:"FileCard"},e)):null),S(Er,null,e.activePickerPanel?S(mr,Dr({key:"Picker"},e)):null),S(Er,null,e.showFileEditor?S(gr,Dr({key:"Editor"},e)):null),S("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:r,uploadStartedFiles:o,completeFiles:a,erroredFiles:l,inProgressFiles:u,inProgressNotPausedFiles:h,processingFiles:d,isUploadStarted:p,isAllComplete:c,isAllErrored:f,isAllPaused:m,totalFileCount:Object.keys(i).length,totalProgress:e.totalProgress,allowNewUpload:n,acquirers:g,theme:v,disabled:this.opts.disabled,disableLocalFiles:this.opts.disableLocalFiles,direction:this.opts.direction,activePickerPanel:t.activePickerPanel,showFileEditor:t.showFileEditor,saveFileEditor:this.saveFileEditor,disableInteractiveElements:this.disableInteractiveElements,animateOpenClose:this.opts.animateOpenClose,isClosing:t.isClosing,progressindicators:y,editors:b,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,handleRequestThumbn
2ail:this.handleRequestThumbnail,handleCancelThumbnail:this.handleCancelThumbnail,isDraggingOver:t.isDraggingOver,handleDragOver:this.handleDragOver,handleDragLeave:this.handleDragLeave,handleDrop:this.handleDrop})},Object.defineProperty(this,Vr,{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,Wr,{writable:!0,value:()=>{this.uppy.iteratePlugins(xr(this,Gr)[Gr])}}),Object.defineProperty(this,Gr,{writable:!0,value:e=>{var t;if(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:!1,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(We,{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(et,{id:`${this.id}:Informer`,target:this}),this.opts.disableThumbnailGenerator||this.uppy.use(_i,{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 r=!!this.darkModeMediaQuery&&this.darkModeMediaQuery.matches;this.uppy.log("[Dashboard] Dark mode is "+(r?"on":"off")),this.setDarkModeCapability(r),"auto"===this.opts.theme&&this.darkModeMediaQuery.addListener(this.handleSystemDarkModeChange),xr(this,Vr)[Vr](),xr(this,Wr)[Wr](),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)}(this.opts.plugins||[]).forEach(e=>{const t=this.uppy.getPlugin(e);t&&t.unmount()}),"auto"===this.opts.theme&&this.darkModeMediaQuery.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.modalName=`uppy-Dashboard-${(0,Gs.A)()}`,this.defaultLocale=Ar;const s={target:"body",metaFields:[],trigger:null,inline:!1,width:750,height:550,thumbnailWidth:280,thumbnailType:"image/jpeg",waitForThumbnailsBeforeUpload:!1,defaultPickerIcon:cn,showLinkToFileUploadResult:!1,showProgressDetails:!1,hideUploadButton:!1,hideCancelButton:!1,hideRetryButton:!1,hidePauseResumeButton:!1,hideProgressAfterFinish:!1,doneButtonHandler:()=>
2{this.uppy.clearUploadedFiles(),this.requestCloseModal()},note:null,closeModalOnClickOutside:!1,closeAfterFinish:!1,singleFileFullScreen:!0,disableStatusBar:!1,disableInformer:!1,disableThumbnailGenerator:!1,disablePageScrollWhenModalOpen:!0,animateOpenClose:!0,fileManagerSelectionType:"files",proudlyDisplayPoweredByUppy:!0,onRequestCloseModal:()=>this.closeModal(),showSelectedFiles:!0,showRemoveButtonAfterComplete:!1,browserBackButtonClose:!1,showNativePhotoCameraButton:!1,showNativeVideoCameraButton:!1,theme:"light",autoOpenFileEditor:!1,disabled:!1,disableLocalFiles:!1};this.opts={...s,...t},this.i18nInit(),this.superFocus=function(){let e=!1;return zn()((t,i)=>{const s=Bn(t,i),n=s.contains(document.activeElement);if(n&&e)return;const r=s.querySelector("[data-uppy-super-focusable]");if(!n||r)if(r)r.focus({preventScroll:!0}),e=!0;else{const t=s.querySelector(Un);null==t||t.focus({preventScroll:!0}),e=!1}},260)}(),this.ifFocusedOnUppyRecently=!1,this.makeDashboardInsidesVisibleAnywayTimeout=null,this.removeDragOverClassTimeout=null}}Kr.VERSION="3.7.1";var Xr=i(35956),Yr=i.n(Xr),Qr=i(99817);const Jr=Yr().instanceOf(Qr.A),Zr=Yr().arrayOf(Yr().string),eo=Yr().shape({strings:Yr().object,pluralize:Yr().func}),to=Yr().shape({id:Yr().string.isRequired,name:Yr().string.isRequired,placeholder:Yr().string}),io=Yr().oneOfType([Yr().arrayOf(to),Yr().func]),so=Yr().oneOfType([Yr().string,Yr().number]),no={uppy:Jr,inline:Yr().bool,plugins:Zr,width:so,height:so,showProgressDetails:Yr().bool,hideUploadButton:Yr().bool,hideProgressAfterFinish:Yr().bool,note:Yr().string,metaFields:io,proudlyDisplayPoweredByUppy:Yr().bool,disableStatusBar:Yr().bool,disableInformer:Yr().bool,disableThumbnailGenerator:Yr().bool,thumbnailWidth:Yr().number,locale:eo},ro=["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"],oo=/^(aria-|data-)/,ao=e=>Object.fromEntries(Object.entries(e).filter(e=>{let[t]=e;return oo.test(t)||ro.includes(t)}));i(68821);function lo(e,t){return Object.keys(e).some(i=>!Object.hasOwn(e,i)&&e[i]!==t[i])}class uo extends y.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){if(e.uppy!==this.props.uppy)this.uninstallPlugin(e),this.installPlugin();else if(lo(this.props,e)){const e={...this.props,target:this.container};delete e.uppy,this.plugin.setOptions(e)}}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:e}=this.props,t={id:"react:Dashboard",...this.props,target:this.container};delete t.uppy,e.use(Kr,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,y.createElement)("div",{className:"uppy-Container",ref:e=>{this.container=e},...ao(this.props)})}}uo.propTypes=no,uo.defaultProps={inline:!0};const ho=uo;class po extends y.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(lo(this.props,e)){const e={...this.props,onRequestCloseModal:s};delete e.uppy,this.plugin.setOptions(e)}e.open&&!i?this.plugin.closeModal():!e.open&&i&&this.plugin.openM
2odal()}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{id:e="react:DashboardModal",uppy:t,target:i,open:s,onRequestClose:n,closeModalOnClickOutside:r,disablePageScrollWhenModalOpen:o,inline:a,plugins:l,width:u,height:h,showProgressDetails:d,note:p,metaFields:c,proudlyDisplayPoweredByUppy:f,autoOpenFileEditor:m,animateOpenClose:g,browserBackButtonClose:y,closeAfterFinish:b,disableStatusBar:v,disableInformer:w,disableThumbnailGenerator:P,disableLocalFiles:_,disabled:F,hideCancelButton:S,hidePauseResumeButton:C,hideProgressAfterFinish:T,hideRetryButton:k,hideUploadButton:O,showLinkToFileUploadResult:E,showRemoveButtonAfterComplete:D,showSelectedFiles:A,waitForThumbnailsBeforeUpload:x,fileManagerSelectionType:N,theme:I,thumbnailType:U,thumbnailWidth:B,locale:R}=this.props,M={id:e,target:i,closeModalOnClickOutside:r,disablePageScrollWhenModalOpen:o,inline:a,plugins:l,width:u,height:h,showProgressDetails:d,note:p,metaFields:c,proudlyDisplayPoweredByUppy:f,autoOpenFileEditor:m,animateOpenClose:g,browserBackButtonClose:y,closeAfterFinish:b,disableStatusBar:v,disableInformer:w,disableThumbnailGenerator:P,disableLocalFiles:_,disabled:F,hideCancelButton:S,hidePauseResumeButton:C,hideProgressAfterFinish:T,hideRetryButton:k,hideUploadButton:O,showLinkToFileUploadResult:E,showRemoveButtonAfterComplete:D,showSelectedFiles:A,waitForThumbnailsBeforeUpload:x,fileManagerSelectionType:N,theme:I,thumbnailType:U,thumbnailWidth:B,locale:R,onRequestCloseModal:n};M.target||(M.target=this.container),delete M.uppy,t.use(Kr,M),this.plugin=t.getPlugin(M.id),s&&this.plugin.openModal()}uninstallPlugin(e){void 0===e&&(e=this.props);const{uppy:t}=e;t.removePlugin(this.plugin)}render(){return(0,y.createElement)("div",{className:"uppy-Container",ref:e=>{this.container=e},...ao(this.props)})}}po.propTypes={uppy:Jr.isRequired,target:"undefined"!=typeof window?Yr().instanceOf(window.HTMLElement):Yr().any,open:Yr().bool,onRequestClose:Yr().func,closeModalOnClickOutside:Yr().bool,disablePageScrollWhenModalOpen:Yr().bool,inline:Yr().bool,plugins:Zr,width:so,height:so,showProgressDetails:Yr().bool,note:Yr().string,metaFields:io,proudlyDisplayPoweredByUppy:Yr().bool,autoOpenFileEditor:Yr().bool,animateOpenClose:Yr().bool,browserBackButtonClose:Yr().bool,closeAfterFinish:Yr().bool,disableStatusBar:Yr().bool,disableInformer:Yr().bool,disableThumbnailGenerator:Yr().bool,disableLocalFiles:Yr().bool,disabled:Yr().bool,hideCancelButton:Yr().bool,hidePauseResumeButton:Yr().bool,hideProgressAfterFinish:Yr().bool,hideRetryButton:Yr().bool,hideUploadButton:Yr().bool,showLinkToFileUploadResult:Yr().bool,showRemoveButtonAfterComplete:Yr().bool,showSelectedFiles:Yr().bool,waitForThumbnailsBeforeUpload:Yr().bool,fileManagerSelectionType:Yr().string,theme:Yr().string,thumbnailType:Yr().string,thumbnailWidth:Yr().number,locale:eo},po.defaultProps={metaFields:[],plugins:[],inline:!1,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};const co={strings:{dropHereOr:"Drop here or %{browse}",browse:"browse"}};class fo extends oe{constructor(e,t){super(e,t),this.handleDrop=async e=>{var t,i;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.setPluginState({isDraggingOver:!1});const s=await(0,Ci.A)(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=co;this.opts={target:null,inputName:"files[]",width:"100%",height:"100%",
2note:null,...t},this.i18nInit(),this.isDragDropSupported=jn(),this.removeDragOverClassTimeout=null,this.onInputChange=this.onInputChange.bind(this),this.handleDragOver=this.handleDragOver.bind(this),this.handleDragLeave=this.handleDragLeave.bind(this),this.handleDrop=this.handleDrop.bind(this),this.addFiles=this.addFiles.bind(this),this.render=this.render.bind(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)}}onInputChange(e){const t=(0,Si.A)(e.target.files);t.length>0&&(this.uppy.log("[DragDrop] Files selected through input"),this.addFiles(t)),e.target.value=null}handleDragOver(e){var t,i;e.preventDefault(),e.stopPropagation();const{types:s}=e.dataTransfer,n=s.some(e=>"Files"===e),{allowNewUpload:r}=this.uppy.getState();if(!n||!r)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)}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)}renderHiddenFileInput(){const{restrictions:e}=this.uppy.opts;return S("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 S("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-DragDrop-arrow",width:"16",height:"16",viewBox:"0 0 16 16"},S("path",{d:"M11 10V0H5v10H2l6 6 6-6h-3zm0 0",fillRule:"evenodd"}))}renderLabel(){return S("div",{className:"uppy-DragDrop-label"},this.i18nArray("dropHereOr",{browse:S("span",{className:"uppy-DragDrop-browse"},this.i18n("browse"))}))}renderNote(){return S("span",{className:"uppy-DragDrop-note"},this.opts.note)}render(){return S("button",{type:"button",className:`uppy-u-reset\n      uppy-DragDrop-container\n      ${this.isDragDropSupported?"uppy-DragDrop--isDragDropSupported":""}\n      ${this.getPluginState().isDraggingOver?"uppy-DragDrop--isDraggingOver":""}\n    `,style:{width:this.opts.width,height:this.opts.height},onClick:()=>this.fileInputRef.click(),onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop},this.renderHiddenFileInput(),S("div",{className:"uppy-DragDrop-inner"},fo.renderArrowSvg(),this.renderLabel(),this.renderNote()))}install(){const{target:e}=this.opts;this.setPluginState({isDraggingOver:!1}),e&&this.mount(e,this)}uninstall(){this.unmount()}}fo.VERSION="3.0.3";class mo extends y.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){if(e.uppy!==this.props.uppy)this.uninstallPlugin(e),this.installPlugin();else if(lo(this.props,e)){const e={...this.props,target:this.container};delete e.uppy,this.plugin.setOptions(e)}}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:e,locale:t,inputName:i,width:s,height:n,note:r}=this.props,o={id:"react:DragDrop",locale:t,inputName:i,width:s,height:n,note:r,target:this.container};delete o.uppy,e.use(fo,o),this.plugin=e.getPlugin(o.id)}uninstallPlugin(e){void 0===e&&(e=this.props);const{uppy:t}=e;t.removePlugin(this.plugin)}render(){return(0,y.createElement)("div",{className:"uppy-Container",ref:e=>{this.container=e},...ao(this.props)})}}mo.propTypes={uppy:Jr.isRequired,locale:eo,inputName:Yr().string,width:Yr().string,height:Yr().string,note:Yr().string},mo.defaultProps={locale:null,inputName:"files[]",width:"100%",height:"100%",note:null};class go extends oe{constructor(e,t){super(e,t),this.id=this.opts.id||"ProgressBar",this.title="Progress Bar",this.type="progressindicator";this.opts={target:"body",fixed:!1,hideAfterFinish:!0,...t},this.render=this.render.bind(this)}render(e){const t=e.totalProgress||0,i=(0===t||100===t)&&this.opts.hideAfterFinish;return S("div",{className:"uppy uppy-ProgressBar",style:{position:this.opts.fixed?"fixed":"initial"},"aria-hidden":i},S("div",{className:"uppy-ProgressBar-inner",style:{width:`${t}%`}}),S("div",{className:"uppy-ProgressBar-percentage"},t))}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}}go.VERSION="3.0.4";class yo extends y.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){if(e.uppy!==this.props.uppy)this.uninstallPlugin(e),this.installPlugin();else if(lo(this.props,e)){const e={...this.props,target:this.container};delete e.uppy,this.plugin.setOptions(e)}}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:e,fixed:t,hideAfterFinish:i}=this.props,s={id:"react:ProgressBar",fixed:t,hideAfterFinish:i,target:this.container};delete s.uppy,e.use(go,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,y.createElement)("div",{className:"uppy-Container",ref:e=>{this.container=e},...ao(this.props)})}}yo.propTypes={uppy:Jr.isRequired,fixed:Yr().bool,hideAfterFinish:Yr().bool}
2,yo.defaultProps={fixed:!1,hideAfterFinish:!0};class bo extends y.Component{componentDidMount(){this.installPlugin()}componentDidUpdate(e){if(e.uppy!==this.props.uppy)this.uninstallPlugin(e),this.installPlugin();else if(lo(this.props,e)){const e={...this.props,target:this.container};delete e.uppy,this.plugin.setOptions(e)}}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:e,hideUploadButton:t,hideRetryButton:i,hidePauseResumeButton:s,hideCancelButton:n,showProgressDetails:r,hideAfterFinish:o,doneButtonHandler:a}=this.props,l={id:"react:StatusBar",hideUploadButton:t,hideRetryButton:i,hidePauseResumeButton:s,hideCancelButton:n,showProgressDetails:r,hideAfterFinish:o,doneButtonHandler:a,target:this.container};delete l.uppy,e.use(We,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,y.createElement)("div",{className:"uppy-Container",ref:e=>{this.container=e},...ao(this.props)})}}bo.propTypes={uppy:Jr.isRequired,hideUploadButton:Yr().bool,hideRetryButton:Yr().bool,hidePauseResumeButton:Yr().bool,hideCancelButton:Yr().bool,showProgressDetails:Yr().bool,hideAfterFinish:Yr().bool,doneButtonHandler:Yr().func},bo.defaultProps={hideUploadButton:!1,hideRetryButton:!1,hidePauseResumeButton:!1,hideCancelButton:!1,showProgressDetails:!1,hideAfterFinish:!0,doneButtonHandler:null};const vo={strings:{chooseFiles:"Choose files"}};class wo extends oe{constructor(e,t){super(e,t),this.id=this.opts.id||"FileInput",this.title="File Input",this.type="acquirer",this.defaultLocale=vo;this.opts={target:null,pretty:!0,inputName:"files[]",...t},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=(0,Si.A)(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(","):null;return S("div",{className:"uppy-FileInput-container"},S("input",{className:"uppy-FileInput-input",style:this.opts.pretty&&{width:"0.1px",height:"0.1px",opacity:0,overflow:"hidden",position:"absolute",zIndex:-1},type:"file",name:this.opts.inputName,onChange:this.handleInputChange,multiple:1!==e.maxNumberOfFiles,accept:t,ref:e=>{this.input=e}}),this.opts.pretty&&S("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()}}wo.VERSION="3.0.4";class Po extends y.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};delete n.uppy,e.use(wo,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,y.createElement)("div",{className:"uppy-Container",ref:e=>{this.container=e}})}}Po.propTypes={uppy:Jr.isRequired,locale:eo,pretty:Yr().bool,inputName:Yr().string},Po.defaultProps={locale:void 0,pretty:!0,inputName:"files[]"}},47236(e,t,i){"use strict";i.d(t,{A:()=>ie});i(36342),i(18527),i(71124),i(43080),i(24354);var s=i(87138),n=i(15475);function r(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var o=0;function a(e){return"__private_"+o+++"_"+e}var l=a("uppy"),u=a("events");class h{constructor(e){Object.defineProperty(this,l,{writable:!0,value:void 0}),Object.defineProperty(this,u,{writable:!0,value:[]}),r(this,l)[l]=e}on(e,t){return r(this,u)[u].push([e,t]),r(this,l)[l].on(e,t)}remove(){for(const[e,t]of r(this,u)[u].splice(0))r(this,l)[l].off(e,t)}onFilePause(e,t){this.on("upload-pause",(i,s)=>{e===i&&t(s)})}onFileRemove(e,t){this.on("file-removed",i=>{e===i.id&&t(i.id)})}onPause(e,t){this.on("upload-pause",(i,s)=>{e===i&&t(s)})}onRetry(e,t){this.on("upload-retry",i=>{e===i&&t()})}onRetryAll(e,t){this.on("retry-all",()=>{r(this,l)[l].getFile(e)&&t()})}onPauseAll(e,t){this.on("pause-all",()=>{r(this,l)[l].getFile(e)&&t()})}onCancelAll(e,t){var i=this;this.on("cancel-all",function(){r(i,l)[l].getFile(e)&&t(...arguments)})}onResumeAll(e,t){this.on("resume-all",()=>{r(this,l)[l].getFile(e)&&t()})}}function d(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var p=0;function c(e){return"__private_"+p+++"_"+e}var f=c("aliveTimer"),m=c("isDone"),g=c("onTimedOut"),y=c("timeout");const b=class{constructor(e,t){Object.defineProperty(this,f,{writable:!0,value:void 0}),Object.defineProperty(this,m,{writable:!0,value:!1}),Object.defineProperty(this,g,{writable:!0,value:void 0}),Object.defineProperty(this,y,{writable:!0,value:void 0}),d(this,y)[y]=e,d(this,g)[g]=()=>t(e)}progress(){d(this,m)[m]||d(this,y)[y]>0&&(clearTimeout(d(this,f)[f]),d(this,f)[f]=setTimeout(d(this,g)[g],d(this,y)[y]))}done(){d(this,m)[m]||(clearTimeout(d(this,f)[f]),d(this,f)[f]=void 0,d(this,m)[m]=!0)}};function v(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var w=0;function P(e){return"__private_"+w+++"_"+e}function _(e){if(null!=e){var t;const i=()=>this.abort(e.reason);e.addEventListener("abort",i,{once:!0});const s=()=>{e.removeEventListener("abort",i)};null==(t=this.then)||t.call(this,s,s)}return this}var F=P("activeRequests"),S=P("queuedHandlers"),C=P("paused"),T=P("pauseTimer"),k=P("downLimit"),O=P("upperLimit"),E=P("rateLimitingTimer"),D=P("call"),A=P("queueNext"),x=P("next"),N=P("queue"),I=P("dequeue"),U=P("resume"),B=P("increaseLimit");class R{constructor(e){Object.defineProperty(this,I,{value:q}),Object.defineProperty(this,N,{value:j}),Object.defineProperty(this,x,{value:z}),Object.defineProperty(this,A,{value:L}),Object.defineProperty(this,D,{value:M}),Object.defineProperty(this,F,{writable:!0,value:0}),Object.defineProperty(this,S,{writable:!0,value:[]}),Object.defineProperty(this,C,{writable:!0,value:!1}),Object.defineProperty(this,T,{writable:!0,value:void 0}),Object.defineProperty(this,k,{writable:!0,value:1}),Object.defineProperty(this,O,{writable:!0,value:void 0}),Object.defineProperty(this,E,{writable:!0,value:void 0}),Object.defineProperty(this,U,{writable:!0,value:()=>this.resume()}),Object.defineProperty(this,B,{writable:!0,value:()=>{if(v(this,C)[C])v(this,E)[E]=setTimeout(v(this,B)[B],0);else{v(this,k)[k]=this.limit,this.limit=Math.ceil((v(this,O)[O]+v(this,k)[k])/2);for(let e=v(this,k)[k];e<=this.limit;e++)v(this,A)[A]();v(this,O)[O]-v(this,k)[k]>3?v(this,E)[E]=setTimeout(v(this,B)[B],2e3):v(this,k)[k]=Math.floor(v(this,k)[k]/2)}}}),this.limit="number"!=typeof e||0===e?1/0:e}run(e,t){return!v(this,C)[C]&&v(this,F)[F]<this.limit?v(this,D)[D](e):v(this,N)[N](e,t)}wrapSyncFunction(e,t){var i=this;return function(){for(var s=arguments.length,n=new Array(s),r=0;r<s;r++)n[r]=arguments[r];const o=i.run(()=>(e(...n),queueMicrotask(()=>o.done()),()=>{}),t);return{abortOn:_,abort(){o.abort()}}}}wrapPromiseFunction(e,t){var i=this;return function(){for(var s=arguments.length,n=new Array(s),r=0;r<s;r++)n[r]=arguments[r];let o;const a=new Promise((s,r)=>{o=i.run(()=>{let t,i;try{i=Promise.resolve(e(...n))}catch(e){i=Promise.reject(e)}return i.then(e=>{t?r(t):(o.done(),s(e))},e=>{t?r(t):(o.done(),r(e))}),e=>{t=function createCancelError(e){return new Error("Cancelled",{cause:e})}(e)}},t)});return a.abort=e=>{o.abort(e)},a.abortOn=_,a}}resume(){v(this,C)[C]=!1,clearTimeout(v(this,T)[T]);for(let e=0;e<this.limit;e++)v(this,A)[A]()}pause(e){void 0===e&&(e=null),v(this,C)[C]=!0,clearTimeout(v(this,T)[T]),null!=e&&(v(this,T)[T]=setTimeout(v(this,U)[U],e))}rateLimit(e){clearTimeout(v(this,E)[E]),this.pause(e),this.limit>1&&Number.isFinite(this.limit)&&(v(this,O)[O]=this.limit-1,this.limit=v(this,k)[k],v(this,E)[E]=setTimeout(v(this,B)[B],e))}get isPaused(){return v(this,C)[C]}}function M(e){v(this,F)[F]+=1;let t,i=!1;try{t=e()}
2catch(e){throw v(this,F)[F]-=1,e}return{abort:e=>{i||(i=!0,v(this,F)[F]-=1,null==t||t(e),v(this,A)[A]())},done:()=>{i||(i=!0,v(this,F)[F]-=1,v(this,A)[A]())}}}function L(){queueMicrotask(()=>v(this,x)[x]())}function z(){if(v(this,C)[C]||v(this,F)[F]>=this.limit)return;if(0===v(this,S)[S].length)return;const e=v(this,S)[S].shift();if(null==e)throw new Error("Invariant violation: next is null");const t=v(this,D)[D](e.fn);e.abort=t.abort,e.done=t.done}function j(e,t){const i={fn:e,priority:(null==t?void 0:t.priority)||0,abort:()=>{v(this,I)[I](i)},done:()=>{throw new Error("Cannot mark a queued request as done: this indicates a bug")}},s=v(this,S)[S].findIndex(e=>i.priority>e.priority);return-1===s?v(this,S)[S].push(i):v(this,S)[S].splice(s,0,i),i}function q(e){const t=v(this,S)[S].indexOf(e);-1!==t&&v(this,S)[S].splice(t,1)}const $=Symbol("__queue");class NetworkError extends Error{constructor(e,t){void 0===t&&(t=null),super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall."),this.cause=e,this.isNetworkError=!0,this.request=t}}const H=NetworkError;const V=function isNetworkError(e){return!!e&&(0!==e.readyState&&4!==e.readyState||0===e.status)};i(8922);const W={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 K=0;function X(e){return"__private_"+K+++"_"+e}function buildResponseError(e,t){let i=t;return i||(i=new Error("Upload error")),"string"==typeof i&&(i=new Error(i)),i instanceof Error||(i=Object.assign(new Error("Upload error"),{data:i})),V(e)?(i=new H(i,e),i):(i.request=e,i)}function Y(e){return e.data.slice(0,e.data.size,e.meta.type)}var Q=X("uploadLocalFile"),J=X("uploadBundle"),Z=X("getCompanionClientArgs"),ee=X("uploadFiles"),te=X("handleUpload");class ie extends s.A{constructor(e,t){super(e,t),Object.defineProperty(this,ee,{value:oe}),Object.defineProperty(this,Z,{value:re}),Object.defineProperty(this,J,{value:ne}),Object.defineProperty(this,Q,{value:se}),Object.defineProperty(this,te,{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[$]||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=function(e){return e.filter(e=>!(e=>"error"in e&&!!e.error)(e))}(this.uppy.getFilesByIds(e)),i=function(e){return e.filter(e=>{var t;return!(null!=(t=e.progress)&&t.uploadStarted&&e.isRestored)})}(t);if(this.uppy.emit("upload-start",i),this.opts.bundle){if(t.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,J)[J](t)}else await G(this,ee)[ee](t)}}),this.type="uploader",this.id=this.opts.id||"XHRUpload",this.title="XHRUpload",this.defaultLocale=W;const i={formData:!0,fieldName:t.bundle?"files[]":"file",method:"post",allowedMetaFields:null,responseUrlFieldName:"url",bundle:!1,headers:{},timeout:3e4,limit:5,withCredentials:!1,responseType:"",getResponseData(t){let i={};try{i=JSON.parse(t)}catch(t){e.log(t)}return i},getResponseError(e,t){let i=new Error("Upload error");return V(t)&&(i=new H(i,t)),i},validateStatus:e=>e>=200&&e<300};if(this.opts={...i,...t},this.i18nInit(),$ in this.opts?this.requests=this.opts[$]:this.requests=new R(this.opts.limit),this.opts.bundle&&!this.opts.formData)throw new Error("`opts.formData` must be true when `opts.bundle` is enabled.");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:i}=this.opts,s={...this.opts,...t||{},...e.xhrUpload||{},headers:{}};return"function"==typeof i?s.headers=i(e):Object.assign(s.headers,this.opts.headers),t&&Ob
2ject.assign(s.headers,t.headers),e.xhrUpload&&Object.assign(s.headers,e.xhrUpload.headers),s}addMetadata(e,t,i){(Array.isArray(i.allowedMetaFields)?i.allowedMetaFields:Object.keys(t)).forEach(i=>{Array.isArray(t[i])?t[i].forEach(t=>e.append(i,t)):e.append(i,t[i])})}createFormDataUpload(e,t){const i=new FormData;this.addMetadata(i,e.meta,t);const s=Y(e);return e.name?i.append(t.fieldName,s,e.meta.name):i.append(t.fieldName,s),i}createBundledUpload(e,t){const i=new FormData,{meta:s}=this.uppy.getState();return this.addMetadata(i,s,t),e.forEach(e=>{const t=this.getOptions(e),s=Y(e);e.name?i.append(t.fieldName,s,e.name):i.append(t.fieldName,s)}),i}install(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!1}})}this.uppy.addUploader(G(this,te)[te])}uninstall(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!0}})}this.uppy.removeUploader(G(this,te)[te])}}async function se(e,t,i){const s=this.getOptions(e);
2return this.uppy.log(`uploading ${t} of ${i}`),new Promise((t,i)=>{const r=s.formData?this.createFormDataUpload(e,s):e.data,o=new XMLHttpRequest,a=new h(this.uppy);let l;this.uploaderEvents[e.id]=a;const u=new b(s.timeout,()=>{const t=new Error(this.i18n("uploadStalled",{seconds:Math.ceil(s.timeout/1e3)}));this.uppy.emit("upload-stalled",t,[e])}),d=(0,n.A)();o.upload.addEventListener("loadstart",()=>{this.uppy.log(`[XHRUpload] ${d} started`)}),o.upload.addEventListener("progress",t=>{this.uppy.log(`[XHRUpload] ${d} progress: ${t.loaded} / ${t.total}`),u.progress(),t.lengthComputable&&this.uppy.emit("upload-progress",e,{uploader:this,bytesUploaded:t.loaded,bytesTotal:t.total})}),o.addEventListener("load",()=>{if(this.uppy.log(`[XHRUpload] ${d} finished`),u.done(),l.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null),s.validateStatus(o.status,o.responseText,o)){const i=s.getResponseData(o.responseText,o),n=i[s.responseUrlFieldName],r={status:o.status,body:i,uploadURL:n};
2return this.uppy.emit("upload-success",e,r),n&&this.uppy.log(`Download ${e.name} from ${n}`),t(e)}const n=s.getResponseData(o.responseText,o),r=buildResponseError(o,s.getResponseError(o.responseText,o)),a={status:o.status,body:n};return this.uppy.emit("upload-error",e,r,a),i(r)}),o.addEventListener("error",()=>{this.uppy.log(`[XHRUpload] ${d} errored`),u.done(),l.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null);const t=buildResponseError(o,s.getResponseError(o.responseText,o));return this.uppy.emit("upload-error",e,t),i(t)}),o.open(s.method.toUpperCase(),s.endpoint,!0),o.withCredentials=s.withCredentials,""!==s.responseType&&(o.responseType=s.responseType),l=this.requests.run(()=>{const t=this.getOptions(e);return Object.keys(t.headers).forEach(e=>{o.setRequestHeader(e,t.headers[e])}),o.send(r),()=>{u.done(),o.abort()}}),a.onFileRemove(e.id,()=>{l.abort(),i(new Error("File removed"))}),a.onCancelAll(e.id,e=>{let{reason:t}=e;"user"===t&&l.abort(),i(new Error("Upload cancelled"))})})}function ne(e){return new Promise((t,i)=>{const{endpoint:s}=this.opts,{method:n}=this.opts,r=this.uppy.getState().xhrUpload,o=this.createBundledUpload(e,{...this.opts,...r||{}}),a=new XMLHttpRequest,emitError=t=>{e.forEach(e=>{this.uppy.emit("upload-error",e,t)})},l=new b(this.opts.timeout,()=>{const t=new Error(this.i18n("uploadStalled",{seconds:Math.ceil(this.opts.timeout/1e3)}));
2this.uppy.emit("upload-stalled",t,e)});a.upload.addEventListener("loadstart",()=>{this.uppy.log("[XHRUpload] started uploading bundle"),l.progress()}),a.upload.addEventListener("progress",t=>{l.progress(),t.lengthComputable&&e.forEach(e=>{this.uppy.emit("upload-progress",e,{uploader:this,bytesUploaded:t.loaded/t.total*e.size,bytesTotal:e.size})})}),a.addEventListener("load",s=>{if(l.done(),this.opts.validateStatus(s.target.status,a.responseText,a)){const i=this.opts.getResponseData(a.responseText,a),n={status:s.target.status,body:i};return e.forEach(e=>{this.uppy.emit("upload-success",e,n)}),t()}const n=this.opts.getResponseError(a.responseText,a)||new Error("Upload error");return n.request=a,emitError(n),i(n)}),a.addEventListener("error",()=>{l.done();const e=this.opts.getResponseError(a.responseText,a)||new Error("Upload error");return emitError(e),i(e)}),this.uppy.on("cancel-all",function(e){let{reason:t}=void 0===e?{}:e;"user"===t&&(l.done(),a.abort())}),a.open(n.toUpperCase(),s,!0),a.withCredentials=this.opts.withCredentials,""!==this.opts.responseType&&(a.responseType=this.opts.responseType),Object.keys(this.opts.headers).forEach(e=>{a.setRequestHeader(e,this.opts.headers[e])}),a.send(o)})}function re(e){const t=this.getOptions(e),i=Array.isArray(t.allowedMetaFields)?t.allowedMetaFields:Object.keys(e.meta);return{...e.remote.body,protocol:"multipart",endpoint:t.endpoint,size:e.data.size,fieldname:t.fieldName,metadata:Object.fromEntries(i.map(t=>[t,e.meta[t]])),httpMethod:t.method,useFormData:t.formData,headers:t.headers}}async function oe(e){await Promise.allSettled(e.map((t,i)=>{const s=parseInt(i,10)+1,n=e.length;if(t.isRemote){const e=()=>this.requests,i=new AbortController,s=e=>{e.id===t.id&&i.abort()};this.uppy.on("file-removed",s);
2const n=this.uppy.getRequestClientForFile(t).uploadRemoteFile(t,G(this,Z)[Z](t),{signal:i.signal,getQueue:e});return this.requests.wrapSyncFunction(()=>{this.uppy.off("file-removed",s)},{priority:-1})(),n}return G(this,Q)[Q](t,s,n)}))}ie.VERSION="3.6.0"},87138(e,t,i){"use strict";i.d(t,{A:()=>n});var s=i(54380);class n{constructor(e,t){this.uppy=e,this.opts=null!=t?t:{}}getPluginState(){const{plugins:e}=this.uppy.getState();return(null==e?void 0:e[this.id])||{}}setPluginState(e){const{plugins:t}=this.uppy.getState();this.uppy.setState({plugins:{...t,[this.id]:{...t[this.id],...e}}})}setOptions(e){this.opts={...this.opts,...e},this.setPluginState(void 0),this.i18nInit()}i18nInit(){const e=new s.A([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.setPluginState(void 0)}addTarget(e){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}update(e){}afterUpdate(){}}},99817(e,t,i){"use strict";i.d(t,{A:()=>be});i(36342),i(8922),i(18683),i(9148),i(18527),i(71124),i(70034),i(43080),i(68821),i(79929),i(79063),i(25226),i(19031),i(64144),i(66663),i(70091),i(15765),i(78245);var s=i(54380),n=i(28867),r=i.n(n),o=i(15475),a=i(50327),l=i.n(a);function u(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var h=0;function d(e){return"__private_"+h+++"_"+e}var p=d("callbacks"),c=d("publish");class f{constructor(){Object.defineProperty(this,c,{value:m}),this.state={},Object.defineProperty(this,p,{writable:!0,value:new Set})}getState(){return this.state}setState(e){const t={...this.state},i={...this.state,...e};this.state=i,u(this,c)[c](t,i,e)}subscribe(e){return u(this,p)[p].add(e),()=>{u(this,p)[p].delete(e)}}}function m(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];u(this,p)[p].forEach(e=>{e(...t)})}f.VERSION="3.2.2";const g=f;var y=i(20139),b=i(44355),v=i(73354);function w(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 i=t[1].split(".",2),s=parseInt(i[0],10),n=parseInt(i[1],10);return s<15||15===s&&n<15063||(s>18||18===s&&n>=18218)}function P(e){return e<10?`0${e}`:e.toString()}function _(){const e=new Date;return`${P(e.getHours())}:${P(e.getMinutes())}:${P(e.getSeconds())}`}const F={debug:()=>{},warn:()=>{},error:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return console.error(`[Uppy] [${_()}]`,...t)}},S={debug:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return console.debug(`[Uppy] [${_()}]`,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return console.warn(`[Uppy] [${_()}]`,...t)},error:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return console.error(`[Uppy] [${_()}]`,...t)}};i(36650);var C=i(7360),T=i.n(C),k=i(16159),O=i.n(k);const E={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};class RestrictionError extends Error{constructor(e,t){var i;super(e),this.isRestriction=!0,this.isUserFacing=null==(i=null==t?void 0:t.isUserFacing)||i,null!=t&&t.file&&(this.file=t.file)}}class D{constructor(e,t){this.getI18n=t,this.getOpts=()=>{var t;const i=e();if(null!=(null==(t=i.restrictions)?void 0:t.allowedFileTypes)&&!Array.isArray(i.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return i}}validateAggregateRestrictions(e,t){const{maxTotalFileSize:i,maxNumberOfFiles:s}=this.getOpts().restrictions;if(s){if(e.filter(e=>!e.isGhost).length+t.length>s)throw new RestrictionError(`${this.getI18n()("youCanOnlyUploadX",{smart_count:s})}`)}if(i){const s=[...e,...t].reduce((e,t)=>{var i;return e+(null!=(i=t.size)?i:0)},0);if(s>i)throw new RestrictionError(this.getI18n()("aggregateExceedsSize",{sizeAllowed:T()(i),size:T()(s)}))}}validateSingleFile(e){const{maxFileSize:t,minFileSize:i,allowedFileTypes:s}=this.getOpts().restrictions;if(s){if(!s.some(t=>t.includes("/")?!!e.type&&O()(e.type.replace(/;.*?$/,""),t):!("."!==t[0]||!e.extension)&&e.extension.toLowerCase()===t.slice(1).toLowerCase())){const t=s.join(", ");throw new RestrictionError(this.getI18n()("youCanOnlyUploadFileTypes",{types:t}),{file:e})}}if(t&&null!=e.size&&e.size>t)throw new RestrictionError(this.getI18n()("exceedsSize",{size:T()(t),file:e.n
2ame}),{file:e});if(i&&null!=e.size&&e.size<i)throw new RestrictionError(this.getI18n()("inferiorSize",{size:T()(i)}),{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 RestrictionError(this.getI18n()("youHaveToAtLeastSelectX",{smart_count:t}))}getMissingRequiredMetaFields(e){const t=new RestrictionError(this.getI18n()("missingRequiredMetaFieldOnFile",{fileName:e.name})),{requiredMetaFields:i}=this.getOpts().restrictions,s=[];for(const t of i)Object.hasOwn(e.meta,t)&&""!==e.meta[t]||s.push(t);return{missingFields:s,error:t}}}const A={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"},aggregateExceedsSize:"You selected %{size} of files, but maximum allowed size is %{sizeAllowed}",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",unnamed:"Unnamed"}};let x,N;function I(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var U=0;function B(e){return"__private_"+U+++"_"+e}const R={totalProgress:0,allowNewUpload:!0,error:null,recoveredState:null};var M=B("plugins"),L=B("restricter"),z=B("storeUnsubscribe"),j=B("emitter"),q=B("preProcessors"),$=B("uploaders"),H=B("postProcessors"),V=B("informAndEmit"),W=B("checkRequiredMetaFieldsOnFile"),G=B("checkRequiredMetaFields"),K=B("assertNewUploadAllowed"),X=B("transformFile"),Y=B("startIfAutoProceed"),Q=B("checkAndUpdateFileState"),J=B("addListeners"),Z=B("updateOnlineStatus"),ee=B("requestClientById"),te=B("createUpload"),ie=B("getUpload"),se=B("removeUpload"),ne=B("runUpload");x=Symbol.for("uppy test: getPlugins"),N=Symbol.for("uppy test: createUpload");class re{constructor(e){Object.defineProperty(this,ne,{value:ye}),Object.defineProperty(this,se,{value:ge}),Object.defineProperty(this,ie,{value:me}),Object.defineProperty(this,te,{value:fe}),Object.defineProperty(this,J,{value:ce}),Object.defineProperty(this,Q,{value:pe}),Object.defineProperty(this,Y,{value:de}),Object.defineProperty(this,X,{value:he}),Object.defineProperty(this,K,{value:ue}),Object.defineProperty(this,G,{value:le}),Object.defineProperty(this,W,{value:ae}),Object.defineProperty(this,V,{value:oe}),Object.defineProperty(this,M,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,L,{writable:!0,value:void 0}),Object.defineProperty(this,z,{writable:!0,value:void 0}),Object.defineProperty(this,j,{writable:!0,value:r()()}),Object.defineProperty(this,q,{writable:!0,value:new Set}),Object.defineProperty(this,$,{writable:!0,value:new Set}),Object.defineProperty(this,H,{writable:!0,value:new Set}),this.scheduledAutoProceed=null,this.wasOffline=!1,this.calculateProgress=l()((e,t)=>{const i=this.getFile(null==e?void 0:e.id);if(null==e||!i)return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);if(100===i.progress.percentage)return void this.log(`Not setting progress for a file that has been already uploaded: ${e.id}`);const s=Number.isFinite(t.bytesTotal)&&t.bytesTotal>0;this.setFileState(e.id,{progress:{...i.progress,bytesUploaded:t.bytesUploaded,bytesTotal:t.bytesTotal,percentage:s?Math.round(t.bytesUploaded/t.bytesTotal*100):0}
2}),this.calculateTotalProgress()},500,{leading:!0,trailing:!0}),Object.defineProperty(this,Z,{writable:!0,value:this.updateOnlineStatus.bind(this)}),Object.defineProperty(this,ee,{writable:!0,value:new Map}),this.defaultLocale=A;const t={id:"uppy",autoProceed:!1,allowMultipleUploadBatches:!0,debug:!1,restrictions:E,meta:{},onBeforeFileAdded:(e,t)=>!Object.hasOwn(t,e.id),onBeforeUpload:e=>e,store:new g,logger:F,infoTimeout:5e3},i={...t,...e};this.opts={...i,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=S),this.log(`Using Core v${re.VERSION}`),this.i18nInit(),this.store=this.opts.store,this.setState({...R,plugins:{},files:{},currentUploads:{},capabilities:{uploadProgress:w(),individualCancellation:!0,resumableUploads:!1},meta:{...this.opts.meta},info:[]}),I(this,L)[L]=new D(()=>this.opts,()=>this.i18n),I(this,z)[z]=this.store.subscribe((e,t,i)=>{this.emit("state-update",e,t,i),this.updateAll(t)}),this.opts.debug&&"undefined"!=typeof window&&(window[this.opts.id]=this),I(this,J)[J]()}emit(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];I(this,j)[j].emit(e,...i)}on(e,t){return I(this,j)[j].on(e,t),this}once(e,t){return I(this,j)[j].once(e,t),this}off(e,t){return I(this,j)[j].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[i,s]=e;return[i,{...t[i],...s}]}))}})}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 s.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},i={};Object.keys(t).forEach(s=>{i[s]={...t[s],progress:{...t[s].progress,...e}}}),this.setState({files:i,...R}),this.emit("reset-progress")}clearUploadedFiles(){const{capabilities:e,currentUploads:t}=this.getState();if(Object.keys(t).length>0&&!e.individualCancellation)throw new Error("The installed uploader plugin does not allow removing files during an upload.");this.setState({...R,files:{}})}addPreProcessor(e){I(this,q)[q].add(e)}removePreProcessor(e){return I(this,q)[q].delete(e)}addPostProcessor(e){I(this,H)[H].add(e)}removePostProcessor(e){return I(this,H)[H].delete(e)}addUploader(e){I(this,$)[$].add(e)}removeUploader(e){return I(this,$)[$].delete(e)}setMeta(e){const t={...this.getState().meta,...e},i={...this.getState().files};
2Object.keys(i).forEach(t=>{i[t]={...i[t],meta:{...i[t].meta,...e}}}),this.log("Adding metadata:"),this.log(e),this.setState({meta:t,files:i})}setFileMeta(e,t){const i={...this.getState().files};if(!i[e])return void this.log("Was trying to set metadata for a file that has been removed: ",e);const s={...i[e].meta,...t};i[e]={...i[e],meta:s},this.setState({files:i})}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:i}=this.getState(),s=Object.values(e),n=[],r=[],o=[],a=[],l=[],u=[],h=[],d=[],p=[];for(const e of s){const{progress:t}=e;!t.uploadComplete&&t.uploadStarted&&(n.push(e),e.isPaused||d.push(e)),t.uploadStarted||r.push(e),(t.uploadStarted||t.preprocess||t.postprocess)&&o.push(e),t.uploadStarted&&a.push(e),e.isPaused&&l.push(e),t.uploadComplete&&u.push(e),e.error&&h.push(e),(t.preprocess||t.postprocess)&&p.push(e)}return{newFiles:r,startedFiles:o,uploadStartedFiles:a,pausedFiles:l,completeFiles:u,erroredFiles:h,inProgressFiles:n,inProgressNotPausedFiles:d,processingFiles:p,isUploadStarted:a.length>0,isAllComplete:100===t&&u.length===s.length&&0===p.length,isAllErrored:!!i&&h.length===s.length,isAllPaused:0!==n.length&&l.length===n.length,isUploadInProgress:n.length>0,isSomeGhost:s.some(e=>e.isGhost)}}validateRestrictions(e,t){void 0===t&&(t=this.getFiles());try{I(this,L)[L].validate(t,[e])}catch(e){return e}return null}checkIfFileAlreadyExists(e){const{files:t}=this.getState();return!(!t[e]||t[e].isGhost)}addFile(e){I(this,K)[K](e);const{nextFilesState:t,validFilesToAdd:i,errors:s}=I(this,Q)[Q]([e]),n=s.filter(e=>e.isRestriction);if(I(this,V)[V](n),s.length>0)throw s[0];this.setState({files:t});const[r]=i;return this.emit("file-added",r),this.emit("files-added",i),this.log(`Added file: ${r.name}, ${r.id}, mime type: ${r.type}`),I(this,Y)[Y](),r.id}addFiles(e){I(this,K)[K]();const{nextFilesState:t,validFilesToAdd:i,errors:s}=I(this,Q)[Q](e),n=s.filter(e=>e.isRestriction);I(this,V)[V](n);const r=s.filter(e=>!e.isRestriction);if(r.length>0){let e="Multiple errors occurred while adding files:\n";if(r.forEach(t=>{e+=`\n * ${t.message}`}),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:r.length}),details:e},"error",this.opts.infoTimeout),"function"==typeof AggregateError)throw new AggregateError(r,e);{const t=new Error(e);throw t.errors=r,t}}this.setState({files:t}),i.forEach(e=>{this.emit("file-added",e)}),this.emit("files-added",i),i.length>5?this.log(`Added batch of ${i.length} files`):Object.values(i).forEach(e=>{this.log(`Added file: ${e.name}\n id: ${e.id}\n type: ${e.type}`)}),i.length>0&&I(this,Y)[Y]()}removeFiles(e,t){const{files:i,currentUploads:s}=this.getState(),n={...i},r={...s},o=Object.create(null);function a(e){return void 0===o[e]}e.forEach(e=>{i[e]&&(o[e]=i[e],delete n[e])}),Object.keys(r).forEach(e=>{const t=s[e].fileIDs.filter(a);if(0===t.length)return void delete r[e];const{capabilities:i}=this.getState();if(t.length!==s[e].fileIDs.length&&!i.individualCancellation)throw new Error("The installed uploader plugin does not allow removing files during an upload.");r[e]={...s[e],fileIDs:t}});const l={currentUploads:r,files:n};0===Object.keys(n).length&&(l.allowNewUpload=!0,l.error=null,l.recoveredState=null),this.setState(l),this.calculateTotalProgress();const u=Object.keys(o);u.forEach(e=>{this.emit("file-removed",o[e],t)}),u.length>5?this.log(`Removed ${u.length} files`):this.log(`Removed files: ${u.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||!1);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 i={...e[t],isPaused:!0};e[t]=i}),this.setState({files:e}),this.emit("pause-all")}
2resumeAll(){const e={...this.getState().files};Object.keys(e).filter(t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted).forEach(t=>{const i={...e[t],isPaused:!1,error:null};e[t]=i}),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 i={...e[t],isPaused:!1,error:null};e[t]=i}),this.setState({files:e,error:null}),this.emit("retry-all",t),0===t.length)return Promise.resolve({successful:[],failed:[]});const i=I(this,te)[te](t,{forceAllowNewUpload:!0});return I(this,ne)[ne](i)}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(R)}}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit("upload-retry",e);const t=I(this,te)[te]([e],{forceAllowNewUpload:!0});return I(this,ne)[ne](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),i=e.filter(e=>null==e.progress.bytesTotal);if(0===t.length){const t=100*e.length,s=i.reduce((e,t)=>e+t.progress.percentage,0),n=Math.round(s/t*100);return void this.setState({totalProgress:n})}let s=t.reduce((e,t)=>{var i;return e+(null!=(i=t.progress.bytesTotal)?i:0)},0);const n=s/t.length;s+=n*i.length;let r=0;t.forEach(e=>{r+=e.progress.bytesUploaded}),i.forEach(e=>{r+=n*(e.progress.percentage||0)/100});let o=0===s?0:Math.round(r/s*100);o>100&&(o=100),this.setState({totalProgress:o}),this.emit("progress",o)}updateOnlineStatus(){var e;
2null==(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 i=new e(this,t),s=i.id;if(!s)throw new Error("Your plugin must have an id");if(!i.type)throw new Error("Your plugin must have a type");const n=this.getPlugin(s);if(n){const e=`Already found a plugin named '${n.id}'. Tried to use: '${s}'.\nUppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id.`;throw new Error(e)}return e.VERSION&&this.log(`Using ${s} v${e.VERSION}`),i.type in I(this,M)[M]?I(this,M)[M][i.type].push(i):I(this,M)[M][i.type]=[i],i.install(),this.emit("plugin-added",i),this}getPlugin(e){for(const t of Object.values(I(this,M)[M])){const i=t.find(t=>t.id===e);if(null!=i)return i}}[x](e){return I(this,M)[M][e]}iteratePlugins(e){Object.values(I(this,M)[M]).flat(1).forEach(e)}removePlugin(e){this.log(`Removing plugin ${e.id}`),this.emit("plugin-remove",e),e.uninstall&&e.uninstall();const t=I(this,M)[M][e.type],i=t.findIndex(t=>t.id===e.id);-1!==i&&t.splice(i,1);const s={plugins:{...this.getState().plugins,[e.id]:void 0}};this.setState(s)}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}),I(this,z)[z](),this.iteratePlugins(e=>{this.removePlugin(e)}),"undefined"!=typeof window&&window.removeEventListener&&(window.removeEventListener("online",I(this,Z)[Z]),window.removeEventListener("offline",I(this,Z)[Z]))}hideInfo(){const{info:e}=this.getState();this.setState({info:e.slice(1)}),this.emit("info-hidden")}info(e,t,i){void 0===t&&(t="info"),void 0===i&&(i=3e3);const s="object"==typeof e;this.setState({info:[...this.getState().info,{type:t,message:s?e.message:e,details:s?e.details:null}]}),setTimeout(()=>this.hideInfo(),i),this.emit("info-visible")}log(e,t){const{logger:i}=this.opts;switch(t){case"error":i.error(e);break;case"warning":i.warn(e);break;default:i.debug(e)}}registerRequestClient(e,t){I(this,ee)[ee].set(e,t)}
2getRequestClientForFile(e){if(!e.remote)throw new Error(`Tried to get RequestClient for a non-remote file ${e.id}`);const t=I(this,ee)[ee].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]?I(this,ne)[ne](e):(I(this,se)[se](e),Promise.reject(new Error("Nonexistent upload")))}[N](){return I(this,te)[te](...arguments)}addResultData(e,t){if(!I(this,ie)[ie](e))return void this.log(`Not setting result for an upload that has been removed: ${e}`);const{currentUploads:i}=this.getState(),s={...i[e],result:{...i[e].result,...t}};this.setState({currentUploads:{...i,[e]:s}})}upload(){var e;null!=(e=I(this,M)[M].uploader)&&e.length||this.log("No uploader type plugins are used","warning");let{files:t}=this.getState();const i=this.opts.onBeforeUpload(t);return!1===i?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(i&&"object"==typeof i&&(t=i,this.setState({files:t})),Promise.resolve().then(()=>I(this,L)[L].validateMinNumberOfFiles(t)).catch(e=>{throw I(this,V)[V]([e]),e}).then(()=>{if(!I(this,G)[G](t))throw new RestrictionError(this.i18n("missingRequiredMetaField"))}).catch(e=>{throw e}).then(()=>{const{currentUploads:e}=this.getState(),i=Object.values(e).flatMap(e=>e.fileIDs),s=[];Object.keys(t).forEach(e=>{const t=this.getFile(e);t.progress.uploadStarted||-1!==i.indexOf(e)||s.push(t.id)});const n=I(this,te)[te](s);return I(this,ne)[ne](n)}).catch(e=>{throw this.emit("error",e),this.log(e,"error"),e}))}}function oe(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),i=t.slice(0,4),s=t.slice(4);i.forEach(e=>{let{message:t,details:i=""}=e;this.info({message:t,details:i},"error",this.opts.infoTimeout)}),s.length>0&&this.info({message:this.i18n("additionalRestrictionsFailed",{count:s.length})})}function ae(e){const{missingFields:t,error:i}=I(this,L)[L].getMissingRequiredMetaFields(e);return!(t.length>0)||(this.setFileState(e.id,{missingRequiredMetaFields:t}),this.log(i.message),this.emit("restriction-failed",e,i),!1)}function le(e){let t=!0;for(const i of Object.values(e))I(this,W)[W](i)||(t=!1);return t}function ue(e){const{allowNewUpload:t}=this.getState();if(!1===t){const t=new RestrictionError(this.i18n("noMoreFilesAllowed"),{file:e});throw I(this,V)[V]([t]),t}}function he(e){const t=e instanceof File?{name:e.name,type:e.type,size:e.size,data:e}:e,i=(0,y.A)(t),s=function(e,t){return t.name?t.name:"image"===e.split("/")[0]?`${e.split("/")[0]}.${e.split("/")[1]}`:"noname"}(i,t),n=(0,b.A)(s).extension,r=(0,v.N)(t,this.getID()),o=t.meta||{};o.name=s,o.type=i;const a=Number.isFinite(t.data.size)?t.data.size:null;return{source:t.source||"",id:r,name:s,extension:n||"",meta:{...this.getState().meta,...o},type:i,data:t.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:a,uploadComplete:!1,uploadStarted:null},size:a,isGhost:!1,isRemote:t.isRemote||!1,remote:t.remote||"",preview:t.preview}}function de(){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 pe(e){const{files:t}=this.getState(),i={...t},s=[],n=[];for(const o of e)try{var r;let e=I(this,X)[X](o);const n=null==(r=t[e.id])?void 0:r.isGhost;if(n){e={...t[e.id],isGhost:!1,data:o.data},this.log(`Replaced the blob in the restored ghost file: ${e.name}, ${e.id}`)}const a=this.opts.onBeforeFileAdded(e,i);if(!a&&this.checkIfFileAlreadyExists(e.id))throw new RestrictionError(this.i18n("noDuplicates",{fileName:e.name}),{file:o});if(!1===a&&!n)throw new RestrictionError("Cannot add the file because onBeforeFileAdded returned false.",{isUserFacing:!1,file:o});"object"==typeof a&&null!==a&&(e=a),I(this,L)[L].validateSingleFile(e),i[e.id]=e,s.push(e)}catch(e){n.push(e)}try{I(this,L)[L].validateAggregateRestrictions(Object.values(t),s)}catch(e){return n.push(e),{nextFilesState:t,validFilesToAdd:[],errors:n}}return{nextFilesState:i,validFilesToAdd:s,errors:n}}function ce(){const e=(e,t,i)=>{let s=e.message||"Unknown error";e.details&&(s+=` ${e.details}`),this.setState({error:s}
2),null!=t&&t.id in this.getState().files&&this.setFileState(t.id,{error:s,response:i})};this.on("error",e),this.on("upload-error",(t,i,s)=>{if(e(i,t,s),"object"==typeof i&&i.message){var n;this.log(i.message,"error");const e=new Error(this.i18n("failedToUpload",{file:null!=(n=null==t?void 0:t.name)?n:""}));e.isUserFacing=!0,e.details=i.message,i.details&&(e.details+=` ${i.details}`),I(this,V)[V]([e])}else I(this,V)[V]([i])});let t=null;this.on("upload-stalled",(e,i)=>{const{message:s}=e,n=i.map(e=>e.meta.name).join(", ");t||(this.info({message:s,details:n},"warning",this.opts.infoTimeout),t=setTimeout(()=>{t=null},this.opts.infoTimeout)),this.log(`${s} ${n}`.trim(),"warning")}),this.on("upload",()=>{this.setState({error:null})});const i=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}),i=Object.fromEntries(t.map(e=>[e.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:e.size}}]));this.patchFilesState(i)};this.on("upload-start",e=>{e.forEach(e=>{this.emit("upload-started",e)}),i(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 i=this.getFile(e.id).progress;this.setFileState(e.id,{progress:{...i,postprocess:I(this,H)[H].size>0?{mode:"indeterminate"}:void 0,uploadComplete:!0,percentage:100,bytesUploaded:i.bytesTotal},response:t,uploadURL:t.uploadURL,isPaused:!1}),null==e.size&&this.setFileState(e.id,{size:t.bytesUploaded||i.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&&I(this,W)[W](e)}),"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("online",I(this,Z)[Z]),window.addEventListener("offline",I(this,Z)[Z]),setTimeout(I(this,Z)[Z],3e3))}function fe(e,t){void 0===t&&(t={});const{forceAllowNewUpload:i=!1}=t,{allowNewUpload:s,currentUploads:n}=this.getState();if(!s&&!i)throw new Error("Cannot create a new upload: already uploading.");const r=(0,o.A)();return this.emit("upload",{id:r,fileIDs:e}),this.setState({allowNewUpload:!1!==this.opts.allowMultipleUploadBatches&&!1!==this.opts.allowMultipleUploads,currentUploads:{...n,[r]:{fileIDs:e,step:0,result:{}}}}),r}function me(e){const{currentUploads:t}=this.getState();return t[e]}function ge(e){const t={...this.getState().currentUploads};delete t[e],this.setState({currentUploads:t})}async function ye(e){const t=()=>{const{currentUploads:t}=this.getState();return t[e]};let i=t();const s=[...I(this,q)[q],...I(this,$)[$],...I(this,H)[H]];try{for(let n=i.step||0;n<s.length&&i;n++){const r=s[n];this.setState({currentUploads:{...this.getState().currentUploads,[e]:{...i,step:n}}});const{fileIDs:o}=i;await r(o,e),i=t()}}catch(t){throw I(this,se)[se](e),t}
2if(i){i.fileIDs.forEach(e=>{const t=this.getFile(e);t&&t.progress.postprocess&&this.emit("postprocess-complete",t)});const s=i.fileIDs.map(e=>this.getFile(e)),n=s.filter(e=>!e.error),r=s.filter(e=>e.error);this.addResultData(e,{successful:n,failed:r,uploadID:e}),i=t()}let n;return i&&(n=i.result,this.emit("complete",n),I(this,se)[se](e)),null==n&&this.log(`Not setting result for an upload that has been removed: ${e}`),n}re.VERSION="3.13.1";const be=re},54380(e,t,i){"use strict";i.d(t,{A:()=>d});i(36342),i(18527);function s(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 r(e){return"__private_"+n+++"_"+e}function o(e,t,i){const s=[];return e.forEach(e=>"string"!=typeof e?s.push(e):t[Symbol.split](e).forEach((e,t,n)=>{""!==e&&s.push(e),t<n.length-1&&s.push(i)})),s}function a(e,t){const i=/\$/g;let s=[e];if(null==t)return s;for(const e of Object.keys(t))if("_"!==e){let n=t[e];"string"==typeof n&&(n=i[Symbol.replace](n,"$$$$")),s=o(s,new RegExp(`%\\{${e}\\}`,"g"),n)}return s}const l=e=>{throw new Error(`missing string: ${e}`)};var u=r("onMissingKey"),h=r("apply");class d{constructor(e,t){let{onMissingKey:i=l}=void 0===t?{}:t;Object.defineProperty(this,h,{value:p}),Object.defineProperty(this,u,{writable:!0,value:void 0}),this.locale={strings:{},pluralize:e=>1===e?0:1},Array.isArray(e)?e.forEach(s(this,h)[h],this):s(this,h)[h](e),s(this,u)[u]=i}translate(e,t){return this.translateArray(e,t).join("")}translateArray(e,t){let i=this.locale.strings[e];null==i&&(s(this,u)[u](e),i=e);if("object"==typeof i){if(t&&void 0!==t.smart_count){return a(i[this.locale.pluralize(t.smart_count)],t)}throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}if("string"!=typeof i)throw new Error("string was not a string");return a(i,t)}}function p(e){if(null==e||!e.strings)return;const t=this.locale;Object.assign(this.locale,{strings:{...t.strings,...e.strings},pluralize:e.pluralize||t.pluralize})}},73354(e,t,i){"use strict";i.d(t,{N:()=>r});i(79929),i(79063),i(25226),i(19031),i(64144),i(66663),i(70091);var s=i(20139);function n(e){let t="";return e.replace(/[^A-Z0-9]/gi,e=>(t+=`-${function(e){return e.charCodeAt(0).toString(32)}(e)}`,"/"))+t}function r(e,t){if(function(e){return!(!e.isRemote||!e.remote)&&new Set(["box","dropbox","drive","facebook","unsplash"]).has(e.remote.provider)}(e))return e.id;const i=(0,s.A)(e);return function(e,t){let i=t||"uppy";return"string"==typeof e.name&&(i+=`-${n(e.name.toLowerCase())}`),void 0!==e.type&&(i+=`-${e.type}`),e.meta&&"string"==typeof e.meta.relativePath&&(i+=`-${n(e.meta.relativePath.toLowerCase())}`),void 0!==e.data.size&&(i+=`-${e.data.size}`),void 0!==e.data.lastModified&&(i+=`-${e.data.lastModified}`),i}({...e,type:i},t)}},44355(e,t,i){"use strict";function s(e){const t=e.lastIndexOf(".");return-1===t||t===e.length-1?{name:e,extension:void 0}:{name:e.slice(0,t),extension:e.slice(t+1)}}i.d(t,{A:()=>s})},20139(e,t,i){"use strict";i.d(t,{A:()=>r});var s=i(44355);const n={__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"};function r(e){var t;if(e.type)return e.type;const i=e.name?null==(t=(0,s.A)(e.name).extension)?void 0:t.toLowerCase():null;return i&&i in n?n[i]:"application/octet-stream"}},97699(){},93700(e){e.exports=function(e){if("number"!=typeof e||isNaN(e))throw new TypeError("Expected a number, got "+typeof e);var t=e<0,i=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(t&&(e=-e),e<1)return(t?"-":"")+e+" B";var s=Math.min(Math.floor(Math.log(e)/Math.log(1024)),i.length-1);e=Number(e/Math.pow(1024,s));var n=i[s];return e>=10||e%1==0?(t?"-":"")+e.toFixed(0)+" "+n:(t?"-":"")+e.toFixed(1)+" "+n}},7360(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;let i=Math.abs(e);if(t&&(i=-i),0===i)return"0 B";const s=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],n=Math.min(Math.floor(Math.log(i)/Math.log(1024)),s.length-1),r=Number(i/1024**n),o=s[n];return`${r>=10||r%1==0?Math.round(r):r.toFixed(1)} ${o}`}},57546(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}},58319(e,t,i){var s=i(60117),n=/^\s+/;e.exports=function(e){return e?e.slice(0,s(e)+1).replace(n,""):e}},60117(e){var t=/\s/;e.exports=function(e){for(var i=e.length;i--&&t.test(e.charAt(i)););return i}},66900(e,t,i){var s=i(88968),n=i(5267),r=i(36039),o=Math.max,a=Math.min;e.exports=function(e,t,i){var l,u,h,d,p,c,f=0,m=!1,g=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var i=l,s=u;return l=u=void 0,f=t,d=e.apply(s,i)}function v(e){var i=e-c;return void 0===c||i>=t||i<0||g&&e-f>=h}function w(){var e=n();if(v(e))return P(e);p=setTimeout(w,function(e){var i=t-(e-c);return g?a(i,h-(e-f)):i}(e))}function P(e){return p=void 0,y&&l?b(e):(l=u=void 0,d)}function _(){var e=n(),i=v(e);if(l=arguments,u=this,c=e,i){if(void 0===p)return function(e){return f=e,p=setTimeout(w,t),m?b(e):d}(c);if(g)return clearTimeout(p),p=setTimeout(w,t),b(c)}return void 0===p&&(p=setTimeout(w,t)),d}return t=r(t)||0,s(i)&&(m=!!i.leading,h=(g="maxWait"in i)?o(r(i.maxWait)||0,t):h,y="trailing"in i?!!i.trailing:y),_.cancel=function(){void 0!==p&&clearTimeout(p),f=0,l=c=u=p=void 0},_.flush=function(){return void 0===p?d:P(n())},_}},5267(e,t,i){var s=i(68602);e.exports=function(){return s.Date.now()}},50327(e,t,i){var s=i(66900),n=i(88968);e.exports=function(e,t,i){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return n(i)&&(r="leading"in i?!!i.leading:r,o="trailing"in i?!!i.trailing:o),s(e,t,{leading:r,maxWait:t,trailing:o})}},36039(e,t,i){var s=i(58319),n=i(88968),r=i(39247),o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(r(e))return NaN;if(n(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=n(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=s(e);var i=a.test(e);return i||l.test(e)?u(e.slice(2),i?2:8):o.test(e)?NaN:+e}},16159(e,t,i){var s=i(55411),n=/[\/\+\.]/;e.exports=function(e,t){function i(t){var i=s(t,e,n);return i&&i.length>=2}return t?i(t.split(";")[0]):i}},28867(e){e.exports=function(){var e={},t=e._fns={};return e.emit=function(e,i,s,n,r,o,a){var l=function(e){var i=t[e]?t[e]:[],s=e.indexOf(":"),n=-1===s?[e]:[e.substring(0,s),e.substring(s+1)],r=Object.keys(t),o=0,a=r.length;for(;o<a;o++){var l=r[o];if("*"===l&&(i=i.concat(t[l])),2===n.length&&n[0]===l){i=i.concat(t[l]);break}}return i}(e);l.length&&function(e,t,i){var s=0,n=t.length;for(;s<n&&t[s];s++)t[s].event=e,t[s].apply(t[s],i)}(e,l,[i,s,n,r,o,a])},e.on=function(e,i){t[e]||(t[e]=[]),t[e].push(i)},e.once=function(t,i){this.on(t,function s(){i.apply(this,arguments),e.off(t,s)})},e.off=function(e,t){var i=[];if(e&&t)for(var s=this._fns[e],n=0,r=s?s.length:0;n<r;n++)s[n]!==t&&i.push(s[n]);i.length?this._fns[e]=i:delete this._fns[e]},e}},55411(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,i,s=!0,n=this.parts,r=n.length;if("string"==typeof e||e instanceof String)if(this.hasWild||this.text==e){for(i=(e||"").split(this.separator),t=0;s&&t<r;t++)"*"!==n[t]&&(s=t<i.length&&n[t]===i[t]);s=s&&i}else s=!1;else if("function"==typeof e.splice)for(s=[],t=e.length;t--;)this.match(e[t])&&(s[s.length]=e[t]);else if("object"==typeof e)for(var o in s={},e)this.match(o)&&(s[o]=e[o]);return s},e.exports=function(e,i,s){var n=new t(e,s||/[\/\.]/);return void 0!==i?n.match(i):n}},68821(e,t,i){"use strict";i(28285)({target:"Object",stat:!0},{hasOwn:i(2146)})},89870(e,t,i){"use strict";i.d(t,{b:()=>s()});var s=i.cw(function(e,t){var i=Object.prototype.hasOwnProperty,s="~";function n(){}function r(e,t,i){this.fn=e,this.context=t,this.once=i||!1}function o(e,t,i,n,o){if("function"!=typeof i)throw new TypeError("The listener must be a function");var a=new r(i,n||e,o),l=s?s+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],a]:e._events[l].push(a):(e._events[l]=a,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new n:delete e._events[t]}function l(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(s=!1)),l.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)i.call(e,t)&&n.push(s?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},l.prototype.listeners=function(e){var t=s?s+e:e,i=this._events[t];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,r=i.length,o=new Array(r);n<r;n++)o[n]=i[n].fn;return o},l.prototype.listenerCount=function(e){var t=s?s+e:e,i=this._events[t];return i?i.fn?1:i.length:0},l.prototype.emit=function(e,t,i,n,r,o){var a=s?s+e:e;if(!this._events[a])return!1;var l,u,h=this._events[a],d=arguments.length;if(h.fn){switch(h.once&&this.removeListener(e,h.fn,void 0,!0),d){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,t),!0;case 3:return h.fn.call(h.context,t,i),!0;case 4:return h.fn.call(h.context,t,i,n),!0;case 5:return h.fn.call(h.context,t,i,n,r),!0;case 6:return h.fn.call(h.context,t,i,n,r,o),!0}for(u=1,l=new Array(d-1);u<d;u++)l[u-1]=arguments[u];h.fn.apply(h.context,l)}else{var p,c=h.length;for(u=0;
2u<c;u++)switch(h[u].once&&this.removeListener(e,h[u].fn,void 0,!0),d){case 1:h[u].fn.call(h[u].context);break;case 2:h[u].fn.call(h[u].context,t);break;case 3:h[u].fn.call(h[u].context,t,i);break;case 4:h[u].fn.call(h[u].context,t,i,n);break;default:if(!l)for(p=1,l=new Array(d-1);p<d;p++)l[p-1]=arguments[p];h[u].fn.apply(h[u].context,l)}}return!0},l.prototype.on=function(e,t,i){return o(this,e,t,i,!1)},l.prototype.once=function(e,t,i){return o(this,e,t,i,!0)},l.prototype.removeListener=function(e,t,i,n){var r=s?s+e:e;if(!this._events[r])return this;if(!t)return a(this,r),this;var o=this._events[r];if(o.fn)o.fn!==t||n&&!o.once||i&&o.context!==i||a(this,r);else{for(var l=0,u=[],h=o.length;l<h;l++)(o[l].fn!==t||n&&!o[l].once||i&&o[l].context!==i)&&u.push(o[l]);u.length?this._events[r]=1===u.length?u[0]:u:a(this,r)}return this},l.prototype.removeAllListeners=function(e){var t;return e?(t=s?s+e:e,this._events[t]&&a(this,t)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=s,l.EventEmitter=l,e.exports=l});s()},15475(e,t,i){"use strict";i.d(t,{A:()=>s});let s=(e=21)=>{let t="",i=0|e;for(;i-- >0;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.