1!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="74b470e2-68be-4df5-9fa9-f3a67ccb6f3e",t._sentryDebugIdIdentifier="sentry-dbid-74b470e2-68be-4df5-9fa9-f3a67ccb6f3e")}catch(t){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9547],{13020:(t,e,r)=>{var o=r(55027),n=r(89210),i=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,a=/[\n\r\t]/g,s=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,u=/:\d+$/,l=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,c=/^[a-zA-Z]:/;function f(t){return(t||"").toString().replace(i,"")}var p=[["#","hash"],["?","query"],function(t,e){return y(e.protocol)?t.replace(/\\/g,"/"):t},["/","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(t){var e,o=("undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{}).location||{},n={},i=typeof(t=t||o);if("blob:"===t.protocol)n=new m(unescape(t.pathname),{});else if("string"===i)for(e in n=new m(t,{}),h)delete n[e];else if("object"===i){for(e in t)e in h||(n[e]=t[e]);void 0===n.slashes&&(n.slashes=s.test(t.href))}return n}function y(t){return"file:"===t||"ftp:"===t||"http:"===t||"https:"===t||"ws:"===t||"wss:"===t}function v(t,e){t=(t=f(t)).replace(a,""),e=e||{};var r,o=l.exec(t),n=o[1]?o[1].toLowerCase():"",i=!!o[2],s=!!o[3],u=0;return i?s?(r=o[2]+o[3]+o[4],u=o[2].length+o[3].length):(r=o[2]+o[4],u=o[2].length):s?(r=o[3]+o[4],u=o[3].length):r=o[4],"file:"===n?u>=2&&(r=r.slice(2)):y(n)?r=o[4]:n?i&&(r=r.slice(2)):u>=2&&y(e.protocol)&&(r=o[4]),{protocol:n,slashes:i||y(n),slashesCount:u,rest:r}}function m(t,e,r){if(t=(t=f(t)).replace(a,""),!(this instanceof m))return new m(t,e,r);var i,s,u,l,h,b,g=p.slice(),_=typeof e,w=0;for("object"!==_&&"string"!==_&&(r=e,e=null),r&&"function"!=typeof r&&(r=n.parse),i=!(s=v(t||"",e=d(e))).protocol&&!s.slashes,this.slashes=s.slashes||i&&e.slashes,this.protocol=s.protocol||e.protocol||"",t=s.rest,("file:"===s.protocol&&(2!==s.slashesCount||c.test(t))||!s.slashes&&(s.protocol||s.slashesCount<2||!y(this.protocol)))&&(g[3]=[/(.*)/,"pathname"]);w<g.length;w++){if("function"==typeof(l=g[w])){t=l(t,this);continue}u=l[0],b=l[1],u!=u?this[b]=t:"string"==typeof u?~(h="@"===u?t.lastIndexOf(u):t.indexOf(u))&&("number"==typeof l[2]?(this[b]=t.slice(0,h),t=t.slice(h+l[2])):(this[b]=t.slice(h),t=t.slice(0,h))):(h=u.exec(t))&&(this[b]=h[1],t=t.slice(0,h.index)),this[b]=this[b]||i&&l[3]&&e[b]||"",l[4]&&(this[b]=this[b].toLowerCase())}r&&(this.query=r(this.query)),i&&e.slashes&&"/"!==this.pathname.charAt(0)&&(""!==this.pathname||""!==e.pathname)&&(this.pathname=function(t,e){if(""===t)return e;for(var r=(e||"/").split("/").slice(0,-1).concat(t.split("/")),o=r.length,n=r[o-1],i=!1,a=0;o--;)"."===r[o]?r.splice(o,1):".."===r[o]?(r.splice(o,1),a++):a&&(0===o&&(i=!0),r.splice(o,1),a--);return i&&r.unshift(""),("."===n||".."===n)&&r.push(""),r.join("/")}(this.pathname,e.pathname)),"/"!==this.pathname.charAt(0)&&y(this.protocol)&&(this.pathname="/"+this.pathname),o(this.port,this.protocol)||(this.host=this.hostname,this.port=""),this.username=this.password="",this.auth&&(~(h=this.auth.indexOf(":"))?(this.username=this.auth.slice(0,h),this.username=encodeURIComponent(decodeURIComponent(this.username)),this.password=this.auth.slice(h+1),this.password=encodeURIComponent(decodeURIComponent(this.password))):this.username=encodeURIComponent(decodeURIComponent(this.auth)),this.auth=this.password?this.username+":"+this.password:this.username),this.origin="file:"!==this.protocol&&y(this.protocol)&&this.host?this.protocol+"//"+this.host:"null",this.href=this.toString()}m.prototype={set:function(t,e,r){switch(t){case"query":"string"==typeof e&&e.length&&(e=(r||n.parse)(e)),this[t]=e;break;case"port":this[t]=e,o(e,this.protocol)?e&&(this.host=this.hostname+":"+e):(this.host=this.hostname,this[t]="");break;case"hostname":this[t]=e,this.port&&(e+=":"+this.port),this.host=e;break;case"host":this[t]=e,u.test(e)?(e=e.split(":"),this.port=e.pop(),this.hostname=e.join(":")):(this.hostname=e,this.port="");break;case"protocol":this.protocol=e.toLowerCase(),this.slashes=!r;break;case"pathname":case"hash":if(e){var i="pathname"===t?"/":"#";this[t]=e.charAt(0)!==i?i+e:e}else this[t]=e;break;case"username":case"password":this[t]=encodeURIComponent(e);break;case"auth":var a=e.indexOf(":");~a?(this.username=e.slice(0,a),this.username=encodeURIComponent(decodeURIComponent(this.username)),this.password=e.slice(a+1),this.password=encodeURIComponent(decodeURIComponent(this.password))):this.username=encodeURIComponent(decodeURIComponent(e))}for(var s=0;s<p.length;s++){var l=p[s];l[4]&&(this[l[1]]=this[l[1]].toLowerCase())}return this.auth=this.password?this.username+":"+this.password:this.username,this.origin="file:"!==this.protocol&&y(this.protocol)&&this.host?this.protocol+"//"+this.host:"null",this.href=this.toString(),this},toString:function(t){t&&"function"==typeof t||(t=n.stringify);var e,r=this.host,o=this.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var i=o+(this.protocol&&this.slashes||y(this.protocol)?"//":"");return this.username?(i+=this.username,this.password&&(i+=":"+this.password),i+="@"):this.password?(i+=":"+this.password,i+="@"):"file:"!==this.protocol&&y(this.protocol)&&!r&&"/"!==this.pathname&&(i+="@"),(":"===r[r.length-1]||u.test(this.hostname)&&!this.port)&&(r+=":"),i+=r+this.pathname,(e="object"==typeof this.query?t(this.query):this.query)&&(i+="?"!==e.charAt(0)?"?"+e:e),this.hash&&(i+=this.hash),i}},m.extractProtocol=v,m.location=d,m.trimLeft=f,m.qs=n,t.exports=m},55027:t=>{t.exports=function(t,e){if(e=e.split(":")[0],!(t*=1))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}},69547:(t,e,r)=>{function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(t){var e="function"==typeof Map?new Map:void 0;return(n=function(t){if(null===t||!function(t){try{return -1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return function(t,e,r){if(i())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,e);var n=new(t.bind.apply(t,o));return r&&a(n,r.prototype),n}(t,arguments,s(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),a(r,t)})(t)}function i(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(i=function(){return!!t})()}
1function a(t,e){return(a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.r(e),r.d(e,{DefaultHttpStack:()=>tw,DetailedError:()=>u,Upload:()=>tH,canStoreURLs:()=>tj,defaultOptions:()=>tN,enableDebugLog:()=>c,isSupported:()=>tI});let u=function(t){function e(t){var r,n,a,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(!(this instanceof e))throw TypeError("Cannot call a class as a function");if(r=e,n=[t],r=s(r),(a=function(t,e){if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");var r=t;if(void 0===r)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(this,i()?Reflect.construct(r,n||[],s(this).constructor):r.apply(this,n))).originalRequest=l,a.originalResponse=c,a.causingError=u,null!=u&&(t+=", caused by ".concat(u.toString())),null!=l){var f=l.getHeader("X-Request-ID")||"n/a",p=l.getMethod(),h=l.getURL(),d=c?c.getStatus():"n/a",y=c?c.getBody()||"":"n/a";t+=", originated from request (method: ".concat(p,", url: ").concat(h,", response code: ").concat(d,", response text: ").concat(y,", request id: ").concat(f,")")}return a.message=t,a}if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");return e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(n(Error));var l=!1;function c(){l=!0}function f(t){l&&console.log(t)}function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var h=function(){var t,e;return t=function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function")},e=[{key:"listAllUploads",value:function(){return Promise.resolve([])}},{key:"findUploadsByFingerprint",value:function(t){return Promise.resolve([])}},{key:"removeUpload",value:function(t){return Promise.resolve()}},{key:"addUpload",value:function(t,e){return Promise.resolve(null)}}],function(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,function(t){var e=function(t,e){if("object"!=p(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!=p(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==p(e)?e:e+""}(o.key),o)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(),d=r(15376).Buffer;let y="function"==typeof d,v="function"==typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0}):void 0,m="function"==typeof TextEncoder?new TextEncoder:void 0,b=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),g=(t=>{let e={};return t.forEach((t,r)=>e[t]=r),e})(b),_=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,w=String.fromCharCode.bind(String),S="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),U=t=>t.replace(/=/g,"").replace(/[+\/]/g,t=>"+"==t?"-":"_"),x=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),E="function"==typeof btoa?t=>btoa(t):y?t=>d.from(t,"binary").toString("base64"):t=>{let e,r,o,n,i="",a=t.length%3;for(let a=0;a<t.length;){if((r=t.charCodeAt(a++))>255||(o=t.charCodeAt(a++))>255||(n=t.charCodeAt(a++))>255)throw TypeError("invalid character found");i+=b[(e=r<<16|o<<8|n)>>18&63]+b[e>>12&63]+b[e>>6&63]+b[63&e]}return a?i.slice(0,a-3)+"===".substring(a):i},O=y?t=>d.from(t).toString("base64"):t=>{let e=[];for(let r=0,o=t.length;r<o;r+=4096)e.push(w.apply(null,t.subarray(r,r+4096)));return E(e.join(""))},P=t=>
1{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?w(192|e>>>6)+w(128|63&e):w(224|e>>>12&15)+w(128|e>>>6&63)+w(128|63&e)}var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return w(240|e>>>18&7)+w(128|e>>>12&63)+w(128|e>>>6&63)+w(128|63&e)},j=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,k=y?t=>d.from(t,"utf8").toString("base64"):m?t=>O(m.encode(t)):t=>E(t.replace(j,P)),R=(t,e=!1)=>e?U(k(t)):k(t),L=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,C=t=>{switch(t.length){case 4:var e=((7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3))-65536;return w((e>>>10)+55296)+w((1023&e)+56320);case 3:return w((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return w((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},A="function"==typeof atob?t=>atob(x(t)):y?t=>d.from(t,"base64").toString("binary"):t=>{let e,r,o;if(t=t.replace(/\s+/g,""),!_.test(t))throw TypeError("malformed base64.");t+="==".slice(2-(3&t.length));let n=[];for(let i=0;i<t.length;)e=g[t.charAt(i++)]<<18|g[t.charAt(i++)]<<12|(r=g[t.charAt(i++)])<<6|(o=g[t.charAt(i++)]),64===r?n.push(w(e>>16&255)):64===o?n.push(w(e>>16&255,e>>8&255)):n.push(w(e>>16&255,e>>8&255,255&e));return n.join("")},T=y?t=>S(d.from(t,"base64")):t=>S(A(t).split("").map(t=>t.charCodeAt(0))),D=y?t=>d.from(t,"base64").toString("utf8"):v?t=>v.decode(T(t)):t=>A(t).replace(L,C),z={encode:R};var N=r(13020),H=r.n(N);function I(){"use strict";I=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function c(e,r,o,i){var a,s,u,l,c=Object.create((r&&r.prototype instanceof v?r:v).prototype);return n(c,"_invoke",{value:(a=e,s=o,u=new P(i||[]),l=p,function(e,r){if(l===h)throw Error("Generator is already running");if(l===d){if("throw"===e)throw r;return{value:t,done:!0}}for(u.method=e,u.arg=r;;){var o=u.delegate;if(o){var n=function e(r,o){var n=o.method,i=r.iterator[n];if(i===t)return o.delegate=null,"throw"===n&&r.iterator.return&&(o.method="return",o.arg=t,e(r,o),"throw"===o.method)||"return"!==n&&(o.method="throw",o.arg=TypeError("The iterator does not provide a '"+n+"' method")),y;var a=f(i,r.iterator,o.arg);if("throw"===a.type)return o.method="throw",o.arg=a.arg,o.delegate=null,y;var s=a.arg;return s?s.done?(o[r.resultName]=s.value,o.next=r.nextLoc,"return"!==o.method&&(o.method="next",o.arg=t),o.delegate=null,y):s:(o.method="throw",o.arg=TypeError("iterator result is not an object"),o.delegate=null,y)}(o,u);if(n){if(n===y)continue;return n}}if("next"===u.method)u.sent=u._sent=u.arg;else if("throw"===u.method){if(l===p)throw l=d,u.arg;u.dispatchException(u.arg)}else"return"===u.method&&u.abrupt("return",u.arg);l=h;var i=f(a,s,u);if("normal"===i.type){if(l=u.done?d:"suspendedYield",i.arg===y)continue;return{value:i.arg,done:u.done}}"throw"===i.type&&(l=d,u.method="throw",u.arg=i.arg)}})}),c}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=c;var p="suspendedStart",h="executing",d="completed",y={};function v(){}function m(){}function b(){}var g={};l(g,a,function(){return this});var _=Object.getPrototypeOf,w=_&&_(_(j([])));w&&w!==r&&o.call(w,a)&&(g=w);var S=b.prototype=v.prototype=Object.create(g);function U(t){["next","throw","return"].forEach(function(e){l(t,e,function(t){return this._invoke(e,t)})})}function x(t,e){var r;n(this,"_invoke",{value:function(n,i){function a(){return new e(function(r,a){!function r(n,i,a,s){var u=f(t[n],t,i);if("throw"!==u.type){var l=u.arg,c=l.value;return c&&"object"==B(c)&&o.call(c,"__await")?e.resolve(c.__await).then(function(t){r("next",t,a,s)},function(t){r("throw",t,a,s)}):e.resolve(c).then(function(t){l.value=t,a(l)},function(t){return r("throw",t,a,s)})}s(u.arg)}(n,i,r,a)})}return r=r?r.then(a,a):a()}})}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function j(e){if(e||""===e){var r=e[a];if(r)return r.call(e);
vendor: 5,101 bytes, line 1
1if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function r(){for(;++n<e.length;)if(o.call(e,n))return r.value=e[n],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw TypeError(B(e)+" is not iterable")}return m.prototype=b,n(S,"constructor",{value:b,configurable:!0}),n(b,"constructor",{value:m,configurable:!0}),m.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},U(x.prototype),l(x.prototype,s,function(){return this}),e.AsyncIterator=x,e.async=function(t,r,o,n,i){void 0===i&&(i=Promise);var a=new x(c(t,r,o,n),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},U(S),l(S,u,"Generator"),l(S,a,function(){return this}),l(S,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var o in e)r.push(o);return r.reverse(),function t(){for(;r.length;){var o=r.pop();if(o in e)return t.value=o,t.done=!1,t}return t.done=!0,t}},e.values=j,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(o,n){return s.type="throw",s.arg=e,r.next=o,n&&(r.method="next",r.arg=t),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var o=r.completion;if("throw"===o.type){var n=o.arg;O(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(e,r,o){return this.delegate={iterator:j(e),resultName:r,nextLoc:o},"next"===this.method&&(this.arg=t),y}},e}function F(t,e,r,o,n,i,a){try{var s=t[i](a),u=s.value}catch(t){r(t);return}s.done?e(u):Promise.resolve(u).then(o,n)}function q(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var o,n,i,a,s=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(o=i.call(r)).done)&&(s.push(o.value),s.length!==e);u=!0);}catch(t){l=!0,n=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw n}}return s}}(t,e)||M(t,e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(t){return(B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function M(t,e){if(t){if("string"==typeof t)return G(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return G(t,e)}}function G(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,o=Array(e);r<e;r++)o[r]=t[r];return o}function K(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,o)}return r}function X(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};
1e%2?K(Object(r),!0).forEach(function(e){var o,n,i;o=t,n=e,i=r[e],(n=Y(n))in o?Object.defineProperty(o,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):K(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Z(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,Y(o.key),o)}}function Y(t){var e=function(t,e){if("object"!=B(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!=B(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==B(e)?e:e+""}var J="tus-v1",$="ietf-draft-03",V="ietf-draft-05",Q=function(){var t,e;function r(t,e){if(!(this instanceof r))throw TypeError("Cannot call a class as a function");"resume"in e&&console.log("tus: The `resume` option has been removed in tus-js-client v2. Please use the URL storage API instead."),this.options=e,this.options.chunkSize=Number(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}return t=[{key:"findPreviousUploads",value:function(){var t=this;return this.options.fingerprint(this.file,this.options).then(function(e){return t._urlStorage.findUploadsByFingerprint(e)})}},{key:"resumeFromPreviousUpload",value:function(t){this.url=t.uploadUrl||null,this._parallelUploadUrls=t.parallelUploadUrls||null,this._urlStorageKey=t.urlStorageKey}},{key:"start",value:function(){var t=this,e=this.file;if(!e)return void this._emitError(Error("tus: no file or stream to upload provided"));if(![J,$,V].includes(this.options.protocol))return void this._emitError(Error("tus: unsupported protocol ".concat(this.options.protocol)));if(!this.options.endpoint&&!this.options.uploadUrl&&!this.url)return void this._emitError(Error("tus: neither an endpoint or an upload URL is provided"));var r=this.options.retryDelays;if(null!=r&&"[object Array]"!==Object.prototype.toString.call(r))return void this._emitError(Error("tus: the `retryDelays` option must either be an array or null"));if(this.options.parallelUploads>1)for(var o=0,n=["uploadUrl","uploadSize","uploadLengthDeferred"];o<n.length;o++){var i=n[o];if(this.options[i])return void this._emitError(Error("tus: cannot use the ".concat(i," option when parallelUploads is enabled")))}if(this.options.parallelUploadBoundaries){if(this.options.parallelUploads<=1)return void this._emitError(Error("tus: cannot use the `parallelUploadBoundaries` option when `parallelUploads` is disabled"));if(this.options.parallelUploads!==this.options.parallelUploadBoundaries.length)return void this._emitError(Error("tus: the `parallelUploadBoundaries` must have the same length as the value of `parallelUploads`"))}this.options.fingerprint(e,this.options).then(function(r){return(null==r?f("No fingerprint was calculated meaning that the upload cannot be stored in the URL storage."):f("Calculated fingerprint: ".concat(r)),t._fingerprint=r,t._source)?t._source:t.options.fileReader.openFile(e,t.options.chunkSize)}).then(function(e){if(t._source=e,t.options.uploadLengthDeferred)t._size=null;else if(null!=t.options.uploadSize){if(t._size=Number(t.options.uploadSize),Number.isNaN(t._size))return void t._emitError(Error("tus: cannot convert `uploadSize` option into a number"))}else if(t._size=t._source.size,null==t._size)return void t._emitError(Error("tus: cannot automatically derive upload's size from input. Specify it manually using the `uploadSize` option or use the `uploadLengthDeferred` option"));t.options.parallelUploads>1||null!=t._parallelUploadUrls?t._startParallelUpload():t._startSingleUpload()}).catch(function(e){t._emitError(e)})}},{key:"_startParallelUpload",value:function(){var t,e,o=this,n=this._size,i=0;this._parallelUploads=[];var a=null!=this._parallelUploadUrls?this._parallelUploadUrls.length:this.options.parallelUploads,s=null!=(e=this.options.parallelUploadBoundaries)?e:function(t,e){for(var r=Math.floor(t/e),o=[],n=0;n<e;n++)o.push({start:r*n,end:r*(n+1)});return o[e-1].end=t,o}(this._source.size,a);
1this._parallelUploadUrls&&s.forEach(function(t,e){t.uploadUrl=o._parallelUploadUrls[e]||null}),this._parallelUploadUrls=Array(s.length),Promise.all(s.map(function(t,e){var a=0;return o._source.slice(t.start,t.end).then(function(u){var l=u.value;return new Promise(function(u,c){var f=new r(l,X(X({},o.options),{},{uploadUrl:t.uploadUrl||null,storeFingerprintForResuming:!1,removeFingerprintOnSuccess:!1,parallelUploads:1,parallelUploadBoundaries:null,metadata:o.options.metadataForPartialUploads,headers:X(X({},o.options.headers),{},{"Upload-Concat":"partial"}),onSuccess:u,onError:c,onProgress:function(t){i=i-a+t,a=t,o._emitProgress(i,n)},onUploadUrlAvailable:function(){o._parallelUploadUrls[e]=f.url,o._parallelUploadUrls.filter(function(t){return!!t}).length===s.length&&o._saveUploadInUrlStorage()}}));f.start(),o._parallelUploads.push(f)})})})).then(function(){(t=o._openRequest("POST",o.options.endpoint)).setHeader("Upload-Concat","final;".concat(o._parallelUploadUrls.join(" ")));var e=W(o.options.metadata);return""!==e&&t.setHeader("Upload-Metadata",e),o._sendRequest(t,null)}).then(function(e){if(!tt(e.getStatus(),200))return void o._emitHttpError(t,e,"tus: unexpected response while creating upload");var r=e.getHeader("Location");if(null==r)return void o._emitHttpError(t,e,"tus: invalid or missing Location header");o.url=ta(o.options.endpoint,r),f("Created upload at ".concat(o.url)),o._emitSuccess(e)}).catch(function(t){o._emitError(t)})}},{key:"_startSingleUpload",value:function(){if(this._aborted=!1,null!=this.url){f("Resuming upload from previous URL: ".concat(this.url)),this._resumeUpload();return}if(null!=this.options.uploadUrl){f("Resuming upload from provided URL: ".concat(this.options.uploadUrl)),this.url=this.options.uploadUrl,this._resumeUpload();return}f("Creating a new upload"),this._createUpload()}},{key:"abort",value:function(t){var e=this;if(null!=this._parallelUploads){var o,n=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=M(t))){r&&(t=r);var o=0,n=function(){};return{s:n,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:n}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}(this._parallelUploads);try{for(n.s();!(o=n.n()).done;)o.value.abort(t)}catch(t){n.e(t)}finally{n.f()}}return(null!==this._req&&this._req.abort(),this._aborted=!0,null!=this._retryTimeout&&(clearTimeout(this._retryTimeout),this._retryTimeout=null),t&&null!=this.url)?r.terminate(this.url,this.options).then(function(){return e._removeFromUrlStorage()}):Promise.resolve()}},{key:"_emitHttpError",value:function(t,e,r,o){this._emitError(new u(r,o,t,e))}},{key:"_emitError",value:function(t){var e=this;if(!this._aborted){if(null!=this.options.retryDelays&&(null!=this._offset&&this._offset>this._offsetBeforeRetry&&(this._retryAttempt=0),tn(t,this._retryAttempt,this.options))){var r=this.options.retryDelays[this._retryAttempt++];this._offsetBeforeRetry=this._offset,this._retryTimeout=setTimeout(function(){e.start()},r);return}if("function"==typeof this.options.onError)this.options.onError(t);else throw t}}},{key:"_emitSuccess",value:function(t){this.options.removeFingerprintOnSuccess&&this._removeFromUrlStorage(),"function"==typeof this.options.onSuccess&&this.options.onSuccess({lastResponse:t})}},{key:"_emitProgress",value:function(t,e){"function"==typeof this.options.onProgress&&this.options.onProgress(t,e)}},{key:"_emitChunkComplete",value:function(t,e,r){"function"==typeof this.options.onChunkComplete&&this.options.onChunkComplete(t,e,r)}},{key:"_createUpload",value:function(){var t,e=this;if(!this.options.endpoint)return void this._emitError(Error("tus: unable to create upload because no endpoint is provided"));var r=this._openRequest("POST",this.options.endpoint);this.options.uploadLengthDeferred?r.setHeader("Upload-Defer-Length","1"):r.setHeader("Upload-Length","".concat(this._size));var o=W(this.options.metadata);""!==o&&r.setHeader("Upload-Metadata",o),this.options.uploadDataDuringCreation&&!this.options.uploadLengthDeferred?(this._offset=0,t=this._addChunkToRequest(r)):((this.options.protocol===$||this.options.protocol===V)&&r.setHeader("Upload-Complete","?0"),t=this._sendRequest(r,
1null)),t.then(function(t){if(!tt(t.getStatus(),200))return void e._emitHttpError(r,t,"tus: unexpected response while creating upload");var o=t.getHeader("Location");if(null==o)return void e._emitHttpError(r,t,"tus: invalid or missing Location header");if(e.url=ta(e.options.endpoint,o),f("Created upload at ".concat(e.url)),"function"==typeof e.options.onUploadUrlAvailable&&e.options.onUploadUrlAvailable(),0===e._size){e._emitSuccess(t),e._source.close();return}e._saveUploadInUrlStorage().then(function(){e.options.uploadDataDuringCreation?e._handleUploadResponse(r,t):(e._offset=0,e._performUpload())})}).catch(function(t){e._emitHttpError(r,null,"tus: failed to create upload",t)})}},{key:"_resumeUpload",value:function(){var t=this,e=this._openRequest("HEAD",this.url);this._sendRequest(e,null).then(function(r){var o=r.getStatus();if(!tt(o,200))return 423===o?void t._emitHttpError(e,r,"tus: upload is currently locked; retry later"):(tt(o,400)&&t._removeFromUrlStorage(),t.options.endpoint)?(t.url=null,void t._createUpload()):void t._emitHttpError(e,r,"tus: unable to resume upload (new upload cannot be created without an endpoint)");var n=Number.parseInt(r.getHeader("Upload-Offset"),10);if(Number.isNaN(n))return void t._emitHttpError(e,r,"tus: invalid or missing offset value");var i=Number.parseInt(r.getHeader("Upload-Length"),10);if(Number.isNaN(i)&&!t.options.uploadLengthDeferred&&t.options.protocol===J)return void t._emitHttpError(e,r,"tus: invalid or missing length value");"function"==typeof t.options.onUploadUrlAvailable&&t.options.onUploadUrlAvailable(),t._saveUploadInUrlStorage().then(function(){if(n===i){t._emitProgress(i,i),t._emitSuccess(r);return}t._offset=n,t._performUpload()})}).catch(function(r){t._emitHttpError(e,null,"tus: failed to resume upload",r)})}},{key:"_performUpload",value:function(){var t,e=this;this._aborted||(this.options.overridePatchMethod?(t=this._openRequest("POST",this.url)).setHeader("X-HTTP-Method-Override","PATCH"):t=this._openRequest("PATCH",this.url),t.setHeader("Upload-Offset","".concat(this._offset)),this._addChunkToRequest(t).then(function(r){if(!tt(r.getStatus(),200))return void e._emitHttpError(t,r,"tus: unexpected response while uploading chunk");e._handleUploadResponse(t,r)}).catch(function(r){e._aborted||e._emitHttpError(t,null,"tus: failed to upload chunk at offset ".concat(e._offset),r)}))}},{key:"_addChunkToRequest",value:function(t){var e=this,r=this._offset,o=this._offset+this.options.chunkSize;return t.setProgressHandler(function(t){e._emitProgress(r+t,e._size)}),this.options.protocol===J?t.setHeader("Content-Type","application/offset+octet-stream"):this.options.protocol===V&&t.setHeader("Content-Type","application/partial-upload"),(o===1/0||o>this._size)&&!this.options.uploadLengthDeferred&&(o=this._size),this._source.slice(r,o).then(function(r){var o=r.value,n=r.done,i=null!=o&&o.size?o.size:0;e.options.uploadLengthDeferred&&n&&(e._size=e._offset+i,t.setHeader("Upload-Length","".concat(e._size)));var a=e._offset+i;return!e.options.uploadLengthDeferred&&n&&a!==e._size?Promise.reject(Error("upload was configured with a size of ".concat(e._size," bytes, but the source is done after ").concat(a," bytes"))):null===o?e._sendRequest(t):((e.options.protocol===$||e.options.protocol===V)&&t.setHeader("Upload-Complete",n?"?1":"?0"),e._emitProgress(e._offset,e._size),e._sendRequest(t,o))})}},{key:"_handleUploadResponse",value:function(t,e){var r=Number.parseInt(e.getHeader("Upload-Offset"),10);if(Number.isNaN(r))return void this._emitHttpError(t,e,"tus: invalid or missing offset value");if(this._emitProgress(r,this._size),this._emitChunkComplete(r-this._offset,r,this._size),this._offset=r,r===this._size){this._emitSuccess(e),this._source.close();return}this._performUpload()}},{key:"_openRequest",value:function(t,e){var r=te(t,e,this.options);return this._req=r,r}},{key:"_removeFromUrlStorage",value:function(){var t=this;this._urlStorageKey&&(this._urlStorage.removeUpload(this._urlStorageKey).catch(function(e){t._emitError(e)}),this._urlStorageKey=null)}},{key:"_saveUploadInUrlStorage",value:function(){var t=this;if(!this.options.storeFingerprintForResuming||!this._fingerprint||null!==this._urlStorageKey)return Promise.resolve();var e={size:this._size,metadata:this.options.metadata,creationTime:new Date().toString()};return this._parallelUploads?e.parallelUploadUrls=this._parallelUploadUrls:e.uploadUrl=this.url,this._urlStorage.addUpload(this._fingerprint,e).then(function(e){t._urlStorageKey=e})}},{key:"_sendRequest",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return tr(t,e,this.options)}}],e=[{key:"terminate",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=te("DELETE",t,e);return tr(o,null,e).then(function(t){if(204!==t.getStatus())throw new u("tus: unexpected response while terminating upload",null,o,t)}).catch(function(n){if(n instanceof u||(n=new u("tus: failed to terminate upload",n,o,null)),!tn(n,0,e))throw n;var i=e.retryDelays[0],a=e.retryDelays.slice(1),s=X(X({},e),{},{retryDelays:a});return new Promise(function(t){return setTimeout(t,i)}).then(function(){return r.terminate(t,s)})})}}],t&&Z(r.prototype,t),e&&Z(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r}();function W(t){return Object.entries(t).map(function(t){var e=q(t,2),r=e[0],o=e[1];return"".concat(r," ").concat(z.encode(String(o)))}).join(",")}function tt(t,e){return t>=e&&t<e+100}function te(t,e,r){var o=r.httpStack.createRequest(t,e);r.protocol===$?o.setHeader("Upload-Draft-Interop-Version","5"):r.protocol===V?o.setHeader("Upload-Draft-Interop-Version","6"):o.setHeader("Tus-Resumable","1.0.0");for(var n=r.headers||{},i=0,a=Object.entries(n);i<a.length;i++){var s=q(a[i],2),u=s[0],l=s[1];o.setHeader(u,l)}if(r.addRequestId){var c="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)});o.setHeader("X-Request-ID",c)}return o}function tr(t,e,r){return to.apply(this,arguments)}function to(){var t;return t=I().mark(function t(e,r,o){var n;return I().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if("function"!=typeof o.onBeforeRequest){t.next=3;break}return t.next=3,o.onBeforeRequest(e);case 3:return t.next=5,e.send(r);case 5:if(n=t.sent,"function"!=typeof o.onAfterResponse){t.next=9;break}return t.next=9,o.onAfterResponse(e,n);case 9:return t.abrupt("return",n);case 10:case"end":return t.stop()}},t)}),(to=function(){var e=this,r=arguments;return new Promise(function(o,n){var i=t.apply(e,r);function a(t){F(i,o,n,a,s,"next",t)}function s(t){F(i,o,n,a,s,"throw",t)}a(void 0)})}).apply(this,arguments)}function tn(t,e,r){return null!=r.retryDelays&&!(e>=r.retryDelays.length)&&null!=t.originalRequest&&(r&&"function"==typeof r.onShouldRetry?r.onShouldRetry(t,e,r):ti(t))}function ti(t){var e,r=t.originalResponse?t.originalResponse.getStatus():0;return(!tt(r,400)||409===r||423===r)&&(e=!0,"undefined"!=typeof navigator&&!1===navigator.onLine&&(e=!1),e)}function ta(t,e){return new(H())(e,t).toString()}Q.defaultOptions={endpoint:null,uploadUrl:null,metadata:{},metadataForPartialUploads:{},fingerprint:null,uploadSize:null,onProgress:null,onChunkComplete:null,onSuccess:null,onError:null,onUploadUrlAvailable:null,overridePatchMethod:!1,headers:{},addRequestId:!1,onBeforeRequest:null,onAfterResponse:null,onShouldRetry:ti,chunkSize:1/0,retryDelays:[0,1e3,3e3,5e3],parallelUploads:1,parallelUploadBoundaries:null,
1storeFingerprintForResuming:!0,removeFingerprintOnSuccess:!1,uploadLengthDeferred:!1,uploadDataDuringCreation:!1,urlStorage:null,fileReader:null,httpStack:null,protocol:J};let ts=function(){return"undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase()};function tu(t){return(tu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var tl=function(){var t,e;return t=function t(e){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this._file=e,this.size=e.size},e=[{key:"slice",value:function(t,e){if("undefined"!=typeof window&&(void 0!==window.PhoneGap||void 0!==window.Cordova||void 0!==window.cordova)){var r;return r=this._file.slice(t,e),new Promise(function(t,e){var o=new FileReader;o.onload=function(){t({value:new Uint8Array(o.result)})},o.onerror=function(t){e(t)},o.readAsArrayBuffer(r)})}return Promise.resolve({value:this._file.slice(t,e),done:e>=this.size})}},{key:"close",value:function(){}}],function(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,function(t){var e=function(t,e){if("object"!=tu(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!=tu(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==tu(e)?e:e+""}(o.key),o)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}();function tc(t){return(tc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function tf(t){return void 0===t?0:void 0!==t.size?t.size:t.length}var tp=function(){var t,e;return t=function t(e){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this._buffer=void 0,this._bufferOffset=0,this._reader=e,this._done=!1},e=[{key:"slice",value:function(t,e){return t<this._bufferOffset?Promise.reject(Error("Requested data is before the reader's current offset")):this._readUntilEnoughDataOrDone(t,e)}},{key:"_readUntilEnoughDataOrDone",value:function(t,e){var r=this,o=e<=this._bufferOffset+tf(this._buffer);if(this._done||o){var n=this._getDataFromBuffer(t,e),i=null==n&&this._done;return Promise.resolve({value:n,done:i})}return this._reader.read().then(function(o){var n=o.value;return o.done?r._done=!0:void 0===r._buffer?r._buffer=n:r._buffer=function(t,e){if(t.concat)return t.concat(e);if(t instanceof Blob)return new Blob([t,e],{type:t.type});if(t.set){var r=new t.constructor(t.length+e.length);return r.set(t),r.set(e,t.length),r}throw Error("Unknown data type")}(r._buffer,n),r._readUntilEnoughDataOrDone(t,e)})}},{key:"_getDataFromBuffer",value:function(t,e){t>this._bufferOffset&&(this._buffer=this._buffer.slice(t-this._bufferOffset),this._bufferOffset=t);var r=0===tf(this._buffer);return this._done&&r?null:this._buffer.slice(0,e-t)}},{key:"close",value:function(){this._reader.cancel&&this._reader.cancel()}}],function(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,function(t){var e=function(t,e){if("object"!=tc(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!=tc(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==tc(e)?e:e+""}(o.key),o)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}();function th(t){return(th="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function td(){"use strict";td=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function c(e,r,o,i){var a,s,u,l,c=Object.create((r&&r.prototype instanceof v?r:v).prototype);return n(c,"_invoke",{value:(a=e,s=o,u=new P(i||[]),l=p,function(e,r){if(l===h)throw Error("Generator is already running");if(l===d){if("throw"===e)throw r;return{value:t,done:!0}}for(u.method=e,u.arg=r;;){var o=u.delegate;if(o){var n=function e(r,o){var n=o.method,i=r.iterator[n];if(i===t)return o.delegate=null,"throw"===n&&r.iterator.return&&
vendor: 5,213 bytes, line 1
1(o.method="return",o.arg=t,e(r,o),"throw"===o.method)||"return"!==n&&(o.method="throw",o.arg=TypeError("The iterator does not provide a '"+n+"' method")),y;var a=f(i,r.iterator,o.arg);if("throw"===a.type)return o.method="throw",o.arg=a.arg,o.delegate=null,y;var s=a.arg;return s?s.done?(o[r.resultName]=s.value,o.next=r.nextLoc,"return"!==o.method&&(o.method="next",o.arg=t),o.delegate=null,y):s:(o.method="throw",o.arg=TypeError("iterator result is not an object"),o.delegate=null,y)}(o,u);if(n){if(n===y)continue;return n}}if("next"===u.method)u.sent=u._sent=u.arg;else if("throw"===u.method){if(l===p)throw l=d,u.arg;u.dispatchException(u.arg)}else"return"===u.method&&u.abrupt("return",u.arg);l=h;var i=f(a,s,u);if("normal"===i.type){if(l=u.done?d:"suspendedYield",i.arg===y)continue;return{value:i.arg,done:u.done}}"throw"===i.type&&(l=d,u.method="throw",u.arg=i.arg)}})}),c}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=c;var p="suspendedStart",h="executing",d="completed",y={};function v(){}function m(){}function b(){}var g={};l(g,a,function(){return this});var _=Object.getPrototypeOf,w=_&&_(_(j([])));w&&w!==r&&o.call(w,a)&&(g=w);var S=b.prototype=v.prototype=Object.create(g);function U(t){["next","throw","return"].forEach(function(e){l(t,e,function(t){return this._invoke(e,t)})})}function x(t,e){var r;n(this,"_invoke",{value:function(n,i){function a(){return new e(function(r,a){!function r(n,i,a,s){var u=f(t[n],t,i);if("throw"!==u.type){var l=u.arg,c=l.value;return c&&"object"==th(c)&&o.call(c,"__await")?e.resolve(c.__await).then(function(t){r("next",t,a,s)},function(t){r("throw",t,a,s)}):e.resolve(c).then(function(t){l.value=t,a(l)},function(t){return r("throw",t,a,s)})}s(u.arg)}(n,i,r,a)})}return r=r?r.then(a,a):a()}})}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function j(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function r(){for(;++n<e.length;)if(o.call(e,n))return r.value=e[n],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw TypeError(th(e)+" is not iterable")}return m.prototype=b,n(S,"constructor",{value:b,configurable:!0}),n(b,"constructor",{value:m,configurable:!0}),m.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},U(x.prototype),l(x.prototype,s,function(){return this}),e.AsyncIterator=x,e.async=function(t,r,o,n,i){void 0===i&&(i=Promise);var a=new x(c(t,r,o,n),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},U(S),l(S,u,"Generator"),l(S,a,function(){return this}),l(S,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var o in e)r.push(o);return r.reverse(),function t(){for(;r.length;){var o=r.pop();if(o in e)return t.value=o,t.done=!1,t}return t.done=!0,t}},e.values=j,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(o,n){return s.type="throw",s.arg=e,r.next=o,n&&(r.method="next",r.arg=t),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),y}}
1,catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var o=r.completion;if("throw"===o.type){var n=o.arg;O(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(e,r,o){return this.delegate={iterator:j(e),resultName:r,nextLoc:o},"next"===this.method&&(this.arg=t),y}},e}function ty(t,e,r,o,n,i,a){try{var s=t[i](a),u=s.value}catch(t){r(t);return}s.done?e(u):Promise.resolve(u).then(o,n)}var tv=function(){var t,e,r,o;return r=function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function")},o=[{key:"openFile",value:(t=td().mark(function t(e,r){var o;return td().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(ts()&&e&&void 0!==e.uri)){t.next=11;break}return t.prev=1,t.next=4,function(t){return new Promise(function(e,r){var o=new XMLHttpRequest;o.responseType="blob",o.onload=function(){e(o.response)},o.onerror=function(t){r(t)},o.open("GET",t),o.send()})}(e.uri);case 4:return o=t.sent,t.abrupt("return",new tl(o));case 8:throw t.prev=8,t.t0=t.catch(1),Error("tus: cannot fetch `file.uri` as Blob, make sure the uri is correct and accessible. ".concat(t.t0));case 11:if("function"!=typeof e.slice||void 0===e.size){t.next=13;break}return t.abrupt("return",Promise.resolve(new tl(e)));case 13:if("function"!=typeof e.read){t.next=18;break}if(Number.isFinite(r=Number(r))){t.next=17;break}return t.abrupt("return",Promise.reject(Error("cannot create source for stream without a finite value for the `chunkSize` option")));case 17:return t.abrupt("return",Promise.resolve(new tp(e,r)));case 18:return t.abrupt("return",Promise.reject(Error("source object may only be an instance of File, Blob, or Reader in this environment")));case 19:case"end":return t.stop()}},t,null,[[1,8]])}),e=function(){var e=this,r=arguments;return new Promise(function(o,n){var i=t.apply(e,r);function a(t){ty(i,o,n,a,s,"next",t)}function s(t){ty(i,o,n,a,s,"throw",t)}a(void 0)})},function(t,r){return e.apply(this,arguments)})}],function(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,function(t){var e=function(t,e){if("object"!=th(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!=th(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==th(e)?e:e+""}(o.key),o)}}(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r}();function tm(t){return(tm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function tb(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}function tg(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,function(t){var e=function(t,e){if("object"!=tm(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!=tm(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==tm(e)?e:e+""}(o.key),o)}}function t_(t,e,r){return e&&tg(t.prototype,e),r&&tg(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var tw=t_(function t(){tb(this,t)},[{key:"createRequest",value:function(t,e){return new tS(t,e)}},{key:"getName",value:function(){return"XHRHttpStack"}}]),tS=t_(function t(e,r){tb(this,t),this._xhr=new XMLHttpRequest,this._xhr.open(e,r,!0),this._method=e,this._url=r,this._headers={}},[{key:"getMethod",value:function(){return this._method}},{key:"getURL",value:function(){return this._url}},{key:"setHeader",value:function(t,e){this._xhr.setRequestHeader(t,e),this._headers[t]=e}},{key:"getHeader",value:function(t){return this._headers[t]}},{key:"setProgressHandler",value:function(t){"upload"in this._xhr&&(this._xhr.upload.onprogress=function(e){e.lengthComputable&&t(e.loaded)})}},{key:"send",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new Promise(function(r,o){t._xhr.onload=function(){r(new tU(t._xhr))},t._xhr.onerror=function(t){o(t)},t._xhr.send(e)})}},{key:"abort",value:function(){return this._xhr.abort(),Promise.resolve()}},{key:"getUnderlyingObject",value:function(){return this._xhr}}]),tU=t_(function t(e){tb(this,t),this._xhr=e},[{key:"getStatus",value:function(){return this._xhr.status}},{key:"getHeader",value:function(t){return this._xhr.getResponseHeader(t)}},{key:"getBody",value:function(){return this._xhr.responseText}},{key:"getUnderlyingObject",value:function(){return this._xhr}}]);function tx(t){return(tx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var tE=!1;
1try{tE="localStorage"in window;var tO="tusSupport",tP=localStorage.getItem(tO);localStorage.setItem(tO,tP),null===tP&&localStorage.removeItem(tO)}catch(t){if(t.code===t.SECURITY_ERR||t.code===t.QUOTA_EXCEEDED_ERR)tE=!1;else throw t}var tj=tE,tk=function(){var t,e;return t=function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function")},e=[{key:"findAllUploads",value:function(){return Promise.resolve(this._findEntries("tus::"))}},{key:"findUploadsByFingerprint",value:function(t){return Promise.resolve(this._findEntries("tus::".concat(t,"::")))}},{key:"removeUpload",value:function(t){return localStorage.removeItem(t),Promise.resolve()}},{key:"addUpload",value:function(t,e){var r=Math.round(1e12*Math.random()),o="tus::".concat(t,"::").concat(r);return localStorage.setItem(o,JSON.stringify(e)),Promise.resolve(o)}},{key:"_findEntries",value:function(t){for(var e=[],r=0;r<localStorage.length;r++){var o=localStorage.key(r);if(0===o.indexOf(t))try{var n=JSON.parse(localStorage.getItem(o));n.urlStorageKey=o,e.push(n)}catch(t){}}return e}}],function(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,function(t){var e=function(t,e){if("object"!=tx(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!=tx(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==tx(e)?e:e+""}(o.key),o)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}();function tR(t){return(tR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function tL(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(tL=function(){return!!t})()}function tC(t){return(tC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function tA(t,e){return(tA=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function tT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,o)}return r}function tD(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?tT(Object(r),!0).forEach(function(e){var o,n,i;o=t,n=e,i=r[e],(n=tz(n))in o?Object.defineProperty(o,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):tT(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function tz(t){var e=function(t,e){if("object"!=tR(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!=tR(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==tR(e)?e:e+""}var tN=tD(tD({},Q.defaultOptions),{},{httpStack:new tw,fileReader:new tv,urlStorage:tj?new tk:new h,fingerprint:function(t,e){var r,o,n;return ts()?Promise.resolve((r=t,o=e,n=r.exif?function(t){var e=0;if(0===t.length)return e;for(var r=0;r<t.length;r++)e=(e<<5)-e+t.charCodeAt(r),e&=e;return e}(JSON.stringify(r.exif)):"noexif",["tus-rn",r.name||"noname",r.size||"nosize",n,o.endpoint].join("/"))):Promise.resolve(["tus-br",t.name,t.type,t.size,t.lastModified,e.endpoint].join("-"))}}),tH=function(t){var e;function r(){var t,e,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return n=tD(tD({},tN),n),t=r,e=[o,n],t=tC(t),function(t,e){if(e&&("object"===tR(e)||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");var r=t;if(void 0===r)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(this,tL()?Reflect.construct(t,e||[],tC(this).constructor):t.apply(this,e))}if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&tA(r,t),e=[{key:"terminate",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e=tD(tD({},tN),e),Q.terminate(t,e)}}],function(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,tz(o.key),o)}}(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r}(Q),tI="function"==typeof XMLHttpRequest&&"function"==typeof Blob&&"function"==typeof Blob.prototype.slice},89210:(t,e)=>{var r,o=Object.prototype.hasOwnProperty;function n(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function i(t){try{return encodeURIComponent(t)}catch(t){return null}}e.stringify=function(t,e){var n,a,s=[];for(a in"string"!=typeof(e=e||"")&&(e="?"),t)if(o.call(t,a)){if(!(n=t[a])&&
1(null===n||n===r||isNaN(n))&&(n=""),a=i(a),n=i(n),null===a||null===n)continue;s.push(a+"="+n)}return s.length?e+s.join("&"):""},e.parse=function(t){for(var e,r=/([^=?#&]+)=?([^&]*)/g,o={};e=r.exec(t);){var i=n(e[1]),a=n(e[2]);null===i||null===a||i in o||(o[i]=a)}return o}}}]); 2//# sourceMappingURL=9547.8e6d5d66f3b74323.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.