@micromag/viewer-build 0.3.516 → 0.3.518
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/asset-manifest.json +6 -23
- package/build/index.html +1 -1
- package/build/static/js/175.42d3627e.js +2 -0
- package/build/static/js/{625.6bcbdc63.js.LICENSE.txt → 175.42d3627e.js.LICENSE.txt} +0 -10
- package/build/static/js/main.5411c29e.js +2 -0
- package/build/static/js/runtime~main.3754c53b.js +1 -0
- package/package.json +6 -6
- package/build/static/js/104.e7b2f53b.chunk.js +0 -1
- package/build/static/js/119.409edb1a.chunk.js +0 -1
- package/build/static/js/139.4365a1df.chunk.js +0 -1
- package/build/static/js/165.a09e3185.chunk.js +0 -1
- package/build/static/js/177.d6cc3845.chunk.js +0 -1
- package/build/static/js/299.a106f35a.chunk.js +0 -1
- package/build/static/js/359.768ec35e.chunk.js +0 -1
- package/build/static/js/375.0bcd7609.chunk.js +0 -2
- package/build/static/js/375.0bcd7609.chunk.js.LICENSE.txt +0 -10
- package/build/static/js/462.307a7cd0.chunk.js +0 -1
- package/build/static/js/50.9da80c9d.chunk.js +0 -1
- package/build/static/js/526.efc3b856.chunk.js +0 -2
- package/build/static/js/526.efc3b856.chunk.js.LICENSE.txt +0 -10
- package/build/static/js/567.1a366653.chunk.js +0 -1
- package/build/static/js/595.27131768.chunk.js +0 -1
- package/build/static/js/625.6bcbdc63.js +0 -2
- package/build/static/js/626.c42d15c2.chunk.js +0 -2
- package/build/static/js/626.c42d15c2.chunk.js.LICENSE.txt +0 -1
- package/build/static/js/784.1708dd96.chunk.js +0 -1
- package/build/static/js/786.6bf1d59f.chunk.js +0 -1
- package/build/static/js/793.ed1b7b39.chunk.js +0 -1
- package/build/static/js/main.065e9735.js +0 -2
- package/build/static/js/runtime~main.4d15fd3a.js +0 -1
- /package/build/static/js/{main.065e9735.js.LICENSE.txt → main.5411c29e.js.LICENSE.txt} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 375.0bcd7609.chunk.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[375],{5181:function(t,e,n){n.d(e,{FK:function(){return y},Ob:function(){return H},XX:function(){return F},_3:function(){return g},fF:function(){return i},h:function(){return m},uA:function(){return b},v2:function(){return A}});var o,i,r,l,_,u,s,a={},p=[],c=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,f=Array.isArray;function d(t,e){for(var n in e)t[n]=e[n];return t}function h(t){var e=t.parentNode;e&&e.removeChild(t)}function m(t,e,n){var i,r,l,_={};for(l in e)"key"==l?i=e[l]:"ref"==l?r=e[l]:_[l]=e[l];if(arguments.length>2&&(_.children=arguments.length>3?o.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(l in t.defaultProps)void 0===_[l]&&(_[l]=t.defaultProps[l]);return v(t,_,i,r,null)}function v(t,e,n,o,l){var _={type:t,props:e,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==l?++r:l,__i:-1,__u:0};return null==l&&null!=i.vnode&&i.vnode(_),_}function g(){return{current:null}}function y(t){return t.children}function b(t,e){this.props=t,this.context=e}function x(t,e){if(null==e)return t.__?x(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?x(t):null}function w(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return w(t)}}function k(t){(!t.__d&&(t.__d=!0)&&l.push(t)&&!P.__r++||_!==i.debounceRendering)&&((_=i.debounceRendering)||u)(P)}function P(){var t,e,n,o,r,_,u,a,p;for(l.sort(s);t=l.shift();)t.__d&&(e=l.length,o=void 0,_=(r=(n=t).__v).__e,a=[],p=[],(u=n.__P)&&((o=d({},r)).__v=r.__v+1,i.vnode&&i.vnode(o),$(u,o,r,n.__n,void 0!==u.ownerSVGElement,32&r.__u?[_]:null,a,null==_?x(r):_,!!(32&r.__u),p),o.__v=r.__v,o.__.__k[o.__i]=o,I(a,o,p),o.__e!=_&&w(o)),l.length>e&&l.sort(s));P.__r=0}function E(t,e,n,o,i,r,l,_,u,s,c){var f,d,h,m,v,g=o&&o.__k||p,y=e.length;for(n.__d=u,S(n,e,g),u=n.__d,f=0;f<y;f++)null!=(h=n.__k[f])&&"boolean"!=typeof h&&"function"!=typeof h&&(d=-1===h.__i?a:g[h.__i]||a,h.__i=f,$(t,h,d,i,r,l,_,u,s,c),m=h.__e,h.ref&&d.ref!=h.ref&&(d.ref&&j(d.ref,null,h),c.push(h.ref,h.__c||m,h)),null==v&&null!=m&&(v=m),65536&h.__u||d.__k===h.__k?(m||d.__e!=u||(u=x(d)),u=T(h,u,t)):"function"==typeof h.type&&void 0!==h.__d?u=h.__d:m&&(u=m.nextSibling),h.__d=void 0,h.__u&=-196609);n.__d=u,n.__e=v}function S(t,e,n){var o,i,r,l,_,u=e.length,s=n.length,a=s,p=0;for(t.__k=[],o=0;o<u;o++)l=o+p,null!=(i=t.__k[o]=null==(i=e[o])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?v(null,i,null,null,null):f(i)?v(y,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?v(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=t,i.__b=t.__b+1,_=C(i,n,l,a),i.__i=_,r=null,-1!==_&&(a--,(r=n[_])&&(r.__u|=131072)),null==r||null===r.__v?(-1==_&&p--,"function"!=typeof i.type&&(i.__u|=65536)):_!==l&&(_===l+1?p++:_>l?a>u-l?p+=_-l:p--:_<l?_==l-1&&(p=_-l):p=0,_!==o+p&&(i.__u|=65536))):(r=n[l])&&null==r.key&&r.__e&&!(131072&r.__u)&&(r.__e==t.__d&&(t.__d=x(r)),z(r,r,!1),n[l]=null,a--);if(a)for(o=0;o<s;o++)null!=(r=n[o])&&!(131072&r.__u)&&(r.__e==t.__d&&(t.__d=x(r)),z(r,r))}function T(t,e,n){var o,i;if("function"==typeof t.type){for(o=t.__k,i=0;o&&i<o.length;i++)o[i]&&(o[i].__=t,e=T(o[i],e,n));return e}t.__e!=e&&(n.insertBefore(t.__e,e||null),e=t.__e);do{e=e&&e.nextSibling}while(null!=e&&8===e.nodeType);return e}function A(t,e){return e=e||[],null==t||"boolean"==typeof t||(f(t)?t.some((function(t){A(t,e)})):e.push(t)),e}function C(t,e,n,o){var i=t.key,r=t.type,l=n-1,_=n+1,u=e[n];if(null===u||u&&i==u.key&&r===u.type&&!(131072&u.__u))return n;if(o>(null==u||131072&u.__u?0:1))for(;l>=0||_<e.length;){if(l>=0){if((u=e[l])&&!(131072&u.__u)&&i==u.key&&r===u.type)return l;l--}if(_<e.length){if((u=e[_])&&!(131072&u.__u)&&i==u.key&&r===u.type)return _;_++}}return-1}function M(t,e,n){"-"===e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||c.test(e)?n:n+"px"}function U(t,e,n,o,i){var r;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof o&&(t.style.cssText=o=""),o)for(e in o)n&&e in n||M(t.style,e,"");if(n)for(e in n)o&&n[e]===o[e]||M(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])r=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in t||"onFocusOut"===e||"onFocusIn"===e?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+r]=n,n?o?n.u=o.u:(n.u=Date.now(),t.addEventListener(e,r?O:D,r)):t.removeEventListener(e,r?O:D,r);else{if(i)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==e&&"height"!==e&&"href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&"rowSpan"!==e&&"colSpan"!==e&&"role"!==e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null==n||!1===n&&"-"!==e[4]?t.removeAttribute(e):t.setAttribute(e,n))}}function D(t){if(this.l){var e=this.l[t.type+!1];if(t.t){if(t.t<=e.u)return}else t.t=Date.now();return e(i.event?i.event(t):t)}}function O(t){if(this.l)return this.l[t.type+!0](i.event?i.event(t):t)}function $(t,e,n,o,r,l,_,u,s,a){var p,c,h,m,v,g,x,w,k,P,S,T,A,C,M,U=e.type;if(void 0!==e.constructor)return null;128&n.__u&&(s=!!(32&n.__u),l=[u=e.__e=n.__e]),(p=i.__b)&&p(e);t:if("function"==typeof U)try{if(w=e.props,k=(p=U.contextType)&&o[p.__c],P=p?k?k.props.value:p.__:o,n.__c?x=(c=e.__c=n.__c).__=c.__E:("prototype"in U&&U.prototype.render?e.__c=c=new U(w,P):(e.__c=c=new b(w,P),c.constructor=U,c.render=N),k&&k.sub(c),c.props=w,c.state||(c.state={}),c.context=P,c.__n=o,h=c.__d=!0,c.__h=[],c._sb=[]),null==c.__s&&(c.__s=c.state),null!=U.getDerivedStateFromProps&&(c.__s==c.state&&(c.__s=d({},c.__s)),d(c.__s,U.getDerivedStateFromProps(w,c.__s))),m=c.props,v=c.state,c.__v=e,h)null==U.getDerivedStateFromProps&&null!=c.componentWillMount&&c.componentWillMount(),null!=c.componentDidMount&&c.__h.push(c.componentDidMount);else{if(null==U.getDerivedStateFromProps&&w!==m&&null!=c.componentWillReceiveProps&&c.componentWillReceiveProps(w,P),!c.__e&&(null!=c.shouldComponentUpdate&&!1===c.shouldComponentUpdate(w,c.__s,P)||e.__v===n.__v)){for(e.__v!==n.__v&&(c.props=w,c.state=c.__s,c.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),S=0;S<c._sb.length;S++)c.__h.push(c._sb[S]);c._sb=[],c.__h.length&&_.push(c);break t}null!=c.componentWillUpdate&&c.componentWillUpdate(w,c.__s,P),null!=c.componentDidUpdate&&c.__h.push((function(){c.componentDidUpdate(m,v,g)}))}if(c.context=P,c.props=w,c.__P=t,c.__e=!1,T=i.__r,A=0,"prototype"in U&&U.prototype.render){for(c.state=c.__s,c.__d=!1,T&&T(e),p=c.render(c.props,c.state,c.context),C=0;C<c._sb.length;C++)c.__h.push(c._sb[C]);c._sb=[]}else do{c.__d=!1,T&&T(e),p=c.render(c.props,c.state,c.context),c.state=c.__s}while(c.__d&&++A<25);c.state=c.__s,null!=c.getChildContext&&(o=d(d({},o),c.getChildContext())),h||null==c.getSnapshotBeforeUpdate||(g=c.getSnapshotBeforeUpdate(m,v)),E(t,f(M=null!=p&&p.type===y&&null==p.key?p.props.children:p)?M:[M],e,n,o,r,l,_,u,s,a),c.base=e.__e,e.__u&=-161,c.__h.length&&_.push(c),x&&(c.__E=c.__=null)}catch(t){e.__v=null,s||null!=l?(e.__e=u,e.__u|=s?160:32,l[l.indexOf(u)]=null):(e.__e=n.__e,e.__k=n.__k),i.__e(t,e,n)}else null==l&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=L(n.__e,e,n,o,r,l,_,s,a);(p=i.diffed)&&p(e)}function I(t,e,n){e.__d=void 0;for(var o=0;o<n.length;o++)j(n[o],n[++o],n[++o]);i.__c&&i.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){i.__e(t,e.__v)}}))}function L(t,e,n,i,r,l,_,u,s){var p,c,d,m,v,g,y,b=n.props,w=e.props,k=e.type;if("svg"===k&&(r=!0),null!=l)for(p=0;p<l.length;p++)if((v=l[p])&&"setAttribute"in v==!!k&&(k?v.localName===k:3===v.nodeType)){t=v,l[p]=null;break}if(null==t){if(null===k)return document.createTextNode(w);t=r?document.createElementNS("http://www.w3.org/2000/svg",k):document.createElement(k,w.is&&w),l=null,u=!1}if(null===k)b===w||u&&t.data===w||(t.data=w);else{if(l=l&&o.call(t.childNodes),b=n.props||a,!u&&null!=l)for(b={},p=0;p<t.attributes.length;p++)b[(v=t.attributes[p]).name]=v.value;for(p in b)v=b[p],"children"==p||("dangerouslySetInnerHTML"==p?d=v:"key"===p||p in w||U(t,p,null,v,r));for(p in w)v=w[p],"children"==p?m=v:"dangerouslySetInnerHTML"==p?c=v:"value"==p?g=v:"checked"==p?y=v:"key"===p||u&&"function"!=typeof v||b[p]===v||U(t,p,v,b[p],r);if(c)u||d&&(c.__html===d.__html||c.__html===t.innerHTML)||(t.innerHTML=c.__html),e.__k=[];else if(d&&(t.innerHTML=""),E(t,f(m)?m:[m],e,n,i,r&&"foreignObject"!==k,l,_,l?l[0]:n.__k&&x(n,0),u,s),null!=l)for(p=l.length;p--;)null!=l[p]&&h(l[p]);u||(p="value",void 0!==g&&(g!==t[p]||"progress"===k&&!g||"option"===k&&g!==b[p])&&U(t,p,g,b[p],!1),p="checked",void 0!==y&&y!==t[p]&&U(t,p,y,b[p],!1))}return t}function j(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){i.__e(t,n)}}function z(t,e,n){var o,r;if(i.unmount&&i.unmount(t),(o=t.ref)&&(o.current&&o.current!==t.__e||j(o,null,e)),null!=(o=t.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(t){i.__e(t,e)}o.base=o.__P=null,t.__c=void 0}if(o=t.__k)for(r=0;r<o.length;r++)o[r]&&z(o[r],e,n||"function"!=typeof t.type);n||null==t.__e||h(t.__e),t.__=t.__e=t.__d=void 0}function N(t,e,n){return this.constructor(t,n)}function F(t,e,n){var r,l,_,u;i.__&&i.__(t,e),l=(r="function"==typeof n)?null:n&&n.__k||e.__k,_=[],u=[],$(e,t=(!r&&n||e).__k=m(y,null,[t]),l||a,a,void 0!==e.ownerSVGElement,!r&&n?[n]:l?null:e.firstChild?o.call(e.childNodes):null,_,!r&&n?n:l?l.__e:e.firstChild,r,u),I(_,t,u)}function H(t,e,n){var i,r,l,_,u=d({},t.props);for(l in t.type&&t.type.defaultProps&&(_=t.type.defaultProps),e)"key"==l?i=e[l]:"ref"==l?r=e[l]:u[l]=void 0===e[l]&&void 0!==_?_[l]:e[l];return arguments.length>2&&(u.children=arguments.length>3?o.call(arguments,2):n),v(t.type,u,i||t.key,r||t.ref,null)}o=p.slice,i={__e:function(t,e,n,o){for(var i,r,l;e=e.__;)if((i=e.__c)&&!i.__)try{if((r=i.constructor)&&null!=r.getDerivedStateFromError&&(i.setState(r.getDerivedStateFromError(t)),l=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(t,o||{}),l=i.__d),l)return i.__E=i}catch(e){t=e}throw t}},r=0,b.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=d({},this.state),"function"==typeof t&&(t=t(d({},n),this.props)),t&&d(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),k(this))},b.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),k(this))},b.prototype.render=y,l=[],u="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,s=function(t,e){return t.__v.__b-e.__v.__b},P.__r=0},2729:function(t,e,n){n.d(e,{A:function(){return i}});var o=n(9491);class i{constructor(t,e){this.uppy=t,this.opts=null!=e?e:{}}getPluginState(){const{plugins:t}=this.uppy.getState();return(null==t?void 0:t[this.id])||{}}setPluginState(t){if(!t)return;const{plugins:e}=this.uppy.getState();this.uppy.setState({plugins:{...e,[this.id]:{...e[this.id],...t}}})}setOptions(t){this.opts={...this.opts,...t},this.setPluginState(void 0),this.i18nInit()}i18nInit(){const t=new o.A([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.setPluginState(void 0)}addTarget(t){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}update(t){}afterUpdate(){}}},7496:function(t,e,n){n.d(e,{A:function(){return c}});var o=n(5181),i=n(1677),r=n(5533),l=n(2729);function _(t,e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}var u=0;function s(t){return"__private_"+u+++"_"+t}var a=s("updateUI");class p extends l.A{constructor(){super(...arguments),Object.defineProperty(this,a,{writable:!0,value:void 0})}getTargetPlugin(t){let e;if("function"==typeof(null==t?void 0:t.addTarget))e=t,e instanceof p||console.warn(new Error("The provided plugin is not an instance of UIPlugin. This is an indication of a bug with the way Uppy is bundled.",{cause:{targetPlugin:e,UIPlugin:p}}));else if("function"==typeof t){const n=t;this.uppy.iteratePlugins((t=>{t instanceof n&&(e=t)}))}return e}mount(t,e){const n=e.id,l=(u=t,void 0===s&&(s=document),"string"==typeof u?s.querySelector(u):(0,i.A)(u)?u:null);var u,s;if(l){this.isTargetDOMEl=!0;const e=document.createElement("div");return e.classList.add("uppy-Root"),_(this,a)[a]=function(t){let e,n=null;return function(){for(var o=arguments.length,i=new Array(o),r=0;r<o;r++)i[r]=arguments[r];return e=i,n||(n=Promise.resolve().then((()=>(n=null,t(...e))))),n}}((t=>{this.uppy.getPlugin(this.id)&&((0,o.XX)(this.render(t),e),this.afterUpdate())})),this.uppy.log(`Installing ${n} to a DOM element '${t}'`),this.opts.replaceTargetContent&&(l.innerHTML=""),(0,o.XX)(this.render(this.uppy.getState()),e),this.el=e,l.appendChild(e),e.dir=this.opts.direction||(0,r.A)(e)||"ltr",this.onMount(),this.el}const p=this.getTargetPlugin(t);if(p)return this.uppy.log(`Installing ${n} to ${p.id}`),this.parent=p,this.el=p.addTarget(e),this.onMount(),this.el;this.uppy.log(`Not installing ${n}`);let c=`Invalid target option given to ${n}.`;throw c+="function"==typeof t?" The given target is not a Plugin class. Please check that you're not specifying a React Component instead of a plugin. If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.":"If you meant to target an HTML element, please make sure that the element exists. Check that the <script> tag initializing Uppy is right before the closing </body> tag at the end of the page. (see https://github.com/transloadit/uppy/issues/1042)\n\nIf you meant to target a plugin, please confirm that your `import` statements or `require` calls are correct.",new Error(c)}render(t){throw new Error("Extend the render method to add your plugin to a DOM element")}update(t){var e,n;null!=this.el&&(null==(e=(n=_(this,a))[a])||e.call(n,t))}unmount(){var t;this.isTargetDOMEl&&(null==(t=this.el)||t.remove()),this.onUnmount()}onMount(){}onUnmount(){}}var c=p},9491:function(t,e,n){function o(t,e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}n.d(e,{A:function(){return p}});var i=0;function r(t){return"__private_"+i+++"_"+t}function l(t,e,n){const o=[];return t.forEach((t=>"string"!=typeof t?o.push(t):e[Symbol.split](t).forEach(((t,e,i)=>{""!==t&&o.push(t),e<i.length-1&&o.push(n)})))),o}function _(t,e){const n=/\$/g;let o=[t];if(null==e)return o;for(const t of Object.keys(e))if("_"!==t){let i=e[t];"string"==typeof i&&(i=n[Symbol.replace](i,"$$$$")),o=l(o,new RegExp(`%\\{${t}\\}`,"g"),i)}return o}const u=t=>{throw new Error(`missing string: ${t}`)};var s=r("onMissingKey"),a=r("apply");class p{constructor(t,e){let{onMissingKey:n=u}=void 0===e?{}:e;Object.defineProperty(this,a,{value:c}),Object.defineProperty(this,s,{writable:!0,value:void 0}),this.locale={strings:{},pluralize(t){return 1===t?0:1}},Array.isArray(t)?t.forEach(o(this,a)[a],this):o(this,a)[a](t),o(this,s)[s]=n}translate(t,e){return this.translateArray(t,e).join("")}translateArray(t,e){let n=this.locale.strings[t];if(null==n&&(o(this,s)[s](t),n=t),"object"==typeof n){if(e&&void 0!==e.smart_count)return _(n[this.locale.pluralize(e.smart_count)],e);throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}if("string"!=typeof n)throw new Error("string was not a string");return _(n,e)}}function c(t){if(null==t||!t.strings)return;const e=this.locale;Object.assign(this.locale,{strings:{...e.strings,...t.strings},pluralize:t.pluralize||e.pluralize})}},5533:function(t,e){e.A=function(t){for(var e;t&&!t.dir;)t=t.parentNode;return null==(e=t)?void 0:e.dir}},1677:function(t,e,n){function o(t){return"object"==typeof t&&null!==t&&"nodeType"in t&&t.nodeType===Node.ELEMENT_NODE}n.d(e,{A:function(){return o}})},7544:function(t,e){e.A={__proto__:null,md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",webp:"image/webp",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"}}}]);
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Takes a string with placeholder variables like `%{smart_count} file selected`
|
|
3
|
-
* and replaces it with values from options `{smart_count: 5}`
|
|
4
|
-
*
|
|
5
|
-
* @license https://github.com/airbnb/polyglot.js/blob/master/LICENSE
|
|
6
|
-
* taken from https://github.com/airbnb/polyglot.js/blob/master/lib/polyglot.js#L299
|
|
7
|
-
*
|
|
8
|
-
* @param phrase that needs interpolation, with placeholders
|
|
9
|
-
* @param options with values that will be used to replace placeholders
|
|
10
|
-
*/
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[462],{5462:function(e,t,s){s.r(t),s.d(t,{default:function(){return A}});var o=s(2729),r=s(590),i=s(4528);function a(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var n=0;function p(e){return"__private_"+n+++"_"+e}var d=p("aliveTimer"),l=p("isDone"),u=p("onTimedOut"),h=p("timeout"),c=class{constructor(e,t){Object.defineProperty(this,d,{writable:!0,value:void 0}),Object.defineProperty(this,l,{writable:!0,value:!1}),Object.defineProperty(this,u,{writable:!0,value:void 0}),Object.defineProperty(this,h,{writable:!0,value:void 0}),a(this,h)[h]=e,a(this,u)[u]=t}progress(){a(this,l)[l]||a(this,h)[h]>0&&(clearTimeout(a(this,d)[d]),a(this,d)[d]=setTimeout(a(this,u)[u],a(this,h)[h]))}done(){a(this,l)[l]||(clearTimeout(a(this,d)[d]),a(this,d)[d]=void 0,a(this,l)[l]=!0)}},m=s(1422),y=s(6681),f=s(7853),w=s(8284),b={strings:{uploadStalled:"Upload has not made any progress for %{seconds} seconds. You may want to retry it."}};function g(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var v=0;function E(e){return"__private_"+v+++"_"+e}function U(e,t){let s=t;return s||(s=new Error("Upload error")),"string"==typeof s&&(s=new Error(s)),s instanceof Error||(s=Object.assign(new Error("Upload error"),{data:s})),(0,f.A)(e)?(s=new y.A(s,e),s):(s.request=e,s)}function O(e){return e.data.slice(0,e.data.size,e.meta.type)}const F={formData:!0,fieldName:"file",method:"post",allowedMetaFields:null,responseUrlFieldName:"url",bundle:!1,headers:{},timeout:3e4,limit:5,withCredentials:!1,responseType:"",getResponseData(e){let t={};try{t=JSON.parse(e)}catch{}return t},getResponseError(e,t){let s=new Error("Upload error");return(0,f.A)(t)&&(s=new y.A(s,t)),s},validateStatus(e){return e>=200&&e<300}};var R=E("uploadLocalFile"),T=E("uploadBundle"),j=E("getCompanionClientArgs"),S=E("uploadFiles"),C=E("handleUpload");class A extends o.A{constructor(e,t){if(super(e,{...F,fieldName:t.bundle?"files[]":"file",...t}),Object.defineProperty(this,S,{value:P}),Object.defineProperty(this,j,{value:M}),Object.defineProperty(this,T,{value:x}),Object.defineProperty(this,R,{value:D}),Object.defineProperty(this,C,{writable:!0,value:async e=>{if(0===e.length)return void this.uppy.log("[XHRUpload] No files to upload!");0!==this.opts.limit||this.opts[m.$]||this.uppy.log("[XHRUpload] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/xhr-upload/#limit-0","warning"),this.uppy.log("[XHRUpload] Uploading...");const t=this.uppy.getFilesByIds(e),s=(0,w.Y)(t),o=(0,w.S)(s);if(this.uppy.emit("upload-start",o),this.opts.bundle){if(s.some((e=>e.isRemote)))throw new Error("Can’t upload remote files when the `bundle: true` option is set");if("function"==typeof this.opts.headers)throw new TypeError("`headers` may not be a function when the `bundle: true` option is set");await g(this,T)[T](s)}else await g(this,S)[S](s)}}),this.type="uploader",this.id=this.opts.id||"XHRUpload",this.defaultLocale=b,this.i18nInit(),m.$ in this.opts?this.requests=this.opts[m.$]:this.requests=new m.i(this.opts.limit),this.opts.bundle&&!this.opts.formData)throw new Error("`opts.formData` must be true when `opts.bundle` is enabled.");if(this.opts.bundle&&"function"==typeof this.opts.headers)throw new Error("`opts.headers` can not be a function when the `bundle: true` option is set.");if(void 0===(null==t?void 0:t.allowedMetaFields)&&"metaFields"in this.opts)throw new Error("The `metaFields` option has been renamed to `allowedMetaFields`.");this.uploaderEvents=Object.create(null)}getOptions(e){const t=this.uppy.getState().xhrUpload,{headers:s}=this.opts,o={...this.opts,...t||{},...e.xhrUpload||{},headers:{}};return"function"==typeof s?o.headers=s(e):Object.assign(o.headers,this.opts.headers),t&&Object.assign(o.headers,t.headers),e.xhrUpload&&Object.assign(o.headers,e.xhrUpload.headers),o}addMetadata(e,t,s){(Array.isArray(s.allowedMetaFields)?s.allowedMetaFields:Object.keys(t)).forEach((s=>{const o=t[s];Array.isArray(o)?o.forEach((t=>e.append(s,t))):e.append(s,o)}))}createFormDataUpload(e,t){const s=new FormData;this.addMetadata(s,e.meta,t);const o=O(e);return e.name?s.append(t.fieldName,o,e.meta.name):s.append(t.fieldName,o),s}createBundledUpload(e,t){const s=new FormData,{meta:o}=this.uppy.getState();return this.addMetadata(s,o,t),e.forEach((e=>{const t=this.getOptions(e),o=O(e);e.name?s.append(t.fieldName,o,e.name):s.append(t.fieldName,o)})),s}install(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!1}})}this.uppy.addUploader(g(this,C)[C])}uninstall(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!0}})}this.uppy.removeUploader(g(this,C)[C])}}async function D(e,t,s){const o=this.getOptions(e),a=Date.now();return this.uppy.log(`uploading ${t} of ${s}`),new Promise(((t,s)=>{const n=o.formData?this.createFormDataUpload(e,o):e.data,p=new XMLHttpRequest,d=new i.A(this.uppy);let l;this.uploaderEvents[e.id]=d;const u=new c(o.timeout,(()=>{const t=new Error(this.i18n("uploadStalled",{seconds:Math.ceil(o.timeout/1e3)}));this.uppy.emit("upload-stalled",t,[e])})),h=(0,r.A)();p.upload.addEventListener("loadstart",(()=>{this.uppy.log(`[XHRUpload] ${h} started`)})),p.upload.addEventListener("progress",(t=>{this.uppy.log(`[XHRUpload] ${h} progress: ${t.loaded} / ${t.total}`),u.progress(),t.lengthComputable&&this.uppy.emit("upload-progress",this.uppy.getFile(e.id),{uploader:this,uploadStarted:a,bytesUploaded:t.loaded,bytesTotal:t.total})})),p.addEventListener("load",(()=>{if(this.uppy.log(`[XHRUpload] ${h} finished`),u.done(),l.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null),o.validateStatus(p.status,p.responseText,p)){const s=o.getResponseData(p.responseText,p),r=null==s?void 0:s[o.responseUrlFieldName],i={status:p.status,body:s,uploadURL:r};return this.uppy.emit("upload-success",this.uppy.getFile(e.id),i),r&&this.uppy.log(`Download ${e.name} from ${r}`),t(e)}const r=o.getResponseData(p.responseText,p),i=U(p,o.getResponseError(p.responseText,p)),a={status:p.status,body:r};return this.uppy.emit("upload-error",e,i,a),s(i)})),p.addEventListener("error",(()=>{this.uppy.log(`[XHRUpload] ${h} errored`),u.done(),l.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null);const t=U(p,o.getResponseError(p.responseText,p));return this.uppy.emit("upload-error",e,t),s(t)})),p.open(o.method.toUpperCase(),o.endpoint,!0),p.withCredentials=o.withCredentials,""!==o.responseType&&(p.responseType=o.responseType),l=this.requests.run((()=>{const t=this.getOptions(e);return Object.keys(t.headers).forEach((e=>{p.setRequestHeader(e,t.headers[e])})),p.send(n),()=>{u.done(),p.abort()}})),d.onFileRemove(e.id,(()=>{l.abort(),s(new Error("File removed"))})),d.onCancelAll(e.id,(e=>{let{reason:t}=e;"user"===t&&l.abort(),s(new Error("Upload cancelled"))}))}))}function x(e){return new Promise(((t,s)=>{const{endpoint:o}=this.opts,{method:r}=this.opts,i=Date.now(),a=this.uppy.getState().xhrUpload,n=this.createBundledUpload(e,{...this.opts,...a||{}}),p=new XMLHttpRequest,d=t=>{e.forEach((e=>{this.uppy.emit("upload-error",e,t)}))},l=new c(this.opts.timeout,(()=>{const t=new Error(this.i18n("uploadStalled",{seconds:Math.ceil(this.opts.timeout/1e3)}));this.uppy.emit("upload-stalled",t,e)}));p.upload.addEventListener("loadstart",(()=>{this.uppy.log("[XHRUpload] started uploading bundle"),l.progress()})),p.upload.addEventListener("progress",(t=>{l.progress(),t.lengthComputable&&e.forEach((e=>{this.uppy.emit("upload-progress",this.uppy.getFile(e.id),{uploader:this,uploadStarted:i,bytesUploaded:t.loaded/t.total*e.size,bytesTotal:e.size})}))})),p.addEventListener("load",(()=>{if(l.done(),this.opts.validateStatus(p.status,p.responseText,p)){const s=this.opts.getResponseData(p.responseText,p),o={status:p.status,body:s};return e.forEach((e=>{this.uppy.emit("upload-success",this.uppy.getFile(e.id),o)})),t()}const o=this.opts.getResponseError(p.responseText,p)||new y.A("Upload error",p);return d(o),s(o)})),p.addEventListener("error",(()=>{l.done();const e=this.opts.getResponseError(p.responseText,p)||new Error("Upload error");return d(e),s(e)})),this.uppy.on("cancel-all",(function(e){let{reason:t}=void 0===e?{}:e;"user"===t&&(l.done(),p.abort())})),p.open(r.toUpperCase(),o,!0),p.withCredentials=this.opts.withCredentials,""!==this.opts.responseType&&(p.responseType=this.opts.responseType);const u=this.opts.headers;Object.keys(u).forEach((e=>{p.setRequestHeader(e,u[e])})),p.send(n)}))}function M(e){var t;const s=this.getOptions(e),o=Array.isArray(s.allowedMetaFields)?s.allowedMetaFields:Object.keys(e.meta);return{...null==(t=e.remote)?void 0:t.body,protocol:"multipart",endpoint:s.endpoint,size:e.data.size,fieldname:s.fieldName,metadata:Object.fromEntries(o.map((t=>[t,e.meta[t]]))),httpMethod:s.method,useFormData:s.formData,headers:s.headers}}async function P(e){await Promise.allSettled(e.map(((t,s)=>{const o=s+1,r=e.length;if(t.isRemote){const e=()=>this.requests,s=new AbortController,o=e=>{e.id===t.id&&s.abort()};this.uppy.on("file-removed",o);const r=this.uppy.getRequestClientForFile(t).uploadRemoteFile(t,g(this,j)[j](t),{signal:s.signal,getQueue:e});return this.requests.wrapSyncFunction((()=>{this.uppy.off("file-removed",o)}),{priority:-1})(),r}return g(this,R)[R](t,o,r)})))}A.VERSION="3.6.4"},590:function(e,t,s){s.d(t,{A:function(){return o}});let o=(e=21)=>{let t="",s=e;for(;s--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[50],{6050:function(e,r,i){i.r(r);const s={strings:{},pluralize(e){return e<=1?0:1}};s.strings={addBulkFilesFailed:{0:"L’ajout de %{smart_count} fichier a échoué",1:"L’ajout de %{smart_count} fichiers a échoué"},addedNumFiles:"%{numFiles} fichier(s) ajouté(s)",addingMoreFiles:"Ajout de fichiers",addMore:"Ajouter d’autres",addMoreFiles:"Ajouter d’autres fichiers",allFilesFromFolderNamed:"Tous les fichiers du dossier %{name}",allowAccessDescription:"Pour prendre des photos ou enregistrer une vidéo, veuillez autoriser l’accès à votre caméra pour ce site.",allowAccessTitle:"Veuillez autoriser l’accès à votre caméra",authAborted:"Authentification interrompue",authenticateWith:"Se connecter à %{pluginName}",authenticateWithTitle:"Veuillez vous authentifier avec %{pluginName} pour sélectionner les fichiers",back:"Retour",browse:"naviguer",browseFiles:"naviguer",cancel:"Annuler",cancelUpload:"Annuler le téléversement",chooseFiles:"Choisir des fichiers",closeModal:"Fermer la fenêtre",companionError:"Connexion à Companion a échoué",companionUnauthorizeHint:"Pour vous déconnecter de votre compte %{provider}, veuillez aller à %{url}",complete:"Terminé",compressedX:"%{size} économisé(s) par la compression",compressingImages:"Compression des images…",connectedToInternet:"Connecté à Internet",copyLink:"Copier le lien",copyLinkToClipboardFallback:"Copier le lien ci-dessous",copyLinkToClipboardSuccess:"Lien copié",creatingAssembly:"Préparation du téléversement…",creatingAssemblyFailed:"Transloadit: Impossible de créer Assembly",dashboardTitle:"Téléverseur de fichiers",dashboardWindowTitle:"Fenêtre de téléversement de fichiers (Appuyez sur Échap pour fermer)",dataUploadedOfTotal:"%{complete} sur %{total}",done:"Terminé",dropHereOr:"Déposer les fichiers ici ou %{browse}",dropHint:"Déposez vos fichiers ici",dropPasteBoth:"Déposer les fichiers ici, coller ou %{browse}",dropPasteFiles:"Déposer les fichiers ici, coller ou %{browse}",dropPasteFolders:"Déposer les fichiers ici, coller ou %{browse}",dropPasteImportBoth:"Déposer les fichiers ici, coller, %{browse} ou importer de",dropPasteImportFiles:"Déposer les fichiers ici, coller, %{browse} ou importer de",dropPasteImportFolders:"Déposer les fichiers ici, coller, %{browse} ou importer de",editFile:"Modifier le fichier",editImage:"Modifier l’image",editFileWithFilename:"Modifier le fichier %{file}",editing:"Modification en cours de %{file}",emptyFolderAdded:"Aucun fichier n’a été ajouté depuis un dossier vide",encoding:"Traitement…",enterCorrectUrl:"Lien incorrect: Assurez-vous que vous entrez un lien direct vers le fichier",enterUrlToImport:"Entrez le lien pour importer un fichier",exceedsSize:"Ce fichier dépasse la taille maximale autorisée de %{size}",failedToFetch:"Companion a échoué à récupérer ce lien, assurez-vous qu’il est correct",failedToUpload:"Le téléversement de %{file} a échoué",fileSource:"Fichier source: %{name}",filesUploadedOfTotal:{0:"%{complete} sur %{smart_count} fichier téléversé",1:"%{complete} sur %{smart_count} fichiers téléversés"},filter:"Filtrer",finishEditingFile:"Terminer l’édition du fichier",folderAdded:{0:"%{smart_count} fichier ajouté de %{folder}",1:"%{smart_count} fichiers ajoutés de %{folder}"},generatingThumbnails:"Génération des vignettes…",import:"Importer",importFrom:"Importer de %{name}",loading:"Chargement…",logOut:"Déconnexion",micDisabled:"Accès au micro refusé par l’utilisateur",myDevice:"Mon Appareil",noDuplicates:'Impossible d’ajouter le fichier "%{fileName}", il existe déjà',noFilesFound:"Vous n’avez aucun fichier ou dossier ici",noInternetConnection:"Pas de connexion à Internet",noMoreFilesAllowed:"Impossible d’ajouter de nouveaux fichiers: en cours de chargement ",openFolderNamed:"Ouvrir %{name}",pause:"Pause",pauseUpload:"Mettre en pause le téléversement",paused:"En pause",poweredBy:"Propulsé par %{uppy}",processingXFiles:{0:"Traitement de %{smart_count} fichier",1:"Traitement de %{smart_count} fichiers"},recording:"Enregistrement",recordingLength:"Durée d’enregistrement %{recording_length}",recordingStoppedMaxSize:"L’enregistrement s’est arrété car la taille du fichier dépasse la limite",removeFile:"Effacer le fichier %{file}",resetFilter:"Réinitialiser filtre",resume:"Reprendre",resumeUpload:"Reprendre le téléversement",retry:"Réessayer",retryUpload:"Réessayer le téléversement",save:"Sauvegarder",saveChanges:"Sauvegarder les modifications",selectFileNamed:"Sélectionner le fichier %{name}",selectX:{0:"Sélectionner %{smart_count}",1:"Sélectionner %{smart_count}"},smile:"Souriez !",startRecording:"Commencer l’enregistrement vidéo",stopRecording:"Arrêter l’enregistrement vidéo",streamActive:"Stream actif",streamPassive:"Stream passif",submitRecordedFile:"Envoyer la vidéo enregistrée",takePicture:"Prendre une photo",timedOut:"Téléversement bloqué durant %{seconds} secondes, annulation.",unselectFileNamed:"Désélectionner le fichier %{name}",upload:"Téléverser",uploadComplete:"Téléversement terminé",uploadFailed:"Le téléversement a échoué",uploadPaused:"Téléversement mis en pause",uploadStalled:"Téléversement bloqué depuis %{seconds} secondes. Il est peut-être nécessaire de recommencer l’opération.",uploadXFiles:{0:"Téléverser %{smart_count} fichier",1:"Téléverser %{smart_count} fichiers"},uploadXNewFiles:{0:"Téléverser +%{smart_count} fichier",1:"Téléverser +%{smart_count} fichiers"},uploading:"Téléversement en cours",uploadingXFiles:{0:"Téléversement de %{smart_count} fichier",1:"Téléversement de %{smart_count} fichiers"},xFilesSelected:{0:"%{smart_count} fichier sélectionné",1:"%{smart_count} fichiers sélectionnés"},xMoreFilesAdded:{0:"%{smart_count} autre fichier ajouté",1:"%{smart_count} autres fichiers ajoutés"},xTimeLeft:"%{time} restantes",youCanOnlyUploadFileTypes:"Vous pouvez seulement téléverser: %{types}",youCanOnlyUploadX:{0:"Vous pouvez seulement téléverser %{smart_count} fichier",1:"Vous pouvez seulement téléverser %{smart_count} fichiers"},youHaveToAtLeastSelectX:{0:"Vous devez sélectionner au moins %{smart_count} fichier",1:"Vous devez sélectionner au moins %{smart_count} fichiers"}},"undefined"!=typeof Uppy&&(globalThis.Uppy.locales.fr_FR=s),r.default=s}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 526.efc3b856.chunk.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[526],{2729:function(t,e,i){i.d(e,{A:function(){return n}});var r=i(9491);class n{constructor(t,e){this.uppy=t,this.opts=null!=e?e:{}}getPluginState(){const{plugins:t}=this.uppy.getState();return(null==t?void 0:t[this.id])||{}}setPluginState(t){if(!t)return;const{plugins:e}=this.uppy.getState();this.uppy.setState({plugins:{...e,[this.id]:{...e[this.id],...t}}})}setOptions(t){this.opts={...this.opts,...t},this.setPluginState(void 0),this.i18nInit()}i18nInit(){const t=new r.A([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.setPluginState(void 0)}addTarget(t){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}update(t){}afterUpdate(){}}},4528:function(t,e,i){function r(t,e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}i.d(e,{A:function(){return a}});var n=0;function s(t){return"__private_"+n+++"_"+t}var o=s("uppy"),u=s("events");class a{constructor(t){Object.defineProperty(this,o,{writable:!0,value:void 0}),Object.defineProperty(this,u,{writable:!0,value:[]}),r(this,o)[o]=t}on(t,e){return r(this,u)[u].push([t,e]),r(this,o)[o].on(t,e)}remove(){for(const[t,e]of r(this,u)[u].splice(0))r(this,o)[o].off(t,e)}onFilePause(t,e){this.on("upload-pause",((i,r)=>{t===i&&e(r)}))}onFileRemove(t,e){this.on("file-removed",(i=>{t===i.id&&e(i.id)}))}onPause(t,e){this.on("upload-pause",((i,r)=>{t===i&&e(r)}))}onRetry(t,e){this.on("upload-retry",(i=>{t===i&&e()}))}onRetryAll(t,e){this.on("retry-all",(()=>{r(this,o)[o].getFile(t)&&e()}))}onPauseAll(t,e){this.on("pause-all",(()=>{r(this,o)[o].getFile(t)&&e()}))}onCancelAll(t,e){var i=this;this.on("cancel-all",(function(){r(i,o)[o].getFile(t)&&e(...arguments)}))}onResumeAll(t,e){this.on("resume-all",(()=>{r(this,o)[o].getFile(t)&&e()}))}}},6681:function(t,e){class i extends Error{constructor(t,e){void 0===e&&(e=null),super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall."),this.cause=t,this.isNetworkError=!0,this.request=e}}e.A=i},1422:function(t,e,i){function r(t,e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}i.d(e,{$:function(){return S},i:function(){return P}});var n=0;function s(t){return"__private_"+n+++"_"+t}function o(t){if(null!=t){var e;const i=()=>this.abort(t.reason);t.addEventListener("abort",i,{once:!0});const r=()=>{t.removeEventListener("abort",i)};null==(e=this.then)||e.call(this,r,r)}return this}var u=s("activeRequests"),a=s("queuedHandlers"),l=s("paused"),h=s("pauseTimer"),c=s("downLimit"),p=s("upperLimit"),f=s("rateLimitingTimer"),d=s("call"),y=s("queueNext"),v=s("next"),b=s("queue"),m=s("dequeue"),w=s("resume"),g=s("increaseLimit");class P{constructor(t){Object.defineProperty(this,m,{value:E}),Object.defineProperty(this,b,{value:A}),Object.defineProperty(this,v,{value:_}),Object.defineProperty(this,y,{value:j}),Object.defineProperty(this,d,{value:O}),Object.defineProperty(this,u,{writable:!0,value:0}),Object.defineProperty(this,a,{writable:!0,value:[]}),Object.defineProperty(this,l,{writable:!0,value:!1}),Object.defineProperty(this,h,{writable:!0,value:void 0}),Object.defineProperty(this,c,{writable:!0,value:1}),Object.defineProperty(this,p,{writable:!0,value:void 0}),Object.defineProperty(this,f,{writable:!0,value:void 0}),Object.defineProperty(this,w,{writable:!0,value:()=>this.resume()}),Object.defineProperty(this,g,{writable:!0,value:()=>{if(r(this,l)[l])r(this,f)[f]=setTimeout(r(this,g)[g],0);else{r(this,c)[c]=this.limit,this.limit=Math.ceil((r(this,p)[p]+r(this,c)[c])/2);for(let t=r(this,c)[c];t<=this.limit;t++)r(this,y)[y]();r(this,p)[p]-r(this,c)[c]>3?r(this,f)[f]=setTimeout(r(this,g)[g],2e3):r(this,c)[c]=Math.floor(r(this,c)[c]/2)}}}),this.limit="number"!=typeof t||0===t?1/0:t}run(t,e){return!r(this,l)[l]&&r(this,u)[u]<this.limit?r(this,d)[d](t):r(this,b)[b](t,e)}wrapSyncFunction(t,e){var i=this;return function(){for(var r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];const u=i.run((()=>(t(...n),queueMicrotask((()=>u.done())),()=>{})),e);return{abortOn:o,abort(){u.abort()}}}}wrapPromiseFunction(t,e){var i=this;return function(){for(var r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];let u;const a=new Promise(((r,s)=>{u=i.run((()=>{let e,i;try{i=Promise.resolve(t(...n))}catch(t){i=Promise.reject(t)}return i.then((t=>{e?s(e):(u.done(),r(t))}),(t=>{e?s(e):(u.done(),s(t))})),t=>{e=function(t){return new Error("Cancelled",{cause:t})}(t)}}),e)}));return a.abort=t=>{u.abort(t)},a.abortOn=o,a}}resume(){r(this,l)[l]=!1,clearTimeout(r(this,h)[h]);for(let t=0;t<this.limit;t++)r(this,y)[y]()}pause(t){void 0===t&&(t=null),r(this,l)[l]=!0,clearTimeout(r(this,h)[h]),null!=t&&(r(this,h)[h]=setTimeout(r(this,w)[w],t))}rateLimit(t){clearTimeout(r(this,f)[f]),this.pause(t),this.limit>1&&Number.isFinite(this.limit)&&(r(this,p)[p]=this.limit-1,this.limit=r(this,c)[c],r(this,f)[f]=setTimeout(r(this,g)[g],t))}get isPaused(){return r(this,l)[l]}}function O(t){r(this,u)[u]+=1;let e,i=!1;try{e=t()}catch(t){throw r(this,u)[u]-=1,t}return{abort:t=>{i||(i=!0,r(this,u)[u]-=1,null==e||e(t),r(this,y)[y]())},done:()=>{i||(i=!0,r(this,u)[u]-=1,r(this,y)[y]())}}}function j(){queueMicrotask((()=>r(this,v)[v]()))}function _(){if(r(this,l)[l]||r(this,u)[u]>=this.limit)return;if(0===r(this,a)[a].length)return;const t=r(this,a)[a].shift();if(null==t)throw new Error("Invariant violation: next is null");const e=r(this,d)[d](t.fn);t.abort=e.abort,t.done=e.done}function A(t,e){const i={fn:t,priority:(null==e?void 0:e.priority)||0,abort:()=>{r(this,m)[m](i)},done:()=>{throw new Error("Cannot mark a queued request as done: this indicates a bug")}},n=r(this,a)[a].findIndex((t=>i.priority>t.priority));return-1===n?r(this,a)[a].push(i):r(this,a)[a].splice(n,0,i),i}function E(t){const e=r(this,a)[a].indexOf(t);-1!==e&&r(this,a)[a].splice(e,1)}const S=Symbol("__queue")},9491:function(t,e,i){function r(t,e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}i.d(e,{A:function(){return c}});var n=0;function s(t){return"__private_"+n+++"_"+t}function o(t,e,i){const r=[];return t.forEach((t=>"string"!=typeof t?r.push(t):e[Symbol.split](t).forEach(((t,e,n)=>{""!==t&&r.push(t),e<n.length-1&&r.push(i)})))),r}function u(t,e){const i=/\$/g;let r=[t];if(null==e)return r;for(const t of Object.keys(e))if("_"!==t){let n=e[t];"string"==typeof n&&(n=i[Symbol.replace](n,"$$$$")),r=o(r,new RegExp(`%\\{${t}\\}`,"g"),n)}return r}const a=t=>{throw new Error(`missing string: ${t}`)};var l=s("onMissingKey"),h=s("apply");class c{constructor(t,e){let{onMissingKey:i=a}=void 0===e?{}:e;Object.defineProperty(this,h,{value:p}),Object.defineProperty(this,l,{writable:!0,value:void 0}),this.locale={strings:{},pluralize(t){return 1===t?0:1}},Array.isArray(t)?t.forEach(r(this,h)[h],this):r(this,h)[h](t),r(this,l)[l]=i}translate(t,e){return this.translateArray(t,e).join("")}translateArray(t,e){let i=this.locale.strings[t];if(null==i&&(r(this,l)[l](t),i=t),"object"==typeof i){if(e&&void 0!==e.smart_count)return u(i[this.locale.pluralize(e.smart_count)],e);throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}if("string"!=typeof i)throw new Error("string was not a string");return u(i,e)}}function p(t){if(null==t||!t.strings)return;const e=this.locale;Object.assign(this.locale,{strings:{...e.strings,...t.strings},pluralize:t.pluralize||e.pluralize})}},8284:function(t,e,i){function r(t){return t.filter((t=>!(t=>"error"in t&&!!t.error)(t)))}function n(t){return t.filter((t=>{var e;return!(null!=(e=t.progress)&&e.uploadStarted&&t.isRestored)}))}i.d(e,{S:function(){return n},Y:function(){return r}})},7853:function(t,e){e.A=function(t){return!!t&&(0!==t.readyState&&4!==t.readyState||0===t.status)}}}]);
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Takes a string with placeholder variables like `%{smart_count} file selected`
|
|
3
|
-
* and replaces it with values from options `{smart_count: 5}`
|
|
4
|
-
*
|
|
5
|
-
* @license https://github.com/airbnb/polyglot.js/blob/master/LICENSE
|
|
6
|
-
* taken from https://github.com/airbnb/polyglot.js/blob/master/lib/polyglot.js#L299
|
|
7
|
-
*
|
|
8
|
-
* @param phrase that needs interpolation, with placeholders
|
|
9
|
-
* @param options with values that will be used to replace placeholders
|
|
10
|
-
*/
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[567],{3567:function(A,s,i){i.r(s),i.d(s,{default:function(){return o}});var e=i(5786),a=i(7496),n=i(5144),t=i(5181),r={strings:{pluginNameInstagram:"Instagram"}};class o extends a.A{constructor(A,s){super(A,s),this.type="acquirer",this.files=[],this.storage=this.opts.storage||e.HM,this.id=this.opts.id||"Instagram",this.icon=()=>(0,t.h)("svg",{"aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32"},(0,t.h)("defs",null,(0,t.h)("path",{d:"M16.825 5l.483-.001.799.002c1.168.005 1.598.021 2.407.057 1.17.05 1.97.235 2.67.506.725.28 1.34.655 1.951 1.265.613.61.99 1.223 1.273 1.946.273.7.46 1.498.516 2.67l.025.552.008.205c.029.748.037 1.51.042 3.777l.001.846v.703l-.001.398a50.82 50.82 0 01-.058 2.588c-.05 1.17-.235 1.97-.506 2.67a5.394 5.394 0 01-1.265 1.951c-.61.613-1.222.99-1.946 1.273-.699.273-1.498.46-2.668.516-.243.012-.451.022-.656.03l-.204.007c-.719.026-1.512.034-3.676.038l-.847.001h-1.1a50.279 50.279 0 01-2.587-.059c-1.171-.05-1.971-.235-2.671-.506a5.394 5.394 0 01-1.951-1.265 5.385 5.385 0 01-1.272-1.946c-.274-.699-.46-1.498-.517-2.668a88.15 88.15 0 01-.03-.656l-.007-.205c-.026-.718-.034-1.512-.038-3.674v-2.129c.006-1.168.022-1.597.058-2.406.051-1.171.235-1.971.506-2.672a5.39 5.39 0 011.265-1.95 5.381 5.381 0 011.946-1.272c.699-.274 1.498-.462 2.669-.517l.656-.03.204-.007c.718-.026 1.511-.034 3.674-.038zm.678 1.981h-1.226l-.295.001c-2.307.005-3.016.013-3.777.043l-.21.009-.457.02c-1.072.052-1.654.232-2.042.383-.513.2-.879.44-1.263.825a3.413 3.413 0 00-.82 1.267c-.15.388-.33.97-.375 2.043a48.89 48.89 0 00-.056 2.482v.398 1.565c.006 2.937.018 3.285.073 4.444.05 1.073.231 1.654.382 2.043.2.512.44.878.825 1.263.386.383.753.621 1.267.82.388.15.97.328 2.043.374.207.01.388.017.563.024l.208.007a63.28 63.28 0 002.109.026h1.564c2.938-.006 3.286-.019 4.446-.073 1.071-.051 1.654-.232 2.04-.383.514-.2.88-.44 1.264-.825.384-.386.622-.753.82-1.266.15-.389.328-.971.375-2.044.039-.88.054-1.292.057-2.723v-1.15-.572c-.006-2.936-.019-3.284-.074-4.445-.05-1.071-.23-1.654-.382-2.04-.2-.515-.44-.88-.825-1.264a3.405 3.405 0 00-1.267-.82c-.388-.15-.97-.328-2.042-.375a48.987 48.987 0 00-2.535-.056zm-1.515 3.37a5.65 5.65 0 11.021 11.299 5.65 5.65 0 01-.02-11.3zm.004 1.982a3.667 3.667 0 10.015 7.334 3.667 3.667 0 00-.015-7.334zm5.865-3.536a1.32 1.32 0 11.005 2.64 1.32 1.32 0 01-.005-2.64z",id:"a"})),(0,t.h)("g",{fill:"none","fill-rule":"evenodd"},(0,t.h)("mask",{id:"b",fill:"#fff"},(0,t.h)("use",{xlinkHref:"#a"})),(0,t.h)("image",{mask:"url(#b)",x:"4",y:"4",width:"24",height:"24",xlinkHref:"data:image/png;base64,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"}))),this.defaultLocale=r,this.i18nInit(),this.title=this.i18n("pluginNameInstagram"),this.opts.companionAllowedHosts=(0,e.cP)(this.opts.companionAllowedHosts,this.opts.companionUrl),this.provider=new e.Kq(A,{companionUrl:this.opts.companionUrl,companionHeaders:this.opts.companionHeaders,companionKeysParams:this.opts.companionKeysParams,companionCookiesRule:this.opts.companionCookiesRule,provider:"instagram",pluginId:this.id,supportsRefreshToken:!1}),this.onFirstRender=this.onFirstRender.bind(this),this.render=this.render.bind(this)}install(){this.view=new n.gi(this,{provider:this.provider,viewType:"grid",showTitles:!1,showFilter:!1,showBreadcrumbs:!1});const{target:A}=this.opts;A&&this.mount(A,this)}uninstall(){this.view.tearDown(),this.unmount()}async onFirstRender(){await Promise.all([this.provider.fetchPreAuthToken(),this.view.getFolder("recent")])}render(A){return this.view.render(A)}}o.VERSION="3.3.0"}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[595],{8106:function(t){function e(t){if(t)return function(t){for(var s in e.prototype)t[s]=e.prototype[s];return t}(t)}t.exports=e,e.prototype.on=e.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},e.prototype.once=function(t,e){function s(){this.off(t,s),e.apply(this,arguments)}return s.fn=e,this.on(t,s),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var s,i=this._callbacks["$"+t];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var r=0;r<i.length;r++)if((s=i[r])===e||s.fn===e){i.splice(r,1);break}return 0===i.length&&delete this._callbacks["$"+t],this},e.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),s=this._callbacks["$"+t],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(s){i=0;for(var r=(s=s.slice(0)).length;i<r;++i)s[i].apply(this,e)}return this},e.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},e.prototype.hasListeners=function(t){return!!this.listeners(t).length}},8595:function(t,e,s){"use strict";s.r(e),s.d(e,{COMPANION_ALLOWED_HOSTS:function(){return wt},COMPANION_URL:function(){return Pt},default:function(){return Gt}});var i=s(9420),r=s(8396),a=s(1422),o=s(2729),l=s(4626),n=s(8106),u=s(6681),h=s(5945);function p(t,e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}var c=0;function d(t){return"__private_"+c+++"_"+t}const m="ASSEMBLY_EXECUTING",y="ASSEMBLY_COMPLETED",f=["ASSEMBLY_UPLOADING",m,y];function b(t,e){return f.indexOf(t)>=f.indexOf(e)}var g=d("rateLimitedQueue"),v=d("fetchWithNetworkError"),O=d("previousFetchStatusStillPending"),_=d("sse"),P=d("onFinished"),w=d("connectServerSentEvents"),A=d("onError"),E=d("beginPolling"),S=d("fetchStatus"),j=d("diffStatus");function F(){this.emit("finished"),this.close()}function R(){p(this,_)[_]=new EventSource(`${this.status.websocket_url}?assembly=${this.status.assembly_id}`),p(this,_)[_].addEventListener("open",(()=>{clearInterval(this.pollInterval),this.pollInterval=null})),p(this,_)[_].addEventListener("message",(t=>{"assembly_finished"===t.data&&p(this,P)[P](),"assembly_uploading_finished"===t.data&&this.emit("executing"),"assembly_upload_meta_data_extracted"===t.data&&(this.emit("metadata"),p(this,S)[S]({diff:!1}))})),p(this,_)[_].addEventListener("assembly_upload_finished",(t=>{const e=JSON.parse(t.data);this.emit("upload",e),this.status.uploads.push(e)})),p(this,_)[_].addEventListener("assembly_result_finished",(t=>{var e,s;const[i,r]=JSON.parse(t.data);this.emit("result",i,r),(null!=(s=(e=this.status.results)[i])?s:e[i]=[]).push(r)})),p(this,_)[_].addEventListener("assembly_execution_progress",(t=>{const e=JSON.parse(t.data);this.emit("execution-progress",e)})),p(this,_)[_].addEventListener("assembly_error",(t=>{try{p(this,A)[A](JSON.parse(t.data))}catch{p(this,A)[A](new Error(t.data))}p(this,S)[S]({diff:!1})}))}function k(t){this.emit("error",Object.assign(new Error(t.message),t)),this.close()}function I(){this.pollInterval=setInterval((()=>{p(this,S)[S]()}),2e3)}async function L(t){let{diff:e=!0}=void 0===t?{}:t;if(!(this.closed||p(this,g)[g].isPaused||p(this,O)[O]))try{p(this,O)[O]=!0;const t=await p(this,v)[v](this.status.assembly_ssl_url);if(p(this,O)[O]=!1,this.closed)return;if(429===t.status)return void p(this,g)[g].rateLimit(2e3);if(!t.ok)return void p(this,A)[A](new u.A(t.statusText));const s=await t.json();if(this.closed)return;this.emit("status",s),e?this.updateStatus(s):this.status=s}catch(t){p(this,A)[A](t)}}function N(t,e){const s=t.ok,r=e.ok;if(e.error&&!t.error)return p(this,A)[A](e);const a=b(r,m)&&!b(s,m);a&&this.emit("executing"),Object.keys(e.uploads).filter((e=>!(0,i.A)(t.uploads,e))).forEach((t=>{this.emit("upload",e.uploads[t])})),a&&this.emit("metadata"),Object.keys(e.results).forEach((s=>{const i=e.results[s],r=t.results[s];i.filter((t=>!r||!r.some((e=>e.id===t.id)))).forEach((t=>{this.emit("result",s,t)}))})),b(r,y)&&!b(s,y)&&this.emit("finished")}var U=class extends n{constructor(t,e){super(),Object.defineProperty(this,j,{value:N}),Object.defineProperty(this,S,{value:L}),Object.defineProperty(this,E,{value:I}),Object.defineProperty(this,A,{value:k}),Object.defineProperty(this,w,{value:R}),Object.defineProperty(this,P,{value:F}),Object.defineProperty(this,g,{writable:!0,value:void 0}),Object.defineProperty(this,v,{writable:!0,value:void 0}),Object.defineProperty(this,O,{writable:!0,value:!1}),Object.defineProperty(this,_,{writable:!0,value:void 0}),this.status=t,this.pollInterval=null,this.closed=!1,p(this,g)[g]=e,p(this,v)[v]=e.wrapPromiseFunction(h.A)}connect(){p(this,w)[w](),p(this,E)[E]()}update(){return p(this,S)[S]({diff:!0})}updateStatus(t){p(this,j)[j](this.status,t),this.status=t}close(){this.closed=!0,p(this,_)[_]&&(p(this,_)[_].close(),p(this,_)[_]=null),clearInterval(this.pollInterval),this.pollInterval=null}};function T(t,e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}var $=0;function x(t){return"__private_"+$+++"_"+t}const C="/assemblies";class D extends Error{constructor(t,e,s){super(t),this.details=e,this.assembly=s}}var M=x("headers"),W=x("fetchWithNetworkError"),J=x("fetchJSON"),B=x("reportError");class z{constructor(t){Object.defineProperty(this,J,{value:Q}),Object.defineProperty(this,M,{writable:!0,value:{}}),Object.defineProperty(this,W,{writable:!0,value:void 0}),Object.defineProperty(this,B,{writable:!0,value:(t,e)=>{if(!1===this.opts.errorReporting)throw t;const s={type:e.type};throw e.assembly&&(s.assembly=e.assembly.assembly_id,s.instance=e.assembly.instance),e.url&&(s.endpoint=e.url),this.submitError(t,s).catch((()=>{})),t}}),this.opts=t,null!=this.opts.client&&(T(this,M)[M]["Transloadit-Client"]=this.opts.client),T(this,W)[W]=this.opts.rateLimitedQueue.wrapPromiseFunction(h.A)}async createAssembly(t){let{params:e,fields:s,signature:i,expectedFiles:r}=t;const a=new FormData;a.append("params","string"==typeof e?e:JSON.stringify(e)),i&&a.append("signature",i),Object.keys(s).forEach((t=>{a.append(t,String(s[t]))})),a.append("num_expected_upload_files",String(r));const o=new URL(C,`${this.opts.service}`).href;return T(this,J)[J](o,{method:"POST",headers:T(this,M)[M],body:a}).catch((t=>T(this,B)[B](t,{url:o,type:"API_ERROR"})))}async reserveFile(t,e){const s=encodeURIComponent(e.size),i=`${t.assembly_ssl_url}/reserve_file?size=${s}`;return T(this,J)[J](i,{method:"POST",headers:T(this,M)[M]}).catch((s=>T(this,B)[B](s,{assembly:t,file:e,url:i,type:"API_ERROR"})))}async addFile(t,e){if(!e.uploadURL)return Promise.reject(new Error("File does not have an `uploadURL`."));const s=encodeURIComponent(e.size),i=encodeURIComponent(e.uploadURL),r=`size=${s}&filename=${encodeURIComponent(e.name)}&fieldname=file&s3Url=${i}`,a=`${t.assembly_ssl_url}/add_file?${r}`;return T(this,J)[J](a,{method:"POST",headers:T(this,M)[M]}).catch((s=>T(this,B)[B](s,{assembly:t,file:e,url:a,type:"API_ERROR"})))}async updateNumberOfFilesInAssembly(t,e){const s=new URL(t.assembly_ssl_url);s.pathname="/update_assemblies";const i=JSON.stringify({assembly_updates:[{assembly_id:t.assembly_id,num_expected_upload_files:e}]});return T(this,J)[J](s,{method:"POST",headers:T(this,M)[M],body:i}).catch((t=>T(this,B)[B](t,{url:s,type:"API_ERROR"})))}async cancelAssembly(t){const e=t.assembly_ssl_url;return T(this,J)[J](e,{method:"DELETE",headers:T(this,M)[M]}).catch((t=>T(this,B)[B](t,{url:e,type:"API_ERROR"})))}async getAssemblyStatus(t){return T(this,J)[J](t,{headers:T(this,M)[M]}).catch((e=>T(this,B)[B](e,{url:t,type:"STATUS_ERROR"})))}async submitError(t,e){let{endpoint:s,instance:i,assembly:r}=void 0===e?{}:e;const a=t.details?`${t.message} (${t.details})`:t.message;return T(this,J)[J]("https://transloaditstatus.com/client_error",{method:"POST",body:JSON.stringify({endpoint:s,instance:i,assembly_id:r,agent:"undefined"!=typeof navigator?navigator.userAgent:"",client:this.opts.client,error:a})})}}async function Q(){const t=await T(this,W)[W](...arguments);if(429===t.status)return this.opts.rateLimitedQueue.rateLimit(2e3),T(this,J)[J](...arguments);if(!t.ok){const e=new Error(t.statusText);return e.statusCode=t.status,`${arguments.length<=0?void 0:arguments[0]}`.endsWith(C)?t.json().then((t=>{if(!t.error)throw e;const s=new D(t.error,t.message,t);throw t.assembly_id&&(s.details+=` Assembly ID: ${t.assembly_id}`),s}),(t=>{throw t.cause=e,t})):Promise.reject(e)}return t.json()}function V(t){if(null==t)throw new Error("Transloadit: The `params` option is required.");if("string"==typeof t)try{t=JSON.parse(t)}catch(t){throw new r.A("Transloadit: The `params` option is a malformed JSON string.",{cause:t})}if(!t.auth||!t.auth.key)throw new Error("Transloadit: The `params.auth.key` option is required. You can find your Transloadit API key at https://transloadit.com/c/template-credentials")}function Y(t){const e=Object.create(null);for(const{fileIDs:s,options:i}of t.filter(Boolean)){const t=JSON.stringify(i);t in e?e[t].fileIDArrays.push(s):e[t]={options:i,fileIDArrays:[s]}}return Object.values(e).map((t=>{let{options:e,fileIDArrays:s}=t;return{options:e,fileIDs:s.flat(1)}}))}async function G(t,e){const s="function"==typeof e.assemblyOptions?await e.assemblyOptions(t,e):e.assemblyOptions;V(s.params);const{fields:i}=s;return Array.isArray(i)?s.fields=null==t?{}:Object.fromEntries(i.map((e=>[e,t.meta[e]]))):null==i&&(s.fields={}),s}var q=class{constructor(t,e){this.files=t,this.opts=e}async build(){const t=this.opts;return this.files.length>0?Promise.all(this.files.map((async e=>{if(null==e)return;const s=await G(e,t);return null!=e?{fileIDs:[e.id],options:s}:void 0}))).then(Y):t.alwaysRunAssembly?[{fileIDs:[],options:await G(null,t)}]:[]}};function H(t,e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}var X=0;function Z(t){return"__private_"+X+++"_"+t}var K=Z("assemblyIDs"),tt=Z("remaining"),et=Z("resolve"),st=Z("reject"),it=Z("uppy"),rt=Z("watching"),at=Z("onAssemblyComplete"),ot=Z("onAssemblyCancel"),lt=Z("onAssemblyError"),nt=Z("onImportError"),ut=Z("checkAllComplete"),ht=Z("removeListeners"),pt=Z("addListeners");function ct(t){return-1!==H(this,K)[K].indexOf(t)}function dt(){H(this,tt)[tt]-=1,0===H(this,tt)[tt]&&(H(this,ht)[ht](),H(this,et)[et]())}function mt(){H(this,it)[it].off("transloadit:complete",H(this,at)[at]),H(this,it)[it].off("transloadit:assembly-cancel",H(this,ot)[ot]),H(this,it)[it].off("transloadit:assembly-error",H(this,lt)[lt]),H(this,it)[it].off("transloadit:import-error",H(this,nt)[nt])}function yt(){H(this,it)[it].on("transloadit:complete",H(this,at)[at]),H(this,it)[it].on("transloadit:assembly-cancel",H(this,ot)[ot]),H(this,it)[it].on("transloadit:assembly-error",H(this,lt)[lt]),H(this,it)[it].on("transloadit:import-error",H(this,nt)[nt])}var ft=class extends n{constructor(t,e){super(),Object.defineProperty(this,pt,{value:yt}),Object.defineProperty(this,ht,{value:mt}),Object.defineProperty(this,ut,{value:dt}),Object.defineProperty(this,rt,{value:ct}),Object.defineProperty(this,K,{writable:!0,value:void 0}),Object.defineProperty(this,tt,{writable:!0,value:void 0}),Object.defineProperty(this,et,{writable:!0,value:void 0}),Object.defineProperty(this,st,{writable:!0,value:void 0}),Object.defineProperty(this,it,{writable:!0,value:void 0}),Object.defineProperty(this,at,{writable:!0,value:t=>{H(this,rt)[rt](t.assembly_id)&&(H(this,it)[it].log(`[Transloadit] AssemblyWatcher: Got Assembly finish ${t.assembly_id}`),this.emit("assembly-complete",t.assembly_id),H(this,ut)[ut]())}}),Object.defineProperty(this,ot,{writable:!0,value:t=>{H(this,rt)[rt](t.assembly_id)&&H(this,ut)[ut]()}}),Object.defineProperty(this,lt,{writable:!0,value:(t,e)=>{H(this,rt)[rt](t.assembly_id)&&(H(this,it)[it].log(`[Transloadit] AssemblyWatcher: Got Assembly error ${t.assembly_id}`),H(this,it)[it].log(e),this.emit("assembly-error",t.assembly_id,e),H(this,ut)[ut]())}}),Object.defineProperty(this,nt,{writable:!0,value:(t,e,s)=>{H(this,rt)[rt](t.assembly_id)&&H(this,lt)[lt](t,s)}}),H(this,it)[it]=t,H(this,K)[K]=e,H(this,tt)[tt]=e.length,this.promise=new Promise(((t,e)=>{H(this,et)[et]=t,H(this,st)[st]=e})),H(this,pt)[pt]()}},bt={strings:{creatingAssembly:"Preparing upload...",creatingAssemblyFailed:"Transloadit: Could not create Assembly",encoding:"Encoding..."}};function gt(t,e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}var vt=0;function Ot(t){return"__private_"+vt+++"_"+t}const _t=t=>e=>{const s=new r.A("Failed to send error to the client",{cause:e});console.error(s,t)},Pt="https://api2.transloadit.com/companion",wt=/\.transloadit\.com$/,At=/https?:\/\/api2(?:-\w+)?\.transloadit\.com\/companion/,Et={service:"https://api2.transloadit.com",errorReporting:!0,waitForEncoding:!1,waitForMetadata:!1,alwaysRunAssembly:!1,importFromUploadURLs:!1,signature:null,params:null,fields:null,getAssemblyOptions:null,limit:20,retryDelays:[7e3,1e4,15e3,2e4],clientName:null};var St=Ot("rateLimitedQueue"),jt=Ot("getClientVersion"),Ft=Ot("attachAssemblyMetadata"),Rt=Ot("createAssembly"),kt=Ot("createAssemblyWatcher"),It=Ot("shouldWaitAfterUpload"),Lt=Ot("reserveFiles"),Nt=Ot("onFileUploadURLAvailable"),Ut=Ot("findFile"),Tt=Ot("onFileUploadComplete"),$t=Ot("onResult"),xt=Ot("onAssemblyFinished"),Ct=Ot("cancelAssembly"),Dt=Ot("onCancelAll"),Mt=Ot("getPersistentData"),Wt=Ot("onRestored"),Jt=Ot("connectAssembly"),Bt=Ot("prepareUpload"),zt=Ot("afterUpload"),Qt=Ot("closeAssemblyIfExists"),Vt=Ot("onError"),Yt=Ot("onTusError");class Gt extends o.A{constructor(t,e){var s,r,o;super(t,{...Et,...e}),s=this,Object.defineProperty(this,Jt,{value:oe}),Object.defineProperty(this,Ct,{value:ae}),Object.defineProperty(this,xt,{value:re}),Object.defineProperty(this,$t,{value:ie}),Object.defineProperty(this,Tt,{value:se}),Object.defineProperty(this,Ut,{value:ee}),Object.defineProperty(this,Lt,{value:te}),Object.defineProperty(this,It,{value:Kt}),Object.defineProperty(this,kt,{value:Zt}),Object.defineProperty(this,Rt,{value:Xt}),Object.defineProperty(this,Ft,{value:Ht}),Object.defineProperty(this,jt,{value:qt}),Object.defineProperty(this,St,{writable:!0,value:void 0}),Object.defineProperty(this,Nt,{writable:!0,value:t=>{var e;const s=this.uppy.getFile(t.id);if(null==s||null==(e=s.transloadit)||!e.assembly)return;const{assemblies:i}=this.getPluginState(),r=i[s.transloadit.assembly];this.client.addFile(r,s).catch((t=>{this.uppy.log(t),this.uppy.emit("transloadit:import-error",r,s.id,t)}))}}),Object.defineProperty(this,Dt,{writable:!0,value:async function(t){let{reason:e}=void 0===t?{}:t;try{if("user"!==e)return;const{uploadsAssemblies:t}=s.getPluginState(),i=Object.values(t).flat(1).map((t=>s.getAssembly(t)));await Promise.all(i.map((t=>gt(s,Ct)[Ct](t))))}catch(t){s.uppy.log(t)}}}),Object.defineProperty(this,Mt,{writable:!0,value:t=>{const{assemblies:e,uploadsAssemblies:s}=this.getPluginState();t({[this.id]:{assemblies:e,uploadsAssemblies:s}})}}),Object.defineProperty(this,Wt,{writable:!0,value:t=>{const e=t&&t[this.id]?t[this.id]:{},s=e.assemblies||{},i=e.uploadsAssemblies||{};if(0===Object.keys(i).length)return;const r=t=>{const e={},s=[];for(const[i,r]of Object.entries(t)){r.uploads.forEach((t=>{const s=gt(this,Ut)[Ut](t);e[t.id]={id:s.id,assembly:i,uploadedFile:t}}));const t=this.getPluginState();Object.keys(r.results).forEach((e=>{for(const a of r.results[e]){const r=t.files[a.original_id];a.localId=r?r.id:null,s.push({id:a.id,result:a,stepName:e,assembly:i})}}))}this.setPluginState({assemblies:t,files:e,results:s,uploadsAssemblies:i})},a=()=>{const{assemblies:t,uploadsAssemblies:e}=this.getPluginState();Object.keys(e).forEach((t=>{const s=e[t];gt(this,kt)[kt](s,t)})),Object.keys(t).forEach((e=>{const s=new U(t[e],gt(this,St)[St]);gt(this,Jt)[Jt](s)}))},o=()=>{const{assemblies:t}=this.getPluginState();return Promise.all(Object.keys(t).map((t=>this.activeAssemblies[t].update())))};this.restored=Promise.resolve().then((()=>{r(s),a(),o()})),this.restored.then((()=>{this.restored=null}))}}),Object.defineProperty(this,Bt,{writable:!0,value:async(t,e)=>{const s=t.map((t=>this.uppy.getFile(t))),i=s.filter((t=>!t.error&&(this.uppy.emit("preprocess-progress",t,{mode:"indeterminate",message:this.i18n("creatingAssembly")}),!0))),r=async t=>{let{fileIDs:s,options:i}=t;try{const t=await gt(this,Rt)[Rt](s,e,i);return this.opts.importFromUploadURLs&&await gt(this,Lt)[Lt](t,s),s.forEach((t=>{const e=this.uppy.getFile(t);this.uppy.emit("preprocess-complete",e)})),t}catch(t){throw s.forEach((e=>{const s=this.uppy.getFile(e);this.uppy.emit("preprocess-complete",s),this.uppy.emit("upload-error",s,t)})),t}},{uploadsAssemblies:a}=this.getPluginState();this.setPluginState({uploadsAssemblies:{...a,[e]:[]}});const o=new q(i,this.opts);await o.build().then((t=>Promise.all(t.map(r)))).then((t=>{const s=t.filter(Boolean),i=s.map((t=>t.status.assembly_id));return gt(this,kt)[kt](i,e),Promise.all(s.map((t=>gt(this,Jt)[Jt](t))))})).catch((t=>{throw i.forEach((e=>{this.uppy.emit("preprocess-complete",e),this.uppy.emit("upload-error",e,t)})),t}))}}),Object.defineProperty(this,zt,{writable:!0,value:(t,e)=>{const s=t.map((t=>this.uppy.getFile(t))),r=s.filter((t=>!t.error)).map((t=>t.id)),a=this.getPluginState();if(this.restored)return this.restored.then((()=>gt(this,zt)[zt](r,e)));const o=a.uploadsAssemblies[e],l=()=>{o.forEach((t=>{this.activeAssemblies[t].close(),delete this.activeAssemblies[t]}))};if(!gt(this,It)[It]()){l();const t=o.map((t=>this.getAssembly(t)));return this.uppy.addResultData(e,{transloadit:t}),Promise.resolve()}return 0===o.length?(this.uppy.addResultData(e,{transloadit:[]}),Promise.resolve()):(s.filter((t=>!(0,i.A)(this.completedFiles,t.id))).forEach((t=>{this.uppy.emit("postprocess-progress",t,{mode:"indeterminate",message:this.i18n("encoding")})})),this.assemblyWatchers[e].promise.then((()=>{l();const t=o.map((t=>this.getAssembly(t))),s={...this.getPluginState().uploadsAssemblies};delete s[e],this.setPluginState({uploadsAssemblies:s}),this.uppy.addResultData(e,{transloadit:t})})))}}),Object.defineProperty(this,Qt,{writable:!0,value:t=>{var e;t&&(null==(e=this.activeAssemblies[t])||e.close())}}),Object.defineProperty(this,Vt,{writable:!0,value:t=>{this.client.submitError(t).catch(_t(t))}}),Object.defineProperty(this,Yt,{writable:!0,value:(t,e)=>{var s,i;if(gt(this,Qt)[Qt](null==t||null==(s=t.transloadit)?void 0:s.assembly),null!=e&&null!=(i=e.message)&&i.startsWith("tus: ")){var r;const t=null==(r=e.originalRequest)||null==(r=r.getUnderlyingObject())?void 0:r.responseURL;this.client.submitError(e,{endpoint:t}).catch(_t(e))}}}),this.type="uploader",this.id=this.opts.id||"Transloadit",this.defaultLocale=bt,null!=(r=this.opts).assemblyOptions||(r.assemblyOptions=null!=(o=this.opts.getAssemblyOptions)?o:{params:this.opts.params,signature:this.opts.signature,fields:this.opts.fields}),null!=(null==e?void 0:e.params)&&null==e.getAssemblyOptions&&null==e.assemblyOptions&&V(this.opts.assemblyOptions.params),gt(this,St)[St]=new a.i(this.opts.limit),this.i18nInit(),this.client=new z({service:this.opts.service,client:gt(this,jt)[jt](),errorReporting:this.opts.errorReporting,rateLimitedQueue:gt(this,St)[St]}),this.activeAssemblies={},this.assemblyWatchers={},this.completedFiles=Object.create(null)}install(){this.uppy.addPreProcessor(gt(this,Bt)[Bt]),this.uppy.addPostProcessor(gt(this,zt)[zt]),this.uppy.on("error",gt(this,Vt)[Vt]),this.uppy.on("cancel-all",gt(this,Dt)[Dt]),this.uppy.on("upload-error",gt(this,Yt)[Yt]),this.opts.importFromUploadURLs?this.uppy.on("upload-success",gt(this,Nt)[Nt]):this.uppy.use(l.default,{storeFingerprintForResuming:!1,allowedMetaFields:["assembly_url","filename","fieldname"],limit:this.opts.limit,rateLimitedQueue:gt(this,St)[St],retryDelays:this.opts.retryDelays}),this.uppy.on("restore:get-data",gt(this,Mt)[Mt]),this.uppy.on("restored",gt(this,Wt)[Wt]),this.setPluginState({assemblies:{},uploadsAssemblies:{},files:{},results:[]});const{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:{...t,individualCancellation:!1}})}uninstall(){this.uppy.removePreProcessor(gt(this,Bt)[Bt]),this.uppy.removePostProcessor(gt(this,zt)[zt]),this.uppy.off("error",gt(this,Vt)[Vt]),this.opts.importFromUploadURLs&&this.uppy.off("upload-success",gt(this,Nt)[Nt]);const{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:{...t,individualCancellation:!0}})}getAssembly(t){const{assemblies:e}=this.getPluginState();return e[t]}getAssemblyFiles(t){return this.uppy.getFiles().filter((e=>{var s;return(null==e||null==(s=e.transloadit)?void 0:s.assembly)===t}))}}function qt(){const t=[`uppy-core:${this.uppy.constructor.VERSION}`,`uppy-transloadit:${this.constructor.VERSION}`,`uppy-tus:${l.default.VERSION}`],e=(e,s)=>{const i=this.uppy.getPlugin(e);i&&t.push(`${s}:${i.constructor.VERSION}`)};return this.opts.importFromUploadURLs&&(e("XHRUpload","uppy-xhr-upload"),e("AwsS3","uppy-aws-s3"),e("AwsS3Multipart","uppy-aws-s3-multipart")),e("Dropbox","uppy-dropbox"),e("Box","uppy-box"),e("Facebook","uppy-facebook"),e("GoogleDrive","uppy-google-drive"),e("Instagram","uppy-instagram"),e("OneDrive","uppy-onedrive"),e("Zoom","uppy-zoom"),e("Url","uppy-url"),null!=this.opts.clientName&&t.push(this.opts.clientName),t.join(",")}function Ht(t,e){const s={...t.meta,assembly_url:e.assembly_url,filename:t.name,fieldname:"file"},i={...t.tus,endpoint:e.tus_url,addRequestId:!0};let{remote:r}=t;if(t.remote&&At.test(t.remote.companionUrl)){const s=e.companion_url.replace(/\/$/,""),i=t.remote.url.replace(t.remote.companionUrl,"").replace(/^\//,"");r={...t.remote,companionUrl:s,url:`${s}/${i}`}}const a={...t,transloadit:{assembly:e.assembly_id}};return this.opts.importFromUploadURLs||Object.assign(a,{meta:s,tus:i,remote:r}),a}function Xt(t,e,s){return this.uppy.log("[Transloadit] Create Assembly"),this.client.createAssembly({...s,expectedFiles:t.length}).then((async s=>{const i=this.uppy.getFiles().filter((e=>{let{id:s}=e;return t.includes(s)}));if(i.length!==t.length){if(0===i.length)return await this.client.cancelAssembly(s),null;await this.client.updateNumberOfFilesInAssembly(s,i.length)}const r=new U(s,gt(this,St)[St]),{status:a}=r,o=a.assembly_id,{assemblies:l,uploadsAssemblies:n}=this.getPluginState();this.setPluginState({assemblies:{...l,[o]:a},uploadsAssemblies:{...n,[e]:[...n[e],o]}});const u={};i.forEach((t=>{u[t.id]=gt(this,Ft)[Ft](t,a)})),this.uppy.setState({files:{...this.uppy.getState().files,...u}});const h=(t,e)=>{var i;if("ASSEMBLY_COMPLETED"!==(null==(i=r.status)?void 0:i.ok)){if("cancel-all"===e)r.close(),this.uppy.off("file-removed",h);else if(t.id in u){delete u[t.id];const e=Object.keys(u).length;0===e?(r.close(),gt(this,Ct)[Ct](s).catch((()=>{})),this.uppy.off("file-removed",h)):this.client.updateNumberOfFilesInAssembly(s,e).catch((()=>{}))}}else this.uppy.off("file-removed",h)};return this.uppy.on("file-removed",h),this.uppy.emit("transloadit:assembly-created",a,t),this.uppy.log(`[Transloadit] Created Assembly ${o}`),r})).catch((t=>{const e=new r.A(`${this.i18n("creatingAssemblyFailed")}: ${t.message}`,{cause:t});throw"details"in t&&(e.details=t.details),"assembly"in t&&(e.assembly=t.assembly),e}))}function Zt(t,e){const s=Array.isArray(t)?t:[t],i=new ft(this.uppy,s);i.on("assembly-complete",(t=>{this.getAssemblyFiles(t).forEach((t=>{this.completedFiles[t.id]=!0,this.uppy.emit("postprocess-complete",t)}))})),i.on("assembly-error",((t,e)=>{const s=this.getAssemblyFiles(t);s.forEach((t=>{this.uppy.emit("upload-error",t,e),this.uppy.emit("postprocess-complete",t)}));const i={...this.uppy.getState().files};s.forEach((t=>delete i[t.id].tus)),this.uppy.setState({files:i}),this.uppy.emit("error",e)})),this.assemblyWatchers[e]=i}function Kt(){return this.opts.waitForEncoding||this.opts.waitForMetadata}function te(t,e){return Promise.all(e.map((e=>{const s=this.uppy.getFile(e);return this.client.reserveFile(t.status,s)})))}function ee(t){const e=this.uppy.getFiles();for(let s=0;s<e.length;s++){const i=e[s];if(i.uploadURL===t.tus_upload_url)return i;if(i.tus&&i.tus.uploadUrl===t.tus_upload_url)return i;if(!t.is_tus_file&&i.name===t.name&&i.size===t.size)return i}}function se(t,e){const s=this.getPluginState(),i=gt(this,Ut)[Ut](e);i?(this.setPluginState({files:{...s.files,[e.id]:{assembly:t,id:i.id,uploadedFile:e}}}),this.uppy.emit("transloadit:upload",e,this.getAssembly(t))):this.uppy.log("[Transloadit] Couldn’t find the file, it was likely removed in the process")}function ie(t,e,s){const i=this.getPluginState(),r=i.files[s.original_id];s.localId=r?r.id:null;const a={result:s,stepName:e,id:s.id,assembly:t};this.setPluginState({results:[...i.results,a]}),this.uppy.emit("transloadit:result",e,s,this.getAssembly(t))}function re(t){const e=t.assembly_ssl_url;this.client.getAssemblyStatus(e).then((t=>{const e=t.assembly_id,s=this.getPluginState();this.setPluginState({assemblies:{...s.assemblies,[e]:t}}),this.uppy.emit("transloadit:complete",t)}))}async function ae(t){await this.client.cancelAssembly(t),this.uppy.emit("transloadit:assembly-cancelled",t)}function oe(t){const{status:e}=t,s=e.assembly_id;return this.activeAssemblies[s]=t,t.on("status",(t=>{const{assemblies:e}=this.getPluginState();this.setPluginState({assemblies:{...e,[s]:t}})})),t.on("upload",(t=>{gt(this,Tt)[Tt](s,t)})),t.on("error",(e=>{e.assembly=t.status,this.uppy.emit("transloadit:assembly-error",t.status,e)})),t.on("executing",(()=>{this.uppy.emit("transloadit:assembly-executing",t.status)})),t.on("execution-progress",(t=>{if(this.uppy.emit("transloadit:execution-progress",t),null!=t.progress_combined)for(const e of this.uppy.getFiles())this.uppy.emit("postprocess-progress",e,{mode:"determinate",value:t.progress_combined/100,message:this.i18n("encoding")})})),this.opts.waitForEncoding&&t.on("result",((t,e)=>{gt(this,$t)[$t](s,t,e)})),this.opts.waitForEncoding?t.on("finished",(()=>{gt(this,xt)[xt](t.status)})):this.opts.waitForMetadata&&t.on("metadata",(()=>{gt(this,xt)[xt](t.status)})),"ASSEMBLY_COMPLETE"===t.ok||t.connect(),t}Gt.VERSION="3.6.0",Gt.COMPANION=Pt,Gt.COMPANION_PATTERN=wt},8396:function(t,e,s){"use strict";var i=s(9420);class r extends Error{constructor(t,e){super(t),this.cause=null==e?void 0:e.cause,this.cause&&(0,i.A)(this.cause,"isNetworkError")?this.isNetworkError=this.cause.isNetworkError:this.isNetworkError=!1}}e.A=r},5945:function(t,e,s){"use strict";s.d(e,{A:function(){return r}});var i=s(6681);function r(){return fetch(...arguments).catch((t=>{throw"AbortError"===t.name?t:new i.A(t)}))}}}]);
|