/*! For license information please see core.js.LICENSE.txt */
"use strict";(self.webpackChunkfirebase_r=self.webpackChunkfirebase_r||[]).push([[321],{26:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(81),s=n.n(r),o=n(645),i=n.n(o)()(s());i.push([e.id,".fireblaze__hidden{\n  opacity: 0;\n}",""]);const a=i},645:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,s,o){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(r)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(i[c]=!0)}for(var u=0;u<e.length;u++){var l=[].concat(e[u]);r&&i[l[0]]||(void 0!==o&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=o),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),s&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=s):l[4]="".concat(s)),t.push(l))}},t}},81:e=>{e.exports=function(e){return e[1]}},379:e=>{var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var o={},i=[],a=0;a<e.length;a++){var c=e[a],u=r.base?c[0]+r.base:c[0],l=o[u]||0,h="".concat(u," ").concat(l);o[u]=l+1;var d=n(h),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)t[d].references++,t[d].updater(p);else{var f=s(p,r);r.byIndex=a,t.splice(a,0,{identifier:h,updater:f,references:1})}i.push(h)}return i}function s(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,s){var o=r(e=e||[],s=s||{});return function(e){e=e||[];for(var i=0;i<o.length;i++){var a=n(o[i]);t[a].references--}for(var c=r(e,s),u=0;u<o.length;u++){var l=n(o[u]);0===t[l].references&&(t[l].updater(),t.splice(l,1))}o=c}}},569:e=>{var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},216:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},795:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var s=void 0!==n.layer;s&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,s&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},162:(e,t,n)=>{n(235);var r=n(118),s=n(238);(0,s.registerVersion)("firebase","9.18.0","app");var o=n(379),i=n.n(o),a=n(795),c=n.n(a),u=n(569),l=n.n(u),h=n(565),d=n.n(h),p=n(216),f=n.n(p),_=n(589),g=n.n(_),m=n(26),b={};b.styleTagTransform=g(),b.setAttributes=d(),b.insert=l().bind(null,"head"),b.domAPI=c(),b.insertStyleElement=f(),i()(m.Z,b),m.Z&&m.Z.locals&&m.Z.locals;var w=n(774),T=n(444),R=n(463);const v="firebasestorage.googleapis.com",y="storageBucket";class k extends T.ZR{constructor(e,t,n=0){super(C(e),`Firebase Storage: ${t} (${C(e)})`),this.status_=n,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,k.prototype)}get status(){return this.status_}set status(e){this.status_=e}_codeEquals(e){return C(e)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message=`${this._baseMessage}\n${this.customData.serverResponse}`:this.message=this._baseMessage}}var E,A;function C(e){return"storage/"+e}function O(){return new k(E.UNKNOWN,"An unknown error occurred, please check the error payload for server response.")}function I(e){return new k(E.INVALID_ARGUMENT,e)}function U(){return new k(E.APP_DELETED,"The Firebase app was deleted.")}function x(e,t){return new k(E.INVALID_FORMAT,"String does not match format '"+e+"': "+t)}function N(e){throw new k(E.INTERNAL_ERROR,"Internal error: "+e)}!function(e){e.UNKNOWN="unknown",e.OBJECT_NOT_FOUND="object-not-found",e.BUCKET_NOT_FOUND="bucket-not-found",e.PROJECT_NOT_FOUND="project-not-found",e.QUOTA_EXCEEDED="quota-exceeded",e.UNAUTHENTICATED="unauthenticated",e.UNAUTHORIZED="unauthorized",e.UNAUTHORIZED_APP="unauthorized-app",e.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",e.INVALID_CHECKSUM="invalid-checksum",e.CANCELED="canceled",e.INVALID_EVENT_NAME="invalid-event-name",e.INVALID_URL="invalid-url",e.INVALID_DEFAULT_BUCKET="invalid-default-bucket",e.NO_DEFAULT_BUCKET="no-default-bucket",e.CANNOT_SLICE_BLOB="cannot-slice-blob",e.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",e.NO_DOWNLOAD_URL="no-download-url",e.INVALID_ARGUMENT="invalid-argument",e.INVALID_ARGUMENT_COUNT="invalid-argument-count",e.APP_DELETED="app-deleted",e.INVALID_ROOT_OPERATION="invalid-root-operation",e.INVALID_FORMAT="invalid-format",e.INTERNAL_ERROR="internal-error",e.UNSUPPORTED_ENVIRONMENT="unsupported-environment"}(E||(E={}));class S{constructor(e,t){this.bucket=e,this.path_=t}get path(){return this.path_}get isRoot(){return 0===this.path.length}fullServerUrl(){const e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(e,t){let n;try{n=S.makeFromUrl(e,t)}catch(t){return new S(e,"")}if(""===n.path)return n;throw r=e,new k(E.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+r+"'.");var r}static makeFromUrl(e,t){let n=null;const r="([A-Za-z0-9.\\-_]+)",s=new RegExp("^gs://"+r+"(/(.*))?$","i");function o(e){e.path_=decodeURIComponent(e.path)}const i=t.replace(/[.]/g,"\\."),a=[{regex:s,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?://${i}/v[A-Za-z0-9_]+/b/${r}/o(/([^?#]*).*)?$`,"i"),indices:{bucket:1,path:3},postModify:o},{regex:new RegExp(`^https?://${t===v?"(?:storage.googleapis.com|storage.cloud.google.com)":t}/${r}/([^?#]*)`,"i"),indices:{bucket:1,path:2},postModify:o}];for(let t=0;t<a.length;t++){const r=a[t],s=r.regex.exec(e);if(s){const e=s[r.indices.bucket];let t=s[r.indices.path];t||(t=""),n=new S(e,t),r.postModify(n);break}}if(null==n)throw function(e){return new k(E.INVALID_URL,"Invalid URL '"+e+"'.")}(e);return n}}class D{constructor(e){this.promise_=Promise.reject(e)}getPromise(){return this.promise_}cancel(e=!1){}}function P(e){return"string"==typeof e||e instanceof String}function L(e){return M()&&e instanceof Blob}function M(){return"undefined"!=typeof Blob&&!(0,T.UG)()}function H(e,t,n,r){if(r<t)throw I(`Invalid value for '${e}'. Expected ${t} or greater.`);if(r>n)throw I(`Invalid value for '${e}'. Expected ${n} or less.`)}function B(e,t,n){let r=t;return null==n&&(r=`https://${t}`),`${n}://${r}/v0${e}`}function z(e){const t=encodeURIComponent;let n="?";for(const r in e)e.hasOwnProperty(r)&&(n=n+(t(r)+"=")+t(e[r])+"&");return n=n.slice(0,-1),n}!function(e){e[e.NO_ERROR=0]="NO_ERROR",e[e.NETWORK_ERROR=1]="NETWORK_ERROR",e[e.ABORT=2]="ABORT"}(A||(A={}));class F{constructor(e,t,n,r,s,o,i,a,c,u,l,h=!0){this.url_=e,this.method_=t,this.headers_=n,this.body_=r,this.successCodes_=s,this.additionalRetryCodes_=o,this.callback_=i,this.errorCallback_=a,this.timeout_=c,this.progressCallback_=u,this.connectionFactory_=l,this.retry=h,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise(((e,t)=>{this.resolve_=e,this.reject_=t,this.start_()}))}start_(){const e=(e,t)=>{const n=this.resolve_,r=this.reject_,s=t.connection;if(t.wasSuccessCode)try{const e=this.callback_(s,s.getResponse());void 0!==e?n(e):n()}catch(e){r(e)}else if(null!==s){const e=O();e.serverResponse=s.getErrorText(),this.errorCallback_?r(this.errorCallback_(s,e)):r(e)}else t.canceled?r(this.appDelete_?U():new k(E.CANCELED,"User canceled the upload/download.")):r(new k(E.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again."))};this.canceled_?e(0,new V(!1,null,!0)):this.backoffId_=function(e,t,n){let r=1,s=null,o=null,i=!1,a=0;function c(){return 2===a}let u=!1;function l(...e){u||(u=!0,t.apply(null,e))}function h(t){s=setTimeout((()=>{s=null,e(p,c())}),t)}function d(){o&&clearTimeout(o)}function p(e,...t){if(u)return void d();if(e)return d(),void l.call(null,e,...t);if(c()||i)return d(),void l.call(null,e,...t);let n;r<64&&(r*=2),1===a?(a=2,n=0):n=1e3*(r+Math.random()),h(n)}let f=!1;function _(e){f||(f=!0,d(),u||(null!==s?(e||(a=2),clearTimeout(s),h(0)):e||(a=1)))}return h(0),o=setTimeout((()=>{i=!0,_(!0)}),n),_}(((e,t)=>{if(t)return void e(!1,new V(!1,null,!0));const n=this.connectionFactory_();this.pendingConnection_=n;const r=e=>{const t=e.loaded,n=e.lengthComputable?e.total:-1;null!==this.progressCallback_&&this.progressCallback_(t,n)};null!==this.progressCallback_&&n.addUploadProgressListener(r),n.send(this.url_,this.method_,this.body_,this.headers_).then((()=>{null!==this.progressCallback_&&n.removeUploadProgressListener(r),this.pendingConnection_=null;const t=n.getErrorCode()===A.NO_ERROR,s=n.getStatus();if(!t||function(e,t){const n=e>=500&&e<600,r=-1!==[408,429].indexOf(e),s=-1!==t.indexOf(e);return n||r||s}(s,this.additionalRetryCodes_)&&this.retry){const t=n.getErrorCode()===A.ABORT;return void e(!1,new V(!1,null,t))}const o=-1!==this.successCodes_.indexOf(s);e(!0,new V(o,n))}))}),e,this.timeout_)}getPromise(){return this.promise_}cancel(e){this.canceled_=!0,this.appDelete_=e||!1,null!==this.backoffId_&&(0,this.backoffId_)(!1),null!==this.pendingConnection_&&this.pendingConnection_.abort()}}class V{constructor(e,t,n){this.wasSuccessCode=e,this.connection=t,this.canceled=!!n}}function j(){return"undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0}function q(...e){const t=j();if(void 0!==t){const n=new t;for(let t=0;t<e.length;t++)n.append(e[t]);return n.getBlob()}if(M())return new Blob(e);throw new k(E.UNSUPPORTED_ENVIRONMENT,"This browser doesn't seem to support creating Blobs")}const W={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"};class K{constructor(e,t){this.data=e,this.contentType=t||null}}function Z(e,t){switch(e){case W.RAW:return new K(X(t));case W.BASE64:case W.BASE64URL:return new K(G(e,t));case W.DATA_URL:return new K(function(e){const t=new J(e);return t.base64?G(W.BASE64,t.rest):function(e){let t;try{t=decodeURIComponent(e)}catch(e){throw x(W.DATA_URL,"Malformed data URL.")}return X(t)}(t.rest)}(t),new J(t).contentType)}throw O()}function X(e){const t=[];for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r<=127?t.push(r):r<=2047?t.push(192|r>>6,128|63&r):55296==(64512&r)?n<e.length-1&&56320==(64512&e.charCodeAt(n+1))?(r=65536|(1023&r)<<10|1023&e.charCodeAt(++n),t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r)):t.push(239,191,189):56320==(64512&r)?t.push(239,191,189):t.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(t)}function G(e,t){switch(e){case W.BASE64:{const n=-1!==t.indexOf("-"),r=-1!==t.indexOf("_");if(n||r)throw x(e,"Invalid character '"+(n?"-":"_")+"' found: is it base64url encoded?");break}case W.BASE64URL:{const n=-1!==t.indexOf("+"),r=-1!==t.indexOf("/");if(n||r)throw x(e,"Invalid character '"+(n?"+":"/")+"' found: is it base64 encoded?");t=t.replace(/-/g,"+").replace(/_/g,"/");break}}let n;try{n=function(e){if("undefined"==typeof atob)throw new k(E.UNSUPPORTED_ENVIRONMENT,"base-64 is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.");return atob(e)}(t)}catch(t){if(t.message.includes("polyfill"))throw t;throw x(e,"Invalid character found")}const r=new Uint8Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);return r}class J{constructor(e){this.base64=!1,this.contentType=null;const t=e.match(/^data:([^,]+)?,/);if(null===t)throw x(W.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");const n=t[1]||null;var r,s;null!=n&&(this.base64=(s=";base64",(r=n).length>=s.length&&r.substring(r.length-s.length)===s),this.contentType=this.base64?n.substring(0,n.length-";base64".length):n),this.rest=e.substring(e.indexOf(",")+1)}}class Y{constructor(e,t){let n=0,r="";L(e)?(this.data_=e,n=e.size,r=e.type):e instanceof ArrayBuffer?(t?this.data_=new Uint8Array(e):(this.data_=new Uint8Array(e.byteLength),this.data_.set(new Uint8Array(e))),n=this.data_.length):e instanceof Uint8Array&&(t?this.data_=e:(this.data_=new Uint8Array(e.length),this.data_.set(e)),n=e.length),this.size_=n,this.type_=r}size(){return this.size_}type(){return this.type_}slice(e,t){if(L(this.data_)){const o=(n=this.data_,r=e,s=t,n.webkitSlice?n.webkitSlice(r,s):n.mozSlice?n.mozSlice(r,s):n.slice?n.slice(r,s):null);return null===o?null:new Y(o)}var n,r,s;{const n=new Uint8Array(this.data_.buffer,e,t-e);return new Y(n,!0)}}static getBlob(...e){if(M()){const t=e.map((e=>e instanceof Y?e.data_:e));return new Y(q.apply(null,t))}{const t=e.map((e=>P(e)?Z(W.RAW,e).data:e.data_));let n=0;t.forEach((e=>{n+=e.byteLength}));const r=new Uint8Array(n);let s=0;return t.forEach((e=>{for(let t=0;t<e.length;t++)r[s++]=e[t]})),new Y(r,!0)}}uploadData(){return this.data_}}function Q(e){let t;try{t=JSON.parse(e)}catch(e){return null}return"object"!=typeof(n=t)||Array.isArray(n)?null:t;var n}function ee(e){const t=e.lastIndexOf("/",e.length-2);return-1===t?e:e.slice(t+1)}function te(e,t){return t}class ne{constructor(e,t,n,r){this.server=e,this.local=t||e,this.writable=!!n,this.xform=r||te}}let re=null;function se(){if(re)return re;const e=[];e.push(new ne("bucket")),e.push(new ne("generation")),e.push(new ne("metageneration")),e.push(new ne("name","fullPath",!0));const t=new ne("name");t.xform=function(e,t){return function(e){return!P(e)||e.length<2?e:ee(e)}(t)},e.push(t);const n=new ne("size");return n.xform=function(e,t){return void 0!==t?Number(t):t},e.push(n),e.push(new ne("timeCreated")),e.push(new ne("updated")),e.push(new ne("md5Hash",null,!0)),e.push(new ne("cacheControl",null,!0)),e.push(new ne("contentDisposition",null,!0)),e.push(new ne("contentEncoding",null,!0)),e.push(new ne("contentLanguage",null,!0)),e.push(new ne("contentType",null,!0)),e.push(new ne("metadata","customMetadata",!0)),re=e,re}function oe(e,t,n){const r=Q(t);return null===r?null:function(e,t,n){const r={type:"file"},s=n.length;for(let e=0;e<s;e++){const s=n[e];r[s.local]=s.xform(r,t[s.server])}return function(e,t){Object.defineProperty(e,"ref",{get:function(){const n=e.bucket,r=e.fullPath,s=new S(n,r);return t._makeStorageReference(s)}})}(r,e),r}(e,r,n)}const ie="prefixes",ae="items";class ce{constructor(e,t,n,r){this.url=e,this.method=t,this.handler=n,this.timeout=r,this.urlParams={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}}function ue(e){if(!e)throw O()}function le(e,t){return function(n,r){const s=oe(e,r,t);return ue(null!==s),s}}function he(e){return function(t,n){let r;var s,o;return 401===t.getStatus()?r=t.getErrorText().includes("Firebase App Check token is invalid")?new k(E.UNAUTHORIZED_APP,"This app does not have permission to access Firebase Storage on this project."):new k(E.UNAUTHENTICATED,"User is not authenticated, please authenticate using Firebase Authentication and try again."):402===t.getStatus()?(o=e.bucket,r=new k(E.QUOTA_EXCEEDED,"Quota for bucket '"+o+"' exceeded, please view quota on https://firebase.google.com/pricing/.")):403===t.getStatus()?(s=e.path,r=new k(E.UNAUTHORIZED,"User does not have permission to access '"+s+"'.")):r=n,r.status=t.getStatus(),r.serverResponse=n.serverResponse,r}}function de(e){const t=he(e);return function(n,r){let s=t(n,r);var o;return 404===n.getStatus()&&(o=e.path,s=new k(E.OBJECT_NOT_FOUND,"Object '"+o+"' does not exist.")),s.serverResponse=r.serverResponse,s}}function pe(e,t,n,r,s){const o={};t.isRoot?o.prefix="":o.prefix=t.path+"/",n&&n.length>0&&(o.delimiter=n),r&&(o.pageToken=r),s&&(o.maxResults=s);const i=B(t.bucketOnlyServerUrl(),e.host,e._protocol),a=e.maxOperationRetryTime,c=new ce(i,"GET",function(e,t){return function(n,r){const s=function(e,t,n){const r=Q(n);return null===r?null:function(e,t,n){const r={prefixes:[],items:[],nextPageToken:n.nextPageToken};if(n[ie])for(const s of n[ie]){const n=s.replace(/\/$/,""),o=e._makeStorageReference(new S(t,n));r.prefixes.push(o)}if(n[ae])for(const s of n[ae]){const n=e._makeStorageReference(new S(t,s.name));r.items.push(n)}return r}(e,t,r)}(e,t,r);return ue(null!==s),s}}(e,t.bucket),a);return c.urlParams=o,c.errorHandler=he(t),c}function fe(e,t,n,r,s){const o=t.bucketOnlyServerUrl(),i={"X-Goog-Upload-Protocol":"multipart"},a=function(){let e="";for(let t=0;t<2;t++)e+=Math.random().toString().slice(2);return e}();i["Content-Type"]="multipart/related; boundary="+a;const c=function(e,t,n){const r=Object.assign({},n);return r.fullPath=e.path,r.size=t.size(),r.contentType||(r.contentType=function(e,t){return t&&t.type()||"application/octet-stream"}(0,t)),r}(t,r,s),u="--"+a+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+function(e,t){const n={},r=t.length;for(let s=0;s<r;s++){const r=t[s];r.writable&&(n[r.server]=e[r.local])}return JSON.stringify(n)}(c,n)+"\r\n--"+a+"\r\nContent-Type: "+c.contentType+"\r\n\r\n",l="\r\n--"+a+"--",h=Y.getBlob(u,r,l);if(null===h)throw new k(E.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.");const d={name:c.fullPath},p=B(o,e.host,e._protocol),f=e.maxUploadRetryTime,_=new ce(p,"POST",le(e,n),f);return _.urlParams=d,_.headers=i,_.body=h.uploadData(),_.errorHandler=he(t),_}let _e=null;class ge{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=A.NO_ERROR,this.sendPromise_=new Promise((e=>{this.xhr_.addEventListener("abort",(()=>{this.errorCode_=A.ABORT,e()})),this.xhr_.addEventListener("error",(()=>{this.errorCode_=A.NETWORK_ERROR,e()})),this.xhr_.addEventListener("load",(()=>{e()}))}))}send(e,t,n,r){if(this.sent_)throw N("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(t,e,!0),void 0!==r)for(const e in r)r.hasOwnProperty(e)&&this.xhr_.setRequestHeader(e,r[e].toString());return void 0!==n?this.xhr_.send(n):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw N("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw N("cannot .getStatus() before sending");try{return this.xhr_.status}catch(e){return-1}}getResponse(){if(!this.sent_)throw N("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw N("cannot .getErrorText() before sending");return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader(e){return this.xhr_.getResponseHeader(e)}addUploadProgressListener(e){null!=this.xhr_.upload&&this.xhr_.upload.addEventListener("progress",e)}removeUploadProgressListener(e){null!=this.xhr_.upload&&this.xhr_.upload.removeEventListener("progress",e)}}class me extends ge{initXhr(){this.xhr_.responseType="text"}}function be(){return _e?_e():new me}class we{constructor(e,t){this._service=e,this._location=t instanceof S?t:S.makeFromUrl(t,e.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(e,t){return new we(e,t)}get root(){const e=new S(this._location.bucket,"");return this._newRef(this._service,e)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return ee(this._location.path)}get storage(){return this._service}get parent(){const e=function(e){if(0===e.length)return null;const t=e.lastIndexOf("/");return-1===t?"":e.slice(0,t)}(this._location.path);if(null===e)return null;const t=new S(this._location.bucket,e);return new we(this._service,t)}_throwIfRoot(e){if(""===this._location.path)throw function(e){return new k(E.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').")}(e)}}function Te(e){const t={prefixes:[],items:[]};return Re(e,t).then((()=>t))}async function Re(e,t,n){const r={pageToken:n},s=await function(e,t){null!=t&&"number"==typeof t.maxResults&&H("options.maxResults",1,1e3,t.maxResults);const n=t||{},r=pe(e.storage,e._location,"/",n.pageToken,n.maxResults);return e.storage.makeRequestWithTokens(r,be)}(e,r);t.prefixes.push(...s.prefixes),t.items.push(...s.items),null!=s.nextPageToken&&await Re(e,t,s.nextPageToken)}function ve(e){e._throwIfRoot("getDownloadURL");const t=function(e,t,n){const r=B(t.fullServerUrl(),e.host,e._protocol),s=e.maxOperationRetryTime,o=new ce(r,"GET",function(e,t){return function(n,r){const s=oe(e,r,t);return ue(null!==s),function(e,t,n,r){const s=Q(t);if(null===s)return null;if(!P(s.downloadTokens))return null;const o=s.downloadTokens;if(0===o.length)return null;const i=encodeURIComponent;return o.split(",").map((t=>{const s=e.bucket,o=e.fullPath;return B("/b/"+i(s)+"/o/"+i(o),n,r)+z({alt:"media",token:t})}))[0]}(s,r,e.host,e._protocol)}}(e,n),s);return o.errorHandler=de(t),o}(e.storage,e._location,se());return e.storage.makeRequestWithTokens(t,be).then((e=>{if(null===e)throw new k(E.NO_DOWNLOAD_URL,"The given file does not have any download URLs.");return e}))}function ye(e,t){if(e instanceof Ee){const n=e;if(null==n._bucket)throw new k(E.NO_DEFAULT_BUCKET,"No default bucket found. Did you set the '"+y+"' property when initializing the app?");const r=new we(n,n._bucket);return null!=t?ye(r,t):r}return void 0!==t?function(e,t){const n=function(e,t){const n=t.split("/").filter((e=>e.length>0)).join("/");return 0===e.length?n:e+"/"+n}(e._location.path,t),r=new S(e._location.bucket,n);return new we(e.storage,r)}(e,t):e}function ke(e,t){const n=null==t?void 0:t[y];return null==n?null:S.makeFromBucketSpec(n,e)}class Ee{constructor(e,t,n,r,s){this.app=e,this._authProvider=t,this._appCheckProvider=n,this._url=r,this._firebaseVersion=s,this._bucket=null,this._host=v,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,this._bucket=null!=r?S.makeFromBucketSpec(r,this._host):ke(this._host,this.app.options)}get host(){return this._host}set host(e){this._host=e,null!=this._url?this._bucket=S.makeFromBucketSpec(this._url,e):this._bucket=ke(e,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(e){H("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(e){H("time",0,Number.POSITIVE_INFINITY,e),this._maxOperationRetryTime=e}async _getAuthToken(){if(this._overrideAuthToken)return this._overrideAuthToken;const e=this._authProvider.getImmediate({optional:!0});if(e){const t=await e.getToken();if(null!==t)return t.accessToken}return null}async _getAppCheckToken(){const e=this._appCheckProvider.getImmediate({optional:!0});return e?(await e.getToken()).token:null}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEach((e=>e.cancel())),this._requests.clear()),Promise.resolve()}_makeStorageReference(e){return new we(this,e)}_makeRequest(e,t,n,r,s=!0){if(this._deleted)return new D(U());{const o=function(e,t,n,r,s,o,i=!0){const a=z(e.urlParams),c=e.url+a,u=Object.assign({},e.headers);return function(e,t){t&&(e["X-Firebase-GMPID"]=t)}(u,t),function(e,t){null!==t&&t.length>0&&(e.Authorization="Firebase "+t)}(u,n),function(e,t){e["X-Firebase-Storage-Version"]="webjs/"+(null!=t?t:"AppManager")}(u,o),function(e,t){null!==t&&(e["X-Firebase-AppCheck"]=t)}(u,r),new F(c,e.method,u,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,s,i)}(e,this._appId,n,r,t,this._firebaseVersion,s);return this._requests.add(o),o.getPromise().then((()=>this._requests.delete(o)),(()=>this._requests.delete(o))),o}}async makeRequestWithTokens(e,t){const[n,r]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(e,t,n,r).getPromise()}}const Ae="@firebase/storage",Ce="0.11.2",Oe="storage";function Ie(e,t,n,r){return function(e,t,n=W.RAW,r){e._throwIfRoot("uploadString");const s=Z(n,t),o=Object.assign({},r);return null==o.contentType&&null!=s.contentType&&(o.contentType=s.contentType),function(e,t,n){e._throwIfRoot("uploadBytes");const r=fe(e.storage,e._location,se(),new Y(t,!0),n);return e.storage.makeRequestWithTokens(r,be).then((t=>({metadata:t,ref:e})))}(e,s.data,o)}(e=(0,T.m9)(e),t,n,r)}function Ue(e){return function(e){e._throwIfRoot("getMetadata");const t=function(e,t,n){const r=B(t.fullServerUrl(),e.host,e._protocol),s=e.maxOperationRetryTime,o=new ce(r,"GET",le(e,n),s);return o.errorHandler=de(t),o}(e.storage,e._location,se());return e.storage.makeRequestWithTokens(t,be)}(e=(0,T.m9)(e))}function xe(e,t){return function(e,t){if(t&&/^[A-Za-z]+:\/\//.test(t)){if(e instanceof Ee)return new we(e,t);throw I("To use ref(service, url), the first argument must be a Storage instance.")}return ye(e,t)}(e=(0,T.m9)(e),t)}let Ne;(0,s._registerComponent)(new R.wA(Oe,(function(e,{instanceIdentifier:t}){const n=e.getProvider("app").getImmediate(),r=e.getProvider("auth-internal"),o=e.getProvider("app-check-internal");return new Ee(n,r,o,t,s.SDK_VERSION)}),"PUBLIC").setMultipleInstances(!0)),(0,s.registerVersion)(Ae,Ce,""),(0,s.registerVersion)(Ae,Ce,"esm2017");const Se=e=>{let t=xe(Ne);Shiny.addCustomMessageHandler("fireblaze-storage-ref",(function(n){Ne||(Ne=function(e=(0,s.getApp)(),t){e=(0,T.m9)(e);const n=(0,s._getProvider)(e,Oe).getImmediate({identifier:t}),r=(0,T.P0)("storage");return r&&function(e,t,n,r={}){!function(e,t,n,r={}){e.host=`${t}:${n}`,e._protocol="http";const{mockUserToken:s}=r;s&&(e._overrideAuthToken="string"==typeof s?s:(0,T.Sg)(s,e.app.options.projectId))}(e,t,n,r)}(n,...r),n}(e)),t=n.path?xe(Ne,n.path):xe(Ne)})),Shiny.addCustomMessageHandler("fireblaze-upload-file",(function(e){Ie(t,e.encoded,"data_url").then((t=>{if(!e.response)return;let n={response:t.metadata,success:!0};(0,w.T1)(e.response,n,e.ns)})).catch((t=>{e.response&&(0,w.T1)(e.response,{success:!1,response:t},e.ns)}))})),Shiny.addCustomMessageHandler("fireblaze-download-file",(e=>{(function(e){return ve(e=(0,T.m9)(e))})(t).then((t=>{if(!e.response)return;let n={success:!0,response:t};(0,w.T1)(e.response,n,e.ns)})).catch((t=>{e.response&&(0,w.T1)(e.response,{success:!1,response:t},e.ns)}))})),Shiny.addCustomMessageHandler("fireblaze-delete-file",(function(e){(function(e){return function(e){e._throwIfRoot("deleteObject");const t=function(e,t){const n=B(t.fullServerUrl(),e.host,e._protocol),r=e.maxOperationRetryTime,s=new ce(n,"DELETE",(function(e,t){}),r);return s.successCodes=[200,204],s.errorHandler=de(t),s}(e.storage,e._location);return e.storage.makeRequestWithTokens(t,be)}(e=(0,T.m9)(e))})(t).then((()=>{e.response&&(0,w.T1)(e.response,{success:!0,response:null},e.ns)})).catch((t=>{e.response&&(0,w.T1)(e.response,{success:!1,response:t},e.ns)}))})),Shiny.addCustomMessageHandler("fireblaze-get-metadata",(function(e){Ue(t).then((t=>{e.response&&(0,w.T1)(e.response,{success:!0,response:t},e.ns)})).catch((t=>{e.response&&(0,w.T1)(e.response,{success:!1,response:t},e.ns)}))})),Shiny.addCustomMessageHandler("fireblaze-list-all-files",(function(e){(function(e){return Te(e=(0,T.m9)(e))})(t).then((t=>{(0,w.T1)(e.response,{success:!0,response:t.items},e.ns)})).catch((t=>{e.response&&(0,w.T1)(e.response,{success:!1,response:t},e.ns)}))}))};window.globalNs="";var De=!1;let Pe;window.uiInitialised=!1,Shiny.addCustomMessageHandler("fireblaze-render-dependencies",(e=>{Shiny.renderDependencies(e.deps)})),Shiny.addCustomMessageHandler("fireblaze-initialize-core",(e=>{Pe||(Pe=(0,s.initializeApp)(e.conf))})),Shiny.addCustomMessageHandler("fireblaze-expose-app",(e=>{Pe&&(window.firebaseApp=Pe)})),Shiny.addCustomMessageHandler("fireblaze-expose-auth",(e=>{window.firebaseAuth=(0,r.v0)()})),Shiny.addCustomMessageHandler("fireblaze-initialize-storage",(e=>{Se(Pe)})),Shiny.addCustomMessageHandler("fireblaze-initialize-auth",(e=>{if(De)return;De=!0,window.globalNs=e.ns;const t=(0,r.v0)();(0,w.qm)(e.languageCode);let n=(0,w.k_)(e.persistence);(0,r.Fb)(t,n).then((()=>{if((0,r.Aj)(t,(e=>{if(e)return(0,w.eL)("show"),(0,w.fh)("hide"),$("#fireblaze-signin-ui").hide(),void t.currentUser.getIdToken(!0).then((function(t){(0,w.H9)("signed_in_user",{success:!0,response:e,token:t})})).catch((function(){console.error("failed to login")}));(0,w.eL)("hide"),(0,w.fh)("show"),(0,w.H9)("signed_in",{success:!1,response:null}),(0,w.H9)("signed_in_user",{success:!1,response:null})})),(0,r.JB)(t,window.location.href)){var e=window.localStorage.getItem("fireblazeEmailSignIn");e||(0,w.H9)("email_verification",{success:!1,response:"Cannot find email"}),(0,r.P6)(t,e,window.location.href).then((e=>{window.localStorage.removeItem("fireblazeEmailSignIn"),(0,w.H9)("email_verification",{success:!0,response:e})})).catch((e=>{(0,w.H9)("email_verification",{success:!1,response:e})}))}})).catch((e=>{console.error(e)}))})),Shiny.addCustomMessageHandler("fireblaze-signout",(e=>{const t=(0,r.v0)();(0,r.w7)(t).then((()=>{window.uiInitialised&&(window.ui.start("#fireblaze-signin-ui",window.uiOpts),$("#fireblaze-signin-ui").show()),(0,w.H9)("signout",{success:!0,response:"successful"},e.ns)})).catch((t=>{(0,w.H9)("signout",{success:!1,response:t},e.ns)}))})),Shiny.addCustomMessageHandler("fireblaze-language-code",(e=>{(0,r.v0)().languageCode=e.code})),Shiny.addCustomMessageHandler("fireblaze-delete-user",(e=>{(0,r.v0)().currentUser.delete().then((()=>{(0,w.H9)("deleted_user",{success:!0,response:"successful"},e.ns)})).catch((t=>{Shiny.setInputValue("deleted_user",{success:!1,response:t},e.ns)}))})),Shiny.addCustomMessageHandler("fireblaze-id-token",(e=>{(0,r.v0)().currentUser.getIdToken(!0).then((t=>{(0,w.H9)("id_token",{response:{idToken:t},success:!0},e.ns)})).catch((t=>{(0,w.H9)("id_token",{response:t,success:!1},e.ns)}))}))}},e=>{e.O(0,[818,647],(()=>(162,e(e.s=162)))),e.O()}]);