text: /*! For license information please see LICENSES */
  (window.webpackJsonp=window.webpackJsonp||[]).push([[14],{477:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return l}));var n=r(453),o=function(e){for(var t=[],p=0,i=0;i<e.length;i++){var r=e.charCodeAt(i);r<128?t[p++]=r:r<2048?(t[p++]=r>>6|192,t[p++]=63&r|128):55296==(64512&r)&&i+1<e.length&&56320==(64512&e.charCodeAt(i+1))?(r=65536+((1023&r)<<10)+(1023&e.charCodeAt(++i)),t[p++]=r>>18|240,t[p++]=r>>12&63|128,t[p++]=r>>6&63|128,t[p++]=63&r|128):(t[p++]=r>>12|224,t[p++]=r>>6&63|128,t[p++]=63&r|128)}return t};var c=function(){function e(){var e=this;this.reject=function(){},this.resolve=function(){},this.promise=new Promise((function(t,r){e.resolve=t,e.reject=r}))}return e.prototype.wrapCallback=function(e){var t=this;return function(r,n){r?t.reject(r):t.resolve(n),"function"==typeof e&&(t.promise.catch((function(){})),1===e.length?e(r):e(r,n))}},e}();var l=function(e){function t(code,r,n){var o=e.call(this,r)||this;return o.code=code,o.customData=n,o.name="FirebaseError",Object.setPrototypeOf(o,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(o,h.prototype.create),o}return Object(n.c)(t,e),t}(Error),h=function(){function e(e,t,r){this.service=e,this.serviceName=t,this.errors=r}return e.prototype.create=function(code){for(var data=[],e=1;e<arguments.length;e++)data[e-1]=arguments[e];var t=data[0]||{},r=this.service+"/"+code,template=this.errors[code],n=template?f(template,t):"Error",o=this.serviceName+": "+n+" ("+r+").",c=new l(r,o,t);return c},e}();function f(template,data){return template.replace(d,(function(e,t){var r=data[t];return null!=r?String(r):"<"+t+"?>"}))}var d=/\{\$([^}]+)}/g;!function(){function e(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(var i=1;i<this.blockSize;++i)this.pad_[i]=0;this.reset()}e.prototype.reset=function(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0},e.prototype.compress_=function(e,t){t||(t=0);var r=this.W_;if("string"==typeof e)for(var i=0;i<16;i++)r[i]=e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|e.charCodeAt(t+3),t+=4;else for(i=0;i<16;i++)r[i]=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],t+=4;for(i=16;i<80;i++){var n=r[i-3]^r[i-8]^r[i-14]^r[i-16];r[i]=4294967295&(n<<1|n>>>31)}var o,c,a=this.chain_[0],b=this.chain_[1],l=this.chain_[2],h=this.chain_[3],f=this.chain_[4];for(i=0;i<80;i++){i<40?i<20?(o=h^b&(l^h),c=1518500249):(o=b^l^h,c=1859775393):i<60?(o=b&l|h&(b|l),c=2400959708):(o=b^l^h,c=3395469782);n=(a<<5|a>>>27)+o+f+c+r[i]&4294967295;f=h,h=l,l=4294967295&(b<<30|b>>>2),b=a,a=n}this.chain_[0]=this.chain_[0]+a&4294967295,this.chain_[1]=this.chain_[1]+b&4294967295,this.chain_[2]=this.chain_[2]+l&4294967295,this.chain_[3]=this.chain_[3]+h&4294967295,this.chain_[4]=this.chain_[4]+f&4294967295},e.prototype.update=function(e,t){if(null!=e){void 0===t&&(t=e.length);for(var r=t-this.blockSize,n=0,o=this.buf_,c=this.inbuf_;n<t;){if(0===c)for(;n<=r;)this.compress_(e,n),n+=this.blockSize;if("string"==typeof e){for(;n<t;)if(o[c]=e.charCodeAt(n),++n,++c===this.blockSize){this.compress_(o),c=0;break}}else for(;n<t;)if(o[c]=e[n],++n,++c===this.blockSize){this.compress_(o),c=0;break}}this.inbuf_=c,this.total_+=t}},e.prototype.digest=function(){var e=[],t=8*this.total_;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var i=this.blockSize-1;i>=56;i--)this.buf_[i]=255&t,t/=256;this.compress_(this.buf_);var r=0;for(i=0;i<5;i++)for(var n=24;n>=0;n-=8)e[r]=this.chain_[i]>>n&255,++r;return e}}();!function(){function e(e,t){var r=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then((function(){e(r)})).catch((function(e){r.error(e)}))}e.prototype.next=function(e){this.forEachObserver((function(t){t.next(e)}))},e.prototype.error=function(e){this.forEachObserver((function(t){t.error(e)})),this.close(e)},e.prototype.complete=function(){this.forEachObserver((function(e){e.complete()})),this.close()},e.prototype.subscribe=function(e,t,r){var n,o=this;if(void 0===e&&void 0===t&&void 0===r)throw new Error("Missing Observer.");void 0===(n=function(e,t){if("object"!=typeof e||null===e)return!1;for(var r=0,n=t;r<n.length;r++){var o=n[r];if(o in e&&"function"==typeof e[o])return!0}return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:r}).next&&(n.next=_),void 0===n.error&&(n.error=_),void 0===n.complete&&(n.complete=_);var c=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((function(){try{o.finalError?n.error(o.finalError):n.complete()}catch(e){}})),this.observers.push(n),c},e.prototype.unsubscribeOne=function(i){void 0!==this.observers&&void 0!==this.observers[i]&&(delete this.observers[i],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},e.prototype.forEachObserver=function(e){if(!this.finalized)for(var i=0;i<this.observers.length;i++)this.sendOne(i,e)},e.prototype.sendOne=function(i,e){var t=this;this.task.then((function(){if(void 0!==t.observers&&void 0!==t.observers[i])try{e(t.observers[i])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}}))},e.prototype.close=function(e){var t=this;this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then((function(){t.observers=void 0,t.onNoObservers=void 0})))}}();function _(){}}).call(this,r(63))},546:function(e,t,r){"use strict";r.r(t);var n=r(454),o=r(453),c=r(477),l=function(){function e(e,t,r){this.name=e,this.instanceFactory=t,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY"}return e.prototype.setInstantiationMode=function(e){return this.instantiationMode=e,this},e.prototype.setMultipleInstances=function(e){return this.multipleInstances=e,this},e.prototype.setServiceProps=function(e){return this.serviceProps=e,this},e}(),h="[DEFAULT]",f=function(){function e(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map}return e.prototype.get=function(e){void 0===e&&(e=h);var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){var r=new c.a;this.instancesDeferred.set(t,r);try{var n=this.getOrInitializeService({instanceIdentifier:t});n&&r.resolve(n)}catch(e){}}return this.instancesDeferred.get(t).promise},e.prototype.getImmediate=function(e){var t=Object(o.a)({identifier:h,optional:!1},e),r=t.identifier,n=t.optional,c=this.normalizeInstanceIdentifier(r);try{var l=this.getOrInitializeService({instanceIdentifier:c});if(!l){if(n)return null;throw Error("Service "+this.name+" is not available")}return l}catch(e){if(n)return null;throw e}},e.prototype.getComponent=function(){return this.component},e.prototype.setComponent=function(component){var e,t;if(component.name!==this.name)throw Error("Mismatching Component "+component.name+" for Provider "+this.name+".");if(this.component)throw Error("Component for "+this.name+" has already been provided");if(this.component=component,function(component){return"EAGER"===component.instantiationMode}(component))try{this.getOrInitializeService({instanceIdentifier:h})}catch(e){}try{for(var r=Object(o.g)(this.instancesDeferred.entries()),n=r.next();!n.done;n=r.next()){var c=Object(o.e)(n.value,2),l=c[0],f=c[1],d=this.normalizeInstanceIdentifier(l);try{var _=this.getOrInitializeService({instanceIdentifier:d});f.resolve(_)}catch(e){}}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}},e.prototype.clearInstance=function(e){void 0===e&&(e=h),this.instancesDeferred.delete(e),this.instances.delete(e)},e.prototype.delete=function(){return Object(o.b)(this,void 0,void 0,(function(){var e;return Object(o.d)(this,(function(t){switch(t.label){case 0:return e=Array.from(this.instances.values()),[4,Promise.all(Object(o.f)(Object(o.f)([],Object(o.e)(e.filter((function(e){return"INTERNAL"in e})).map((function(e){return e.INTERNAL.delete()})))),Object(o.e)(e.filter((function(e){return"_delete"in e})).map((function(e){return e._delete()})))))];case 1:return t.sent(),[2]}}))}))},e.prototype.isComponentSet=function(){return null!=this.component},e.prototype.isInitialized=function(e){return void 0===e&&(e=h),this.instances.has(e)},e.prototype.initialize=function(e){void 0===e&&(e={});var t=e.instanceIdentifier,r=void 0===t?h:t,n=e.options,o=void 0===n?{}:n,c=this.normalizeInstanceIdentifier(r);if(this.isInitialized(c))throw Error(this.name+"("+c+") has already been initialized");if(!this.isComponentSet())throw Error("Component "+this.name+" has not been registered yet");return this.getOrInitializeService({instanceIdentifier:c,options:o})},e.prototype.getOrInitializeService=function(e){var t,r=e.instanceIdentifier,n=e.options,o=void 0===n?{}:n,c=this.instances.get(r);return!c&&this.component&&(c=this.component.instanceFactory(this.container,{instanceIdentifier:(t=r,t===h?void 0:t),options:o}),this.instances.set(r,c)),c||null},e.prototype.normalizeInstanceIdentifier=function(e){return this.component?this.component.multipleInstances?e:h:e},e}();!function(){function e(e){this.name=e,this.providers=new Map}e.prototype.addComponent=function(component){var e=this.getProvider(component.name);if(e.isComponentSet())throw new Error("Component "+component.name+" has already been registered with "+this.name);e.setComponent(component)},e.prototype.addOrOverwriteComponent=function(component){this.getProvider(component.name).isComponentSet()&&this.providers.delete(component.name),this.addComponent(component)},e.prototype.getProvider=function(e){if(this.providers.has(e))return this.providers.get(e);var t=new f(e,this);return this.providers.set(e,t),t},e.prototype.getProviders=function(){return Array.from(this.providers.values())}}();var d="firebasestorage.googleapis.com",_=function(e){function t(code,r){var n=e.call(this,v(code),"Firebase Storage: "+r+" ("+v(code)+")")||this;return n.customData={serverResponse:null},Object.setPrototypeOf(n,t.prototype),n}return Object(o.c)(t,e),t.prototype._codeEquals=function(code){return v(code)===this.code},Object.defineProperty(t.prototype,"message",{get:function(){return this.customData.serverResponse?this.message+"\n"+this.customData.serverResponse:this.message},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"serverResponse",{get:function(){return this.customData.serverResponse},set:function(e){this.customData.serverResponse=e},enumerable:!1,configurable:!0}),t}(c.b);function v(code){return"storage/"+code}function m(){return new _("unknown","An unknown error occurred, please check the error payload for server response.")}function y(){return new _("canceled","User canceled the upload/download.")}function w(){return new _("cannot-slice-blob","Cannot slice blob for upload. Please retry the upload.")}function R(e){return new _("invalid-argument",e)}function O(){return new _("app-deleted","The Firebase app was deleted.")}function k(e){return new _("invalid-root-operation","The operation '"+e+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function T(e,t){return new _("invalid-format","String does not match format '"+e+"': "+t)}function x(e){throw new _("internal-error","Internal error: "+e)}var P={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"},S=function(data,e){this.data=data,this.contentType=e||null};function C(e,t){switch(e){case P.RAW:return new S(U(t));case P.BASE64:case P.BASE64URL:return new S(E(e,t));case P.DATA_URL:return new S((r=new I(t)).base64?E(P.BASE64,r.rest):function(e){var t;try{t=decodeURIComponent(e)}catch(e){throw T(P.DATA_URL,"Malformed data URL.")}return U(t)}(r.rest),function(e){return new I(e).contentType}(t))}var r;throw m()}function U(e){for(var b=[],i=0;i<e.length;i++){var t=e.charCodeAt(i);if(t<=127)b.push(t);else if(t<=2047)b.push(192|t>>6,128|63&t);else if(55296==(64512&t))if(i<e.length-1&&56320==(64512&e.charCodeAt(i+1)))t=65536|(1023&t)<<10|1023&e.charCodeAt(++i),b.push(240|t>>18,128|t>>12&63,128|t>>6&63,128|63&t);else b.push(239,191,189);else 56320==(64512&t)?b.push(239,191,189):b.push(224|t>>12,128|t>>6&63,128|63&t)}return new Uint8Array(b)}function E(e,t){switch(e){case P.BASE64:var r=-1!==t.indexOf("-"),n=-1!==t.indexOf("_");if(r||n)throw T(e,"Invalid character '"+(r?"-":"_")+"' found: is it base64url encoded?");break;case P.BASE64URL:var o=-1!==t.indexOf("+"),c=-1!==t.indexOf("/");if(o||c)throw T(e,"Invalid character '"+(o?"+":"/")+"' found: is it base64 encoded?");t=t.replace(/-/g,"+").replace(/_/g,"/")}var l;try{l=atob(t)}catch(t){throw T(e,"Invalid character found")}for(var h=new Uint8Array(l.length),i=0;i<l.length;i++)h[i]=l.charCodeAt(i);return h}var I=function(e){this.base64=!1,this.contentType=null;var t=e.match(/^data:([^,]+)?,/);if(null===t)throw T(P.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");var r=t[1]||null;null!=r&&(this.base64=(s=r,n=";base64",s.length>=n.length&&s.substring(s.length-n.length)===n),this.contentType=this.base64?r.substring(0,r.length-";base64".length):r),this.rest=e.substring(e.indexOf(",")+1);var s,n};var A,j={STATE_CHANGED:"state_changed"},z={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};function N(e){switch(e){case"running":case"pausing":case"canceling":return z.RUNNING;case"paused":return z.PAUSED;case"success":return z.SUCCESS;case"canceled":return z.CANCELED;case"error":default:return z.ERROR}}!function(e){e[e.NO_ERROR=0]="NO_ERROR",e[e.NETWORK_ERROR=1]="NETWORK_ERROR",e[e.ABORT=2]="ABORT"}(A||(A={}));var L=function(){function e(){var e=this;this.sent_=!1,this.xhr_=new XMLHttpRequest,this.errorCode_=A.NO_ERROR,this.sendPromise_=new Promise((function(t){e.xhr_.addEventListener("abort",(function(){e.errorCode_=A.ABORT,t(e)})),e.xhr_.addEventListener("error",(function(){e.errorCode_=A.NETWORK_ERROR,t(e)})),e.xhr_.addEventListener("load",(function(){t(e)}))}))}return e.prototype.send=function(e,t,body,r){if(this.sent_)throw x("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(t,e,!0),void 0!==r)for(var n in r)r.hasOwnProperty(n)&&this.xhr_.setRequestHeader(n,r[n].toString());return void 0!==body?this.xhr_.send(body):this.xhr_.send(),this.sendPromise_},e.prototype.getErrorCode=function(){if(!this.sent_)throw x("cannot .getErrorCode() before sending");return this.errorCode_},e.prototype.getStatus=function(){if(!this.sent_)throw x("cannot .getStatus() before sending");try{return this.xhr_.status}catch(e){return-1}},e.prototype.getResponseText=function(){if(!this.sent_)throw x("cannot .getResponseText() before sending");return this.xhr_.responseText},e.prototype.abort=function(){this.xhr_.abort()},e.prototype.getResponseHeader=function(header){return this.xhr_.getResponseHeader(header)},e.prototype.addUploadProgressListener=function(e){null!=this.xhr_.upload&&this.xhr_.upload.addEventListener("progress",e)},e.prototype.removeUploadProgressListener=function(e){null!=this.xhr_.upload&&this.xhr_.upload.removeEventListener("progress",e)},e}(),M=function(){function e(){}return e.prototype.createXhrIo=function(){return new L},e}(),D=function(){function e(e,path){this.bucket=e,this.path_=path}return Object.defineProperty(e.prototype,"path",{get:function(){return this.path_},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRoot",{get:function(){return 0===this.path.length},enumerable:!1,configurable:!0}),e.prototype.fullServerUrl=function(){var e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)},e.prototype.bucketOnlyServerUrl=function(){return"/b/"+encodeURIComponent(this.bucket)+"/o"},e.makeFromBucketSpec=function(t){var r;try{r=e.makeFromUrl(t)}catch(r){return new e(t,"")}if(""===r.path)return r;throw new _("invalid-default-bucket","Invalid default bucket '"+t+"'.")},e.makeFromUrl=function(t){var r=null,n="([A-Za-z0-9.\\-_]+)";var o=new RegExp("^gs://"+n+"(/(.*))?$","i");function c(e){e.path_=decodeURIComponent(e.path)}for(var l=d.replace(/[.]/g,"\\."),h=[{regex:o,indices:{bucket:1,path:3},postModify:function(e){"/"===e.path.charAt(e.path.length-1)&&(e.path_=e.path_.slice(0,-1))}},{regex:new RegExp("^https?://"+l+"/v[A-Za-z0-9_]+/b/"+n+"/o(/([^?#]*).*)?$","i"),indices:{bucket:1,path:3},postModify:c},{regex:new RegExp("^https?://(?:storage.googleapis.com|storage.cloud.google.com)/"+n+"/([^?#]*)","i"),indices:{bucket:1,path:2},postModify:c}],i=0;i<h.length;i++){var f=h[i],v=f.regex.exec(t);if(v){var m=v[f.indices.bucket],y=v[f.indices.path];y||(y=""),r=new e(m,y),f.postModify(r);break}}if(null==r)throw function(e){return new _("invalid-url","Invalid URL '"+e+"'.")}(t);return r},e}(),B=function(){function e(e){this.promise_=Promise.reject(e)}return e.prototype.getPromise=function(){return this.promise_},e.prototype.cancel=function(e){},e}();function F(p){return"string"==typeof p||p instanceof String}function H(p){return X()&&p instanceof Blob}function X(){return"undefined"!=typeof Blob}function G(e,t,r,n){if(n<t)throw R("Invalid value for '"+e+"'. Expected "+t+" or greater.");if(n>r)throw R("Invalid value for '"+e+"'. Expected "+r+" or less.")}function W(e){return"https://"+d+"/v0"+e}function V(e){var t=encodeURIComponent,r="?";for(var n in e){if(e.hasOwnProperty(n))r=r+(t(n)+"="+t(e[n]))+"&"}return r=r.slice(0,-1)}var K=function(){function e(e,t,r,body,n,o,c,l,h,f,d){var _=this;this.pendingXhr_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.url_=e,this.method_=t,this.headers_=r,this.body_=body,this.successCodes_=n.slice(),this.additionalRetryCodes_=o.slice(),this.callback_=c,this.errorCallback_=l,this.progressCallback_=f,this.timeout_=h,this.pool_=d,this.promise_=new Promise((function(e,t){_.resolve_=e,_.reject_=t,_.start_()}))}return e.prototype.start_=function(){var e=this;function t(t,r){var n,o=e.resolve_,c=e.reject_,l=r.xhr;if(r.wasSuccessCode)try{var h=e.callback_(l,l.getResponseText());void 0!==h?o(h):o()}catch(e){c(e)}else null!==l?((n=m()).serverResponse=l.getResponseText(),e.errorCallback_?c(e.errorCallback_(l,n)):c(n)):r.canceled?c(n=e.appDelete_?O():y()):c(n=new _("retry-limit-exceeded","Max retry time for operation exceeded, please try again."))}this.canceled_?t(0,new J(!1,null,!0)):this.backoffId_=function(e,t,r){var n=1,c=null,l=!1,h=0;function f(){return 2===h}var d=!1;function _(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];d||(d=!0,t.apply(null,e))}function v(t){c=setTimeout((function(){c=null,e(m,f())}),t)}function m(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(!d)if(e)_.call.apply(_,Object(o.f)([null,e],t));else{var c;f()||l?_.call.apply(_,Object(o.f)([null,e],t)):(n<64&&(n*=2),1===h?(h=2,c=0):c=1e3*(n+Math.random()),v(c))}}var y=!1;function w(e){y||(y=!0,d||(null!==c?(e||(h=2),clearTimeout(c),v(0)):e||(h=1)))}return v(0),setTimeout((function(){l=!0,w(!0)}),r),w}((function(t,r){if(r)t(!1,new J(!1,null,!0));else{var n=e.pool_.createXhrIo();e.pendingXhr_=n,null!==e.progressCallback_&&n.addUploadProgressListener(o),n.send(e.url_,e.method_,e.body_,e.headers_).then((function(r){null!==e.progressCallback_&&r.removeUploadProgressListener(o),e.pendingXhr_=null;var n=(r=r).getErrorCode()===A.NO_ERROR,c=r.getStatus();if(n&&!e.isRetryStatusCode_(c)){var l=-1!==e.successCodes_.indexOf(c);t(!0,new J(l,r))}else{var h=r.getErrorCode()===A.ABORT;t(!1,new J(!1,null,h))}}))}function o(t){var r=t.loaded,n=t.lengthComputable?t.total:-1;null!==e.progressCallback_&&e.progressCallback_(r,n)}}),t,this.timeout_)},e.prototype.getPromise=function(){return this.promise_},e.prototype.cancel=function(e){this.canceled_=!0,this.appDelete_=e||!1,null!==this.backoffId_&&(0,this.backoffId_)(!1),null!==this.pendingXhr_&&this.pendingXhr_.abort()},e.prototype.isRetryStatusCode_=function(e){var t=e>=500&&e<600,r=-1!==[408,429].indexOf(e),n=-1!==this.additionalRetryCodes_.indexOf(e);return t||r||n},e}(),J=function(e,t,r){this.wasSuccessCode=e,this.xhr=t,this.canceled=!!r};function Z(){return"undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0}function $(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Z();if(void 0!==r){for(var n=new r,i=0;i<e.length;i++)n.append(e[i]);return n.getBlob()}if(X())return new Blob(e);throw new _("unsupported-environment","This browser doesn't seem to support creating Blobs")}var Y=function(){function e(data,e){var t=0,r="";H(data)?(this.data_=data,t=data.size,r=data.type):data instanceof ArrayBuffer?(e?this.data_=new Uint8Array(data):(this.data_=new Uint8Array(data.byteLength),this.data_.set(new Uint8Array(data))),t=this.data_.length):data instanceof Uint8Array&&(e?this.data_=data:(this.data_=new Uint8Array(data.length),this.data_.set(data)),t=data.length),this.size_=t,this.type_=r}return e.prototype.size=function(){return this.size_},e.prototype.type=function(){return this.type_},e.prototype.slice=function(t,r){if(H(this.data_)){var n=function(e,t,r){return e.webkitSlice?e.webkitSlice(t,r):e.mozSlice?e.mozSlice(t,r):e.slice?e.slice(t,r):null}(this.data_,t,r);return null===n?null:new e(n)}return new e(new Uint8Array(this.data_.buffer,t,r-t),!0)},e.getBlob=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(X()){var n=t.map((function(t){return t instanceof e?t.data_:t}));return new e($.apply(null,n))}var o=t.map((function(e){return F(e)?C(P.RAW,e).data:e.data_})),c=0;o.forEach((function(e){c+=e.byteLength}));var l=new Uint8Array(c),h=0;return o.forEach((function(e){for(var i=0;i<e.length;i++)l[h++]=e[i]})),new e(l,!0)},e.prototype.uploadData=function(){return this.data_},e}();function Q(s){var e,p;try{e=JSON.parse(s)}catch(e){return null}return"object"!=typeof(p=e)||Array.isArray(p)?null:e}function ee(path){var e=path.lastIndexOf("/",path.length-2);return-1===e?path:path.slice(e+1)}function te(e,t){return t}var re=function(e,t,r,n){this.server=e,this.local=t||e,this.writable=!!r,this.xform=n||te},ne=null;function ie(){if(ne)return ne;var e=[];e.push(new re("bucket")),e.push(new re("generation")),e.push(new re("metageneration")),e.push(new re("name","fullPath",!0));var t=new re("name");t.xform=function(e,t){return function(e){return!F(e)||e.length<2?e:ee(e)}(t)},e.push(t);var r=new re("size");return r.xform=function(e,t){return void 0!==t?Number(t):t},e.push(r),e.push(new re("timeCreated")),e.push(new re("updated")),e.push(new re("md5Hash",null,!0)),e.push(new re("cacheControl",null,!0)),e.push(new re("contentDisposition",null,!0)),e.push(new re("contentEncoding",null,!0)),e.push(new re("contentLanguage",null,!0)),e.push(new re("contentType",null,!0)),e.push(new re("metadata","customMetadata",!0)),ne=e}function oe(e,t,r){for(var n={type:"file"},o=r.length,i=0;i<o;i++){var c=r[i];n[c.local]=c.xform(n,t[c.server])}return function(e,t){Object.defineProperty(e,"ref",{get:function(){var r=e.bucket,path=e.fullPath,n=new D(r,path);return t._makeStorageReference(n)}})}(n,e),n}function se(e,t,r){var n=Q(t);return null===n?null:oe(e,n,r)}function ae(e,t){for(var r={},n=t.length,i=0;i<n;i++){var o=t[i];o.writable&&(r[o.server]=e[o.local])}return JSON.stringify(r)}function ue(e,t,r){var n=Q(r);return null===n?null:function(e,t,r){var n={prefixes:[],items:[],nextPageToken:r.nextPageToken};if(r.prefixes)for(var o=0,c=r.prefixes;o<c.length;o++){var l=c[o].replace(/\/$/,""),h=e._makeStorageReference(new D(t,l));n.prefixes.push(h)}if(r.items)for(var f=0,d=r.items;f<d.length;f++){var _=d[f];h=e._makeStorageReference(new D(t,_.name)),n.items.push(h)}return n}(e,t,n)}var ce=function(e,t,r,n){this.url=e,this.method=t,this.handler=r,this.timeout=n,this.urlParams={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]};function le(e){if(!e)throw m()}function he(e,t){return function(r,text){var n=se(e,text,t);return le(null!==n),n}}function fe(e,t){return function(r,text){var n=se(e,text,t);return le(null!==n),function(e,t){var r=Q(t);if(null===r)return null;if(!F(r.downloadTokens))return null;var n=r.downloadTokens;if(0===n.length)return null;var o=encodeURIComponent;return n.split(",").map((function(t){var r=e.bucket,path=e.fullPath;return W("/b/"+o(r)+"/o/"+o(path))+V({alt:"media",token:t})}))[0]}(n,text)}}function pe(e){return function(t,r){var n,path,o;return 401===t.getStatus()?n=new _("unauthenticated","User is not authenticated, please authenticate using Firebase Authentication and try again."):402===t.getStatus()?(o=e.bucket,n=new _("quota-exceeded","Quota for bucket '"+o+"' exceeded, please view quota on https://firebase.google.com/pricing/.")):403===t.getStatus()?(path=e.path,n=new _("unauthorized","User does not have permission to access '"+path+"'.")):n=r,n.serverResponse=r.serverResponse,n}}function de(e){var t=pe(e);return function(r,n){var path,o=t(r,n);return 404===r.getStatus()&&(path=e.path,o=new _("object-not-found","Object '"+path+"' does not exist.")),o.serverResponse=n.serverResponse,o}}function _e(e,t,r){var n=W(t.fullServerUrl()),o=e.maxOperationRetryTime,c=new ce(n,"GET",he(e,r),o);return c.errorHandler=de(t),c}function ve(e,t,r,n,o){var c={};t.isRoot?c.prefix="":c.prefix=t.path+"/",r&&r.length>0&&(c.delimiter=r),n&&(c.pageToken=n),o&&(c.maxResults=o);var l=W(t.bucketOnlyServerUrl()),h=e.maxOperationRetryTime,f=new ce(l,"GET",function(e,t){return function(r,text){var n=ue(e,t,text);return le(null!==n),n}}(e,t.bucket),h);return f.urlParams=c,f.errorHandler=pe(t),f}function ge(e,t,r){var n=Object.assign({},r);return n.fullPath=e.path,n.size=t.size(),n.contentType||(n.contentType=function(e,t){return e&&e.contentType||t&&t.type()||"application/octet-stream"}(null,t)),n}var be=function(e,t,r,n){this.current=e,this.total=t,this.finalized=!!r,this.metadata=n||null};function me(e,t){var r=null;try{r=e.getResponseHeader("X-Goog-Upload-Status")}catch(e){le(!1)}return le(!!r&&-1!==(t||["active"]).indexOf(r)),r}var ye=262144;function we(e,t,r,n,o,c,l,h){var f=new be(0,0);if(l?(f.current=l.current,f.total=l.total):(f.current=0,f.total=n.size()),n.size()!==f.total)throw new _("server-file-wrong-size","Server recorded incorrect upload file size, please retry the upload.");var d=f.total-f.current,v=d;o>0&&(v=Math.min(v,o));var m=f.current,y=m+v,R={"X-Goog-Upload-Command":v===d?"upload, finalize":"upload","X-Goog-Upload-Offset":f.current},body=n.slice(m,y);if(null===body)throw w();var O=t.maxUploadRetryTime,k=new ce(r,"POST",(function(e,text){var r,o=me(e,["active","final"]),l=f.current+v,h=n.size();return r="final"===o?he(t,c)(e,text):null,new be(l,h,"final"===o,r)}),O);return k.headers=R,k.body=body.uploadData(),k.progressCallback=h||null,k.errorHandler=pe(e),k}var Re=function(e,t,r){if("function"==typeof e||null!=t||null!=r)this.next=e,this.error=t,this.complete=r;else{var n=e;this.next=n.next,this.error=n.error,this.complete=n.complete}};function Oe(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];Promise.resolve().then((function(){return e.apply(void 0,t)}))}}var ke=function(){function e(e,t,r){var n=this;void 0===r&&(r=null),this._transferred=0,this._needToFetchStatus=!1,this._needToFetchMetadata=!1,this._observers=[],this._error=void 0,this._uploadUrl=void 0,this._request=void 0,this._chunkMultiplier=1,this._resolve=void 0,this._reject=void 0,this._ref=e,this._blob=t,this._metadata=r,this._mappings=ie(),this._resumable=this._shouldDoResumable(this._blob),this._state="running",this._errorHandler=function(e){n._request=void 0,n._chunkMultiplier=1,e._codeEquals("canceled")?(n._needToFetchStatus=!0,n.completeTransitions_()):(n._error=e,n._transition("error"))},this._metadataErrorHandler=function(e){n._request=void 0,e._codeEquals("canceled")?n.completeTransitions_():(n._error=e,n._transition("error"))},this._promise=new Promise((function(e,t){n._resolve=e,n._reject=t,n._start()})),this._promise.then(null,(function(){}))}return e.prototype._makeProgressCallback=function(){var e=this,t=this._transferred;return function(r){return e._updateProgress(t+r)}},e.prototype._shouldDoResumable=function(e){return e.size()>262144},e.prototype._start=function(){"running"===this._state&&void 0===this._request&&(this._resumable?void 0===this._uploadUrl?this._createResumable():this._needToFetchStatus?this._fetchStatus():this._needToFetchMetadata?this._fetchMetadata():this._continueUpload():this._oneShotUpload())},e.prototype._resolveToken=function(e){var t=this;this._ref.storage._getAuthToken().then((function(r){switch(t._state){case"running":e(r);break;case"canceling":t._transition("canceled");break;case"pausing":t._transition("paused")}}))},e.prototype._createResumable=function(){var e=this;this._resolveToken((function(t){var r=function(e,t,r,n,o){var c=t.bucketOnlyServerUrl(),l=ge(t,n,o),h={name:l.fullPath},f=W(c),d={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":n.size(),"X-Goog-Upload-Header-Content-Type":l.contentType,"Content-Type":"application/json; charset=utf-8"},body=ae(l,r),_=e.maxUploadRetryTime,v=new ce(f,"POST",(function(e){var t;me(e);try{t=e.getResponseHeader("X-Goog-Upload-URL")}catch(e){le(!1)}return le(F(t)),t}),_);return v.urlParams=h,v.headers=d,v.body=body,v.errorHandler=pe(t),v}(e._ref.storage,e._ref._location,e._mappings,e._blob,e._metadata),n=e._ref.storage._makeRequest(r,t);e._request=n,n.getPromise().then((function(t){e._request=void 0,e._uploadUrl=t,e._needToFetchStatus=!1,e.completeTransitions_()}),e._errorHandler)}))},e.prototype._fetchStatus=function(){var e=this,t=this._uploadUrl;this._resolveToken((function(r){var n=function(e,t,r,n){var o=e.maxUploadRetryTime,c=new ce(r,"POST",(function(e){var t=me(e,["active","final"]),r=null;try{r=e.getResponseHeader("X-Goog-Upload-Size-Received")}catch(e){le(!1)}r||le(!1);var o=Number(r);return le(!isNaN(o)),new be(o,n.size(),"final"===t)}),o);return c.headers={"X-Goog-Upload-Command":"query"},c.errorHandler=pe(t),c}(e._ref.storage,e._ref._location,t,e._blob),o=e._ref.storage._makeRequest(n,r);e._request=o,o.getPromise().then((function(t){t=t,e._request=void 0,e._updateProgress(t.current),e._needToFetchStatus=!1,t.finalized&&(e._needToFetchMetadata=!0),e.completeTransitions_()}),e._errorHandler)}))},e.prototype._continueUpload=function(){var e=this,t=ye*this._chunkMultiplier,r=new be(this._transferred,this._blob.size()),n=this._uploadUrl;this._resolveToken((function(o){var c;try{c=we(e._ref._location,e._ref.storage,n,e._blob,t,e._mappings,r,e._makeProgressCallback())}catch(t){return e._error=t,void e._transition("error")}var l=e._ref.storage._makeRequest(c,o);e._request=l,l.getPromise().then((function(t){e._increaseMultiplier(),e._request=void 0,e._updateProgress(t.current),t.finalized?(e._metadata=t.metadata,e._transition("success")):e.completeTransitions_()}),e._errorHandler)}))},e.prototype._increaseMultiplier=function(){ye*this._chunkMultiplier<33554432&&(this._chunkMultiplier*=2)},e.prototype._fetchMetadata=function(){var e=this;this._resolveToken((function(t){var r=_e(e._ref.storage,e._ref._location,e._mappings),n=e._ref.storage._makeRequest(r,t);e._request=n,n.getPromise().then((function(t){e._request=void 0,e._metadata=t,e._transition("success")}),e._metadataErrorHandler)}))},e.prototype._oneShotUpload=function(){var e=this;this._resolveToken((function(t){var r=function(e,t,r,n,o){var c=t.bucketOnlyServerUrl(),l={"X-Goog-Upload-Protocol":"multipart"},h=function(){for(var e="",i=0;i<2;i++)e+=Math.random().toString().slice(2);return e}();l["Content-Type"]="multipart/related; boundary="+h;var f=ge(t,n,o),d="--"+h+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+ae(f,r)+"\r\n--"+h+"\r\nContent-Type: "+f.contentType+"\r\n\r\n",_="\r\n--"+h+"--",body=Y.getBlob(d,n,_);if(null===body)throw w();var v={name:f.fullPath},m=W(c),y=e.maxUploadRetryTime,R=new ce(m,"POST",he(e,r),y);return R.urlParams=v,R.headers=l,R.body=body.uploadData(),R.errorHandler=pe(t),R}(e._ref.storage,e._ref._location,e._mappings,e._blob,e._metadata),n=e._ref.storage._makeRequest(r,t);e._request=n,n.getPromise().then((function(t){e._request=void 0,e._metadata=t,e._updateProgress(e._blob.size()),e._transition("success")}),e._errorHandler)}))},e.prototype._updateProgress=function(e){var t=this._transferred;this._transferred=e,this._transferred!==t&&this._notifyObservers()},e.prototype._transition=function(e){if(this._state!==e)switch(e){case"canceling":case"pausing":this._state=e,void 0!==this._request&&this._request.cancel();break;case"running":var t="paused"===this._state;this._state=e,t&&(this._notifyObservers(),this._start());break;case"paused":this._state=e,this._notifyObservers();break;case"canceled":this._error=y(),this._state=e,this._notifyObservers();break;case"error":case"success":this._state=e,this._notifyObservers()}},e.prototype.completeTransitions_=function(){switch(this._state){case"pausing":this._transition("paused");break;case"canceling":this._transition("canceled");break;case"running":this._start()}},Object.defineProperty(e.prototype,"snapshot",{get:function(){var e=N(this._state);return{bytesTransferred:this._transferred,totalBytes:this._blob.size(),state:e,metadata:this._metadata,task:this,ref:this._ref}},enumerable:!1,configurable:!0}),e.prototype.on=function(e,t,r,n){var o=this,c=new Re(t,r,n);return this._addObserver(c),function(){o._removeObserver(c)}},e.prototype.then=function(e,t){return this._promise.then(e,t)},e.prototype.catch=function(e){return this.then(null,e)},e.prototype._addObserver=function(e){this._observers.push(e),this._notifyObserver(e)},e.prototype._removeObserver=function(e){var i=this._observers.indexOf(e);-1!==i&&this._observers.splice(i,1)},e.prototype._notifyObservers=function(){var e=this;this._finishPromise(),this._observers.slice().forEach((function(t){e._notifyObserver(t)}))},e.prototype._finishPromise=function(){if(void 0!==this._resolve){var e=!0;switch(N(this._state)){case z.SUCCESS:Oe(this._resolve.bind(null,this.snapshot))();break;case z.CANCELED:case z.ERROR:Oe(this._reject.bind(null,this._error))();break;default:e=!1}e&&(this._resolve=void 0,this._reject=void 0)}},e.prototype._notifyObserver=function(e){switch(N(this._state)){case z.RUNNING:case z.PAUSED:e.next&&Oe(e.next.bind(e,this.snapshot))();break;case z.SUCCESS:e.complete&&Oe(e.complete.bind(e))();break;case z.CANCELED:case z.ERROR:e.error&&Oe(e.error.bind(e,this._error))();break;default:e.error&&Oe(e.error.bind(e,this._error))()}},e.prototype.resume=function(){var e="paused"===this._state||"pausing"===this._state;return e&&this._transition("running"),e},e.prototype.pause=function(){var e="running"===this._state;return e&&this._transition("pausing"),e},e.prototype.cancel=function(){var e="running"===this._state||"pausing"===this._state;return e&&this._transition("canceling"),e},e}(),Te=function(){function e(e,t){this._service=e,this._location=t instanceof D?t:D.makeFromUrl(t)}return e.prototype.toString=function(){return"gs://"+this._location.bucket+"/"+this._location.path},e.prototype._newRef=function(t,r){return new e(t,r)},Object.defineProperty(e.prototype,"root",{get:function(){var e=new D(this._location.bucket,"");return this._newRef(this._service,e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bucket",{get:function(){return this._location.bucket},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fullPath",{get:function(){return this._location.path},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return ee(this._location.path)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"storage",{get:function(){return this._service},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){var t=function(path){if(0===path.length)return null;var e=path.lastIndexOf("/");return-1===e?"":path.slice(0,e)}(this._location.path);if(null===t)return null;var r=new D(this._location.bucket,t);return new e(this._service,r)},enumerable:!1,configurable:!0}),e.prototype._throwIfRoot=function(e){if(""===this._location.path)throw k(e)},e}();function xe(e){var t={prefixes:[],items:[]};return Pe(e,t).then((function(){return t}))}function Pe(e,t,r){return Object(o.b)(this,void 0,void 0,(function(){var n,c,l;return Object(o.d)(this,(function(o){switch(o.label){case 0:return[4,Se(e,{pageToken:r})];case 1:return n=o.sent(),(c=t.prefixes).push.apply(c,n.prefixes),(l=t.items).push.apply(l,n.items),null==n.nextPageToken?[3,3]:[4,Pe(e,t,n.nextPageToken)];case 2:o.sent(),o.label=3;case 3:return[2]}}))}))}function Se(e,t){return Object(o.b)(this,void 0,void 0,(function(){var r,n,c;return Object(o.d)(this,(function(o){switch(o.label){case 0:return null!=t&&"number"==typeof t.maxResults&&G("options.maxResults",1,1e3,t.maxResults),[4,e.storage._getAuthToken()];case 1:return r=o.sent(),n=t||{},c=ve(e.storage,e._location,"/",n.pageToken,n.maxResults),[2,e.storage._makeRequest(c,r).getPromise()]}}))}))}function Ce(e,t){return Object(o.b)(this,void 0,void 0,(function(){var r,n;return Object(o.d)(this,(function(o){switch(o.label){case 0:return e._throwIfRoot("updateMetadata"),[4,e.storage._getAuthToken()];case 1:return r=o.sent(),n=function(e,t,r,n){var o=W(t.fullServerUrl()),body=ae(r,n),c=e.maxOperationRetryTime,l=new ce(o,"PATCH",he(e,n),c);return l.headers={"Content-Type":"application/json; charset=utf-8"},l.body=body,l.errorHandler=de(t),l}(e.storage,e._location,t,ie()),[2,e.storage._makeRequest(n,r).getPromise()]}}))}))}function Ue(e){return Object(o.b)(this,void 0,void 0,(function(){var t,r;return Object(o.d)(this,(function(n){switch(n.label){case 0:return e._throwIfRoot("getDownloadURL"),[4,e.storage._getAuthToken()];case 1:return t=n.sent(),r=function(e,t,r){var n=W(t.fullServerUrl()),o=e.maxOperationRetryTime,c=new ce(n,"GET",fe(e,r),o);return c.errorHandler=de(t),c}(e.storage,e._location,ie()),[2,e.storage._makeRequest(r,t).getPromise().then((function(e){if(null===e)throw new _("no-download-url","The given file does not have any download URLs.");return e}))]}}))}))}function Ee(e){return Object(o.b)(this,void 0,void 0,(function(){var t,r;return Object(o.d)(this,(function(n){switch(n.label){case 0:return e._throwIfRoot("deleteObject"),[4,e.storage._getAuthToken()];case 1:return t=n.sent(),r=function(e,t){var r=W(t.fullServerUrl()),n=e.maxOperationRetryTime,o=new ce(r,"DELETE",(function(e,t){}),n);return o.successCodes=[200,204],o.errorHandler=de(t),o}(e.storage,e._location),[2,e.storage._makeRequest(r,t).getPromise()]}}))}))}function Ie(e,t){var r=function(path,e){var t=e.split("/").filter((function(component){return component.length>0})).join("/");return 0===path.length?t:path+"/"+t}(e._location.path,t),n=new D(e._location.bucket,r);return new Te(e.storage,n)}function Ae(path){return/^[A-Za-z]+:\/\//.test(path)}function je(e,path){if(e instanceof Ne){var t=e;if(null==t._bucket)throw new _("no-default-bucket","No default bucket found. Did you set the 'storageBucket' property when initializing the app?");var r=new Te(t,t._bucket);return null!=path?je(r,path):r}if(void 0!==path){if(path.includes(".."))throw R('`path` param cannot contain ".."');return Ie(e,path)}return e}function ze(e,t){if(t&&Ae(t)){if(e instanceof Ne)return new Te(e,t);throw R("To use ref(service, url), the first argument must be a Storage instance.")}return je(e,t)}var Ne=function(){function e(e,t,r,n,o){var c,l;this.app=e,this._authProvider=t,this._pool=r,this._url=n,this._firebaseVersion=o,this._bucket=null,this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,this._bucket=null!=n?D.makeFromBucketSpec(n):(c=this.app.options,null==(l=null==c?void 0:c.storageBucket)?null:D.makeFromBucketSpec(l))}return Object.defineProperty(e.prototype,"maxUploadRetryTime",{get:function(){return this._maxUploadRetryTime},set:function(time){G("time",0,Number.POSITIVE_INFINITY,time),this._maxUploadRetryTime=time},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxOperationRetryTime",{get:function(){return this._maxOperationRetryTime},set:function(time){G("time",0,Number.POSITIVE_INFINITY,time),this._maxOperationRetryTime=time},enumerable:!1,configurable:!0}),e.prototype._getAuthToken=function(){return Object(o.b)(this,void 0,void 0,(function(){var e,t;return Object(o.d)(this,(function(r){switch(r.label){case 0:return(e=this._authProvider.getImmediate({optional:!0}))?[4,e.getToken()]:[3,2];case 1:if(null!==(t=r.sent()))return[2,t.accessToken];r.label=2;case 2:return[2,null]}}))}))},e.prototype._delete=function(){return this._deleted=!0,this._requests.forEach((function(e){return e.cancel()})),this._requests.clear(),Promise.resolve()},e.prototype._makeStorageReference=function(e){return new Te(this,e)},e.prototype._makeRequest=function(e,t){var r=this;if(this._deleted)return new B(O());var n=function(e,t,r,n,o){var c=V(e.urlParams),l=e.url+c,h=Object.assign({},e.headers);return function(e,t){t&&(e["X-Firebase-GMPID"]=t)}(h,t),function(e,t){null!==t&&t.length>0&&(e.Authorization="Firebase "+t)}(h,r),function(e,t){e["X-Firebase-Storage-Version"]="webjs/"+(null!=t?t:"AppManager")}(h,o),new K(l,e.method,h,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,n)}(e,this._appId,t,this._pool,this._firebaseVersion);return this._requests.add(n),n.getPromise().then((function(){return r._requests.delete(n)}),(function(){return r._requests.delete(n)})),n},e}();function Le(e,data,t){return function(e,data,t){return e._throwIfRoot("uploadBytesResumable"),new ke(e,new Y(data),t)}(e,data,t)}function Me(e){return function(e){return Object(o.b)(this,void 0,void 0,(function(){var t,r;return Object(o.d)(this,(function(n){switch(n.label){case 0:return e._throwIfRoot("getMetadata"),[4,e.storage._getAuthToken()];case 1:return t=n.sent(),r=_e(e.storage,e._location,ie()),[2,e.storage._makeRequest(r,t).getPromise()]}}))}))}(e)}function qe(e,t){return ze(e,t)}var De,Be,Fe=function(){function e(e,t,r){this._delegate=e,this.task=t,this.ref=r}return Object.defineProperty(e.prototype,"bytesTransferred",{get:function(){return this._delegate.bytesTransferred},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"metadata",{get:function(){return this._delegate.metadata},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._delegate.state},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"totalBytes",{get:function(){return this._delegate.totalBytes},enumerable:!1,configurable:!0}),e}(),He=function(){function e(e,t){this._delegate=e,this._ref=t,this.cancel=this._delegate.cancel.bind(this._delegate),this.catch=this._delegate.catch.bind(this._delegate),this.pause=this._delegate.pause.bind(this._delegate),this.resume=this._delegate.resume.bind(this._delegate)}return Object.defineProperty(e.prototype,"snapshot",{get:function(){return new Fe(this._delegate.snapshot,this,this._ref)},enumerable:!1,configurable:!0}),e.prototype.then=function(e,t){var r=this;return this._delegate.then((function(t){if(e)return e(new Fe(t,r,r._ref))}),t)},e.prototype.on=function(e,t,r,n){var o=this,c=void 0;return t&&(c="function"==typeof t?function(e){return t(new Fe(e,o,o._ref))}:{next:t.next?function(e){return t.next(new Fe(e,o,o._ref))}:void 0,complete:t.complete||void 0,error:t.error||void 0}),this._delegate.on(e,c,r||void 0,n||void 0)},e}(),Xe=function(){function e(e,t){this._delegate=e,this._service=t}return Object.defineProperty(e.prototype,"prefixes",{get:function(){var e=this;return this._delegate.prefixes.map((function(t){return new Ge(t,e._service)}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){var e=this;return this._delegate.items.map((function(t){return new Ge(t,e._service)}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextPageToken",{get:function(){return this._delegate.nextPageToken||null},enumerable:!1,configurable:!0}),e}(),Ge=function(){function e(e,t){this._delegate=e,this.storage=t}return Object.defineProperty(e.prototype,"name",{get:function(){return this._delegate.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bucket",{get:function(){return this._delegate.bucket},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fullPath",{get:function(){return this._delegate.fullPath},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return this._delegate.toString()},e.prototype.child=function(t){return new e(function(e,t){return Ie(e,t)}(this._delegate,t),this.storage)},Object.defineProperty(e.prototype,"root",{get:function(){return new e(this._delegate.root,this.storage)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){var t=this._delegate.parent;return null==t?null:new e(t,this.storage)},enumerable:!1,configurable:!0}),e.prototype.put=function(data,e){return this._throwIfRoot("put"),new He(Le(this._delegate,data,e),this)},e.prototype.putString=function(e,t,r){void 0===t&&(t=P.RAW),this._throwIfRoot("putString");var data=C(t,e),n=Object(o.a)({},r);return null==n.contentType&&null!=data.contentType&&(n.contentType=data.contentType),new He(new ke(this._delegate,new Y(data.data,!0),n),this)},e.prototype.listAll=function(){var e,t=this;return(e=this._delegate,xe(e)).then((function(e){return new Xe(e,t.storage)}))},e.prototype.list=function(e){var t=this;return function(e,t){return Se(e,t)}(this._delegate,e||void 0).then((function(e){return new Xe(e,t.storage)}))},e.prototype.getMetadata=function(){return Me(this._delegate)},e.prototype.updateMetadata=function(e){return function(e,t){return Ce(e,t)}(this._delegate,e)},e.prototype.getDownloadURL=function(){return Ue(this._delegate)},e.prototype.delete=function(){return this._throwIfRoot("delete"),Ee(this._delegate)},e.prototype._throwIfRoot=function(e){if(""===this._delegate._location.path)throw k(e)},e}(),We=function(){function e(e,t){var r=this;this.app=e,this._delegate=t,this.INTERNAL={delete:function(){return r._delegate._delete()}}}return Object.defineProperty(e.prototype,"maxOperationRetryTime",{get:function(){return this._delegate.maxOperationRetryTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxUploadRetryTime",{get:function(){return this._delegate.maxUploadRetryTime},enumerable:!1,configurable:!0}),e.prototype.ref=function(path){if(Ae(path))throw R("ref() expected a child path but got a URL, use refFromURL instead.");return new Ge(qe(this._delegate,path),this)},e.prototype.refFromURL=function(e){if(!Ae(e))throw R("refFromURL() expected a full URL but got a child path, use ref() instead.");try{D.makeFromUrl(e)}catch(e){throw R("refFromUrl() expected a valid full URL but got an invalid one.")}return new Ge(qe(this._delegate,e),this)},e.prototype.setMaxUploadRetryTime=function(time){this._delegate.maxUploadRetryTime=time},e.prototype.setMaxOperationRetryTime=function(time){this._delegate.maxOperationRetryTime=time},e}();function Ve(e,t){var r=t.instanceIdentifier,o=e.getProvider("app").getImmediate(),c=e.getProvider("auth-internal");return new We(o,new Ne(o,c,new M,r,n.a.SDK_VERSION))}De=n.a,Be={TaskState:z,TaskEvent:j,StringFormat:P,Storage:Ne,Reference:Ge},De.INTERNAL.registerComponent(new l("storage",Ve,"PUBLIC").setServiceProps(Be).setMultipleInstances(!0)),De.registerVersion("@firebase/storage","0.4.5")}}]);