@micromag/viewer-build 0.3.427 → 0.3.430

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/build/asset-manifest.json +24 -9
  2. package/build/index.html +1 -1
  3. package/build/static/css/main.df0184fe.css +3 -0
  4. package/build/static/js/127.ecee243c.chunk.js +1 -0
  5. package/build/static/js/175.43cc18cc.chunk.js +1 -0
  6. package/build/static/js/224.a7ff47c0.chunk.js +1 -0
  7. package/build/static/js/278.104cc999.chunk.js +1 -0
  8. package/build/static/js/310.57bc752b.chunk.js +1 -0
  9. package/build/static/js/348.46e5aa48.chunk.js +1 -0
  10. package/build/static/js/399.a996319d.chunk.js +1 -0
  11. package/build/static/js/458.754925ee.js +2 -0
  12. package/build/static/js/{482.142347c1.js.LICENSE.txt → 458.754925ee.js.LICENSE.txt} +0 -12
  13. package/build/static/js/466.fed09323.chunk.js +1 -0
  14. package/build/static/js/525.af68af36.chunk.js +1 -0
  15. package/build/static/js/536.9840925e.chunk.js +1 -0
  16. package/build/static/js/645.00ab18b4.chunk.js +2 -0
  17. package/build/static/js/645.00ab18b4.chunk.js.LICENSE.txt +11 -0
  18. package/build/static/js/690.2b6d4b51.chunk.js +1 -0
  19. package/build/static/js/838.bb614050.chunk.js +1 -0
  20. package/build/static/js/910.bde92f36.chunk.js +1 -0
  21. package/build/static/js/{955.64cb9d7d.chunk.js → 955.22d55535.chunk.js} +1 -1
  22. package/build/static/js/969.1f600cdd.chunk.js +1 -0
  23. package/build/static/js/main.1e8ac130.js +2 -0
  24. package/build/static/js/runtime~main.72b91df2.js +1 -0
  25. package/package.json +7 -7
  26. package/build/static/css/main.06faff4a.css +0 -3
  27. package/build/static/js/482.142347c1.js +0 -2
  28. package/build/static/js/main.4805a7bc.js +0 -2
  29. package/build/static/js/runtime~main.f3deebc4.js +0 -1
  30. /package/build/static/js/{main.4805a7bc.js.LICENSE.txt → main.1e8ac130.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[278],{95978:function(e,t,r){var n,o;o="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==r.g?r.g:this,e.exports=function(r){"use strict";var o,i=(r=r||{}).Base64,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=function(e){for(var t={},r=0,n=e.length;r<n;r++)t[e.charAt(r)]=r;return t}(s),u=String.fromCharCode,l=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?u(192|t>>>6)+u(128|63&t):u(224|t>>>12&15)+u(128|t>>>6&63)+u(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return u(240|t>>>18&7)+u(128|t>>>12&63)+u(128|t>>>6&63)+u(128|63&t)},c=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,p=function(e){return e.replace(c,l)},f=function(e){var t=[0,2,1][e.length%3],r=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[s.charAt(r>>>18),s.charAt(r>>>12&63),t>=2?"=":s.charAt(r>>>6&63),t>=1?"=":s.charAt(63&r)].join("")},h=r.btoa&&"function"==typeof r.btoa?function(e){return r.btoa(e)}:function(e){if(e.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return e.replace(/[\s\S]{1,3}/g,f)},d=function(e){return h(p(String(e)))},v=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},y=function(e,t){return t?v(d(e)):d(e)};r.Uint8Array&&(o=function(e,t){for(var r="",n=0,o=e.length;n<o;n+=3){var i=e[n],a=e[n+1],u=e[n+2],l=i<<16|a<<8|u;r+=s.charAt(l>>>18)+s.charAt(l>>>12&63)+(void 0!==a?s.charAt(l>>>6&63):"=")+(void 0!==u?s.charAt(63&l):"=")}return t?v(r):r});var m,g=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,_=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return u(55296+(t>>>10))+u(56320+(1023&t));case 3:return u((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return u((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},b=function(e){return e.replace(g,_)},w=function(e){var t=e.length,r=t%4,n=(t>0?a[e.charAt(0)]<<18:0)|(t>1?a[e.charAt(1)]<<12:0)|(t>2?a[e.charAt(2)]<<6:0)|(t>3?a[e.charAt(3)]:0),o=[u(n>>>16),u(n>>>8&255),u(255&n)];return o.length-=[0,0,2,1][r],o.join("")},U=r.atob&&"function"==typeof r.atob?function(e){return r.atob(e)}:function(e){return e.replace(/\S{1,4}/g,w)},R=function(e){return U(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},S=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},P=function(e){return function(e){return b(U(e))}(S(e))};r.Uint8Array&&(m=function(e){return Uint8Array.from(R(S(e)),(function(e){return e.charCodeAt(0)}))});if(r.Base64={VERSION:"2.6.4",atob:R,btoa:h,fromBase64:P,toBase64:y,utob:p,encode:y,encodeURI:function(e){return y(e,!0)},btou:b,decode:P,noConflict:function(){var e=r.Base64;return r.Base64=i,e},fromUint8Array:o,toUint8Array:m},"function"==typeof Object.defineProperty){var O=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};r.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",O((function(){return P(this)}))),Object.defineProperty(String.prototype,"toBase64",O((function(e){return y(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",O((function(){return y(this,!0)})))}}return r.Meteor&&(Base64=r.Base64),e.exports?e.exports.Base64=r.Base64:void 0===(n=function(){return r.Base64}.apply(t,[]))||(e.exports=n),{Base64:r.Base64}}(o)},97375:function(e,t){"use strict";var r=Object.prototype.hasOwnProperty;function n(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function o(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var n,i,s=[];for(i in"string"!=typeof t&&(t="?"),e)if(r.call(e,i)){if((n=e[i])||null!=n&&!isNaN(n)||(n=""),i=o(i),n=o(n),null===i||null===n)continue;s.push(i+"="+n)}return s.length?t+s.join("&"):""},t.parse=function(e){for(var t,r=/([^=?#&]+)=?([^&]*)/g,o={};t=r.exec(e);){var i=n(t[1]),s=n(t[2]);null===i||null===s||i in o||(o[i]=s)}return o}},57245:function(e){"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},37875:function(e,t,r){"use strict";r.r(t),r.d(t,{DetailedError:function(){return h},HttpStack:function(){return H},Upload:function(){return oe},canStoreURLs:function(){return D},defaultOptions:function(){return ne},enableDebugLog:function(){return v},isSupported:function(){return ue}});var n=r(95978),o=r(64846),i=r.n(o);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function a(e){var t="function"==typeof Map?new Map:void 0;return a=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return u(e,arguments,p(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),c(n,e)},a(e)}function u(e,t,r){return u=l()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&c(o,r.prototype),o},u.apply(null,arguments)}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function c(e,t){return c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},c(e,t)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(o,e);var t,r,n=(t=o,r=l(),function(){var e,n=p(t);if(r){var o=p(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return function(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,e)});function o(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).originalRequest=i,t.originalResponse=s,t.causingError=r,null!=r&&(e+=", caused by ".concat(r.toString())),null!=i){var a=i.getHeader("X-Request-ID")||"n/a",u=i.getMethod(),l=i.getURL(),c=s?s.getStatus():"n/a",p=s?s.getBody()||"":"n/a";e+=", originated from request (method: ".concat(u,", url: ").concat(l,", response code: ").concat(c,", response text: ").concat(p,", request id: ").concat(a,")")}return t.message=e,t}return o}(a(Error)),h=f,d=!1;function v(){d=!0}function y(e){d&&console.log(e)}function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){_(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var w=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"resume"in r&&console.log("tus: The `resume` option has been removed in tus-js-client v2. Please use the URL storage API instead."),this.options=r,this.options.chunkSize=+this.options.chunkSize,this._urlStorage=this.options.urlStorage,this.file=t,this.url=null,this._req=null,this._fingerprint=null,this._urlStorageKey=null,this._offset=null,this._aborted=!1,this._size=null,this._source=null,this._retryAttempt=0,this._retryTimeout=null,this._offsetBeforeRetry=0,this._parallelUploads=null,this._parallelUploadUrls=null}var t,r,n;return t=e,r=[{key:"findPreviousUploads",value:function(){var e=this;return this.options.fingerprint(this.file,this.options).then((function(t){return e._urlStorage.findUploadsByFingerprint(t)}))}},{key:"resumeFromPreviousUpload",value:function(e){this.url=e.uploadUrl||null,this._parallelUploadUrls=e.parallelUploadUrls||null,this._urlStorageKey=e.urlStorageKey}},{key:"start",value:function(){var e=this,t=this.file;if(t)if(this.options.endpoint||this.options.uploadUrl){var r=this.options.retryDelays;null==r||"[object Array]"===Object.prototype.toString.call(r)?(this.options.parallelUploads>1&&["uploadUrl","uploadSize","uploadLengthDeferred"].forEach((function(t){e.options[t]&&e._emitError(new Error("tus: cannot use the ".concat(t," option when parallelUploads is enabled")))})),this.options.fingerprint(t,this.options).then((function(r){return y(null==r?"No fingerprint was calculated meaning that the upload cannot be stored in the URL storage.":"Calculated fingerprint: ".concat(r)),e._fingerprint=r,e._source?e._source:e.options.fileReader.openFile(t,e.options.chunkSize)})).then((function(t){e._source=t,e.options.parallelUploads>1||null!=e._parallelUploadUrls?e._startParallelUpload():e._startSingleUpload()})).catch((function(t){e._emitError(t)}))):this._emitError(new Error("tus: the `retryDelays` option must either be an array or null"))}else this._emitError(new Error("tus: neither an endpoint or an upload URL is provided"));else this._emitError(new Error("tus: no file or stream to upload provided"))}},{key:"_startParallelUpload",value:function(){var t=this,r=this._size=this._source.size,n=0;this._parallelUploads=[];var o=null!=this._parallelUploadUrls?this._parallelUploadUrls.length:this.options.parallelUploads,i=function(e,t,r){for(var n=Math.floor(e/t),o=[],i=0;i<t;i++)o.push({start:n*i,end:n*(i+1)});return o[t-1].end=e,r&&o.forEach((function(e,t){e.uploadUrl=r[t]||null})),o}(this._source.size,o,this._parallelUploadUrls);this._parallelUploadUrls=new Array(i.length);var s,a=i.map((function(o,s){var a=0;return t._source.slice(o.start,o.end).then((function(u){var l=u.value;return new Promise((function(u,c){var p=g(g({},t.options),{},{uploadUrl:o.uploadUrl||null,storeFingerprintForResuming:!1,removeFingerprintOnSuccess:!1,parallelUploads:1,metadata:{},headers:g(g({},t.options.headers),{},{"Upload-Concat":"partial"}),onSuccess:u,onError:c,onProgress:function(e){n=n-a+e,a=e,t._emitProgress(n,r)},_onUploadUrlAvailable:function(){t._parallelUploadUrls[s]=f.url,t._parallelUploadUrls.filter((function(e){return!!e})).length===i.length&&t._saveUploadInUrlStorage()}}),f=new e(l,p);f.start(),t._parallelUploads.push(f)}))}))}));Promise.all(a).then((function(){(s=t._openRequest("POST",t.options.endpoint)).setHeader("Upload-Concat","final;".concat(t._parallelUploadUrls.join(" ")));var e=U(t.options.metadata);return""!==e&&s.setHeader("Upload-Metadata",e),t._sendRequest(s,null)})).then((function(e){if(R(e.getStatus(),200)){var r=e.getHeader("Location");null!=r?(t.url=k(t.options.endpoint,r),y("Created upload at ".concat(t.url)),t._emitSuccess()):t._emitHttpError(s,e,"tus: invalid or missing Location header")}else t._emitHttpError(s,e,"tus: unexpected response while creating upload")})).catch((function(e){t._emitError(e)}))}},{key:"_startSingleUpload",value:function(){if(this.options.uploadLengthDeferred)this._size=null;else if(null!=this.options.uploadSize){if(this._size=+this.options.uploadSize,isNaN(this._size))return void this._emitError(new Error("tus: cannot convert `uploadSize` option into a number"))}else if(this._size=this._source.size,null==this._size)return void this._emitError(new Error("tus: cannot automatically derive upload's size from input. Specify it manually using the `uploadSize` option or use the `uploadLengthDeferred` option"));return this._aborted=!1,null!=this.url?(y("Resuming upload from previous URL: ".concat(this.url)),void this._resumeUpload()):null!=this.options.uploadUrl?(y("Resuming upload from provided URL: ".concat(this.options.uploadUrl)),this.url=this.options.uploadUrl,void this._resumeUpload()):(y("Creating a new upload"),void this._createUpload())}},{key:"abort",value:function(t){var r=this;if(arguments.length>1&&"function"==typeof arguments[1])throw new Error("tus: the abort function does not accept a callback since v2 anymore; please use the returned Promise instead");return null!=this._parallelUploads&&this._parallelUploads.forEach((function(e){e.abort(t)})),null!==this._req&&(this._req.abort(),this._source.close()),this._aborted=!0,null!=this._retryTimeout&&(clearTimeout(this._retryTimeout),this._retryTimeout=null),t&&null!=this.url?e.terminate(this.url,this.options).then((function(){return r._removeFromUrlStorage()})):Promise.resolve()}},{key:"_emitHttpError",value:function(e,t,r,n){this._emitError(new h(r,n,e,t))}},{key:"_emitError",value:function(e){var t=this;if(!this._aborted){if(null!=this.options.retryDelays&&(null!=this._offset&&this._offset>this._offsetBeforeRetry&&(this._retryAttempt=0),O(e,this._retryAttempt,this.options))){var r=this.options.retryDelays[this._retryAttempt++];return this._offsetBeforeRetry=this._offset,void(this._retryTimeout=setTimeout((function(){t.start()}),r))}if("function"!=typeof this.options.onError)throw e;this.options.onError(e)}}},{key:"_emitSuccess",value:function(){this.options.removeFingerprintOnSuccess&&this._removeFromUrlStorage(),"function"==typeof this.options.onSuccess&&this.options.onSuccess()}},{key:"_emitProgress",value:function(e,t){"function"==typeof this.options.onProgress&&this.options.onProgress(e,t)}},{key:"_emitChunkComplete",value:function(e,t,r){"function"==typeof this.options.onChunkComplete&&this.options.onChunkComplete(e,t,r)}},{key:"_createUpload",value:function(){var e=this;if(this.options.endpoint){var t=this._openRequest("POST",this.options.endpoint);this.options.uploadLengthDeferred?t.setHeader("Upload-Defer-Length",1):t.setHeader("Upload-Length",this._size);var r,n=U(this.options.metadata);""!==n&&t.setHeader("Upload-Metadata",n),this.options.uploadDataDuringCreation&&!this.options.uploadLengthDeferred?(this._offset=0,r=this._addChunkToRequest(t)):r=this._sendRequest(t,null),r.then((function(r){if(R(r.getStatus(),200)){var n=r.getHeader("Location");if(null!=n){if(e.url=k(e.options.endpoint,n),y("Created upload at ".concat(e.url)),"function"==typeof e.options._onUploadUrlAvailable&&e.options._onUploadUrlAvailable(),0===e._size)return e._emitSuccess(),void e._source.close();e._saveUploadInUrlStorage(),e.options.uploadDataDuringCreation?e._handleUploadResponse(t,r):(e._offset=0,e._performUpload())}else e._emitHttpError(t,r,"tus: invalid or missing Location header")}else e._emitHttpError(t,r,"tus: unexpected response while creating upload")})).catch((function(r){e._emitHttpError(t,null,"tus: failed to create upload",r)}))}else this._emitError(new Error("tus: unable to create upload because no endpoint is provided"))}},{key:"_resumeUpload",value:function(){var e=this,t=this._openRequest("HEAD",this.url);this._sendRequest(t,null).then((function(r){var n=r.getStatus();if(!R(n,200))return R(n,400)&&e._removeFromUrlStorage(),423===n?void e._emitHttpError(t,r,"tus: upload is currently locked; retry later"):e.options.endpoint?(e.url=null,void e._createUpload()):void e._emitHttpError(t,r,"tus: unable to resume upload (new upload cannot be created without an endpoint)");var o=parseInt(r.getHeader("Upload-Offset"),10);if(isNaN(o))e._emitHttpError(t,r,"tus: invalid or missing offset value");else{var i=parseInt(r.getHeader("Upload-Length"),10);if(!isNaN(i)||e.options.uploadLengthDeferred){if("function"==typeof e.options._onUploadUrlAvailable&&e.options._onUploadUrlAvailable(),o===i)return e._emitProgress(i,i),void e._emitSuccess();e._offset=o,e._performUpload()}else e._emitHttpError(t,r,"tus: invalid or missing length value")}})).catch((function(r){e._emitHttpError(t,null,"tus: failed to resume upload",r)}))}},{key:"_performUpload",value:function(){var e,t=this;this._aborted||(this.options.overridePatchMethod?(e=this._openRequest("POST",this.url)).setHeader("X-HTTP-Method-Override","PATCH"):e=this._openRequest("PATCH",this.url),e.setHeader("Upload-Offset",this._offset),this._addChunkToRequest(e).then((function(r){R(r.getStatus(),200)?t._handleUploadResponse(e,r):t._emitHttpError(e,r,"tus: unexpected response while uploading chunk")})).catch((function(r){t._aborted||t._emitHttpError(e,null,"tus: failed to upload chunk at offset ".concat(t._offset),r)})))}},{key:"_addChunkToRequest",value:function(e){var t=this,r=this._offset,n=this._offset+this.options.chunkSize;return e.setProgressHandler((function(e){t._emitProgress(r+e,t._size)})),e.setHeader("Content-Type","application/offset+octet-stream"),(n===1/0||n>this._size)&&!this.options.uploadLengthDeferred&&(n=this._size),this._source.slice(r,n).then((function(r){var n=r.value,o=r.done;return t.options.uploadLengthDeferred&&o&&(t._size=t._offset+(n&&n.size?n.size:0),e.setHeader("Upload-Length",t._size)),null===n?t._sendRequest(e):(t._emitProgress(t._offset,t._size),t._sendRequest(e,n))}))}},{key:"_handleUploadResponse",value:function(e,t){var r=parseInt(t.getHeader("Upload-Offset"),10);if(isNaN(r))this._emitHttpError(e,t,"tus: invalid or missing offset value");else{if(this._emitProgress(r,this._size),this._emitChunkComplete(r-this._offset,r,this._size),this._offset=r,r==this._size)return this._emitSuccess(),void this._source.close();this._performUpload()}}},{key:"_openRequest",value:function(e,t){var r=S(e,t,this.options);return this._req=r,r}},{key:"_removeFromUrlStorage",value:function(){var e=this;this._urlStorageKey&&(this._urlStorage.removeUpload(this._urlStorageKey).catch((function(t){e._emitError(t)})),this._urlStorageKey=null)}},{key:"_saveUploadInUrlStorage",value:function(){var e=this;if(this.options.storeFingerprintForResuming&&this._fingerprint){var t={size:this._size,metadata:this.options.metadata,creationTime:(new Date).toString()};this._parallelUploads?t.parallelUploadUrls=this._parallelUploadUrls:t.uploadUrl=this.url,this._urlStorage.addUpload(this._fingerprint,t).then((function(t){return e._urlStorageKey=t})).catch((function(t){e._emitError(t)}))}}},{key:"_sendRequest",value:function(e){return P(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,this.options)}}],n=[{key:"terminate",value:function(t,r){if(arguments.length>1&&"function"==typeof arguments[arguments.length-1])throw new Error("tus: the terminate function does not accept a callback since v2 anymore; please use the returned Promise instead");void 0===r&&(r={});var n=S("DELETE",t,r);return P(n,null,r).then((function(e){if(204!==e.getStatus())throw new h("tus: unexpected response while terminating upload",null,n,e)})).catch((function(o){if(o instanceof h||(o=new h("tus: failed to terminate upload",o,n,null)),!O(o,0,r))throw o;var i=r.retryDelays[0],s=r.retryDelays.slice(1),a=g(g({},r),{},{retryDelays:s});return new Promise((function(e){return setTimeout(e,i)})).then((function(){return e.terminate(t,a)}))}))}}],r&&b(t.prototype,r),n&&b(t,n),e}();function U(e){var t=[];for(var r in e)t.push("".concat(r," ").concat(n.Base64.encode(e[r])));return t.join(",")}function R(e,t){return e>=t&&e<t+100}function S(e,t,r){var n=r.httpStack.createRequest(e,t);n.setHeader("Tus-Resumable","1.0.0");var o=r.headers||{};for(var i in o)n.setHeader(i,o[i]);if(r.addRequestId){var s="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}));n.setHeader("X-Request-ID",s)}return n}function P(e,t,r){return("function"==typeof r.onBeforeRequest?Promise.resolve(r.onBeforeRequest(e)):Promise.resolve()).then((function(){return e.send(t).then((function(t){return("function"==typeof r.onAfterResponse?Promise.resolve(r.onAfterResponse(e,t)):Promise.resolve()).then((function(){return t}))}))}))}function O(e,t,r){if(null==r.retryDelays||t>=r.retryDelays.length||null==e.originalRequest)return!1;if(r&&"function"==typeof r.onShouldRetry)return r.onShouldRetry(e,t,r);var n,o=e.originalResponse?e.originalResponse.getStatus():0;return(!R(o,400)||409===o||423===o)&&(n=!0,"undefined"!=typeof window&&"navigator"in window&&!1===window.navigator.onLine&&(n=!1),n)}function k(e,t){return new(i())(t,e).toString()}w.defaultOptions={endpoint:null,uploadUrl:null,metadata:{},fingerprint:null,uploadSize:null,onProgress:null,onChunkComplete:null,onSuccess:null,onError:null,_onUploadUrlAvailable:null,overridePatchMethod:!1,headers:{},addRequestId:!1,onBeforeRequest:null,onAfterResponse:null,onShouldRetry:null,chunkSize:1/0,retryDelays:[0,1e3,3e3,5e3],parallelUploads:1,storeFingerprintForResuming:!0,removeFingerprintOnSuccess:!1,uploadLengthDeferred:!1,uploadDataDuringCreation:!1,urlStorage:null,fileReader:null,httpStack:null};var E=w;function x(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var C=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r;return t=e,(r=[{key:"listAllUploads",value:function(){return Promise.resolve([])}},{key:"findUploadsByFingerprint",value:function(e){return Promise.resolve([])}},{key:"removeUpload",value:function(e){return Promise.resolve()}},{key:"addUpload",value:function(e,t){return Promise.resolve(null)}}])&&x(t.prototype,r),e}();function j(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var A=!1;try{A="localStorage"in window;var q="tusSupport";localStorage.setItem(q,localStorage.getItem(q))}catch(e){if(e.code!==e.SECURITY_ERR&&e.code!==e.QUOTA_EXCEEDED_ERR)throw e;A=!1}var D=A,F=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r;return t=e,r=[{key:"findAllUploads",value:function(){var e=this._findEntries("tus::");return Promise.resolve(e)}},{key:"findUploadsByFingerprint",value:function(e){var t=this._findEntries("tus::".concat(e,"::"));return Promise.resolve(t)}},{key:"removeUpload",value:function(e){return localStorage.removeItem(e),Promise.resolve()}},{key:"addUpload",value:function(e,t){var r=Math.round(1e12*Math.random()),n="tus::".concat(e,"::").concat(r);return localStorage.setItem(n,JSON.stringify(t)),Promise.resolve(n)}},{key:"_findEntries",value:function(e){for(var t=[],r=0;r<localStorage.length;r++){var n=localStorage.key(r);if(0===n.indexOf(e))try{var o=JSON.parse(localStorage.getItem(n));o.urlStorageKey=n,t.push(o)}catch(e){}}return t}}],r&&j(t.prototype,r),e}();function T(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function B(e,t,r){return t&&z(e.prototype,t),r&&z(e,r),e}var H=function(){function e(){T(this,e)}return B(e,[{key:"createRequest",value:function(e,t){return new L(e,t)}},{key:"getName",value:function(){return"XHRHttpStack"}}]),e}(),L=function(){function e(t,r){T(this,e),this._xhr=new XMLHttpRequest,this._xhr.open(t,r,!0),this._method=t,this._url=r,this._headers={}}return B(e,[{key:"getMethod",value:function(){return this._method}},{key:"getURL",value:function(){return this._url}},{key:"setHeader",value:function(e,t){this._xhr.setRequestHeader(e,t),this._headers[e]=t}},{key:"getHeader",value:function(e){return this._headers[e]}},{key:"setProgressHandler",value:function(e){"upload"in this._xhr&&(this._xhr.upload.onprogress=function(t){t.lengthComputable&&e(t.loaded)})}},{key:"send",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new Promise((function(r,n){e._xhr.onload=function(){r(new I(e._xhr))},e._xhr.onerror=function(e){n(e)},e._xhr.send(t)}))}},{key:"abort",value:function(){return this._xhr.abort(),Promise.resolve()}},{key:"getUnderlyingObject",value:function(){return this._xhr}}]),e}(),I=function(){function e(t){T(this,e),this._xhr=t}return B(e,[{key:"getStatus",value:function(){return this._xhr.status}},{key:"getHeader",value:function(e){return this._xhr.getResponseHeader(e)}},{key:"getBody",value:function(){return this._xhr.responseText}},{key:"getUnderlyingObject",value:function(){return this._xhr}}]),e}(),N=function(){return"undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase()};function M(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var $=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._file=t,this.size=t.size}var t,r;return t=e,(r=[{key:"slice",value:function(e,t){if("undefined"!=typeof window&&(void 0!==window.PhoneGap||void 0!==window.Cordova||void 0!==window.cordova))return r=this._file.slice(e,t),new Promise((function(e,t){var n=new FileReader;n.onload=function(){var t=new Uint8Array(n.result);e({value:t})},n.onerror=function(e){t(e)},n.readAsArrayBuffer(r)}));var r,n=this._file.slice(e,t);return Promise.resolve({value:n})}},{key:"close",value:function(){}}])&&M(t.prototype,r),e}();function K(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function X(e){return void 0===e?0:void 0!==e.size?e.size:e.length}var Z=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._chunkSize=r,this._buffer=void 0,this._bufferOffset=0,this._reader=t,this._done=!1}var t,r;return t=e,(r=[{key:"slice",value:function(e,t){return e<this._bufferOffset?Promise.reject(new Error("Requested data is before the reader's current offset")):this._readUntilEnoughDataOrDone(e,t)}},{key:"_readUntilEnoughDataOrDone",value:function(e,t){var r=this,n=t<=this._bufferOffset+X(this._buffer);if(this._done||n){var o=this._getDataFromBuffer(e,t),i=null==o&&this._done;return Promise.resolve({value:o,done:i})}return this._reader.read().then((function(n){var o=n.value;return n.done?r._done=!0:void 0===r._buffer?r._buffer=o:r._buffer=function(e,t){if(e.concat)return e.concat(t);if(e instanceof Blob)return new Blob([e,t],{type:e.type});if(e.set){var r=new e.constructor(e.length+t.length);return r.set(e),r.set(t,e.length),r}throw new Error("Unknown data type")}(r._buffer,o),r._readUntilEnoughDataOrDone(e,t)}))}},{key:"_getDataFromBuffer",value:function(e,t){e>this._bufferOffset&&(this._buffer=this._buffer.slice(e-this._bufferOffset),this._bufferOffset=e);var r=0===X(this._buffer);return this._done&&r?null:this._buffer.slice(0,t-e)}},{key:"close",value:function(){this._reader.cancel&&this._reader.cancel()}}])&&K(t.prototype,r),e}();function G(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var J=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r;return t=e,(r=[{key:"openFile",value:function(e,t){return N()&&e&&void 0!==e.uri?(r=e.uri,new Promise((function(e,t){var n=new XMLHttpRequest;n.responseType="blob",n.onload=function(){var t=n.response;e(t)},n.onerror=function(e){t(e)},n.open("GET",r),n.send()}))).then((function(e){return new $(e)})).catch((function(e){throw new Error("tus: cannot fetch `file.uri` as Blob, make sure the uri is correct and accessible. ".concat(e))})):"function"==typeof e.slice&&void 0!==e.size?Promise.resolve(new $(e)):"function"==typeof e.read?(t=+t,isFinite(t)?Promise.resolve(new Z(e,t)):Promise.reject(new Error("cannot create source for stream without a finite value for the `chunkSize` option"))):Promise.reject(new Error("source object may only be an instance of File, Blob, or Reader in this environment"));var r}}])&&G(t.prototype,r),e}();function Q(e){return Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Q(e)}function V(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function W(e,t){return W=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},W(e,t)}function Y(e){return Y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Y(e)}function ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(r),!0).forEach((function(t){re(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ee(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function re(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ne=te(te({},E.defaultOptions),{},{httpStack:new H,fileReader:new J,urlStorage:D?new F:new C,fingerprint:function(e,t){return N()?Promise.resolve(function(e,t){var r=e.exif?function(e){var t=0;if(0===e.length)return t;for(var r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t&=t;return t}(JSON.stringify(e.exif)):"noexif";return["tus-rn",e.name||"noname",e.size||"nosize",r,t.endpoint].join("/")}(e,t)):Promise.resolve(["tus-br",e.name,e.type,e.size,e.lastModified,t.endpoint].join("-"))}}),oe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&W(e,t)}(s,e);var t,r,n,o,i=(n=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Y(n);if(o){var r=Y(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){return!t||"object"!==Q(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,e)});function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),t=te(te({},ne),t),i.call(this,e,t)}return t=s,r=[{key:"terminate",value:function(e,t,r){return t=te(te({},ne),t),E.terminate(e,t,r)}}],null&&V(t.prototype,null),r&&V(t,r),s}(E),ie=window,se=ie.XMLHttpRequest,ae=ie.Blob,ue=se&&ae&&"function"==typeof ae.prototype.slice},64846:function(e,t,r){"use strict";var n=r(57245),o=r(97375),i=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,s=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,u=/:\d+$/,l=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,c=/^[a-zA-Z]:/;function p(e){return(e||"").toString().replace(i,"")}var f=[["#","hash"],["?","query"],function(e,t){return v(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],h={hash:1,query:1};function d(e){var t,n=("undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{}).location||{},o={},i=typeof(e=e||n);if("blob:"===e.protocol)o=new m(unescape(e.pathname),{});else if("string"===i)for(t in o=new m(e,{}),h)delete o[t];else if("object"===i){for(t in e)t in h||(o[t]=e[t]);void 0===o.slashes&&(o.slashes=a.test(e.href))}return o}function v(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function y(e,t){e=(e=p(e)).replace(s,""),t=t||{};var r,n=l.exec(e),o=n[1]?n[1].toLowerCase():"",i=!!n[2],a=!!n[3],u=0;return i?a?(r=n[2]+n[3]+n[4],u=n[2].length+n[3].length):(r=n[2]+n[4],u=n[2].length):a?(r=n[3]+n[4],u=n[3].length):r=n[4],"file:"===o?u>=2&&(r=r.slice(2)):v(o)?r=n[4]:o?i&&(r=r.slice(2)):u>=2&&v(t.protocol)&&(r=n[4]),{protocol:o,slashes:i||v(o),slashesCount:u,rest:r}}function m(e,t,r){if(e=(e=p(e)).replace(s,""),!(this instanceof m))return new m(e,t,r);var i,a,u,l,h,g,_=f.slice(),b=typeof t,w=this,U=0;for("object"!==b&&"string"!==b&&(r=t,t=null),r&&"function"!=typeof r&&(r=o.parse),i=!(a=y(e||"",t=d(t))).protocol&&!a.slashes,w.slashes=a.slashes||i&&t.slashes,w.protocol=a.protocol||t.protocol||"",e=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||c.test(e))||!a.slashes&&(a.protocol||a.slashesCount<2||!v(w.protocol)))&&(_[3]=[/(.*)/,"pathname"]);U<_.length;U++)"function"!=typeof(l=_[U])?(u=l[0],g=l[1],u!=u?w[g]=e:"string"==typeof u?~(h="@"===u?e.lastIndexOf(u):e.indexOf(u))&&("number"==typeof l[2]?(w[g]=e.slice(0,h),e=e.slice(h+l[2])):(w[g]=e.slice(h),e=e.slice(0,h))):(h=u.exec(e))&&(w[g]=h[1],e=e.slice(0,h.index)),w[g]=w[g]||i&&l[3]&&t[g]||"",l[4]&&(w[g]=w[g].toLowerCase())):e=l(e,w);r&&(w.query=r(w.query)),i&&t.slashes&&"/"!==w.pathname.charAt(0)&&(""!==w.pathname||""!==t.pathname)&&(w.pathname=function(e,t){if(""===e)return t;for(var r=(t||"/").split("/").slice(0,-1).concat(e.split("/")),n=r.length,o=r[n-1],i=!1,s=0;n--;)"."===r[n]?r.splice(n,1):".."===r[n]?(r.splice(n,1),s++):s&&(0===n&&(i=!0),r.splice(n,1),s--);return i&&r.unshift(""),"."!==o&&".."!==o||r.push(""),r.join("/")}(w.pathname,t.pathname)),"/"!==w.pathname.charAt(0)&&v(w.protocol)&&(w.pathname="/"+w.pathname),n(w.port,w.protocol)||(w.host=w.hostname,w.port=""),w.username=w.password="",w.auth&&(~(h=w.auth.indexOf(":"))?(w.username=w.auth.slice(0,h),w.username=encodeURIComponent(decodeURIComponent(w.username)),w.password=w.auth.slice(h+1),w.password=encodeURIComponent(decodeURIComponent(w.password))):w.username=encodeURIComponent(decodeURIComponent(w.auth)),w.auth=w.password?w.username+":"+w.password:w.username),w.origin="file:"!==w.protocol&&v(w.protocol)&&w.host?w.protocol+"//"+w.host:"null",w.href=w.toString()}m.prototype={set:function(e,t,r){var i=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(r||o.parse)(t)),i[e]=t;break;case"port":i[e]=t,n(t,i.protocol)?t&&(i.host=i.hostname+":"+t):(i.host=i.hostname,i[e]="");break;case"hostname":i[e]=t,i.port&&(t+=":"+i.port),i.host=t;break;case"host":i[e]=t,u.test(t)?(t=t.split(":"),i.port=t.pop(),i.hostname=t.join(":")):(i.hostname=t,i.port="");break;case"protocol":i.protocol=t.toLowerCase(),i.slashes=!r;break;case"pathname":case"hash":if(t){var s="pathname"===e?"/":"#";i[e]=t.charAt(0)!==s?s+t:t}else i[e]=t;break;case"username":case"password":i[e]=encodeURIComponent(t);break;case"auth":var a=t.indexOf(":");~a?(i.username=t.slice(0,a),i.username=encodeURIComponent(decodeURIComponent(i.username)),i.password=t.slice(a+1),i.password=encodeURIComponent(decodeURIComponent(i.password))):i.username=encodeURIComponent(decodeURIComponent(t))}for(var l=0;l<f.length;l++){var c=f[l];c[4]&&(i[c[1]]=i[c[1]].toLowerCase())}return i.auth=i.password?i.username+":"+i.password:i.username,i.origin="file:"!==i.protocol&&v(i.protocol)&&i.host?i.protocol+"//"+i.host:"null",i.href=i.toString(),i},toString:function(e){e&&"function"==typeof e||(e=o.stringify);var t,r=this,n=r.host,i=r.protocol;i&&":"!==i.charAt(i.length-1)&&(i+=":");var s=i+(r.protocol&&r.slashes||v(r.protocol)?"//":"");return r.username?(s+=r.username,r.password&&(s+=":"+r.password),s+="@"):r.password?(s+=":"+r.password,s+="@"):"file:"!==r.protocol&&v(r.protocol)&&!n&&"/"!==r.pathname&&(s+="@"),(":"===n[n.length-1]||u.test(r.hostname)&&!r.port)&&(n+=":"),s+=n+r.pathname,(t="object"==typeof r.query?e(r.query):r.query)&&(s+="?"!==t.charAt(0)?"?"+t:t),r.hash&&(s+=r.hash),s}},m.extractProtocol=y,m.location=d,m.trimLeft=p,m.qs=o,e.exports=m},72737:function(e,t,r){"use strict";var n=r(37875);e.exports=function(e){return(t,r)=>{if("undefined"!=typeof window&&(void 0!==window.PhoneGap||void 0!==window.Cordova||void 0!==window.cordova)||"undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase())return n.defaultOptions.fingerprint(t,r);const o=["tus",e.id,r.endpoint].join("-");return Promise.resolve(o)}}},92278:function(e,t,r){"use strict";var n=r(37875),o=r(78729),i=r(61539);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 a=0;function u(e){return"__private_"+a+++"_"+e}const l=r(1515),c=r(50862),p=r(32746),f=r(76148),h=r(4574),d=r(35018),v=r(21625),y=r(68410),m=r(72737),g={endpoint:"",uploadUrl:null,metadata:{},uploadSize:null,onProgress:null,onChunkComplete:null,onSuccess:null,onError:null,overridePatchMethod:!1,headers:{},addRequestId:!1,chunkSize:1/0,retryDelays:[100,1e3,3e3,5e3],parallelUploads:1,removeFingerprintOnSuccess:!1,uploadLengthDeferred:!1,uploadDataDuringCreation:!1};var _=u("retryDelayIterator"),b=u("queueRequestSocketToken"),w=u("requestSocketToken");class U extends l{constructor(e,t){var r,n;super(e,t),Object.defineProperty(this,_,{writable:!0,value:void 0}),Object.defineProperty(this,b,{writable:!0,value:void 0}),Object.defineProperty(this,w,{writable:!0,value:async e=>{const t=new(e.remote.providerOptions.provider?o.Provider:o.RequestClient)(this.uppy,e.remote.providerOptions),r={...this.opts};return e.tus&&Object.assign(r,e.tus),(await t.post(e.remote.url,{...e.remote.body,endpoint:r.endpoint,uploadUrl:r.uploadUrl,protocol:"tus",size:e.data.size,headers:r.headers,metadata:e.meta})).token}}),this.type="uploader",this.id=this.opts.id||"Tus",this.title="Tus";const a={useFastRemoteRetry:!0,limit:20,retryDelays:g.retryDelays,withCredentials:!1};if(this.opts={...a,...t},"autoRetry"in t)throw new Error("The `autoRetry` option was deprecated and has been removed.");this.requests=null!=(r=this.opts.rateLimitedQueue)?r:new i.RateLimitedQueue(this.opts.limit),s(this,_)[_]=null==(n=this.opts.retryDelays)?void 0:n.values(),this.uploaders=Object.create(null),this.uploaderEvents=Object.create(null),this.uploaderSockets=Object.create(null),this.handleResetProgress=this.handleResetProgress.bind(this),this.handleUpload=this.handleUpload.bind(this),s(this,b)[b]=this.requests.wrapPromiseFunction(s(this,w)[w])}handleResetProgress(){const e={...this.uppy.getState().files};Object.keys(e).forEach((t=>{if(e[t].tus&&e[t].tus.uploadUrl){const r={...e[t].tus};delete r.uploadUrl,e[t]={...e[t],tus:r}}})),this.uppy.setState({files:e})}resetUploaderReferences(e,t){if(void 0===t&&(t={}),this.uploaders[e]){const r=this.uploaders[e];r.abort(),t.abort&&r.abort(!0),this.uploaders[e]=null}this.uploaderEvents[e]&&(this.uploaderEvents[e].remove(),this.uploaderEvents[e]=null),this.uploaderSockets[e]&&(this.uploaderSockets[e].close(),this.uploaderSockets[e]=null)}upload(e){var t=this;return this.resetUploaderReferences(e.id),new Promise(((r,o)=>{let i,a,u;this.uppy.emit("upload-started",e);const l={...this.opts,...e.tus||{}};"function"==typeof l.headers&&(l.headers=l.headers(e));const c={...g,...l};c.fingerprint=m(e),c.onBeforeRequest=t=>{let r;if(t.getUnderlyingObject().withCredentials=!!l.withCredentials,"function"==typeof l.onBeforeRequest&&(r=l.onBeforeRequest(t,e)),y(i,"shouldBeRequeued")){if(!i.shouldBeRequeued)return Promise.reject();let t;const n=new Promise((e=>{t=e}));return i=this.requests.run((()=>(e.isPaused&&i.abort(),t(),()=>{}))),Promise.all([n,r])}return r},c.onError=t=>{var r;this.uppy.log(t);const n=t.originalRequest?t.originalRequest.getUnderlyingObject():null;v(n)&&(t=new d(t,n)),this.resetUploaderReferences(e.id),null==(r=i)||r.abort(),this.uppy.emit("upload-error",e,t),o(t)},c.onProgress=(t,r)=>{this.onReceiveUploadUrl(e,u.url),this.uppy.emit("upload-progress",e,{uploader:this,bytesUploaded:t,bytesTotal:r})},c.onSuccess=()=>{const t={uploadURL:u.url};this.resetUploaderReferences(e.id),i.done(),this.uppy.emit("upload-success",e,t),u.url&&this.uppy.log(`Download ${u.file.name} from ${u.url}`),r(u)};const p=e=>{var t;const r=null==e||null==(t=e.originalResponse)?void 0:t.getStatus();if(429===r){if(!this.requests.isPaused){var n;const e=null==(n=s(this,_)[_])?void 0:n.next();if(null==e||e.done)return!1;this.requests.rateLimit(e.value)}}else{if(r>400&&r<500&&409!==r)return!1;"undefined"!=typeof navigator&&!1===navigator.onLine&&(this.requests.isPaused||(this.requests.pause(),window.addEventListener("online",(()=>{this.requests.resume()}),{once:!0})))}return i.abort(),i={shouldBeRequeued:!0,abort(){this.shouldBeRequeued=!1},done(){throw new Error("Cannot mark a queued request as done: this indicates a bug")},fn(){throw new Error("Cannot run a queued request: this indicates a bug")}},!0};null!=l.onShouldRetry?c.onShouldRetry=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return l.onShouldRetry(...t,p)}:c.onShouldRetry=p;const f=(e,t,r)=>{y(e,t)&&!y(e,r)&&(e[r]=e[t])},b={};(Array.isArray(l.metaFields)?l.metaFields:Object.keys(e.meta)).forEach((t=>{b[t]=e.meta[t]})),f(b,"type","filetype"),f(b,"name","filename"),c.metadata=b,u=new n.Upload(e.data,c),this.uploaders[e.id]=u,this.uploaderEvents[e.id]=new h(this.uppy),a=()=>(e.isPaused||u.start(),()=>{}),u.findPreviousUploads().then((t=>{const r=t[0];r&&(this.uppy.log(`[Tus] Resuming upload of ${e.id} started at ${r.creationTime}`),u.resumeFromPreviousUpload(r))})),i=this.requests.run(a),this.onFileRemove(e.id,(t=>{i.abort(),this.resetUploaderReferences(e.id,{abort:!!u.url}),r(`upload ${t} was removed`)})),this.onPause(e.id,(e=>{i.abort(),e?u.abort():i=this.requests.run(a)})),this.onPauseAll(e.id,(()=>{i.abort(),u.abort()})),this.onCancelAll(e.id,(function(n){let{reason:o}=void 0===n?{}:n;"user"===o&&(i.abort(),t.resetUploaderReferences(e.id,{abort:!!u.url})),r(`upload ${e.id} was canceled`)})),this.onResumeAll(e.id,(()=>{i.abort(),e.error&&u.abort(),i=this.requests.run(a)}))})).catch((t=>{throw this.uppy.emit("upload-error",e,t),t}))}async uploadRemote(e){this.resetUploaderReferences(e.id),e.progress.uploadStarted&&e.isRestored||this.uppy.emit("upload-started",e);try{if(e.serverToken)return this.connectToServerSocket(e);const t=await s(this,b)[b](e);if(!this.uppy.getState().files[e.id])return;return this.uppy.setFileState(e.id,{serverToken:t}),this.connectToServerSocket(this.uppy.getFile(e.id))}catch(t){throw this.uppy.emit("upload-error",e,t),t}}connectToServerSocket(e){var t=this;return new Promise(((r,n)=>{const i=e.serverToken,s=p(e.remote.companionUrl),a=new o.Socket({target:`${s}/api/${i}`});let u;this.uploaderSockets[e.id]=a,this.uploaderEvents[e.id]=new h(this.uppy),this.onFileRemove(e.id,(()=>{u.abort(),a.send("cancel",{}),this.resetUploaderReferences(e.id),r(`upload ${e.id} was removed`)})),this.onPause(e.id,(e=>{e?(u.abort(),a.send("pause",{})):(u.abort(),u=this.requests.run((()=>(a.send("resume",{}),()=>{}))))})),this.onPauseAll(e.id,(()=>{u.abort(),a.send("pause",{})})),this.onCancelAll(e.id,(function(n){let{reason:o}=void 0===n?{}:n;"user"===o&&(u.abort(),a.send("cancel",{}),t.resetUploaderReferences(e.id)),r(`upload ${e.id} was canceled`)})),this.onResumeAll(e.id,(()=>{u.abort(),e.error&&a.send("pause",{}),u=this.requests.run((()=>(a.send("resume",{}),()=>{})))})),this.onRetry(e.id,(()=>{a.isOpen&&(a.send("pause",{}),a.send("resume",{}))})),this.onRetryAll(e.id,(()=>{a.isOpen&&(a.send("pause",{}),a.send("resume",{}))})),a.on("progress",(t=>c(this,t,e))),a.on("error",(t=>{const{message:r}=t.error,o=Object.assign(new Error(r),{cause:t.error});this.opts.useFastRemoteRetry?a.close():(this.resetUploaderReferences(e.id),this.uppy.setFileState(e.id,{serverToken:null})),this.uppy.emit("upload-error",e,o),u.done(),n(o)})),a.on("success",(t=>{const n={uploadURL:t.url};this.uppy.emit("upload-success",e,n),this.resetUploaderReferences(e.id),u.done(),r()})),u=this.requests.run((()=>(e.isPaused&&a.send("pause",{}),()=>{})))}))}onReceiveUploadUrl(e,t){const r=this.uppy.getFile(e.id);r&&(r.tus&&r.tus.uploadUrl===t||(this.uppy.log("[Tus] Storing upload url"),this.uppy.setFileState(r.id,{tus:{...r.tus,uploadUrl:t}})))}onFileRemove(e,t){this.uploaderEvents[e].on("file-removed",(r=>{e===r.id&&t(r.id)}))}onPause(e,t){this.uploaderEvents[e].on("upload-pause",((r,n)=>{e===r&&t(n)}))}onRetry(e,t){this.uploaderEvents[e].on("upload-retry",(r=>{e===r&&t()}))}onRetryAll(e,t){this.uploaderEvents[e].on("retry-all",(()=>{this.uppy.getFile(e)&&t()}))}onPauseAll(e,t){this.uploaderEvents[e].on("pause-all",(()=>{this.uppy.getFile(e)&&t()}))}onCancelAll(e,t){var r=this;this.uploaderEvents[e].on("cancel-all",(function(){r.uppy.getFile(e)&&t(...arguments)}))}onResumeAll(e,t){this.uploaderEvents[e].on("resume-all",(()=>{this.uppy.getFile(e)&&t()}))}uploadFiles(e){const t=e.map(((t,r)=>{const n=r+1,o=e.length;return"error"in t&&t.error?Promise.reject(new Error(t.error)):t.isRemote?(t.progress.uploadStarted&&t.isRestored||this.uppy.emit("upload-started",t),this.uploadRemote(t,n,o)):(t.progress.uploadStarted&&t.isRestored||this.uppy.emit("upload-started",t),this.upload(t,n,o))}));return f(t)}handleUpload(e){if(0===e.length)return this.uppy.log("[Tus] No files to upload"),Promise.resolve();0===this.opts.limit&&this.uppy.log("[Tus] 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/tus/#limit-0","warning"),this.uppy.log("[Tus] Uploading...");const t=e.map((e=>this.uppy.getFile(e)));return this.uploadFiles(t).then((()=>null))}install(){this.uppy.setState({capabilities:{...this.uppy.getState().capabilities,resumableUploads:!0}}),this.uppy.addUploader(this.handleUpload),this.uppy.on("reset-progress",this.handleResetProgress)}uninstall(){this.uppy.setState({capabilities:{...this.uppy.getState().capabilities,resumableUploads:!1}}),this.uppy.removeUploader(this.handleUpload)}}U.VERSION="2.4.6",e.exports=U}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[310],{75310:function(t,n,i){var e;!function(){function o(t,n,i){return t.call.apply(t.bind,arguments)}function a(t,n,i){if(!t)throw Error();if(2<arguments.length){var e=Array.prototype.slice.call(arguments,2);return function(){var i=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(i,e),t.apply(n,i)}}return function(){return t.apply(n,arguments)}}function s(t,n,i){return(s=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?o:a).apply(null,arguments)}var r=Date.now||function(){return+new Date};function c(t,n){this.a=t,this.o=n||t,this.c=this.o.document}var f=!!window.FontFace;function h(t,n,i,e){if(n=t.c.createElement(n),i)for(var o in i)i.hasOwnProperty(o)&&("style"==o?n.style.cssText=i[o]:n.setAttribute(o,i[o]));return e&&n.appendChild(t.c.createTextNode(e)),n}function l(t,n,i){(t=t.c.getElementsByTagName(n)[0])||(t=document.documentElement),t.insertBefore(i,t.lastChild)}function u(t){t.parentNode&&t.parentNode.removeChild(t)}function p(t,n,i){n=n||[],i=i||[];for(var e=t.className.split(/\s+/),o=0;o<n.length;o+=1){for(var a=!1,s=0;s<e.length;s+=1)if(n[o]===e[s]){a=!0;break}a||e.push(n[o])}for(n=[],o=0;o<e.length;o+=1){for(a=!1,s=0;s<i.length;s+=1)if(e[o]===i[s]){a=!0;break}a||n.push(e[o])}t.className=n.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function g(t,n){for(var i=t.className.split(/\s+/),e=0,o=i.length;e<o;e++)if(i[e]==n)return!0;return!1}function d(t,n,i){function e(){r&&o&&a&&(r(s),r=null)}n=h(t,"link",{rel:"stylesheet",href:n,media:"all"});var o=!1,a=!0,s=null,r=i||null;f?(n.onload=function(){o=!0,e()},n.onerror=function(){o=!0,s=Error("Stylesheet failed to load"),e()}):setTimeout((function(){o=!0,e()}),0),l(t,"head",n)}function v(t,n,i,e){var o=t.c.getElementsByTagName("head")[0];if(o){var a=h(t,"script",{src:n}),s=!1;return a.onload=a.onreadystatechange=function(){s||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(s=!0,i&&i(null),a.onload=a.onreadystatechange=null,"HEAD"==a.parentNode.tagName&&o.removeChild(a))},o.appendChild(a),setTimeout((function(){s||(s=!0,i&&i(Error("Script load timeout")))}),e||5e3),a}return null}function m(){this.a=0,this.c=null}function w(t){return t.a++,function(){t.a--,b(t)}}function y(t,n){t.c=n,b(t)}function b(t){0==t.a&&t.c&&(t.c(),t.c=null)}function _(t){this.a=t||"-"}function x(t,n){this.c=t,this.f=4,this.a="n";var i=(n||"n4").match(/^([nio])([1-9])$/i);i&&(this.a=i[1],this.f=parseInt(i[2],10))}function j(t){var n=[];t=t.split(/,\s*/);for(var i=0;i<t.length;i++){var e=t[i].replace(/['"]/g,"");-1!=e.indexOf(" ")||/^\d/.test(e)?n.push("'"+e+"'"):n.push(e)}return n.join(",")}function k(t){return t.a+t.f}function T(t){var n="normal";return"o"===t.a?n="oblique":"i"===t.a&&(n="italic"),n}function S(t){var n=4,i="n",e=null;return t&&((e=t.match(/(normal|oblique|italic)/i))&&e[1]&&(i=e[1].substr(0,1).toLowerCase()),(e=t.match(/([1-9]00|normal|bold)/i))&&e[1]&&(/bold/i.test(e[1])?n=7:/[1-9]00/.test(e[1])&&(n=parseInt(e[1].substr(0,1),10)))),i+n}function C(t,n){this.c=t,this.f=t.o.document.documentElement,this.h=n,this.a=new _("-"),this.j=!1!==n.events,this.g=!1!==n.classes}function A(t){if(t.g){var n=g(t.f,t.a.c("wf","active")),i=[],e=[t.a.c("wf","loading")];n||i.push(t.a.c("wf","inactive")),p(t.f,i,e)}N(t,"inactive")}function N(t,n,i){t.j&&t.h[n]&&(i?t.h[n](i.c,k(i)):t.h[n]())}function E(){this.c={}}function I(t,n){this.c=t,this.f=n,this.a=h(this.c,"span",{"aria-hidden":"true"},this.f)}function O(t){l(t.c,"body",t.a)}function P(t){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+j(t.c)+";font-style:"+T(t)+";font-weight:"+t.f+"00;"}function W(t,n,i,e,o,a){this.g=t,this.j=n,this.a=e,this.c=i,this.f=o||3e3,this.h=a||void 0}function B(t,n,i,e,o,a,s){this.v=t,this.B=n,this.c=i,this.a=e,this.s=s||"BESbswy",this.f={},this.w=o||3e3,this.u=a||null,this.m=this.j=this.h=this.g=null,this.g=new I(this.c,this.s),this.h=new I(this.c,this.s),this.j=new I(this.c,this.s),this.m=new I(this.c,this.s),t=P(t=new x(this.a.c+",serif",k(this.a))),this.g.a.style.cssText=t,t=P(t=new x(this.a.c+",sans-serif",k(this.a))),this.h.a.style.cssText=t,t=P(t=new x("serif",k(this.a))),this.j.a.style.cssText=t,t=P(t=new x("sans-serif",k(this.a))),this.m.a.style.cssText=t,O(this.g),O(this.h),O(this.j),O(this.m)}_.prototype.c=function(t){for(var n=[],i=0;i<arguments.length;i++)n.push(arguments[i].replace(/[\W_]+/g,"").toLowerCase());return n.join(this.a)},W.prototype.start=function(){var t=this.c.o.document,n=this,i=r(),e=new Promise((function(e,o){!function a(){r()-i>=n.f?o():t.fonts.load(function(t){return T(t)+" "+t.f+"00 300px "+j(t.c)}(n.a),n.h).then((function(t){1<=t.length?e():setTimeout(a,25)}),(function(){o()}))}()})),o=null,a=new Promise((function(t,i){o=setTimeout(i,n.f)}));Promise.race([a,e]).then((function(){o&&(clearTimeout(o),o=null),n.g(n.a)}),(function(){n.j(n.a)}))};var F={D:"serif",C:"sans-serif"},L=null;function D(){if(null===L){var t=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);L=!!t&&(536>parseInt(t[1],10)||536===parseInt(t[1],10)&&11>=parseInt(t[2],10))}return L}function $(t,n,i){for(var e in F)if(F.hasOwnProperty(e)&&n===t.f[F[e]]&&i===t.f[F[e]])return!0;return!1}function q(t){var n,i=t.g.a.offsetWidth,e=t.h.a.offsetWidth;(n=i===t.f.serif&&e===t.f["sans-serif"])||(n=D()&&$(t,i,e)),n?r()-t.A>=t.w?D()&&$(t,i,e)&&(null===t.u||t.u.hasOwnProperty(t.a.c))?H(t,t.v):H(t,t.B):function(t){setTimeout(s((function(){q(this)}),t),50)}(t):H(t,t.v)}function H(t,n){setTimeout(s((function(){u(this.g.a),u(this.h.a),u(this.j.a),u(this.m.a),n(this.a)}),t),0)}function M(t,n,i){this.c=t,this.a=n,this.f=0,this.m=this.j=!1,this.s=i}B.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=r(),q(this)};var z=null;function G(t){0==--t.f&&t.j&&(t.m?((t=t.a).g&&p(t.f,[t.a.c("wf","active")],[t.a.c("wf","loading"),t.a.c("wf","inactive")]),N(t,"active")):A(t.a))}function K(t){this.j=t,this.a=new E,this.h=0,this.f=this.g=!0}function R(t,n,i,e,o){var a=0==--t.h;(t.f||t.g)&&setTimeout((function(){var t=o||null,r=e||{};if(0===i.length&&a)A(n.a);else{n.f+=i.length,a&&(n.j=a);var c,f=[];for(c=0;c<i.length;c++){var h=i[c],l=r[h.c],u=n.a,g=h;if(u.g&&p(u.f,[u.a.c("wf",g.c,k(g).toString(),"loading")]),N(u,"fontloading",g),u=null,null===z)if(window.FontFace){g=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent);var d=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);z=g?42<parseInt(g[1],10):!d}else z=!1;u=z?new W(s(n.g,n),s(n.h,n),n.c,h,n.s,l):new B(s(n.g,n),s(n.h,n),n.c,h,n.s,t,l),f.push(u)}for(c=0;c<f.length;c++)f[c].start()}}),0)}function U(t,n){this.c=t,this.a=n}function V(t,n){this.c=t,this.a=n}function X(t,n){this.c=t||J,this.a=[],this.f=[],this.g=n||""}M.prototype.g=function(t){var n=this.a;n.g&&p(n.f,[n.a.c("wf",t.c,k(t).toString(),"active")],[n.a.c("wf",t.c,k(t).toString(),"loading"),n.a.c("wf",t.c,k(t).toString(),"inactive")]),N(n,"fontactive",t),this.m=!0,G(this)},M.prototype.h=function(t){var n=this.a;if(n.g){var i=g(n.f,n.a.c("wf",t.c,k(t).toString(),"active")),e=[],o=[n.a.c("wf",t.c,k(t).toString(),"loading")];i||e.push(n.a.c("wf",t.c,k(t).toString(),"inactive")),p(n.f,e,o)}N(n,"fontinactive",t),G(this)},K.prototype.load=function(t){this.c=new c(this.j,t.context||this.j),this.g=!1!==t.events,this.f=!1!==t.classes,function(t,n,i){var e=[],o=i.timeout;!function(t){t.g&&p(t.f,[t.a.c("wf","loading")]),N(t,"loading")}(n),e=function(t,n,i){var e,o=[];for(e in n)if(n.hasOwnProperty(e)){var a=t.c[e];a&&o.push(a(n[e],i))}return o}(t.a,i,t.c);var a=new M(t.c,n,o);for(t.h=e.length,n=0,i=e.length;n<i;n++)e[n].load((function(n,i,e){R(t,a,n,i,e)}))}(this,new C(this.c,t),t)},U.prototype.load=function(t){function n(){if(a["__mti_fntLst"+e]){var i,o=a["__mti_fntLst"+e](),s=[];if(o)for(var r=0;r<o.length;r++){var c=o[r].fontfamily;null!=o[r].fontStyle&&null!=o[r].fontWeight?(i=o[r].fontStyle+o[r].fontWeight,s.push(new x(c,i))):s.push(new x(c))}t(s)}else setTimeout((function(){n()}),50)}var i=this,e=i.a.projectId,o=i.a.version;if(e){var a=i.c.o;v(this.c,(i.a.api||"https://fast.fonts.net/jsapi")+"/"+e+".js"+(o?"?v="+o:""),(function(o){o?t([]):(a["__MonotypeConfiguration__"+e]=function(){return i.a},n())})).id="__MonotypeAPIScript__"+e}else t([])},V.prototype.load=function(t){var n,i,e=this.a.urls||[],o=this.a.families||[],a=this.a.testStrings||{},s=new m;for(n=0,i=e.length;n<i;n++)d(this.c,e[n],w(s));var r=[];for(n=0,i=o.length;n<i;n++)if((e=o[n].split(":"))[1])for(var c=e[1].split(","),f=0;f<c.length;f+=1)r.push(new x(e[0],c[f]));else r.push(new x(e[0]));y(s,(function(){t(r,a)}))};var J="https://fonts.googleapis.com/css";function Q(t){this.f=t,this.a=[],this.c={}}var Y={latin:"BESbswy","latin-ext":"çöüğş",cyrillic:"йяЖ",greek:"αβΣ",khmer:"កខគ",Hanuman:"កខគ"},Z={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},tt={i:"i",italic:"i",n:"n",normal:"n"},nt=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;function it(t,n){this.c=t,this.a=n}var et={Arimo:!0,Cousine:!0,Tinos:!0};function ot(t,n){this.c=t,this.a=n}function at(t,n){this.c=t,this.f=n,this.a=[]}it.prototype.load=function(t){var n=new m,i=this.c,e=new X(this.a.api,this.a.text),o=this.a.families;!function(t,n){for(var i=n.length,e=0;e<i;e++){var o=n[e].split(":");3==o.length&&t.f.push(o.pop());var a="";2==o.length&&""!=o[1]&&(a=":"),t.a.push(o.join(a))}}(e,o);var a=new Q(o);!function(t){for(var n=t.f.length,i=0;i<n;i++){var e=t.f[i].split(":"),o=e[0].replace(/\+/g," "),a=["n4"];if(2<=e.length){var s;if(s=[],r=e[1])for(var r,c=(r=r.split(",")).length,f=0;f<c;f++){var h;if((h=r[f]).match(/^[\w-]+$/))if(null==(l=nt.exec(h.toLowerCase())))h="";else{if(h=null==(h=l[2])||""==h?"n":tt[h],null==(l=l[1])||""==l)l="4";else var l=Z[l]||(isNaN(l)?"4":l.substr(0,1));h=[h,l].join("")}else h="";h&&s.push(h)}0<s.length&&(a=s),3==e.length&&(s=[],0<(e=(e=e[2])?e.split(","):s).length&&(e=Y[e[0]])&&(t.c[o]=e))}for(t.c[o]||(e=Y[o])&&(t.c[o]=e),e=0;e<a.length;e+=1)t.a.push(new x(o,a[e]))}}(a),d(i,function(t){if(0==t.a.length)throw Error("No fonts to load!");if(-1!=t.c.indexOf("kit="))return t.c;for(var n=t.a.length,i=[],e=0;e<n;e++)i.push(t.a[e].replace(/ /g,"+"));return n=t.c+"?family="+i.join("%7C"),0<t.f.length&&(n+="&subset="+t.f.join(",")),0<t.g.length&&(n+="&text="+encodeURIComponent(t.g)),n}(e),w(n)),y(n,(function(){t(a.a,a.c,et)}))},ot.prototype.load=function(t){var n=this.a.id,i=this.c.o;n?v(this.c,(this.a.api||"https://use.typekit.net")+"/"+n+".js",(function(n){if(n)t([]);else if(i.Typekit&&i.Typekit.config&&i.Typekit.config.fn){n=i.Typekit.config.fn;for(var e=[],o=0;o<n.length;o+=2)for(var a=n[o],s=n[o+1],r=0;r<s.length;r++)e.push(new x(a,s[r]));try{i.Typekit.load({events:!1,classes:!1,async:!0})}catch(t){}t(e)}}),2e3):t([])},at.prototype.load=function(t){var n=this.f.id,i=this.c.o,e=this;n?(i.__webfontfontdeckmodule__||(i.__webfontfontdeckmodule__={}),i.__webfontfontdeckmodule__[n]=function(n,i){for(var o=0,a=i.fonts.length;o<a;++o){var s=i.fonts[o];e.a.push(new x(s.name,S("font-weight:"+s.weight+";font-style:"+s.style)))}t(e.a)},v(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+function(t){return t.o.location.hostname||t.a.location.hostname}(this.c)+"/"+n+".js",(function(n){n&&t([])}))):t([])};var st=new K(window);st.a.c.custom=function(t,n){return new V(n,t)},st.a.c.fontdeck=function(t,n){return new at(n,t)},st.a.c.monotype=function(t,n){return new U(n,t)},st.a.c.typekit=function(t,n){return new ot(n,t)},st.a.c.google=function(t,n){return new it(n,t)};var rt={load:s(st.load,st)};void 0===(e=function(){return rt}.call(n,i,n,t))||(t.exports=e)}()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[348],{65630:function(i,e,t){var o=t(42127),s=t(78729),r=t(50516),n=t(33847);const h=t(87098);class l extends o.UIPlugin{constructor(i,e){super(i,e),this.id=this.opts.id||"Dropbox",s.Provider.initPlugin(this,e),this.title=this.opts.title||"Dropbox",this.icon=()=>(0,n.h)("svg",{"aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32"},(0,n.h)("g",{fill:"none",fillRule:"evenodd"},(0,n.h)("rect",{className:"uppy-ProviderIconBg",fill:"#0D2481",width:"32",height:"32",rx:"16"}),(0,n.h)("path",{d:"M11 8l5 3.185-5 3.186-5-3.186L11 8zm10 0l5 3.185-5 3.186-5-3.186L21 8zM6 17.556l5-3.185 5 3.185-5 3.186-5-3.186zm15-3.185l5 3.185-5 3.186-5-3.186 5-3.185zm-10 7.432l5-3.185 5 3.185-5 3.186-5-3.186z",fill:"#FFF",fillRule:"nonzero"}))),this.provider=new s.Provider(i,{companionUrl:this.opts.companionUrl,companionHeaders:this.opts.companionHeaders,companionKeysParams:this.opts.companionKeysParams,companionCookiesRule:this.opts.companionCookiesRule,provider:"dropbox",pluginId:this.id}),this.defaultLocale=h,this.i18nInit(),this.title=this.i18n("pluginNameDropbox"),this.onFirstRender=this.onFirstRender.bind(this),this.render=this.render.bind(this)}install(){this.view=new r.ProviderViews(this,{provider:this.provider});const{target:i}=this.opts;i&&this.mount(i,this)}uninstall(){this.view.tearDown(),this.unmount()}onFirstRender(){return Promise.all([this.provider.fetchPreAuthToken(),this.view.getFolder()])}render(i){return this.view.render(i)}}l.VERSION="2.0.8",i.exports=l},68348:function(i,e,t){i.exports=t(65630)},87098:function(i){i.exports={strings:{pluginNameDropbox:"Dropbox"}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[399],{99193:function(i,e,s){var t=s(33847),n=s(42127),r=s(78729),o=s(50516);const a=s(99421);class h extends n.UIPlugin{constructor(i,e){super(i,e),this.id=this.opts.id||"Instagram",r.Provider.initPlugin(this,e),this.icon=()=>(0,t.h)("svg",{"aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32"},(0,t.h)("g",{fill:"none",fillRule:"evenodd"},(0,t.h)("rect",{className:"uppy-ProviderIconBg",fill:"#E1306C",width:"32",height:"32",rx:"16"}),(0,t.h)("path",{d:"M16 8.622c2.403 0 2.688.009 3.637.052.877.04 1.354.187 1.67.31.392.144.745.374 1.036.673.299.29.529.644.673 1.035.123.317.27.794.31 1.671.043.95.052 1.234.052 3.637s-.009 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.671a2.98 2.98 0 0 1-1.708 1.708c-.317.123-.794.27-1.671.31-.95.043-1.234.053-3.637.053s-2.688-.01-3.637-.053c-.877-.04-1.354-.187-1.671-.31a2.788 2.788 0 0 1-1.035-.673 2.788 2.788 0 0 1-.673-1.035c-.123-.317-.27-.794-.31-1.671-.043-.949-.052-1.234-.052-3.637s.009-2.688.052-3.637c.04-.877.187-1.354.31-1.67.144-.392.374-.745.673-1.036.29-.299.644-.529 1.035-.673.317-.123.794-.27 1.671-.31.95-.043 1.234-.052 3.637-.052zM16 7c-2.444 0-2.75.01-3.71.054-.959.044-1.613.196-2.185.419-.6.225-1.145.58-1.594 1.038-.458.45-.813.993-1.039 1.594-.222.572-.374 1.226-.418 2.184C7.01 13.25 7 13.556 7 16s.01 2.75.054 3.71c.044.959.196 1.613.419 2.185.226.6.58 1.145 1.038 1.594.45.458.993.813 1.594 1.038.572.223 1.227.375 2.184.419.96.044 1.267.054 3.711.054s2.75-.01 3.71-.054c.959-.044 1.613-.196 2.185-.419a4.602 4.602 0 0 0 2.632-2.632c.223-.572.375-1.226.419-2.184.044-.96.054-1.267.054-3.711s-.01-2.75-.054-3.71c-.044-.959-.196-1.613-.419-2.185A4.412 4.412 0 0 0 23.49 8.51a4.412 4.412 0 0 0-1.594-1.039c-.572-.222-1.226-.374-2.184-.418C18.75 7.01 18.444 7 16 7zm0 4.5a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9zm0 7.421a2.921 2.921 0 1 1 0-5.842 2.921 2.921 0 0 1 0 5.842zm4.875-6.671a1.125 1.125 0 1 1 0-2.25 1.125 1.125 0 0 1 0 2.25z",fill:"#FFF"}))),this.defaultLocale=a,this.i18nInit(),this.title=this.i18n("pluginNameInstagram"),this.provider=new r.Provider(i,{companionUrl:this.opts.companionUrl,companionHeaders:this.opts.companionHeaders,companionKeysParams:this.opts.companionKeysParams,companionCookiesRule:this.opts.companionCookiesRule,provider:"instagram",pluginId:this.id}),this.onFirstRender=this.onFirstRender.bind(this),this.render=this.render.bind(this)}install(){this.view=new o.ProviderViews(this,{provider:this.provider,viewType:"grid",showTitles:!1,showFilter:!1,showBreadcrumbs:!1});const{target:i}=this.opts;i&&this.mount(i,this)}uninstall(){this.view.tearDown(),this.unmount()}onFirstRender(){return Promise.all([this.provider.fetchPreAuthToken(),this.view.getFolder("recent")])}render(i){return this.view.render(i)}}h.VERSION="2.1.2",i.exports=h},9399:function(i,e,s){i.exports=s(99193)},99421:function(i){i.exports={strings:{pluginNameInstagram:"Instagram"}}}}]);