diff --git a/assets/index-1a639e89.css b/assets/index-e0c70332.css similarity index 76% rename from assets/index-1a639e89.css rename to assets/index-e0c70332.css index f5798b5..e4ae1a0 100644 --- a/assets/index-1a639e89.css +++ b/assets/index-e0c70332.css @@ -1 +1 @@ -:root{--google-blue: #4285f4;--google-red: #ea4335;--google-yellow: #f4b400;--google-green: #34a853}*{font-family:Poppins,sans-serif}.navcus{background:#fff;border-bottom:2px rgba(0,0,0,.07) solid}.divone{margin-top:5%}.txtone{margin-top:5%;font-size:1px}.butone{margin-top:5%;margin-bottom:5%}.mainone{margin-left:5%;margin-right:5%;text-align:center;border-style:solid;border-radius:15px}.navbar.active{background:linear-gradient(135deg,rgba(255,255,255,.1),rgba(255,255,255,0));backdrop-filter:blur(15px);-webkit-backdrop-filter:blur(15px);box-shadow:0 20px 30px #0000001a}.navbar-toggler-icon{width:24px;height:24px}.footone{text-align:center}#myCarousel .carousel-item img{object-fit:cover;object-position:center;height:100vh;overflow:hidden}.videowrapper{float:none;clear:both;width:100%;position:relative;padding-bottom:56.25%;padding-top:25px;height:0}.videowrapper iframe{position:absolute;top:0;left:0;width:100%;height:100%}.iframe-container{position:relative;width:100%;padding-bottom:50%}.iframe-container iframe{position:absolute;width:100%;height:200%;top:0;left:0;right:0;bottom:0}.blogPage{background:url(./img/banner2.png) no-repeat center center fixed;-moz-background-size:cover;background-size:cover;opacity:1;-o-background-size:cover}.blogFooter{background-color:#fff}.border-blue{border-color:var(--google-blue)!important}.border-red{border-color:var(--google-red)!important}.border-yellow{border-color:var(--google-yellow)!important}.border-green{border-color:var(--google-green)!important}.color-dark{color:#3c434e}.bg-blue{background-color:var(--google-blue)!important}.bg-red{background-color:var(--google-red)!important}.bg-yellow{background-color:var(--google-yellow)!important}.bg-green{background-color:var(--google-green)!important}.testimonial-card .card-up{height:120px;overflow:hidden;border-top-left-radius:.25rem;border-top-right-radius:.25rem}.aqua-gradient{background:linear-gradient(40deg,#2096ff,#05ffa3)!important}.testimonial-card .avatar{width:120px;margin-top:-60px;overflow:hidden;border:5px solid #fff;border-radius:50%}.navbar-nav .nav-link{transition:background-color .3s,color .3s,border-bottom .2s;border-bottom:2px solid transparent}.navbar-nav .nav-link:hover{border-bottom:2px solid #333}.frosted-glass{background:rgba(255,255,255,.2);box-shadow:0 8px 32px #5f60765e;backdrop-filter:blur(10.5px);-webkit-backdrop-filter:blur(5.5px);border:1px solid rgba(255,255,255,.18)}div.vision_card{height:55vh}div.vision_card:hover{box-shadow:0 2px 8px #00000042}div.vision_card:hover .vision_card__title{width:100%!important}.form_submit_btn{padding:.5rem;width:40%}@media screen and (max-width: 800px){.contact_logo{width:80%}}@media screen and (max-width: 600px){.yt_video{width:99%;height:400}.form{width:80%!important}.contact_logo{width:80%}} +:root{--google-blue: #4285f4;--google-red: #ea4335;--google-yellow: #f4b400;--google-green: #34a853}*{font-family:Poppins,sans-serif}.navcus{background:#fff;border-bottom:2px rgba(0,0,0,.07) solid}.divone{margin-top:5%}.txtone{margin-top:5%;font-size:1px}.butone{margin-top:5%;margin-bottom:5%}.mainone{margin-left:5%;margin-right:5%;text-align:center;border-style:solid;border-radius:15px}.navbar.active{background:linear-gradient(135deg,rgba(255,255,255,.1),rgba(255,255,255,0));backdrop-filter:blur(15px);-webkit-backdrop-filter:blur(15px);box-shadow:0 20px 30px #0000001a}.navbar-toggler-icon{width:24px;height:24px}.footone{text-align:center}#myCarousel .carousel-item img{object-fit:cover;object-position:center;height:100vh;overflow:hidden}.videowrapper{float:none;clear:both;width:100%;position:relative;padding-bottom:56.25%;padding-top:25px;height:0}.videowrapper iframe{position:absolute;top:0;left:0;width:100%;height:100%}.iframe-container{position:relative;width:100%;padding-bottom:50%}.iframe-container iframe{position:absolute;width:100%;height:200%;top:0;left:0;right:0;bottom:0}.blogPage{background:url(./img/banner2.png) no-repeat center center fixed;-moz-background-size:cover;background-size:cover;opacity:1;-o-background-size:cover}.blogFooter{background-color:#fff}.border-blue{border-color:var(--google-blue)!important}.border-red{border-color:var(--google-red)!important}.border-yellow{border-color:var(--google-yellow)!important}.border-green{border-color:var(--google-green)!important}.color-dark{color:#3c434e}.bg-blue{background-color:var(--google-blue)!important}.bg-red{background-color:var(--google-red)!important}.bg-yellow{background-color:var(--google-yellow)!important}.bg-green{background-color:var(--google-green)!important}.testimonial-card .card-up{height:120px;overflow:hidden;border-top-left-radius:.25rem;border-top-right-radius:.25rem}.aqua-gradient{background:linear-gradient(40deg,#2096ff,#05ffa3)!important}.testimonial-card .avatar{width:120px;margin-top:-60px;overflow:hidden;border:5px solid #fff;border-radius:50%}.navbar-nav .nav-link{transition:background-color .3s,color .3s,border-bottom .2s;border-bottom:2px solid transparent}.navbar-nav .nav-link:hover{border-bottom:2px solid #333}.frosted-glass{background:rgba(255,255,255,.2);box-shadow:0 8px 32px #5f60765e;backdrop-filter:blur(10.5px);-webkit-backdrop-filter:blur(5.5px);border:1px solid rgba(255,255,255,.18)}div.vision_card{height:55vh}div.vision_card:hover{box-shadow:0 2px 8px #00000042}div.vision_card:hover .vision_card__title{width:100%!important}.form_submit_btn{padding:.5rem;width:40%}.loader{width:100vw;height:100vh;background-color:#fff;display:grid;grid-template-columns:auto;place-content:center;align-items:center;position:fixed}@media screen and (max-width: 800px){.contact_logo{width:80%}}@media screen and (max-width: 600px){.yt_video{width:99%;height:400}.form{width:80%!important}.contact_logo{width:80%}}.scroll-to-top-button{position:fixed;bottom:20px;right:20px;opacity:0;visibility:hidden;transition:opacity .3s,visibility .3s}.scroll-to-top-button.visible{opacity:1;visibility:visible}.scroll-to-top-button button{background-color:#007bff;color:#fff;border:none;border-radius:50%;width:40px;height:40px;font-size:20px;cursor:pointer;outline:none}.scroll-to-top-button button:hover{background-color:#0056b3} diff --git a/assets/index-509c5406.js b/assets/index-e5284700.js similarity index 59% rename from assets/index-509c5406.js rename to assets/index-e5284700.js index 12ecc2f..81fbc1e 100644 --- a/assets/index-509c5406.js +++ b/assets/index-e5284700.js @@ -1,4 +1,4 @@ -function a0(t,e){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function u0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var hg={exports:{}},fa={},fg={exports:{}},Y={};/** +function f0(t,e){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function p0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var gg={exports:{}},ma={},_g={exports:{}},Y={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ function a0(t,e){for(var n=0;n>>1,Ne=b[_e];if(0>>1;_ei(fn,H))eni(ii,fn)?(b[_e]=ii,b[en]=H,_e=en):(b[_e]=fn,b[le]=H,_e=le);else if(eni(ii,H))b[_e]=ii,b[en]=H,_e=en;else break e}}return F}function i(b,F){var H=b.sortIndex-F.sortIndex;return H!==0?H:b.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var a=[],u=[],c=1,d=null,h=3,_=!1,v=!1,w=!1,S=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(b){for(var F=n(u);F!==null;){if(F.callback===null)r(u);else if(F.startTime<=b)r(u),F.sortIndex=F.expirationTime,e(a,F);else break;F=n(u)}}function p(b){if(w=!1,y(b),!v)if(n(a)!==null)v=!0,_t(x);else{var F=n(u);F!==null&&Zt(p,F.startTime-b)}}function x(b,F){v=!1,w&&(w=!1,g(D),D=-1),_=!0;var H=h;try{for(y(F),d=n(a);d!==null&&(!(d.expirationTime>F)||b&&!Le());){var _e=d.callback;if(typeof _e=="function"){d.callback=null,h=d.priorityLevel;var Ne=_e(d.expirationTime<=F);F=t.unstable_now(),typeof Ne=="function"?d.callback=Ne:d===n(a)&&r(a),y(F)}else r(a);d=n(a)}if(d!==null)var ri=!0;else{var le=n(u);le!==null&&Zt(p,le.startTime-F),ri=!1}return ri}finally{d=null,h=H,_=!1}}var I=!1,N=null,D=-1,Q=5,B=-1;function Le(){return!(t.unstable_now()-Bb||125_e?(b.sortIndex=H,e(u,b),n(a)===null&&b===n(u)&&(w?(g(D),D=-1):w=!0,Zt(p,H-_e))):(b.sortIndex=Ne,e(a,b),v||_||(v=!0,_t(x))),b},t.unstable_shouldYield=Le,t.unstable_wrapCallback=function(b){var F=h;return function(){var H=h;h=F;try{return b.apply(this,arguments)}finally{h=H}}}})(kg);xg.exports=kg;var D0=xg.exports;/** + */(function(t){function e(b,F){var H=b.length;b.push(F);e:for(;0>>1,Ne=b[_e];if(0>>1;_ei(fn,H))eni(oi,fn)?(b[_e]=oi,b[en]=H,_e=en):(b[_e]=fn,b[le]=H,_e=le);else if(eni(oi,H))b[_e]=oi,b[en]=H,_e=en;else break e}}return F}function i(b,F){var H=b.sortIndex-F.sortIndex;return H!==0?H:b.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var a=[],u=[],c=1,d=null,h=3,_=!1,v=!1,w=!1,S=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(b){for(var F=n(u);F!==null;){if(F.callback===null)r(u);else if(F.startTime<=b)r(u),F.sortIndex=F.expirationTime,e(a,F);else break;F=n(u)}}function p(b){if(w=!1,y(b),!v)if(n(a)!==null)v=!0,_t(x);else{var F=n(u);F!==null&&Zt(p,F.startTime-b)}}function x(b,F){v=!1,w&&(w=!1,g(D),D=-1),_=!0;var H=h;try{for(y(F),d=n(a);d!==null&&(!(d.expirationTime>F)||b&&!Le());){var _e=d.callback;if(typeof _e=="function"){d.callback=null,h=d.priorityLevel;var Ne=_e(d.expirationTime<=F);F=t.unstable_now(),typeof Ne=="function"?d.callback=Ne:d===n(a)&&r(a),y(F)}else r(a);d=n(a)}if(d!==null)var si=!0;else{var le=n(u);le!==null&&Zt(p,le.startTime-F),si=!1}return si}finally{d=null,h=H,_=!1}}var I=!1,N=null,D=-1,Q=5,B=-1;function Le(){return!(t.unstable_now()-Bb||125_e?(b.sortIndex=H,e(u,b),n(a)===null&&b===n(u)&&(w?(g(D),D=-1):w=!0,Zt(p,H-_e))):(b.sortIndex=Ne,e(a,b),v||_||(v=!0,_t(x))),b},t.unstable_shouldYield=Le,t.unstable_wrapCallback=function(b){var F=h;return function(){var H=h;h=F;try{return b.apply(this,arguments)}finally{h=H}}}})(Ng);Rg.exports=Ng;var j0=Rg.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ function a0(t,e){for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),lc=Object.prototype.hasOwnProperty,A0=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Of={},Lf={};function O0(t){return lc.call(Lf,t)?!0:lc.call(Of,t)?!1:A0.test(t)?Lf[t]=!0:(Of[t]=!0,!1)}function L0(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function M0(t,e,n,r){if(e===null||typeof e>"u"||L0(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function lt(t,e,n,r,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var Ke={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Ke[t]=new lt(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Ke[e]=new lt(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Ke[t]=new lt(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Ke[t]=new lt(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Ke[t]=new lt(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Ke[t]=new lt(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Ke[t]=new lt(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Ke[t]=new lt(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Ke[t]=new lt(t,5,!1,t.toLowerCase(),null,!1,!1)});var Md=/[\-:]([a-z])/g;function jd(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(Md,jd);Ke[e]=new lt(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Md,jd);Ke[e]=new lt(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Md,jd);Ke[e]=new lt(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Ke[t]=new lt(t,1,!1,t.toLowerCase(),null,!1,!1)});Ke.xlinkHref=new lt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Ke[t]=new lt(t,1,!1,t.toLowerCase(),null,!0,!0)});function Fd(t,e,n,r){var i=Ke.hasOwnProperty(e)?Ke[e]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cc=Object.prototype.hasOwnProperty,F0=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,jf={},Ff={};function U0(t){return cc.call(Ff,t)?!0:cc.call(jf,t)?!1:F0.test(t)?Ff[t]=!0:(jf[t]=!0,!1)}function B0(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function z0(t,e,n,r){if(e===null||typeof e>"u"||B0(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function lt(t,e,n,r,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var Ke={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Ke[t]=new lt(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Ke[e]=new lt(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Ke[t]=new lt(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Ke[t]=new lt(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Ke[t]=new lt(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Ke[t]=new lt(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Ke[t]=new lt(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Ke[t]=new lt(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Ke[t]=new lt(t,5,!1,t.toLowerCase(),null,!1,!1)});var Ud=/[\-:]([a-z])/g;function Bd(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(Ud,Bd);Ke[e]=new lt(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Ud,Bd);Ke[e]=new lt(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Ud,Bd);Ke[e]=new lt(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Ke[t]=new lt(t,1,!1,t.toLowerCase(),null,!1,!1)});Ke.xlinkHref=new lt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Ke[t]=new lt(t,1,!1,t.toLowerCase(),null,!0,!0)});function zd(t,e,n,r){var i=Ke.hasOwnProperty(e)?Ke[e]:null;(i!==null?i.type!==0:r||!(2l||i[o]!==s[l]){var a=` -`+i[o].replace(" at new "," at ");return t.displayName&&a.includes("")&&(a=a.replace("",t.displayName)),a}while(1<=o&&0<=l);break}}}finally{vu=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Ts(t):""}function j0(t){switch(t.tag){case 5:return Ts(t.type);case 16:return Ts("Lazy");case 13:return Ts("Suspense");case 19:return Ts("SuspenseList");case 0:case 2:case 15:return t=wu(t.type,!1),t;case 11:return t=wu(t.type.render,!1),t;case 1:return t=wu(t.type,!0),t;default:return""}}function dc(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case hi:return"Fragment";case di:return"Portal";case ac:return"Profiler";case Ud:return"StrictMode";case uc:return"Suspense";case cc:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Ig:return(t.displayName||"Context")+".Consumer";case Ng:return(t._context.displayName||"Context")+".Provider";case Bd:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case zd:return e=t.displayName||null,e!==null?e:dc(t.type)||"Memo";case zn:e=t._payload,t=t._init;try{return dc(t(e))}catch{}}return null}function F0(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return dc(e);case 8:return e===Ud?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function lr(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function bg(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function U0(t){var e=bg(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Vo(t){t._valueTracker||(t._valueTracker=U0(t))}function Dg(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=bg(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function xl(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function hc(t,e){var n=e.checked;return Ee({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function jf(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=lr(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function Ag(t,e){e=e.checked,e!=null&&Fd(t,"checked",e,!1)}function fc(t,e){Ag(t,e);var n=lr(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?pc(t,e.type,n):e.hasOwnProperty("defaultValue")&&pc(t,e.type,lr(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Ff(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function pc(t,e,n){(e!=="number"||xl(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Rs=Array.isArray;function ki(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=Go.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Gs(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Ps={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},B0=["Webkit","ms","Moz","O"];Object.keys(Ps).forEach(function(t){B0.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Ps[e]=Ps[t]})});function jg(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Ps.hasOwnProperty(t)&&Ps[t]?(""+e).trim():e+"px"}function Fg(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=jg(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var z0=Ee({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function _c(t,e){if(e){if(z0[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(T(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(T(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(T(61))}if(e.style!=null&&typeof e.style!="object")throw Error(T(62))}}function yc(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var vc=null;function $d(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var wc=null,Ti=null,Ri=null;function zf(t){if(t=Ro(t)){if(typeof wc!="function")throw Error(T(280));var e=t.stateNode;e&&(e=ya(e),wc(t.stateNode,t.type,e))}}function Ug(t){Ti?Ri?Ri.push(t):Ri=[t]:Ti=t}function Bg(){if(Ti){var t=Ti,e=Ri;if(Ri=Ti=null,zf(t),e)for(t=0;t>>=0,t===0?32:31-(J0(t)/Z0|0)|0}var Qo=64,Ko=4194304;function Ns(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Nl(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,s=t.pingedLanes,o=n&268435455;if(o!==0){var l=o&~i;l!==0?r=Ns(l):(s&=o,s!==0&&(r=Ns(s)))}else o=n&~i,o!==0?r=Ns(o):s!==0&&(r=Ns(s));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function ko(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Gt(e),t[e]=n}function rE(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=Ds),Yf=String.fromCharCode(32),Xf=!1;function o_(t,e){switch(t){case"keyup":return bE.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function l_(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var fi=!1;function AE(t,e){switch(t){case"compositionend":return l_(e);case"keypress":return e.which!==32?null:(Xf=!0,Yf);case"textInput":return t=e.data,t===Yf&&Xf?null:t;default:return null}}function OE(t,e){if(fi)return t==="compositionend"||!Yd&&o_(t,e)?(t=i_(),ml=Qd=Vn=null,fi=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=tp(n)}}function d_(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?d_(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function h_(){for(var t=window,e=xl();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=xl(t.document)}return e}function Xd(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function WE(t){var e=h_(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&d_(n.ownerDocument.documentElement,n)){if(r!==null&&Xd(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!t.extend&&s>r&&(i=r,r=s,s=i),i=np(n,s);var o=np(n,r);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,pi=null,Tc=null,Os=null,Rc=!1;function rp(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Rc||pi==null||pi!==xl(r)||(r=pi,"selectionStart"in r&&Xd(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Os&&Js(Os,r)||(Os=r,r=bl(Tc,"onSelect"),0_i||(t.current=Ac[_i],Ac[_i]=null,_i--)}function ue(t,e){_i++,Ac[_i]=t.current,t.current=e}var ar={},et=_r(ar),ht=_r(!1),jr=ar;function Mi(t,e){var n=t.type.contextTypes;if(!n)return ar;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=e[s];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function ft(t){return t=t.childContextTypes,t!=null}function Al(){he(ht),he(et)}function cp(t,e,n){if(et.current!==ar)throw Error(T(168));ue(et,e),ue(ht,n)}function E_(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(T(108,F0(t)||"Unknown",i));return Ee({},n,r)}function Ol(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||ar,jr=et.current,ue(et,t),ue(ht,ht.current),!0}function dp(t,e,n){var r=t.stateNode;if(!r)throw Error(T(169));n?(t=E_(t,e,jr),r.__reactInternalMemoizedMergedChildContext=t,he(ht),he(et),ue(et,t)):he(ht),ue(ht,n)}var _n=null,va=!1,Ou=!1;function C_(t){_n===null?_n=[t]:_n.push(t)}function tC(t){va=!0,C_(t)}function yr(){if(!Ou&&_n!==null){Ou=!0;var t=0,e=ee;try{var n=_n;for(ee=1;t>=o,i-=o,vn=1<<32-Gt(e)+i|n<D?(Q=N,N=null):Q=N.sibling;var B=h(g,N,y[D],p);if(B===null){N===null&&(N=Q);break}t&&N&&B.alternate===null&&e(g,N),m=s(B,m,D),I===null?x=B:I.sibling=B,I=B,N=Q}if(D===y.length)return n(g,N),me&&Sr(g,D),x;if(N===null){for(;DD?(Q=N,N=null):Q=N.sibling;var Le=h(g,N,B.value,p);if(Le===null){N===null&&(N=Q);break}t&&N&&Le.alternate===null&&e(g,N),m=s(Le,m,D),I===null?x=Le:I.sibling=Le,I=Le,N=Q}if(B.done)return n(g,N),me&&Sr(g,D),x;if(N===null){for(;!B.done;D++,B=y.next())B=d(g,B.value,p),B!==null&&(m=s(B,m,D),I===null?x=B:I.sibling=B,I=B);return me&&Sr(g,D),x}for(N=r(g,N);!B.done;D++,B=y.next())B=_(N,g,D,B.value,p),B!==null&&(t&&B.alternate!==null&&N.delete(B.key===null?D:B.key),m=s(B,m,D),I===null?x=B:I.sibling=B,I=B);return t&&N.forEach(function(oe){return e(g,oe)}),me&&Sr(g,D),x}function S(g,m,y,p){if(typeof y=="object"&&y!==null&&y.type===hi&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Ho:e:{for(var x=y.key,I=m;I!==null;){if(I.key===x){if(x=y.type,x===hi){if(I.tag===7){n(g,I.sibling),m=i(I,y.props.children),m.return=g,g=m;break e}}else if(I.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===zn&&yp(x)===I.type){n(g,I.sibling),m=i(I,y.props),m.ref=ps(g,I,y),m.return=g,g=m;break e}n(g,I);break}else e(g,I);I=I.sibling}y.type===hi?(m=Or(y.props.children,g.mode,p,y.key),m.return=g,g=m):(p=Sl(y.type,y.key,y.props,null,g.mode,p),p.ref=ps(g,m,y),p.return=g,g=p)}return o(g);case di:e:{for(I=y.key;m!==null;){if(m.key===I)if(m.tag===4&&m.stateNode.containerInfo===y.containerInfo&&m.stateNode.implementation===y.implementation){n(g,m.sibling),m=i(m,y.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else e(g,m);m=m.sibling}m=$u(y,g.mode,p),m.return=g,g=m}return o(g);case zn:return I=y._init,S(g,m,I(y._payload),p)}if(Rs(y))return v(g,m,y,p);if(us(y))return w(g,m,y,p);tl(g,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,m!==null&&m.tag===6?(n(g,m.sibling),m=i(m,y),m.return=g,g=m):(n(g,m),m=zu(y,g.mode,p),m.return=g,g=m),o(g)):n(g,m)}return S}var Fi=P_(!0),b_=P_(!1),No={},ln=_r(No),no=_r(No),ro=_r(No);function Ir(t){if(t===No)throw Error(T(174));return t}function oh(t,e){switch(ue(ro,e),ue(no,t),ue(ln,No),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:gc(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=gc(e,t)}he(ln),ue(ln,e)}function Ui(){he(ln),he(no),he(ro)}function D_(t){Ir(ro.current);var e=Ir(ln.current),n=gc(e,t.type);e!==n&&(ue(no,t),ue(ln,n))}function lh(t){no.current===t&&(he(ln),he(no))}var ye=_r(0);function Bl(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Lu=[];function ah(){for(var t=0;tn?n:4,t(!0);var r=Mu.transition;Mu.transition={};try{t(!1),e()}finally{ee=n,Mu.transition=r}}function K_(){return Mt().memoizedState}function sC(t,e,n){var r=tr(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},q_(t))Y_(e,n);else if(n=T_(t,e,n,r),n!==null){var i=st();Qt(n,t,r,i),X_(n,e,r)}}function oC(t,e,n){var r=tr(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(q_(t))Y_(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,l=s(o,n);if(i.hasEagerState=!0,i.eagerState=l,qt(l,o)){var a=e.interleaved;a===null?(i.next=i,ih(e)):(i.next=a.next,a.next=i),e.interleaved=i;return}}catch{}finally{}n=T_(t,e,i,r),n!==null&&(i=st(),Qt(n,t,r,i),X_(n,e,r))}}function q_(t){var e=t.alternate;return t===we||e!==null&&e===we}function Y_(t,e){Ls=zl=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function X_(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Hd(t,n)}}var $l={readContext:Lt,useCallback:qe,useContext:qe,useEffect:qe,useImperativeHandle:qe,useInsertionEffect:qe,useLayoutEffect:qe,useMemo:qe,useReducer:qe,useRef:qe,useState:qe,useDebugValue:qe,useDeferredValue:qe,useTransition:qe,useMutableSource:qe,useSyncExternalStore:qe,useId:qe,unstable_isNewReconciler:!1},lC={readContext:Lt,useCallback:function(t,e){return nn().memoizedState=[t,e===void 0?null:e],t},useContext:Lt,useEffect:wp,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,vl(4194308,4,W_.bind(null,e,t),n)},useLayoutEffect:function(t,e){return vl(4194308,4,t,e)},useInsertionEffect:function(t,e){return vl(4,2,t,e)},useMemo:function(t,e){var n=nn();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=nn();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=sC.bind(null,we,t),[r.memoizedState,t]},useRef:function(t){var e=nn();return t={current:t},e.memoizedState=t},useState:vp,useDebugValue:fh,useDeferredValue:function(t){return nn().memoizedState=t},useTransition:function(){var t=vp(!1),e=t[0];return t=iC.bind(null,t[1]),nn().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=we,i=nn();if(me){if(n===void 0)throw Error(T(407));n=n()}else{if(n=e(),$e===null)throw Error(T(349));Ur&30||L_(r,e,n)}i.memoizedState=n;var s={value:n,getSnapshot:e};return i.queue=s,wp(j_.bind(null,r,s,t),[t]),r.flags|=2048,oo(9,M_.bind(null,r,s,n,e),void 0,null),n},useId:function(){var t=nn(),e=$e.identifierPrefix;if(me){var n=wn,r=vn;n=(r&~(1<<32-Gt(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=io++,0")&&(a=a.replace("",t.displayName)),a}while(1<=o&&0<=l);break}}}finally{Cu=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Ns(t):""}function $0(t){switch(t.tag){case 5:return Ns(t.type);case 16:return Ns("Lazy");case 13:return Ns("Suspense");case 19:return Ns("SuspenseList");case 0:case 2:case 15:return t=Su(t.type,!1),t;case 11:return t=Su(t.type.render,!1),t;case 1:return t=Su(t.type,!0),t;default:return""}}function pc(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case pi:return"Fragment";case fi:return"Portal";case dc:return"Profiler";case $d:return"StrictMode";case hc:return"Suspense";case fc:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Dg:return(t.displayName||"Context")+".Consumer";case bg:return(t._context.displayName||"Context")+".Provider";case Wd:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Hd:return e=t.displayName||null,e!==null?e:pc(t.type)||"Memo";case $n:e=t._payload,t=t._init;try{return pc(t(e))}catch{}}return null}function W0(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pc(e);case 8:return e===$d?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function ur(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Og(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function H0(t){var e=Og(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Qo(t){t._valueTracker||(t._valueTracker=H0(t))}function Lg(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=Og(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function Tl(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function mc(t,e){var n=e.checked;return Ee({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function Bf(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=ur(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function Mg(t,e){e=e.checked,e!=null&&zd(t,"checked",e,!1)}function gc(t,e){Mg(t,e);var n=ur(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?_c(t,e.type,n):e.hasOwnProperty("defaultValue")&&_c(t,e.type,ur(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function zf(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function _c(t,e,n){(e!=="number"||Tl(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Is=Array.isArray;function Ri(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=Ko.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Ks(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Ds={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},V0=["Webkit","ms","Moz","O"];Object.keys(Ds).forEach(function(t){V0.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Ds[e]=Ds[t]})});function Bg(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Ds.hasOwnProperty(t)&&Ds[t]?(""+e).trim():e+"px"}function zg(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Bg(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var G0=Ee({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function wc(t,e){if(e){if(G0[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(T(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(T(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(T(61))}if(e.style!=null&&typeof e.style!="object")throw Error(T(62))}}function Ec(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Cc=null;function Vd(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Sc=null,Ni=null,Ii=null;function Hf(t){if(t=Io(t)){if(typeof Sc!="function")throw Error(T(280));var e=t.stateNode;e&&(e=wa(e),Sc(t.stateNode,t.type,e))}}function $g(t){Ni?Ii?Ii.push(t):Ii=[t]:Ni=t}function Wg(){if(Ni){var t=Ni,e=Ii;if(Ii=Ni=null,Hf(t),e)for(t=0;t>>=0,t===0?32:31-(rE(t)/iE|0)|0}var qo=64,Yo=4194304;function Ps(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Pl(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,s=t.pingedLanes,o=n&268435455;if(o!==0){var l=o&~i;l!==0?r=Ps(l):(s&=o,s!==0&&(r=Ps(s)))}else o=n&~i,o!==0?r=Ps(o):s!==0&&(r=Ps(s));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function Ro(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Gt(e),t[e]=n}function aE(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=Os),Zf=String.fromCharCode(32),ep=!1;function u_(t,e){switch(t){case"keyup":return ME.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function c_(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var mi=!1;function FE(t,e){switch(t){case"compositionend":return c_(e);case"keypress":return e.which!==32?null:(ep=!0,Zf);case"textInput":return t=e.data,t===Zf&&ep?null:t;default:return null}}function UE(t,e){if(mi)return t==="compositionend"||!Zd&&u_(t,e)?(t=l_(),_l=Yd=Gn=null,mi=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ip(n)}}function p_(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?p_(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function m_(){for(var t=window,e=Tl();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Tl(t.document)}return e}function eh(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function KE(t){var e=m_(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&p_(n.ownerDocument.documentElement,n)){if(r!==null&&eh(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!t.extend&&s>r&&(i=r,r=s,s=i),i=sp(n,s);var o=sp(n,r);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,gi=null,Ic=null,Ms=null,Pc=!1;function op(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Pc||gi==null||gi!==Tl(r)||(r=gi,"selectionStart"in r&&eh(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ms&&eo(Ms,r)||(Ms=r,r=Al(Ic,"onSelect"),0vi||(t.current=Mc[vi],Mc[vi]=null,vi--)}function ue(t,e){vi++,Mc[vi]=t.current,t.current=e}var cr={},et=vr(cr),ht=vr(!1),Ur=cr;function Fi(t,e){var n=t.type.contextTypes;if(!n)return cr;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=e[s];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function ft(t){return t=t.childContextTypes,t!=null}function Ll(){he(ht),he(et)}function fp(t,e,n){if(et.current!==cr)throw Error(T(168));ue(et,e),ue(ht,n)}function x_(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(T(108,W0(t)||"Unknown",i));return Ee({},n,r)}function Ml(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||cr,Ur=et.current,ue(et,t),ue(ht,ht.current),!0}function pp(t,e,n){var r=t.stateNode;if(!r)throw Error(T(169));n?(t=x_(t,e,Ur),r.__reactInternalMemoizedMergedChildContext=t,he(ht),he(et),ue(et,t)):he(ht),ue(ht,n)}var _n=null,Ea=!1,ju=!1;function k_(t){_n===null?_n=[t]:_n.push(t)}function oC(t){Ea=!0,k_(t)}function wr(){if(!ju&&_n!==null){ju=!0;var t=0,e=ee;try{var n=_n;for(ee=1;t>=o,i-=o,vn=1<<32-Gt(e)+i|n<D?(Q=N,N=null):Q=N.sibling;var B=h(g,N,y[D],p);if(B===null){N===null&&(N=Q);break}t&&N&&B.alternate===null&&e(g,N),m=s(B,m,D),I===null?x=B:I.sibling=B,I=B,N=Q}if(D===y.length)return n(g,N),me&&kr(g,D),x;if(N===null){for(;DD?(Q=N,N=null):Q=N.sibling;var Le=h(g,N,B.value,p);if(Le===null){N===null&&(N=Q);break}t&&N&&Le.alternate===null&&e(g,N),m=s(Le,m,D),I===null?x=Le:I.sibling=Le,I=Le,N=Q}if(B.done)return n(g,N),me&&kr(g,D),x;if(N===null){for(;!B.done;D++,B=y.next())B=d(g,B.value,p),B!==null&&(m=s(B,m,D),I===null?x=B:I.sibling=B,I=B);return me&&kr(g,D),x}for(N=r(g,N);!B.done;D++,B=y.next())B=_(N,g,D,B.value,p),B!==null&&(t&&B.alternate!==null&&N.delete(B.key===null?D:B.key),m=s(B,m,D),I===null?x=B:I.sibling=B,I=B);return t&&N.forEach(function(oe){return e(g,oe)}),me&&kr(g,D),x}function S(g,m,y,p){if(typeof y=="object"&&y!==null&&y.type===pi&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Go:e:{for(var x=y.key,I=m;I!==null;){if(I.key===x){if(x=y.type,x===pi){if(I.tag===7){n(g,I.sibling),m=i(I,y.props.children),m.return=g,g=m;break e}}else if(I.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===$n&&Ep(x)===I.type){n(g,I.sibling),m=i(I,y.props),m.ref=gs(g,I,y),m.return=g,g=m;break e}n(g,I);break}else e(g,I);I=I.sibling}y.type===pi?(m=Mr(y.props.children,g.mode,p,y.key),m.return=g,g=m):(p=kl(y.type,y.key,y.props,null,g.mode,p),p.ref=gs(g,m,y),p.return=g,g=p)}return o(g);case fi:e:{for(I=y.key;m!==null;){if(m.key===I)if(m.tag===4&&m.stateNode.containerInfo===y.containerInfo&&m.stateNode.implementation===y.implementation){n(g,m.sibling),m=i(m,y.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else e(g,m);m=m.sibling}m=Vu(y,g.mode,p),m.return=g,g=m}return o(g);case $n:return I=y._init,S(g,m,I(y._payload),p)}if(Is(y))return v(g,m,y,p);if(ds(y))return w(g,m,y,p);rl(g,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,m!==null&&m.tag===6?(n(g,m.sibling),m=i(m,y),m.return=g,g=m):(n(g,m),m=Hu(y,g.mode,p),m.return=g,g=m),o(g)):n(g,m)}return S}var Bi=A_(!0),O_=A_(!1),Po={},ln=vr(Po),io=vr(Po),so=vr(Po);function br(t){if(t===Po)throw Error(T(174));return t}function uh(t,e){switch(ue(so,e),ue(io,t),ue(ln,Po),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:vc(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=vc(e,t)}he(ln),ue(ln,e)}function zi(){he(ln),he(io),he(so)}function L_(t){br(so.current);var e=br(ln.current),n=vc(e,t.type);e!==n&&(ue(io,t),ue(ln,n))}function ch(t){io.current===t&&(he(ln),he(io))}var ye=vr(0);function $l(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Fu=[];function dh(){for(var t=0;tn?n:4,t(!0);var r=Uu.transition;Uu.transition={};try{t(!1),e()}finally{ee=n,Uu.transition=r}}function X_(){return Mt().memoizedState}function cC(t,e,n){var r=nr(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},J_(t))Z_(e,n);else if(n=I_(t,e,n,r),n!==null){var i=st();Qt(n,t,r,i),ey(n,e,r)}}function dC(t,e,n){var r=nr(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(J_(t))Z_(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,l=s(o,n);if(i.hasEagerState=!0,i.eagerState=l,qt(l,o)){var a=e.interleaved;a===null?(i.next=i,lh(e)):(i.next=a.next,a.next=i),e.interleaved=i;return}}catch{}finally{}n=I_(t,e,i,r),n!==null&&(i=st(),Qt(n,t,r,i),ey(n,e,r))}}function J_(t){var e=t.alternate;return t===we||e!==null&&e===we}function Z_(t,e){js=Wl=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function ey(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Qd(t,n)}}var Hl={readContext:Lt,useCallback:qe,useContext:qe,useEffect:qe,useImperativeHandle:qe,useInsertionEffect:qe,useLayoutEffect:qe,useMemo:qe,useReducer:qe,useRef:qe,useState:qe,useDebugValue:qe,useDeferredValue:qe,useTransition:qe,useMutableSource:qe,useSyncExternalStore:qe,useId:qe,unstable_isNewReconciler:!1},hC={readContext:Lt,useCallback:function(t,e){return nn().memoizedState=[t,e===void 0?null:e],t},useContext:Lt,useEffect:Sp,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,El(4194308,4,G_.bind(null,e,t),n)},useLayoutEffect:function(t,e){return El(4194308,4,t,e)},useInsertionEffect:function(t,e){return El(4,2,t,e)},useMemo:function(t,e){var n=nn();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=nn();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=cC.bind(null,we,t),[r.memoizedState,t]},useRef:function(t){var e=nn();return t={current:t},e.memoizedState=t},useState:Cp,useDebugValue:gh,useDeferredValue:function(t){return nn().memoizedState=t},useTransition:function(){var t=Cp(!1),e=t[0];return t=uC.bind(null,t[1]),nn().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=we,i=nn();if(me){if(n===void 0)throw Error(T(407));n=n()}else{if(n=e(),$e===null)throw Error(T(349));zr&30||F_(r,e,n)}i.memoizedState=n;var s={value:n,getSnapshot:e};return i.queue=s,Sp(B_.bind(null,r,s,t),[t]),r.flags|=2048,ao(9,U_.bind(null,r,s,n,e),void 0,null),n},useId:function(){var t=nn(),e=$e.identifierPrefix;if(me){var n=wn,r=vn;n=(r&~(1<<32-Gt(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=oo++,0<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[rn]=e,t[to]=r,oy(t,e,!1,!1),e.stateNode=t;e:{switch(o=yc(n,r),n){case"dialog":de("cancel",t),de("close",t),i=r;break;case"iframe":case"object":case"embed":de("load",t),i=r;break;case"video":case"audio":for(i=0;izi&&(e.flags|=128,r=!0,ms(s,!1),e.lanes=4194304)}else{if(!r)if(t=Bl(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),ms(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!me)return Ye(e),null}else 2*Te()-s.renderingStartTime>zi&&n!==1073741824&&(e.flags|=128,r=!0,ms(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(n=s.last,n!==null?n.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Te(),e.sibling=null,n=ye.current,ue(ye,r?n&1|2:n&1),e):(Ye(e),null);case 22:case 23:return vh(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?yt&1073741824&&(Ye(e),e.subtreeFlags&6&&(e.flags|=8192)):Ye(e),null;case 24:return null;case 25:return null}throw Error(T(156,e.tag))}function mC(t,e){switch(Zd(e),e.tag){case 1:return ft(e.type)&&Al(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Ui(),he(ht),he(et),ah(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return lh(e),null;case 13:if(he(ye),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(T(340));ji()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return he(ye),null;case 4:return Ui(),null;case 10:return rh(e.type._context),null;case 22:case 23:return vh(),null;case 24:return null;default:return null}}var rl=!1,Xe=!1,gC=typeof WeakSet=="function"?WeakSet:Set,A=null;function Ei(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Se(t,e,r)}else n.current=null}function Vc(t,e,n){try{n()}catch(r){Se(t,e,r)}}var Ip=!1;function _C(t,e){if(Nc=Il,t=h_(),Xd(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,l=-1,a=-1,u=0,c=0,d=t,h=null;t:for(;;){for(var _;d!==n||i!==0&&d.nodeType!==3||(l=o+i),d!==s||r!==0&&d.nodeType!==3||(a=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(_=d.firstChild)!==null;)h=d,d=_;for(;;){if(d===t)break t;if(h===n&&++u===i&&(l=o),h===s&&++c===r&&(a=o),(_=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=_}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ic={focusedElem:t,selectionRange:n},Il=!1,A=e;A!==null;)if(e=A,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,A=t;else for(;A!==null;){e=A;try{var v=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var w=v.memoizedProps,S=v.memoizedState,g=e.stateNode,m=g.getSnapshotBeforeUpdate(e.elementType===e.type?w:zt(e.type,w),S);g.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var y=e.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(T(163))}}catch(p){Se(e,e.return,p)}if(t=e.sibling,t!==null){t.return=e.return,A=t;break}A=e.return}return v=Ip,Ip=!1,v}function Ms(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&Vc(e,n,s)}i=i.next}while(i!==r)}}function Ca(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function Gc(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function uy(t){var e=t.alternate;e!==null&&(t.alternate=null,uy(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[rn],delete e[to],delete e[Dc],delete e[ZE],delete e[eC])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function cy(t){return t.tag===5||t.tag===3||t.tag===4}function Pp(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||cy(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Qc(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Dl));else if(r!==4&&(t=t.child,t!==null))for(Qc(t,e,n),t=t.sibling;t!==null;)Qc(t,e,n),t=t.sibling}function Kc(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(Kc(t,e,n),t=t.sibling;t!==null;)Kc(t,e,n),t=t.sibling}var Ge=null,$t=!1;function Bn(t,e,n){for(n=n.child;n!==null;)dy(t,e,n),n=n.sibling}function dy(t,e,n){if(on&&typeof on.onCommitFiberUnmount=="function")try{on.onCommitFiberUnmount(pa,n)}catch{}switch(n.tag){case 5:Xe||Ei(n,e);case 6:var r=Ge,i=$t;Ge=null,Bn(t,e,n),Ge=r,$t=i,Ge!==null&&($t?(t=Ge,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Ge.removeChild(n.stateNode));break;case 18:Ge!==null&&($t?(t=Ge,n=n.stateNode,t.nodeType===8?Au(t.parentNode,n):t.nodeType===1&&Au(t,n),Ys(t)):Au(Ge,n.stateNode));break;case 4:r=Ge,i=$t,Ge=n.stateNode.containerInfo,$t=!0,Bn(t,e,n),Ge=r,$t=i;break;case 0:case 11:case 14:case 15:if(!Xe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Vc(n,e,o),i=i.next}while(i!==r)}Bn(t,e,n);break;case 1:if(!Xe&&(Ei(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Se(n,e,l)}Bn(t,e,n);break;case 21:Bn(t,e,n);break;case 22:n.mode&1?(Xe=(r=Xe)||n.memoizedState!==null,Bn(t,e,n),Xe=r):Bn(t,e,n);break;default:Bn(t,e,n)}}function bp(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new gC),e.forEach(function(r){var i=TC.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ut(t,e){var n=e.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~s}if(r=i,r=Te()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*vC(r/1960))-r,10t?16:t,Gn===null)var r=!1;else{if(t=Gn,Gn=null,Vl=0,X&6)throw Error(T(331));var i=X;for(X|=4,A=t.current;A!==null;){var s=A,o=s.child;if(A.flags&16){var l=s.deletions;if(l!==null){for(var a=0;aTe()-_h?Ar(t,0):gh|=n),pt(t,e)}function vy(t,e){e===0&&(t.mode&1?(e=Ko,Ko<<=1,!(Ko&130023424)&&(Ko=4194304)):e=1);var n=st();t=In(t,e),t!==null&&(ko(t,e,n),pt(t,n))}function kC(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),vy(t,n)}function TC(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(T(314))}r!==null&&r.delete(e),vy(t,n)}var wy;wy=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||ht.current)ct=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return ct=!1,fC(t,e,n);ct=!!(t.flags&131072)}else ct=!1,me&&e.flags&1048576&&S_(e,Ml,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;wl(t,e),t=e.pendingProps;var i=Mi(e,et.current);Ii(e,n),i=ch(null,e,r,t,i,n);var s=dh();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,ft(r)?(s=!0,Ol(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,sh(e),i.updater=wa,e.stateNode=i,i._reactInternals=e,Fc(e,r,t,n),e=zc(null,e,r,!0,s,n)):(e.tag=0,me&&s&&Jd(e),nt(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(wl(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=NC(r),t=zt(r,t),i){case 0:e=Bc(null,e,r,t,n);break e;case 1:e=Tp(null,e,r,t,n);break e;case 11:e=xp(null,e,r,t,n);break e;case 14:e=kp(null,e,r,zt(r.type,t),n);break e}throw Error(T(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:zt(r,i),Bc(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:zt(r,i),Tp(t,e,r,i,n);case 3:e:{if(ry(e),t===null)throw Error(T(387));r=e.pendingProps,s=e.memoizedState,i=s.element,R_(t,e),Ul(e,r,null,n);var o=e.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=Bi(Error(T(423)),e),e=Rp(t,e,r,n,i);break e}else if(r!==i){i=Bi(Error(T(424)),e),e=Rp(t,e,r,n,i);break e}else for(vt=Jn(e.stateNode.containerInfo.firstChild),wt=e,me=!0,Ht=null,n=b_(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ji(),r===i){e=Pn(t,e,n);break e}nt(t,e,r,n)}e=e.child}return e;case 5:return D_(e),t===null&&Lc(e),r=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,Pc(r,i)?o=null:s!==null&&Pc(r,s)&&(e.flags|=32),ny(t,e),nt(t,e,o,n),e.child;case 6:return t===null&&Lc(e),null;case 13:return iy(t,e,n);case 4:return oh(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Fi(e,null,r,n):nt(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:zt(r,i),xp(t,e,r,i,n);case 7:return nt(t,e,e.pendingProps,n),e.child;case 8:return nt(t,e,e.pendingProps.children,n),e.child;case 12:return nt(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,ue(jl,r._currentValue),r._currentValue=o,s!==null)if(qt(s.value,o)){if(s.children===i.children&&!ht.current){e=Pn(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var l=s.dependencies;if(l!==null){o=s.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(s.tag===1){a=Cn(-1,n&-n),a.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Mc(s.return,n,e),l.lanes|=n;break}a=a.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(T(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Mc(o,n,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}nt(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,Ii(e,n),i=Lt(i),r=r(i),e.flags|=1,nt(t,e,r,n),e.child;case 14:return r=e.type,i=zt(r,e.pendingProps),i=zt(r.type,i),kp(t,e,r,i,n);case 15:return ey(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:zt(r,i),wl(t,e),e.tag=1,ft(r)?(t=!0,Ol(e)):t=!1,Ii(e,n),I_(e,r,i),Fc(e,r,i,n),zc(null,e,r,!0,t,n);case 19:return sy(t,e,n);case 22:return ty(t,e,n)}throw Error(T(156,e.tag))};function Ey(t,e){return Qg(t,e)}function RC(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pt(t,e,n,r){return new RC(t,e,n,r)}function Eh(t){return t=t.prototype,!(!t||!t.isReactComponent)}function NC(t){if(typeof t=="function")return Eh(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Bd)return 11;if(t===zd)return 14}return 2}function nr(t,e){var n=t.alternate;return n===null?(n=Pt(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Sl(t,e,n,r,i,s){var o=2;if(r=t,typeof t=="function")Eh(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case hi:return Or(n.children,i,s,e);case Ud:o=8,i|=8;break;case ac:return t=Pt(12,n,e,i|2),t.elementType=ac,t.lanes=s,t;case uc:return t=Pt(13,n,e,i),t.elementType=uc,t.lanes=s,t;case cc:return t=Pt(19,n,e,i),t.elementType=cc,t.lanes=s,t;case Pg:return xa(n,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Ng:o=10;break e;case Ig:o=9;break e;case Bd:o=11;break e;case zd:o=14;break e;case zn:o=16,r=null;break e}throw Error(T(130,t==null?t:typeof t,""))}return e=Pt(o,n,e,i),e.elementType=t,e.type=r,e.lanes=s,e}function Or(t,e,n,r){return t=Pt(7,t,r,e),t.lanes=n,t}function xa(t,e,n,r){return t=Pt(22,t,r,e),t.elementType=Pg,t.lanes=n,t.stateNode={isHidden:!1},t}function zu(t,e,n){return t=Pt(6,t,null,e),t.lanes=n,t}function $u(t,e,n){return e=Pt(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function IC(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Cu(0),this.expirationTimes=Cu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cu(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Ch(t,e,n,r,i,s,o,l,a){return t=new IC(t,e,n,l,a),e===1?(e=1,s===!0&&(e|=8)):e=0,s=Pt(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},sh(s),t}function PC(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ky)}catch(t){console.error(t)}}ky(),Sg.exports=xt;var LC=Sg.exports,Up=LC;oc.createRoot=Up.createRoot,oc.hydrateRoot=Up.hydrateRoot;function Ia(){const t=new Date().getFullYear();return f.jsx(f.Fragment,{children:f.jsx("div",{className:"border-top",style:{backgroundColor:"white"},children:f.jsx("div",{className:"py-3",children:f.jsxs("p",{className:"text-center text-muted font-weight-bold",children:["© ",t," COPYRIGHT GDSC SMIT"]})})})})}const MC=()=>{const t=[{id:1,title:"Seminar",image:"https://medschool.vanderbilt.edu/wp-content/uploads/sites/35/public_files/13314405705_fa3a6e6850_k.jpg",description:"Exploring Emerging Tech Trends Together.",classes:"bg-red rounded"},{id:2,title:"Projects",image:"https://www.thebvnewspaper.com/wp-content/uploads/2021/04/Group-Projects.jpg",description:"Building Solutions, Empowering Communities.",classes:"bg-green rounded"},{id:3,title:"Workshop",image:"https://studio180theatre.com/wp-content/uploads/2023/08/Studio-180-Education-Workshop-68-1-1200x801.jpg",description:"Hands-On Learning for Tech Enthusiasts",classes:"bg-yellow rounded"},{id:4,title:"Hackathons",image:"https://www.coresponsibility.com/wp-content/uploads/2016/03/cr-students-hack.jpg",description:"Innovate, Collaborate, Create, Win!",classes:"bg-blue rounded"}];return f.jsx(f.Fragment,{children:f.jsxs("div",{className:"my-5 w-75 mx-auto",children:[f.jsxs("div",{className:"d-flex flex-column justify-center",children:[f.jsx("h1",{className:"text-center display-5 font-bold",children:"Vision"}),f.jsx("p",{className:"text-2xl text-center max-w-lg md:max-w-2xl",children:"GDSC SMIT is inspired by the Google Developer's Family"}),f.jsxs("p",{className:"text-2xl text-center max-w-lg md:max-w-2xl",children:["Our goal is to learn, explore, innovate and create ",f.jsx("br",{})," And also, having fun!"]})]}),f.jsx("div",{className:"d-flex flex-md-row flex-column text-center vh-25 ",children:t.map(({id:e,title:n,description:r,classes:i,image:s})=>f.jsxs("div",{className:"vision_card rounded my-2 mx-2 w-100 border border-light-subtle",children:[f.jsxs("div",{className:"my-4 mx-4 d-flex flex-column ",children:[f.jsx("img",{className:"w-100 rounded",src:s,style:{height:"155px"}}),f.jsx("span",{className:`vision_card__title fw-bold text-white rounded p-2 w-75 my-4 px-3 ${i} mx-auto`,children:n})]}),f.jsx("p",{className:"w-75 mx-auto",children:r})]},e))})]})})};function jC(){return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"container divone",children:[f.jsx("div",{className:"display-5",children:"Welcome to GDSC SMIT "}),f.jsxs("div",{className:"row",children:[f.jsxs("div",{className:"col-md-8",children:[f.jsx("div",{className:"my-5",children:f.jsx("div",{className:"text-lg text-sm",children:"Google Developer Student Clubs are groups of students from diverse undergraduate or graduate programs with an interest in growing as a developer. As GDSC's chapter at Sikkim Manipal Institute of Technology, we aim to help students connect with like-minded developers, facilitate knowledge across several domains, from industry leaders to students and build solutions that will be the change we hope for."})}),f.jsxs("div",{className:"butone",children:[f.jsx("a",{href:"https://gdsc.community.dev/accounts/login/?next=/sikkim-manipal-institute-of-technology-gangtok/",children:f.jsx("button",{type:"button",className:"btn btn-primary mx-3",children:"Become Member"})}),f.jsx("a",{href:"https://developers.google.com/community/gdsc#:~:text=Google%20Developer%20Student%20Clubs%20(GDSC,as%20a%20developer%20are%20welcome.",children:f.jsx("button",{type:"button",className:"btn btn-outline-dark",children:"Learn More"})})]})]}),f.jsx("div",{className:"col-md-4",children:f.jsx("img",{src:"./img/gsc.png",className:"img-fluid",alt:"..."})})]})]}),f.jsx("div",{className:"d-flex container overflow-hidden text-center my-4 ",children:f.jsxs("div",{className:"gy-5 d-flex flex-md-row flex-column text-center my-5 justify-content-center align-items-center shadow-lg",children:[f.jsx("div",{className:"my-3 mx-3",children:f.jsxs("div",{className:"p-3 border bg-light",children:[f.jsx("b",{children:"Why GDSC?"}),f.jsx("br",{}),"By joining GDSC at SMIT, you gain access to numerous workshops, information sessions, and student-community collaborative projects"]})}),f.jsx("div",{className:"my-3 mx-3",children:f.jsxs("div",{className:"p-3 border bg-light",children:[f.jsx("b",{children:"Concept of GDSC"}),f.jsx("br",{}),"The purpose of GDSC is to inspire and empower students through understanding technology and reflecting on it's impact"]})})]})}),f.jsx(MC,{}),f.jsx("div",{className:"bg embed-responsive-16by9 text-center my-4",id:"Video",children:f.jsx("div",{className:"container-fluid overflow-hidden ",children:f.jsx("iframe",{className:"embed-responsive-item yt_video",width:"560",height:"315",src:"https://www.youtube.com/embed/earTjC0iSjg",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:!0})})}),f.jsx("div",{id:"endcontain",className:"container-fluid text-center my-4",children:f.jsx("strong",{children:f.jsxs("font",{size:"7",children:[f.jsx("font",{color:"#4285F4",children:"Connect. "}),f.jsx("font",{color:"#EA4335",children:"Learn. "}),f.jsx("font",{color:"#34A853",children:"Grow. "})]})})}),f.jsx(Ia,{})]})}/** +`+s.stack}return{value:t,source:e,stack:i,digest:null}}function $u(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function $c(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var mC=typeof WeakMap=="function"?WeakMap:Map;function ty(t,e,n){n=Sn(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Gl||(Gl=!0,Jc=r),$c(t,e)},n}function ny(t,e,n){n=Sn(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){$c(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){$c(t,e),typeof r!="function"&&(tr===null?tr=new Set([this]):tr.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function xp(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new mC;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=IC.bind(null,t,e,n),e.then(t,t))}function kp(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function Tp(t,e,n,r,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=Sn(-1,1),e.tag=2,er(n,e,1))),n.lanes|=1),t)}var gC=An.ReactCurrentOwner,ct=!1;function nt(t,e,n,r){e.child=t===null?O_(e,null,n,r):Bi(e,t.child,n,r)}function Rp(t,e,n,r,i){n=n.render;var s=e.ref;return bi(e,i),r=fh(t,e,n,r,s,i),n=ph(),t!==null&&!ct?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,bn(t,e,i)):(me&&n&&th(e),e.flags|=1,nt(t,e,r,i),e.child)}function Np(t,e,n,r,i){if(t===null){var s=n.type;return typeof s=="function"&&!xh(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=s,ry(t,e,s,r,i)):(t=kl(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:eo,n(o,r)&&t.ref===e.ref)return bn(t,e,i)}return e.flags|=1,t=rr(s,r),t.ref=e.ref,t.return=e,e.child=t}function ry(t,e,n,r,i){if(t!==null){var s=t.memoizedProps;if(eo(s,r)&&t.ref===e.ref)if(ct=!1,e.pendingProps=r=s,(t.lanes&i)!==0)t.flags&131072&&(ct=!0);else return e.lanes=t.lanes,bn(t,e,i)}return Wc(t,e,n,r,i)}function iy(t,e,n){var r=e.pendingProps,i=r.children,s=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},ue(xi,yt),yt|=n;else{if(!(n&1073741824))return t=s!==null?s.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,ue(xi,yt),yt|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,ue(xi,yt),yt|=r}else s!==null?(r=s.baseLanes|n,e.memoizedState=null):r=n,ue(xi,yt),yt|=r;return nt(t,e,i,n),e.child}function sy(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function Wc(t,e,n,r,i){var s=ft(n)?Ur:et.current;return s=Fi(e,s),bi(e,i),n=fh(t,e,n,r,s,i),r=ph(),t!==null&&!ct?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,bn(t,e,i)):(me&&r&&th(e),e.flags|=1,nt(t,e,n,i),e.child)}function Ip(t,e,n,r,i){if(ft(n)){var s=!0;Ml(e)}else s=!1;if(bi(e,i),e.stateNode===null)Cl(t,e),D_(e,n,r),zc(e,n,r,i),r=!0;else if(t===null){var o=e.stateNode,l=e.memoizedProps;o.props=l;var a=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Lt(u):(u=ft(n)?Ur:et.current,u=Fi(e,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==r||a!==u)&&wp(e,o,r,u),Wn=!1;var h=e.memoizedState;o.state=h,zl(e,r,o,i),a=e.memoizedState,l!==r||h!==a||ht.current||Wn?(typeof c=="function"&&(Bc(e,n,c,r),a=e.memoizedState),(l=Wn||vp(e,n,l,r,h,a,u))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=a),o.props=r,o.state=a,o.context=u,r=l):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,P_(t,e),l=e.memoizedProps,u=e.type===e.elementType?l:zt(e.type,l),o.props=u,d=e.pendingProps,h=o.context,a=n.contextType,typeof a=="object"&&a!==null?a=Lt(a):(a=ft(n)?Ur:et.current,a=Fi(e,a));var _=n.getDerivedStateFromProps;(c=typeof _=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==d||h!==a)&&wp(e,o,r,a),Wn=!1,h=e.memoizedState,o.state=h,zl(e,r,o,i);var v=e.memoizedState;l!==d||h!==v||ht.current||Wn?(typeof _=="function"&&(Bc(e,n,_,r),v=e.memoizedState),(u=Wn||vp(e,n,u,r,h,v,a)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,v,a),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,v,a)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=v),o.props=r,o.state=v,o.context=a,r=u):(typeof o.componentDidUpdate!="function"||l===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),r=!1)}return Hc(t,e,n,r,s,i)}function Hc(t,e,n,r,i,s){sy(t,e);var o=(e.flags&128)!==0;if(!r&&!o)return i&&pp(e,n,!1),bn(t,e,s);r=e.stateNode,gC.current=e;var l=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&o?(e.child=Bi(e,t.child,null,s),e.child=Bi(e,null,l,s)):nt(t,e,l,s),e.memoizedState=r.state,i&&pp(e,n,!0),e.child}function oy(t){var e=t.stateNode;e.pendingContext?fp(t,e.pendingContext,e.pendingContext!==e.context):e.context&&fp(t,e.context,!1),uh(t,e.containerInfo)}function Pp(t,e,n,r,i){return Ui(),rh(i),e.flags|=256,nt(t,e,n,r),e.child}var Vc={dehydrated:null,treeContext:null,retryLane:0};function Gc(t){return{baseLanes:t,cachePool:null,transitions:null}}function ly(t,e,n){var r=e.pendingProps,i=ye.current,s=!1,o=(e.flags&128)!==0,l;if((l=o)||(l=t!==null&&t.memoizedState===null?!1:(i&2)!==0),l?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),ue(ye,i&1),t===null)return Fc(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=r.children,t=r.fallback,s?(r=e.mode,s=e.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=Ta(o,r,0,null),t=Mr(t,r,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=Gc(n),e.memoizedState=Vc,t):_h(e,o));if(i=t.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return _C(t,e,o,r,l,i,n);if(s){s=r.fallback,o=e.mode,i=t.child,l=i.sibling;var a={mode:"hidden",children:r.children};return!(o&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=a,e.deletions=null):(r=rr(i,a),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?s=rr(l,s):(s=Mr(s,o,n,null),s.flags|=2),s.return=e,r.return=e,r.sibling=s,e.child=r,r=s,s=e.child,o=t.child.memoizedState,o=o===null?Gc(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~n,e.memoizedState=Vc,r}return s=t.child,t=s.sibling,r=rr(s,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function _h(t,e){return e=Ta({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function il(t,e,n,r){return r!==null&&rh(r),Bi(e,t.child,null,n),t=_h(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function _C(t,e,n,r,i,s,o){if(n)return e.flags&256?(e.flags&=-257,r=$u(Error(T(422))),il(t,e,o,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=r.fallback,i=e.mode,r=Ta({mode:"visible",children:r.children},i,0,null),s=Mr(s,i,o,null),s.flags|=2,r.return=e,s.return=e,r.sibling=s,e.child=r,e.mode&1&&Bi(e,t.child,null,o),e.child.memoizedState=Gc(o),e.memoizedState=Vc,s);if(!(e.mode&1))return il(t,e,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,s=Error(T(419)),r=$u(s,r,void 0),il(t,e,o,r)}if(l=(o&t.childLanes)!==0,ct||l){if(r=$e,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Pn(t,i),Qt(r,t,i,-1))}return Sh(),r=$u(Error(T(421))),il(t,e,o,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=PC.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,vt=Zn(i.nextSibling),wt=e,me=!0,Ht=null,t!==null&&(Rt[Nt++]=vn,Rt[Nt++]=wn,Rt[Nt++]=Br,vn=t.id,wn=t.overflow,Br=e),e=_h(e,r.children),e.flags|=4096,e)}function bp(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),Uc(t.return,e,n)}function Wu(t,e,n,r,i){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function ay(t,e,n){var r=e.pendingProps,i=r.revealOrder,s=r.tail;if(nt(t,e,r.children,n),r=ye.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&bp(t,n,e);else if(t.tag===19)bp(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(ue(ye,r),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&$l(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),Wu(e,!1,i,n,s);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&$l(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}Wu(e,!0,n,null,s);break;case"together":Wu(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Cl(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function bn(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),$r|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(T(153));if(e.child!==null){for(t=e.child,n=rr(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=rr(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function yC(t,e,n){switch(e.tag){case 3:oy(e),Ui();break;case 5:L_(e);break;case 1:ft(e.type)&&Ml(e);break;case 4:uh(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;ue(Ul,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(ue(ye,ye.current&1),e.flags|=128,null):n&e.child.childLanes?ly(t,e,n):(ue(ye,ye.current&1),t=bn(t,e,n),t!==null?t.sibling:null);ue(ye,ye.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return ay(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ue(ye,ye.current),r)break;return null;case 22:case 23:return e.lanes=0,iy(t,e,n)}return bn(t,e,n)}var uy,Qc,cy,dy;uy=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Qc=function(){};cy=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,br(ln.current);var s=null;switch(n){case"input":i=mc(t,i),r=mc(t,r),s=[];break;case"select":i=Ee({},i,{value:void 0}),r=Ee({},r,{value:void 0}),s=[];break;case"textarea":i=yc(t,i),r=yc(t,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=Ol)}wc(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Qs.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var a=r[u];if(l=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(o in l)!l.hasOwnProperty(o)||a&&a.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in a)a.hasOwnProperty(o)&&l[o]!==a[o]&&(n||(n={}),n[o]=a[o])}else n||(s||(s=[]),s.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(s=s||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(s=s||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Qs.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&de("scroll",t),s||l===a||(s=[])):(s=s||[]).push(u,a))}n&&(s=s||[]).push("style",n);var u=s;(e.updateQueue=u)&&(e.flags|=4)}};dy=function(t,e,n,r){n!==r&&(e.flags|=4)};function _s(t,e){if(!me)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Ye(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function vC(t,e,n){var r=e.pendingProps;switch(nh(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ye(e),null;case 1:return ft(e.type)&&Ll(),Ye(e),null;case 3:return r=e.stateNode,zi(),he(ht),he(et),dh(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(nl(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Ht!==null&&(td(Ht),Ht=null))),Qc(t,e),Ye(e),null;case 5:ch(e);var i=br(so.current);if(n=e.type,t!==null&&e.stateNode!=null)cy(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(T(166));return Ye(e),null}if(t=br(ln.current),nl(e)){r=e.stateNode,n=e.type;var s=e.memoizedProps;switch(r[rn]=e,r[ro]=s,t=(e.mode&1)!==0,n){case"dialog":de("cancel",r),de("close",r);break;case"iframe":case"object":case"embed":de("load",r);break;case"video":case"audio":for(i=0;i<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[rn]=e,t[ro]=r,uy(t,e,!1,!1),e.stateNode=t;e:{switch(o=Ec(n,r),n){case"dialog":de("cancel",t),de("close",t),i=r;break;case"iframe":case"object":case"embed":de("load",t),i=r;break;case"video":case"audio":for(i=0;iWi&&(e.flags|=128,r=!0,_s(s,!1),e.lanes=4194304)}else{if(!r)if(t=$l(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),_s(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!me)return Ye(e),null}else 2*Te()-s.renderingStartTime>Wi&&n!==1073741824&&(e.flags|=128,r=!0,_s(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(n=s.last,n!==null?n.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Te(),e.sibling=null,n=ye.current,ue(ye,r?n&1|2:n&1),e):(Ye(e),null);case 22:case 23:return Ch(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?yt&1073741824&&(Ye(e),e.subtreeFlags&6&&(e.flags|=8192)):Ye(e),null;case 24:return null;case 25:return null}throw Error(T(156,e.tag))}function wC(t,e){switch(nh(e),e.tag){case 1:return ft(e.type)&&Ll(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return zi(),he(ht),he(et),dh(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return ch(e),null;case 13:if(he(ye),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(T(340));Ui()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return he(ye),null;case 4:return zi(),null;case 10:return oh(e.type._context),null;case 22:case 23:return Ch(),null;case 24:return null;default:return null}}var sl=!1,Xe=!1,EC=typeof WeakSet=="function"?WeakSet:Set,A=null;function Si(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Se(t,e,r)}else n.current=null}function Kc(t,e,n){try{n()}catch(r){Se(t,e,r)}}var Dp=!1;function CC(t,e){if(bc=bl,t=m_(),eh(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,l=-1,a=-1,u=0,c=0,d=t,h=null;t:for(;;){for(var _;d!==n||i!==0&&d.nodeType!==3||(l=o+i),d!==s||r!==0&&d.nodeType!==3||(a=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(_=d.firstChild)!==null;)h=d,d=_;for(;;){if(d===t)break t;if(h===n&&++u===i&&(l=o),h===s&&++c===r&&(a=o),(_=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=_}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Dc={focusedElem:t,selectionRange:n},bl=!1,A=e;A!==null;)if(e=A,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,A=t;else for(;A!==null;){e=A;try{var v=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var w=v.memoizedProps,S=v.memoizedState,g=e.stateNode,m=g.getSnapshotBeforeUpdate(e.elementType===e.type?w:zt(e.type,w),S);g.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var y=e.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(T(163))}}catch(p){Se(e,e.return,p)}if(t=e.sibling,t!==null){t.return=e.return,A=t;break}A=e.return}return v=Dp,Dp=!1,v}function Fs(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&Kc(e,n,s)}i=i.next}while(i!==r)}}function xa(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function qc(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function hy(t){var e=t.alternate;e!==null&&(t.alternate=null,hy(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[rn],delete e[ro],delete e[Lc],delete e[iC],delete e[sC])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function fy(t){return t.tag===5||t.tag===3||t.tag===4}function Ap(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||fy(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Yc(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Ol));else if(r!==4&&(t=t.child,t!==null))for(Yc(t,e,n),t=t.sibling;t!==null;)Yc(t,e,n),t=t.sibling}function Xc(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(Xc(t,e,n),t=t.sibling;t!==null;)Xc(t,e,n),t=t.sibling}var Ge=null,$t=!1;function zn(t,e,n){for(n=n.child;n!==null;)py(t,e,n),n=n.sibling}function py(t,e,n){if(on&&typeof on.onCommitFiberUnmount=="function")try{on.onCommitFiberUnmount(ga,n)}catch{}switch(n.tag){case 5:Xe||Si(n,e);case 6:var r=Ge,i=$t;Ge=null,zn(t,e,n),Ge=r,$t=i,Ge!==null&&($t?(t=Ge,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Ge.removeChild(n.stateNode));break;case 18:Ge!==null&&($t?(t=Ge,n=n.stateNode,t.nodeType===8?Mu(t.parentNode,n):t.nodeType===1&&Mu(t,n),Js(t)):Mu(Ge,n.stateNode));break;case 4:r=Ge,i=$t,Ge=n.stateNode.containerInfo,$t=!0,zn(t,e,n),Ge=r,$t=i;break;case 0:case 11:case 14:case 15:if(!Xe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Kc(n,e,o),i=i.next}while(i!==r)}zn(t,e,n);break;case 1:if(!Xe&&(Si(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Se(n,e,l)}zn(t,e,n);break;case 21:zn(t,e,n);break;case 22:n.mode&1?(Xe=(r=Xe)||n.memoizedState!==null,zn(t,e,n),Xe=r):zn(t,e,n);break;default:zn(t,e,n)}}function Op(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new EC),e.forEach(function(r){var i=bC.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ut(t,e){var n=e.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~s}if(r=i,r=Te()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*xC(r/1960))-r,10t?16:t,Qn===null)var r=!1;else{if(t=Qn,Qn=null,Ql=0,X&6)throw Error(T(331));var i=X;for(X|=4,A=t.current;A!==null;){var s=A,o=s.child;if(A.flags&16){var l=s.deletions;if(l!==null){for(var a=0;aTe()-wh?Lr(t,0):vh|=n),pt(t,e)}function Cy(t,e){e===0&&(t.mode&1?(e=Yo,Yo<<=1,!(Yo&130023424)&&(Yo=4194304)):e=1);var n=st();t=Pn(t,e),t!==null&&(Ro(t,e,n),pt(t,n))}function PC(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),Cy(t,n)}function bC(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(T(314))}r!==null&&r.delete(e),Cy(t,n)}var Sy;Sy=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||ht.current)ct=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return ct=!1,yC(t,e,n);ct=!!(t.flags&131072)}else ct=!1,me&&e.flags&1048576&&T_(e,Fl,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;Cl(t,e),t=e.pendingProps;var i=Fi(e,et.current);bi(e,n),i=fh(null,e,r,t,i,n);var s=ph();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,ft(r)?(s=!0,Ml(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ah(e),i.updater=Ca,e.stateNode=i,i._reactInternals=e,zc(e,r,t,n),e=Hc(null,e,r,!0,s,n)):(e.tag=0,me&&s&&th(e),nt(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(Cl(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=AC(r),t=zt(r,t),i){case 0:e=Wc(null,e,r,t,n);break e;case 1:e=Ip(null,e,r,t,n);break e;case 11:e=Rp(null,e,r,t,n);break e;case 14:e=Np(null,e,r,zt(r.type,t),n);break e}throw Error(T(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:zt(r,i),Wc(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:zt(r,i),Ip(t,e,r,i,n);case 3:e:{if(oy(e),t===null)throw Error(T(387));r=e.pendingProps,s=e.memoizedState,i=s.element,P_(t,e),zl(e,r,null,n);var o=e.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=$i(Error(T(423)),e),e=Pp(t,e,r,n,i);break e}else if(r!==i){i=$i(Error(T(424)),e),e=Pp(t,e,r,n,i);break e}else for(vt=Zn(e.stateNode.containerInfo.firstChild),wt=e,me=!0,Ht=null,n=O_(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ui(),r===i){e=bn(t,e,n);break e}nt(t,e,r,n)}e=e.child}return e;case 5:return L_(e),t===null&&Fc(e),r=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,Ac(r,i)?o=null:s!==null&&Ac(r,s)&&(e.flags|=32),sy(t,e),nt(t,e,o,n),e.child;case 6:return t===null&&Fc(e),null;case 13:return ly(t,e,n);case 4:return uh(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Bi(e,null,r,n):nt(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:zt(r,i),Rp(t,e,r,i,n);case 7:return nt(t,e,e.pendingProps,n),e.child;case 8:return nt(t,e,e.pendingProps.children,n),e.child;case 12:return nt(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,ue(Ul,r._currentValue),r._currentValue=o,s!==null)if(qt(s.value,o)){if(s.children===i.children&&!ht.current){e=bn(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var l=s.dependencies;if(l!==null){o=s.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(s.tag===1){a=Sn(-1,n&-n),a.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Uc(s.return,n,e),l.lanes|=n;break}a=a.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(T(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Uc(o,n,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}nt(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,bi(e,n),i=Lt(i),r=r(i),e.flags|=1,nt(t,e,r,n),e.child;case 14:return r=e.type,i=zt(r,e.pendingProps),i=zt(r.type,i),Np(t,e,r,i,n);case 15:return ry(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:zt(r,i),Cl(t,e),e.tag=1,ft(r)?(t=!0,Ml(e)):t=!1,bi(e,n),D_(e,r,i),zc(e,r,i,n),Hc(null,e,r,!0,t,n);case 19:return ay(t,e,n);case 22:return iy(t,e,n)}throw Error(T(156,e.tag))};function xy(t,e){return Yg(t,e)}function DC(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pt(t,e,n,r){return new DC(t,e,n,r)}function xh(t){return t=t.prototype,!(!t||!t.isReactComponent)}function AC(t){if(typeof t=="function")return xh(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Wd)return 11;if(t===Hd)return 14}return 2}function rr(t,e){var n=t.alternate;return n===null?(n=Pt(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function kl(t,e,n,r,i,s){var o=2;if(r=t,typeof t=="function")xh(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case pi:return Mr(n.children,i,s,e);case $d:o=8,i|=8;break;case dc:return t=Pt(12,n,e,i|2),t.elementType=dc,t.lanes=s,t;case hc:return t=Pt(13,n,e,i),t.elementType=hc,t.lanes=s,t;case fc:return t=Pt(19,n,e,i),t.elementType=fc,t.lanes=s,t;case Ag:return Ta(n,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case bg:o=10;break e;case Dg:o=9;break e;case Wd:o=11;break e;case Hd:o=14;break e;case $n:o=16,r=null;break e}throw Error(T(130,t==null?t:typeof t,""))}return e=Pt(o,n,e,i),e.elementType=t,e.type=r,e.lanes=s,e}function Mr(t,e,n,r){return t=Pt(7,t,r,e),t.lanes=n,t}function Ta(t,e,n,r){return t=Pt(22,t,r,e),t.elementType=Ag,t.lanes=n,t.stateNode={isHidden:!1},t}function Hu(t,e,n){return t=Pt(6,t,null,e),t.lanes=n,t}function Vu(t,e,n){return e=Pt(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function OC(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ku(0),this.expirationTimes=ku(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ku(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function kh(t,e,n,r,i,s,o,l,a){return t=new OC(t,e,n,l,a),e===1?(e=1,s===!0&&(e|=8)):e=0,s=Pt(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ah(s),t}function LC(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ny)}catch(t){console.error(t)}}Ny(),Tg.exports=xt;var BC=Tg.exports,$p=BC;uc.createRoot=$p.createRoot,uc.hydrateRoot=$p.hydrateRoot;function ba(){const t=new Date().getFullYear();return f.jsx(f.Fragment,{children:f.jsx("div",{className:"border-top",style:{backgroundColor:"white"},children:f.jsx("div",{className:"py-3",children:f.jsxs("p",{className:"text-center text-muted font-weight-bold",children:["© ",t," COPYRIGHT GDSC SMIT"]})})})})}const zC=()=>{const t=[{id:1,title:"Seminar",image:"https://medschool.vanderbilt.edu/wp-content/uploads/sites/35/public_files/13314405705_fa3a6e6850_k.jpg",description:"Exploring Emerging Tech Trends Together.",classes:"bg-red rounded"},{id:2,title:"Projects",image:"https://www.thebvnewspaper.com/wp-content/uploads/2021/04/Group-Projects.jpg",description:"Building Solutions, Empowering Communities.",classes:"bg-green rounded"},{id:3,title:"Workshop",image:"https://studio180theatre.com/wp-content/uploads/2023/08/Studio-180-Education-Workshop-68-1-1200x801.jpg",description:"Hands-On Learning for Tech Enthusiasts",classes:"bg-yellow rounded"},{id:4,title:"Hackathons",image:"https://www.coresponsibility.com/wp-content/uploads/2016/03/cr-students-hack.jpg",description:"Innovate, Collaborate, Create, Win!",classes:"bg-blue rounded"}];return f.jsx(f.Fragment,{children:f.jsxs("div",{className:"my-5 w-75 mx-auto",children:[f.jsxs("div",{className:"d-flex flex-column justify-center",children:[f.jsx("h1",{className:"text-center display-5 font-bold",children:"Vision"}),f.jsx("p",{className:"text-2xl text-center max-w-lg md:max-w-2xl",children:"GDSC SMIT is inspired by the Google Developer's Family"}),f.jsxs("p",{className:"text-2xl text-center max-w-lg md:max-w-2xl",children:["Our goal is to learn, explore, innovate and create ",f.jsx("br",{})," And also, having fun!"]})]}),f.jsx("div",{className:"d-flex flex-md-row flex-column text-center vh-25 ",children:t.map(({id:e,title:n,description:r,classes:i,image:s})=>f.jsxs("div",{className:"vision_card rounded my-2 mx-2 w-100 border border-light-subtle",children:[f.jsxs("div",{className:"my-4 mx-4 d-flex flex-column ",children:[f.jsx("img",{className:"w-100 rounded",src:s,style:{height:"155px"}}),f.jsx("span",{className:`vision_card__title fw-bold text-white rounded p-2 w-75 my-4 px-3 ${i} mx-auto`,children:n})]}),f.jsx("p",{className:"w-75 mx-auto",children:r})]},e))})]})})};var Iy={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Wp=Cn.createContext&&Cn.createContext(Iy),ir=globalThis&&globalThis.__assign||function(){return ir=Object.assign||function(t){for(var e,n=1,r=arguments.length;n{const[t,e]=P.useState(!1);P.useEffect(()=>{const r=()=>{(window.scrollY||document.documentElement.scrollTop)>window.innerHeight/2?e(!0):e(!1)};return window.addEventListener("scroll",r),()=>{window.removeEventListener("scroll",r)}},[]);const n=()=>{window.scrollTo({top:0,behavior:"smooth"})};return f.jsx("div",{className:`scroll-to-top-button ${t?"visible":""}`,children:f.jsx("button",{onClick:n,children:f.jsx(VC,{})})})};function QC(){return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"container divone",children:[f.jsx("div",{className:"display-5",children:"Welcome to GDSC SMIT "}),f.jsxs("div",{className:"row",children:[f.jsxs("div",{className:"col-md-8",children:[f.jsx("div",{className:"my-5",children:f.jsx("div",{className:"text-lg text-sm",children:"Google Developer Student Clubs are groups of students from diverse undergraduate or graduate programs with an interest in growing as a developer. As GDSC's chapter at Sikkim Manipal Institute of Technology, we aim to help students connect with like-minded developers, facilitate knowledge across several domains, from industry leaders to students and build solutions that will be the change we hope for."})}),f.jsxs("div",{className:"butone",children:[f.jsx("a",{href:"https://gdsc.community.dev/accounts/login/?next=/sikkim-manipal-institute-of-technology-gangtok/",children:f.jsx("button",{type:"button",className:"btn btn-primary mx-3",children:"Become Member"})}),f.jsx("a",{href:"https://developers.google.com/community/gdsc#:~:text=Google%20Developer%20Student%20Clubs%20(GDSC,as%20a%20developer%20are%20welcome.",children:f.jsx("button",{type:"button",className:"btn btn-outline-dark",children:"Learn More"})})]})]}),f.jsx("div",{className:"col-md-4",children:f.jsx("img",{src:"./img/gsc.png",className:"img-fluid",alt:"..."})})]})]}),f.jsx("div",{className:"d-flex container overflow-hidden text-center my-4 ",children:f.jsxs("div",{className:"gy-5 d-flex flex-md-row flex-column text-center my-5 justify-content-center align-items-center shadow-lg",children:[f.jsx("div",{className:"my-3 mx-3",children:f.jsxs("div",{className:"p-3 border bg-light",children:[f.jsx("b",{children:"Why GDSC?"}),f.jsx("br",{}),"By joining GDSC at SMIT, you gain access to numerous workshops, information sessions, and student-community collaborative projects"]})}),f.jsx("div",{className:"my-3 mx-3",children:f.jsxs("div",{className:"p-3 border bg-light",children:[f.jsx("b",{children:"Concept of GDSC"}),f.jsx("br",{}),"The purpose of GDSC is to inspire and empower students through understanding technology and reflecting on it's impact"]})})]})}),f.jsx(zC,{}),f.jsx("div",{className:"bg embed-responsive-16by9 text-center my-4",id:"Video",children:f.jsx("div",{className:"container-fluid overflow-hidden ",children:f.jsx("iframe",{className:"embed-responsive-item yt_video",width:"560",height:"315",src:"https://www.youtube.com/embed/earTjC0iSjg",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:!0})})}),f.jsx("div",{id:"endcontain",className:"container-fluid text-center my-4",children:f.jsx("strong",{children:f.jsxs("font",{size:"7",children:[f.jsx("font",{color:"#4285F4",children:"Connect. "}),f.jsx("font",{color:"#EA4335",children:"Learn. "}),f.jsx("font",{color:"#34A853",children:"Grow. "})]})})}),f.jsx(GC,{}),f.jsx(ba,{})]})}/** * @remix-run/router v1.8.0 * * Copyright (c) Remix Software Inc. @@ -46,8 +46,8 @@ Error generating stack: `+s.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function pe(){return pe=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function $i(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function UC(){return Math.random().toString(36).substr(2,8)}function zp(t,e){return{usr:t.state,key:t.key,idx:e}}function ao(t,e,n,r){return n===void 0&&(n=null),pe({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?An(e):e,{state:n,key:e&&e.key||r||UC()})}function $r(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function An(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function BC(t,e,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,l=Ie.Pop,a=null,u=c();u==null&&(u=0,o.replaceState(pe({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function d(){l=Ie.Pop;let S=c(),g=S==null?null:S-u;u=S,a&&a({action:l,location:w.location,delta:g})}function h(S,g){l=Ie.Push;let m=ao(w.location,S,g);n&&n(m,S),u=c()+1;let y=zp(m,u),p=w.createHref(m);try{o.pushState(y,"",p)}catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;i.location.assign(p)}s&&a&&a({action:l,location:w.location,delta:1})}function _(S,g){l=Ie.Replace;let m=ao(w.location,S,g);n&&n(m,S),u=c();let y=zp(m,u),p=w.createHref(m);o.replaceState(y,"",p),s&&a&&a({action:l,location:w.location,delta:0})}function v(S){let g=i.location.origin!=="null"?i.location.origin:i.location.href,m=typeof S=="string"?S:$r(S);return q(g,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,g)}let w={get action(){return l},get location(){return t(i,o)},listen(S){if(a)throw new Error("A history only accepts one active listener");return i.addEventListener(Bp,d),a=S,()=>{i.removeEventListener(Bp,d),a=null}},createHref(S){return e(i,S)},createURL:v,encodeLocation(S){let g=v(S);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:h,replace:_,go(S){return o.go(S)}};return w}var ke;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(ke||(ke={}));const zC=new Set(["lazy","caseSensitive","path","id","index","children"]);function $C(t){return t.index===!0}function Zc(t,e,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),t.map((i,s)=>{let o=[...n,s],l=typeof i.id=="string"?i.id:o.join("-");if(q(i.index!==!0||!i.children,"Cannot specify children on an index route"),q(!r[l],'Found a route id collision on id "'+l+`". Route id's must be globally unique within Data Router usages`),$C(i)){let a=pe({},i,e(i),{id:l});return r[l]=a,a}else{let a=pe({},i,e(i),{id:l,children:void 0});return r[l]=a,i.children&&(a.children=Zc(i.children,e,o,r)),a}})}function Si(t,e,n){n===void 0&&(n="/");let r=typeof e=="string"?An(e):e,i=Xi(r.pathname||"/",n);if(i==null)return null;let s=Ty(t);WC(s);let o=null;for(let l=0;o==null&&l{let a={relativePath:l===void 0?s.path||"":l,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};a.relativePath.startsWith("/")&&(q(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(r.length));let u=Sn([r,a.relativePath]),c=n.concat(a);s.children&&s.children.length>0&&(q(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Ty(s.children,e,c,u)),!(s.path==null&&!s.index)&&e.push({path:u,score:YC(u,s.index),routesMeta:c})};return t.forEach((s,o)=>{var l;if(s.path===""||!((l=s.path)!=null&&l.includes("?")))i(s,o);else for(let a of Ry(s.path))i(s,o,a)}),e}function Ry(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=Ry(r.join("/")),l=[];return l.push(...o.map(a=>a===""?s:[s,a].join("/"))),i&&l.push(...o),l.map(a=>t.startsWith("/")&&a===""?"/":a)}function WC(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:XC(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const HC=/^:\w+$/,VC=3,GC=2,QC=1,KC=10,qC=-2,$p=t=>t==="*";function YC(t,e){let n=t.split("/"),r=n.length;return n.some($p)&&(r+=qC),e&&(r+=GC),n.filter(i=>!$p(i)).reduce((i,s)=>i+(HC.test(s)?VC:s===""?QC:KC),r)}function XC(t,e){return t.length===e.length&&t.slice(0,-1).every((r,i)=>r===e[i])?t[t.length-1]-e[e.length-1]:0}function JC(t,e){let{routesMeta:n}=t,r={},i="/",s=[];for(let o=0;o{if(c==="*"){let h=l[d]||"";o=s.slice(0,s.length-h.length).replace(/(.)\/+$/,"$1")}return u[c]=nS(l[d]||"",c),u},{}),pathname:s,pathnameBase:o,pattern:t}}function eS(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),$i(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(o,l)=>(r.push(l),"/([^\\/]+)"));return t.endsWith("*")?(r.push("*"),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function tS(t){try{return decodeURI(t)}catch(e){return $i(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function nS(t,e){try{return decodeURIComponent(t)}catch(n){return $i(!1,'The value for the URL param "'+e+'" will not be decoded because'+(' the string "'+t+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),t}}function Xi(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function rS(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?An(t):t;return{pathname:n?n.startsWith("/")?n:iS(n,e):e,search:oS(r),hash:lS(i)}}function iS(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Wu(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Pa(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function Th(t,e,n,r){r===void 0&&(r=!1);let i;typeof t=="string"?i=An(t):(i=pe({},t),q(!i.pathname||!i.pathname.includes("?"),Wu("?","pathname","search",i)),q(!i.pathname||!i.pathname.includes("#"),Wu("#","pathname","hash",i)),q(!i.search||!i.search.includes("#"),Wu("#","search","hash",i)));let s=t===""||i.pathname==="",o=s?"/":i.pathname,l;if(r||o==null)l=n;else{let d=e.length-1;if(o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),d-=1;i.pathname=h.join("/")}l=d>=0?e[d]:"/"}let a=rS(i,l),u=o&&o!=="/"&&o.endsWith("/"),c=(s||o===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(u||c)&&(a.pathname+="/"),a}const Sn=t=>t.join("/").replace(/\/\/+/g,"/"),sS=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),oS=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,lS=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class Rh{constructor(e,n,r,i){i===void 0&&(i=!1),this.status=e,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Ny(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const Iy=["post","put","patch","delete"],aS=new Set(Iy),uS=["get",...Iy],cS=new Set(uS),dS=new Set([301,302,303,307,308]),hS=new Set([307,308]),Hu={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},fS={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},_s={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Py=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,pS=t=>({hasErrorBoundary:!!t.hasErrorBoundary});function mS(t){const e=t.window?t.window:typeof window<"u"?window:void 0,n=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",r=!n;q(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(t.mapRouteProperties)i=t.mapRouteProperties;else if(t.detectErrorBoundary){let E=t.detectErrorBoundary;i=C=>({hasErrorBoundary:E(C)})}else i=pS;let s={},o=Zc(t.routes,i,void 0,s),l,a=t.basename||"/",u=pe({v7_normalizeFormMethod:!1,v7_prependBasename:!1},t.future),c=null,d=new Set,h=null,_=null,v=null,w=t.hydrationData!=null,S=Si(o,t.history.location,a),g=null;if(S==null){let E=Tt(404,{pathname:t.history.location.pathname}),{matches:C,route:k}=Yp(o);S=C,g={[k.id]:E}}let m=!S.some(E=>E.route.lazy)&&(!S.some(E=>E.route.loader)||t.hydrationData!=null),y,p={historyAction:t.history.action,location:t.history.location,matches:S,initialized:m,navigation:Hu,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||g,fetchers:new Map,blockers:new Map},x=Ie.Pop,I=!1,N,D=!1,Q=!1,B=[],Le=[],oe=new Map,Jt=0,Ln=-1,Mn=new Map,_t=new Set,Zt=new Map,b=new Map,F=new Map,H=!1;function _e(){return c=t.history.listen(E=>{let{action:C,location:k,delta:O}=E;if(H){H=!1;return}$i(F.size===0||O!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let W=Rf({currentLocation:p.location,nextLocation:k,historyAction:C});if(W&&O!=null){H=!0,t.history.go(O*-1),zo(W,{state:"blocked",location:k,proceed(){zo(W,{state:"proceeding",proceed:void 0,reset:void 0,location:k}),t.history.go(O)},reset(){let z=new Map(p.blockers);z.set(W,_s),le({blockers:z})}});return}return jn(C,k)}),p.initialized||jn(Ie.Pop,p.location),y}function Ne(){c&&c(),d.clear(),N&&N.abort(),p.fetchers.forEach((E,C)=>cu(C)),p.blockers.forEach((E,C)=>Tf(C))}function ri(E){return d.add(E),()=>d.delete(E)}function le(E){p=pe({},p,E),d.forEach(C=>C(p))}function fn(E,C){var k,O;let W=p.actionData!=null&&p.navigation.formMethod!=null&&Wt(p.navigation.formMethod)&&p.navigation.state==="loading"&&((k=E.state)==null?void 0:k._isRedirect)!==!0,z;C.actionData?Object.keys(C.actionData).length>0?z=C.actionData:z=null:W?z=p.actionData:z=null;let $=C.loaderData?qp(p.loaderData,C.loaderData,C.matches||[],C.errors):p.loaderData,M=p.blockers;M.size>0&&(M=new Map(M),M.forEach((re,He)=>M.set(He,_s)));let L=I===!0||p.navigation.formMethod!=null&&Wt(p.navigation.formMethod)&&((O=E.state)==null?void 0:O._isRedirect)!==!0;l&&(o=l,l=void 0),D||x===Ie.Pop||(x===Ie.Push?t.history.push(E,E.state):x===Ie.Replace&&t.history.replace(E,E.state)),le(pe({},C,{actionData:z,loaderData:$,historyAction:x,location:E,initialized:!0,navigation:Hu,revalidation:"idle",restoreScrollPosition:If(E,C.matches||p.matches),preventScrollReset:L,blockers:M})),x=Ie.Pop,I=!1,D=!1,Q=!1,B=[],Le=[]}async function en(E,C){if(typeof E=="number"){t.history.go(E);return}let k=ed(p.location,p.matches,a,u.v7_prependBasename,E,C==null?void 0:C.fromRouteId,C==null?void 0:C.relative),{path:O,submission:W,error:z}=Wp(u.v7_normalizeFormMethod,!1,k,C),$=p.location,M=ao(p.location,O,C&&C.state);M=pe({},M,t.history.encodeLocation(M));let L=C&&C.replace!=null?C.replace:void 0,re=Ie.Push;L===!0?re=Ie.Replace:L===!1||W!=null&&Wt(W.formMethod)&&W.formAction===p.location.pathname+p.location.search&&(re=Ie.Replace);let He=C&&"preventScrollReset"in C?C.preventScrollReset===!0:void 0,te=Rf({currentLocation:$,nextLocation:M,historyAction:re});if(te){zo(te,{state:"blocked",location:M,proceed(){zo(te,{state:"proceeding",proceed:void 0,reset:void 0,location:M}),en(E,C)},reset(){let xe=new Map(p.blockers);xe.set(te,_s),le({blockers:xe})}});return}return await jn(re,M,{submission:W,pendingError:z,preventScrollReset:He,replace:C&&C.replace})}function ii(){if(uu(),le({revalidation:"loading"}),p.navigation.state!=="submitting"){if(p.navigation.state==="idle"){jn(p.historyAction,p.location,{startUninterruptedRevalidation:!0});return}jn(x||p.historyAction,p.navigation.location,{overrideNavigation:p.navigation})}}async function jn(E,C,k){N&&N.abort(),N=null,x=E,D=(k&&k.startUninterruptedRevalidation)===!0,s0(p.location,p.matches),I=(k&&k.preventScrollReset)===!0;let O=l||o,W=k&&k.overrideNavigation,z=Si(O,C,a);if(!z){let xe=Tt(404,{pathname:C.pathname}),{matches:Me,route:Er}=Yp(O);du(),fn(C,{matches:Me,loaderData:{},errors:{[Er.id]:xe}});return}if(p.initialized&&!Q&&wS(p.location,C)&&!(k&&k.submission&&Wt(k.submission.formMethod))){fn(C,{matches:z});return}N=new AbortController;let $=vs(t.history,C,N.signal,k&&k.submission),M,L;if(k&&k.pendingError)L={[xi(z).route.id]:k.pendingError};else if(k&&k.submission&&Wt(k.submission.formMethod)){let xe=await Jw($,C,k.submission,z,{replace:k.replace});if(xe.shortCircuited)return;M=xe.pendingActionData,L=xe.pendingActionError,W=ol(C,k.submission),$=new Request($.url,{signal:$.signal})}let{shortCircuited:re,loaderData:He,errors:te}=await Zw($,C,z,W,k&&k.submission,k&&k.fetcherSubmission,k&&k.replace,M,L);re||(N=null,fn(C,pe({matches:z},M?{actionData:M}:{},{loaderData:He,errors:te})))}async function Jw(E,C,k,O,W){W===void 0&&(W={}),uu();let z=kS(C,k);le({navigation:z});let $,M=nd(O,C);if(!M.route.action&&!M.route.lazy)$={type:ke.error,error:Tt(405,{method:E.method,pathname:C.pathname,routeId:M.route.id})};else if($=await ys("action",E,M,O,s,i,a),E.signal.aborted)return{shortCircuited:!0};if(bi($)){let L;return W&&W.replace!=null?L=W.replace:L=$.location===p.location.pathname+p.location.search,await os(p,$,{submission:k,replace:L}),{shortCircuited:!0}}if(Us($)){let L=xi(O,M.route.id);return(W&&W.replace)!==!0&&(x=Ie.Push),{pendingActionData:{},pendingActionError:{[L.route.id]:$.error}}}if(Pr($))throw Tt(400,{type:"defer-action"});return{pendingActionData:{[M.route.id]:$.data}}}async function Zw(E,C,k,O,W,z,$,M,L){let re=O||ol(C,W),He=W||z||Zp(re),te=l||o,[xe,Me]=Hp(t.history,p,k,He,C,Q,B,Le,Zt,_t,te,a,M,L);if(du(ne=>!(k&&k.some(Ft=>Ft.route.id===ne))||xe&&xe.some(Ft=>Ft.route.id===ne)),Ln=++Jt,xe.length===0&&Me.length===0){let ne=xf();return fn(C,pe({matches:k,loaderData:{},errors:L||null},M?{actionData:M}:{},ne?{fetchers:new Map(p.fetchers)}:{})),{shortCircuited:!0}}if(!D){Me.forEach(Ft=>{let Un=p.fetchers.get(Ft.key),gu=ws(void 0,Un?Un.data:void 0);p.fetchers.set(Ft.key,gu)});let ne=M||p.actionData;le(pe({navigation:re},ne?Object.keys(ne).length===0?{actionData:null}:{actionData:ne}:{},Me.length>0?{fetchers:new Map(p.fetchers)}:{}))}Me.forEach(ne=>{oe.has(ne.key)&&Fn(ne.key),ne.controller&&oe.set(ne.key,ne.controller)});let Er=()=>Me.forEach(ne=>Fn(ne.key));N&&N.signal.addEventListener("abort",Er);let{results:Cr,loaderResults:ls,fetcherResults:hu}=await Cf(p.matches,k,xe,Me,E);if(E.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener("abort",Er),Me.forEach(ne=>oe.delete(ne.key));let pn=Xp(Cr);if(pn){if(pn.idx>=xe.length){let ne=Me[pn.idx-xe.length].key;_t.add(ne)}return await os(p,pn.result,{replace:$}),{shortCircuited:!0}}let{loaderData:mn,errors:$o}=Kp(p,k,xe,ls,L,Me,hu,b);b.forEach((ne,Ft)=>{ne.subscribe(Un=>{(Un||ne.done)&&b.delete(Ft)})});let fu=xf(),pu=kf(Ln),mu=fu||pu||Me.length>0;return pe({loaderData:mn,errors:$o},mu?{fetchers:new Map(p.fetchers)}:{})}function Ef(E){return p.fetchers.get(E)||fS}function e0(E,C,k,O){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");oe.has(E)&&Fn(E);let W=l||o,z=ed(p.location,p.matches,a,u.v7_prependBasename,k,C,O==null?void 0:O.relative),$=Si(W,z,a);if(!$){Bo(E,C,Tt(404,{pathname:z}));return}let{path:M,submission:L,error:re}=Wp(u.v7_normalizeFormMethod,!0,z,O);if(re){Bo(E,C,re);return}let He=nd($,M);if(I=(O&&O.preventScrollReset)===!0,L&&Wt(L.formMethod)){t0(E,C,M,He,$,L);return}Zt.set(E,{routeId:C,path:M}),n0(E,C,M,He,$,L)}async function t0(E,C,k,O,W,z){if(uu(),Zt.delete(E),!O.route.action&&!O.route.lazy){let be=Tt(405,{method:z.formMethod,pathname:k,routeId:C});Bo(E,C,be);return}let $=p.fetchers.get(E),M=TS(z,$);p.fetchers.set(E,M),le({fetchers:new Map(p.fetchers)});let L=new AbortController,re=vs(t.history,k,L.signal,z);oe.set(E,L);let He=Jt,te=await ys("action",re,O,W,s,i,a);if(re.signal.aborted){oe.get(E)===L&&oe.delete(E);return}if(bi(te))if(oe.delete(E),Ln>He){let be=ui(void 0);p.fetchers.set(E,be),le({fetchers:new Map(p.fetchers)});return}else{_t.add(E);let be=ws(z);return p.fetchers.set(E,be),le({fetchers:new Map(p.fetchers)}),os(p,te,{submission:z,isFetchActionRedirect:!0})}if(Us(te)){Bo(E,C,te.error);return}if(Pr(te))throw Tt(400,{type:"defer-action"});let xe=p.navigation.location||p.location,Me=vs(t.history,xe,L.signal),Er=l||o,Cr=p.navigation.state!=="idle"?Si(Er,p.navigation.location,a):p.matches;q(Cr,"Didn't find any matches after fetcher action");let ls=++Jt;Mn.set(E,ls);let hu=ws(z,te.data);p.fetchers.set(E,hu);let[pn,mn]=Hp(t.history,p,Cr,z,xe,Q,B,Le,Zt,_t,Er,a,{[O.route.id]:te.data},void 0);mn.filter(be=>be.key!==E).forEach(be=>{let as=be.key,Pf=p.fetchers.get(as),l0=ws(void 0,Pf?Pf.data:void 0);p.fetchers.set(as,l0),oe.has(as)&&Fn(as),be.controller&&oe.set(as,be.controller)}),le({fetchers:new Map(p.fetchers)});let $o=()=>mn.forEach(be=>Fn(be.key));L.signal.addEventListener("abort",$o);let{results:fu,loaderResults:pu,fetcherResults:mu}=await Cf(p.matches,Cr,pn,mn,Me);if(L.signal.aborted)return;L.signal.removeEventListener("abort",$o),Mn.delete(E),oe.delete(E),mn.forEach(be=>oe.delete(be.key));let ne=Xp(fu);if(ne){if(ne.idx>=pn.length){let be=mn[ne.idx-pn.length].key;_t.add(be)}return os(p,ne.result)}let{loaderData:Ft,errors:Un}=Kp(p,p.matches,pn,pu,void 0,mn,mu,b);if(p.fetchers.has(E)){let be=ui(te.data);p.fetchers.set(E,be)}let gu=kf(ls);p.navigation.state==="loading"&&ls>Ln?(q(x,"Expected pending action"),N&&N.abort(),fn(p.navigation.location,{matches:Cr,loaderData:Ft,errors:Un,fetchers:new Map(p.fetchers)})):(le(pe({errors:Un,loaderData:qp(p.loaderData,Ft,Cr,Un)},gu||mn.length>0?{fetchers:new Map(p.fetchers)}:{})),Q=!1)}async function n0(E,C,k,O,W,z){let $=p.fetchers.get(E),M=ws(z,$?$.data:void 0);p.fetchers.set(E,M),le({fetchers:new Map(p.fetchers)});let L=new AbortController,re=vs(t.history,k,L.signal);oe.set(E,L);let He=Jt,te=await ys("loader",re,O,W,s,i,a);if(Pr(te)&&(te=await Ay(te,re.signal,!0)||te),oe.get(E)===L&&oe.delete(E),re.signal.aborted)return;if(bi(te))if(Ln>He){let Me=ui(void 0);p.fetchers.set(E,Me),le({fetchers:new Map(p.fetchers)});return}else{_t.add(E),await os(p,te);return}if(Us(te)){let Me=xi(p.matches,C);p.fetchers.delete(E),le({fetchers:new Map(p.fetchers),errors:{[Me.route.id]:te.error}});return}q(!Pr(te),"Unhandled fetcher deferred data");let xe=ui(te.data);p.fetchers.set(E,xe),le({fetchers:new Map(p.fetchers)})}async function os(E,C,k){let{submission:O,replace:W,isFetchActionRedirect:z}=k===void 0?{}:k;C.revalidate&&(Q=!0);let $=ao(E.location,C.location,pe({_isRedirect:!0},z?{_isFetchActionRedirect:!0}:{}));if(q($,"Expected a location on the redirect navigation"),n){let re=!1;if(C.reloadDocument)re=!0;else if(Py.test(C.location)){const He=t.history.createURL(C.location);re=He.origin!==e.location.origin||Xi(He.pathname,a)==null}if(re){W?e.location.replace(C.location):e.location.assign(C.location);return}}N=null;let M=W===!0?Ie.Replace:Ie.Push,L=O||Zp(E.navigation);if(hS.has(C.status)&&L&&Wt(L.formMethod))await jn(M,$,{submission:pe({},L,{formAction:C.location}),preventScrollReset:I});else if(z)await jn(M,$,{overrideNavigation:ol($),fetcherSubmission:L,preventScrollReset:I});else{let re=ol($,L);await jn(M,$,{overrideNavigation:re,preventScrollReset:I})}}async function Cf(E,C,k,O,W){let z=await Promise.all([...k.map(L=>ys("loader",W,L,C,s,i,a)),...O.map(L=>L.matches&&L.match&&L.controller?ys("loader",vs(t.history,L.path,L.controller.signal),L.match,L.matches,s,i,a):{type:ke.error,error:Tt(404,{pathname:L.path})})]),$=z.slice(0,k.length),M=z.slice(k.length);return await Promise.all([Jp(E,k,$,$.map(()=>W.signal),!1,p.loaderData),Jp(E,O.map(L=>L.match),M,O.map(L=>L.controller?L.controller.signal:null),!0)]),{results:z,loaderResults:$,fetcherResults:M}}function uu(){Q=!0,B.push(...du()),Zt.forEach((E,C)=>{oe.has(C)&&(Le.push(C),Fn(C))})}function Bo(E,C,k){let O=xi(p.matches,C);cu(E),le({errors:{[O.route.id]:k},fetchers:new Map(p.fetchers)})}function cu(E){let C=p.fetchers.get(E);oe.has(E)&&!(C&&C.state==="loading"&&Mn.has(E))&&Fn(E),Zt.delete(E),Mn.delete(E),_t.delete(E),p.fetchers.delete(E)}function Fn(E){let C=oe.get(E);q(C,"Expected fetch controller: "+E),C.abort(),oe.delete(E)}function Sf(E){for(let C of E){let k=Ef(C),O=ui(k.data);p.fetchers.set(C,O)}}function xf(){let E=[],C=!1;for(let k of _t){let O=p.fetchers.get(k);q(O,"Expected fetcher: "+k),O.state==="loading"&&(_t.delete(k),E.push(k),C=!0)}return Sf(E),C}function kf(E){let C=[];for(let[k,O]of Mn)if(O0}function r0(E,C){let k=p.blockers.get(E)||_s;return F.get(E)!==C&&F.set(E,C),k}function Tf(E){p.blockers.delete(E),F.delete(E)}function zo(E,C){let k=p.blockers.get(E)||_s;q(k.state==="unblocked"&&C.state==="blocked"||k.state==="blocked"&&C.state==="blocked"||k.state==="blocked"&&C.state==="proceeding"||k.state==="blocked"&&C.state==="unblocked"||k.state==="proceeding"&&C.state==="unblocked","Invalid blocker state transition: "+k.state+" -> "+C.state);let O=new Map(p.blockers);O.set(E,C),le({blockers:O})}function Rf(E){let{currentLocation:C,nextLocation:k,historyAction:O}=E;if(F.size===0)return;F.size>1&&$i(!1,"A router only supports one blocker at a time");let W=Array.from(F.entries()),[z,$]=W[W.length-1],M=p.blockers.get(z);if(!(M&&M.state==="proceeding")&&$({currentLocation:C,nextLocation:k,historyAction:O}))return z}function du(E){let C=[];return b.forEach((k,O)=>{(!E||E(O))&&(k.cancel(),C.push(O),b.delete(O))}),C}function i0(E,C,k){if(h=E,v=C,_=k||null,!w&&p.navigation===Hu){w=!0;let O=If(p.location,p.matches);O!=null&&le({restoreScrollPosition:O})}return()=>{h=null,v=null,_=null}}function Nf(E,C){return _&&_(E,C.map(O=>xS(O,p.loaderData)))||E.key}function s0(E,C){if(h&&v){let k=Nf(E,C);h[k]=v()}}function If(E,C){if(h){let k=Nf(E,C),O=h[k];if(typeof O=="number")return O}return null}function o0(E){s={},l=Zc(E,i,void 0,s)}return y={get basename(){return a},get state(){return p},get routes(){return o},initialize:_e,subscribe:ri,enableScrollRestoration:i0,navigate:en,fetch:e0,revalidate:ii,createHref:E=>t.history.createHref(E),encodeLocation:E=>t.history.encodeLocation(E),getFetcher:Ef,deleteFetcher:cu,dispose:Ne,getBlocker:r0,deleteBlocker:Tf,_internalFetchControllers:oe,_internalActiveDeferreds:b,_internalSetRoutes:o0},y}function gS(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function ed(t,e,n,r,i,s,o){let l,a;if(s!=null&&o!=="path"){l=[];for(let c of e)if(l.push(c),c.route.id===s){a=c;break}}else l=e,a=e[e.length-1];let u=Th(i||".",Pa(l).map(c=>c.pathnameBase),Xi(t.pathname,n)||t.pathname,o==="path");return i==null&&(u.search=t.search,u.hash=t.hash),(i==null||i===""||i===".")&&a&&a.route.index&&!Nh(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:Sn([n,u.pathname])),$r(u)}function Wp(t,e,n,r){if(!r||!gS(r))return{path:n};if(r.formMethod&&!SS(r.formMethod))return{path:n,error:Tt(405,{method:r.formMethod})};let i=()=>({path:n,error:Tt(400,{type:"invalid-body"})}),s=r.formMethod||"get",o=t?s.toUpperCase():s.toLowerCase(),l=Dy(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Wt(o))return i();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((_,v)=>{let[w,S]=v;return""+_+w+"="+S+` -`},""):String(r.body);return{path:n,submission:{formMethod:o,formAction:l,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!Wt(o))return i();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:o,formAction:l,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return i()}}}q(typeof FormData=="function","FormData is not available in this environment");let a,u;if(r.formData)a=td(r.formData),u=r.formData;else if(r.body instanceof FormData)a=td(r.body),u=r.body;else if(r.body instanceof URLSearchParams)a=r.body,u=Qp(a);else if(r.body==null)a=new URLSearchParams,u=new FormData;else try{a=new URLSearchParams(r.body),u=Qp(a)}catch{return i()}let c={formMethod:o,formAction:l,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(Wt(c.formMethod))return{path:n,submission:c};let d=An(n);return e&&d.search&&Nh(d.search)&&a.append("index",""),d.search="?"+a,{path:$r(d),submission:c}}function _S(t,e){let n=t;if(e){let r=t.findIndex(i=>i.route.id===e);r>=0&&(n=t.slice(0,r))}return n}function Hp(t,e,n,r,i,s,o,l,a,u,c,d,h,_){let v=_?Object.values(_)[0]:h?Object.values(h)[0]:void 0,w=t.createURL(e.location),S=t.createURL(i),g=_?Object.keys(_)[0]:void 0,y=_S(n,g).filter((x,I)=>{if(x.route.lazy)return!0;if(x.route.loader==null)return!1;if(yS(e.loaderData,e.matches[I],x)||o.some(Q=>Q===x.route.id))return!0;let N=e.matches[I],D=x;return Vp(x,pe({currentUrl:w,currentParams:N.params,nextUrl:S,nextParams:D.params},r,{actionResult:v,defaultShouldRevalidate:s||w.pathname+w.search===S.pathname+S.search||w.search!==S.search||by(N,D)}))}),p=[];return a.forEach((x,I)=>{if(!n.some(Le=>Le.route.id===x.routeId))return;let N=Si(c,x.path,d);if(!N){p.push({key:I,routeId:x.routeId,path:x.path,matches:null,match:null,controller:null});return}let D=e.fetchers.get(I),Q=nd(N,x.path),B=!1;u.has(I)?B=!1:l.includes(I)?B=!0:D&&D.state!=="idle"&&D.data===void 0?B=s:B=Vp(Q,pe({currentUrl:w,currentParams:e.matches[e.matches.length-1].params,nextUrl:S,nextParams:n[n.length-1].params},r,{actionResult:v,defaultShouldRevalidate:s})),B&&p.push({key:I,routeId:x.routeId,path:x.path,matches:N,match:Q,controller:new AbortController})}),[y,p]}function yS(t,e,n){let r=!e||n.route.id!==e.route.id,i=t[n.route.id]===void 0;return r||i}function by(t,e){let n=t.route.path;return t.pathname!==e.pathname||n!=null&&n.endsWith("*")&&t.params["*"]!==e.params["*"]}function Vp(t,e){if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate(e);if(typeof n=="boolean")return n}return e.defaultShouldRevalidate}async function Gp(t,e,n){if(!t.lazy)return;let r=await t.lazy();if(!t.lazy)return;let i=n[t.id];q(i,"No route found in manifest");let s={};for(let o in r){let a=i[o]!==void 0&&o!=="hasErrorBoundary";$i(!a,'Route "'+i.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!a&&!zC.has(o)&&(s[o]=r[o])}Object.assign(i,s),Object.assign(i,pe({},e(i),{lazy:void 0}))}async function ys(t,e,n,r,i,s,o,l){l===void 0&&(l={});let a,u,c,d=v=>{let w,S=new Promise((g,m)=>w=m);return c=()=>w(),e.signal.addEventListener("abort",c),Promise.race([v({request:e,params:n.params,context:l.requestContext}),S])};try{let v=n.route[t];if(n.route.lazy)if(v)u=(await Promise.all([d(v),Gp(n.route,s,i)]))[0];else if(await Gp(n.route,s,i),v=n.route[t],v)u=await d(v);else if(t==="action"){let w=new URL(e.url),S=w.pathname+w.search;throw Tt(405,{method:e.method,pathname:S,routeId:n.route.id})}else return{type:ke.data,data:void 0};else if(v)u=await d(v);else{let w=new URL(e.url),S=w.pathname+w.search;throw Tt(404,{pathname:S})}q(u!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(v){a=ke.error,u=v}finally{c&&e.signal.removeEventListener("abort",c)}if(CS(u)){let v=u.status;if(dS.has(v)){let g=u.headers.get("Location");if(q(g,"Redirects returned/thrown from loaders/actions must have a Location header"),!Py.test(g))g=ed(new URL(e.url),r.slice(0,r.indexOf(n)+1),o,!0,g);else if(!l.isStaticRequest){let m=new URL(e.url),y=g.startsWith("//")?new URL(m.protocol+g):new URL(g),p=Xi(y.pathname,o)!=null;y.origin===m.origin&&p&&(g=y.pathname+y.search+y.hash)}if(l.isStaticRequest)throw u.headers.set("Location",g),u;return{type:ke.redirect,status:v,location:g,revalidate:u.headers.get("X-Remix-Revalidate")!==null,reloadDocument:u.headers.get("X-Remix-Reload-Document")!==null}}if(l.isRouteRequest)throw{type:a===ke.error?ke.error:ke.data,response:u};let w,S=u.headers.get("Content-Type");return S&&/\bapplication\/json\b/.test(S)?w=await u.json():w=await u.text(),a===ke.error?{type:a,error:new Rh(v,u.statusText,w),headers:u.headers}:{type:ke.data,data:w,statusCode:u.status,headers:u.headers}}if(a===ke.error)return{type:a,error:u};if(ES(u)){var h,_;return{type:ke.deferred,deferredData:u,statusCode:(h=u.init)==null?void 0:h.status,headers:((_=u.init)==null?void 0:_.headers)&&new Headers(u.init.headers)}}return{type:ke.data,data:u}}function vs(t,e,n,r){let i=t.createURL(Dy(e)).toString(),s={signal:n};if(r&&Wt(r.formMethod)){let{formMethod:o,formEncType:l}=r;s.method=o.toUpperCase(),l==="application/json"?(s.headers=new Headers({"Content-Type":l}),s.body=JSON.stringify(r.json)):l==="text/plain"?s.body=r.text:l==="application/x-www-form-urlencoded"&&r.formData?s.body=td(r.formData):s.body=r.formData}return new Request(i,s)}function td(t){let e=new URLSearchParams;for(let[n,r]of t.entries())e.append(n,typeof r=="string"?r:r.name);return e}function Qp(t){let e=new FormData;for(let[n,r]of t.entries())e.append(n,r);return e}function vS(t,e,n,r,i){let s={},o=null,l,a=!1,u={};return n.forEach((c,d)=>{let h=e[d].route.id;if(q(!bi(c),"Cannot handle redirect results in processLoaderData"),Us(c)){let _=xi(t,h),v=c.error;r&&(v=Object.values(r)[0],r=void 0),o=o||{},o[_.route.id]==null&&(o[_.route.id]=v),s[h]=void 0,a||(a=!0,l=Ny(c.error)?c.error.status:500),c.headers&&(u[h]=c.headers)}else Pr(c)?(i.set(h,c.deferredData),s[h]=c.deferredData.data):s[h]=c.data,c.statusCode!=null&&c.statusCode!==200&&!a&&(l=c.statusCode),c.headers&&(u[h]=c.headers)}),r&&(o=r,s[Object.keys(r)[0]]=void 0),{loaderData:s,errors:o,statusCode:l||200,loaderHeaders:u}}function Kp(t,e,n,r,i,s,o,l){let{loaderData:a,errors:u}=vS(e,n,r,i,l);for(let c=0;cr.route.id===e)+1):[...t]).reverse().find(r=>r.route.hasErrorBoundary===!0)||t[0]}function Yp(t){let e=t.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function Tt(t,e){let{pathname:n,routeId:r,method:i,type:s}=e===void 0?{}:e,o="Unknown Server Error",l="Unknown @remix-run/router error";return t===400?(o="Bad Request",i&&n&&r?l="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":s==="defer-action"?l="defer() is not supported in actions":s==="invalid-body"&&(l="Unable to encode submission body")):t===403?(o="Forbidden",l='Route "'+r+'" does not match URL "'+n+'"'):t===404?(o="Not Found",l='No route matches URL "'+n+'"'):t===405&&(o="Method Not Allowed",i&&n&&r?l="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(l='Invalid request method "'+i.toUpperCase()+'"')),new Rh(t||500,o,new Error(l),!0)}function Xp(t){for(let e=t.length-1;e>=0;e--){let n=t[e];if(bi(n))return{result:n,idx:e}}}function Dy(t){let e=typeof t=="string"?An(t):t;return $r(pe({},e,{hash:""}))}function wS(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function Pr(t){return t.type===ke.deferred}function Us(t){return t.type===ke.error}function bi(t){return(t&&t.type)===ke.redirect}function ES(t){let e=t;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function CS(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function SS(t){return cS.has(t.toLowerCase())}function Wt(t){return aS.has(t.toLowerCase())}async function Jp(t,e,n,r,i,s){for(let o=0;od.route.id===a.route.id),c=u!=null&&!by(u,a)&&(s&&s[a.route.id])!==void 0;if(Pr(l)&&(i||c)){let d=r[o];q(d,"Expected an AbortSignal for revalidating fetcher deferred result"),await Ay(l,d,i).then(h=>{h&&(n[o]=h||n[o])})}}}async function Ay(t,e,n){if(n===void 0&&(n=!1),!await t.deferredData.resolveData(e)){if(n)try{return{type:ke.data,data:t.deferredData.unwrappedData}}catch(i){return{type:ke.error,error:i}}return{type:ke.data,data:t.deferredData.data}}}function Nh(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function xS(t,e){let{route:n,pathname:r,params:i}=t;return{id:n.id,pathname:r,params:i,data:e[n.id],handle:n.handle}}function nd(t,e){let n=typeof e=="string"?An(e).search:e.search;if(t[t.length-1].route.index&&Nh(n||""))return t[t.length-1];let r=Pa(t);return r[r.length-1]}function Zp(t){let{formMethod:e,formAction:n,formEncType:r,text:i,formData:s,json:o}=t;if(!(!e||!n||!r)){if(i!=null)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(s!=null)return{formMethod:e,formAction:n,formEncType:r,formData:s,json:void 0,text:void 0};if(o!==void 0)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function ol(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function kS(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function ws(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e," _hasFetcherDoneAnything ":!0}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e," _hasFetcherDoneAnything ":!0}}function TS(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0," _hasFetcherDoneAnything ":!0}}function ui(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t," _hasFetcherDoneAnything ":!0}}/** + */function pe(){return pe=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function Hi(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function qC(){return Math.random().toString(36).substr(2,8)}function Vp(t,e){return{usr:t.state,key:t.key,idx:e}}function co(t,e,n,r){return n===void 0&&(n=null),pe({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?On(e):e,{state:n,key:e&&e.key||r||qC()})}function Hr(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function On(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function YC(t,e,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,l=Ie.Pop,a=null,u=c();u==null&&(u=0,o.replaceState(pe({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function d(){l=Ie.Pop;let S=c(),g=S==null?null:S-u;u=S,a&&a({action:l,location:w.location,delta:g})}function h(S,g){l=Ie.Push;let m=co(w.location,S,g);n&&n(m,S),u=c()+1;let y=Vp(m,u),p=w.createHref(m);try{o.pushState(y,"",p)}catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;i.location.assign(p)}s&&a&&a({action:l,location:w.location,delta:1})}function _(S,g){l=Ie.Replace;let m=co(w.location,S,g);n&&n(m,S),u=c();let y=Vp(m,u),p=w.createHref(m);o.replaceState(y,"",p),s&&a&&a({action:l,location:w.location,delta:0})}function v(S){let g=i.location.origin!=="null"?i.location.origin:i.location.href,m=typeof S=="string"?S:Hr(S);return q(g,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,g)}let w={get action(){return l},get location(){return t(i,o)},listen(S){if(a)throw new Error("A history only accepts one active listener");return i.addEventListener(Hp,d),a=S,()=>{i.removeEventListener(Hp,d),a=null}},createHref(S){return e(i,S)},createURL:v,encodeLocation(S){let g=v(S);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:h,replace:_,go(S){return o.go(S)}};return w}var ke;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(ke||(ke={}));const XC=new Set(["lazy","caseSensitive","path","id","index","children"]);function JC(t){return t.index===!0}function nd(t,e,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),t.map((i,s)=>{let o=[...n,s],l=typeof i.id=="string"?i.id:o.join("-");if(q(i.index!==!0||!i.children,"Cannot specify children on an index route"),q(!r[l],'Found a route id collision on id "'+l+`". Route id's must be globally unique within Data Router usages`),JC(i)){let a=pe({},i,e(i),{id:l});return r[l]=a,a}else{let a=pe({},i,e(i),{id:l,children:void 0});return r[l]=a,i.children&&(a.children=nd(i.children,e,o,r)),a}})}function ki(t,e,n){n===void 0&&(n="/");let r=typeof e=="string"?On(e):e,i=Zi(r.pathname||"/",n);if(i==null)return null;let s=by(t);ZC(s);let o=null;for(let l=0;o==null&&l{let a={relativePath:l===void 0?s.path||"":l,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};a.relativePath.startsWith("/")&&(q(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(r.length));let u=xn([r,a.relativePath]),c=n.concat(a);s.children&&s.children.length>0&&(q(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),by(s.children,e,c,u)),!(s.path==null&&!s.index)&&e.push({path:u,score:oS(u,s.index),routesMeta:c})};return t.forEach((s,o)=>{var l;if(s.path===""||!((l=s.path)!=null&&l.includes("?")))i(s,o);else for(let a of Dy(s.path))i(s,o,a)}),e}function Dy(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=Dy(r.join("/")),l=[];return l.push(...o.map(a=>a===""?s:[s,a].join("/"))),i&&l.push(...o),l.map(a=>t.startsWith("/")&&a===""?"/":a)}function ZC(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:lS(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const eS=/^:\w+$/,tS=3,nS=2,rS=1,iS=10,sS=-2,Gp=t=>t==="*";function oS(t,e){let n=t.split("/"),r=n.length;return n.some(Gp)&&(r+=sS),e&&(r+=nS),n.filter(i=>!Gp(i)).reduce((i,s)=>i+(eS.test(s)?tS:s===""?rS:iS),r)}function lS(t,e){return t.length===e.length&&t.slice(0,-1).every((r,i)=>r===e[i])?t[t.length-1]-e[e.length-1]:0}function aS(t,e){let{routesMeta:n}=t,r={},i="/",s=[];for(let o=0;o{if(c==="*"){let h=l[d]||"";o=s.slice(0,s.length-h.length).replace(/(.)\/+$/,"$1")}return u[c]=hS(l[d]||"",c),u},{}),pathname:s,pathnameBase:o,pattern:t}}function cS(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),Hi(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(o,l)=>(r.push(l),"/([^\\/]+)"));return t.endsWith("*")?(r.push("*"),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function dS(t){try{return decodeURI(t)}catch(e){return Hi(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function hS(t,e){try{return decodeURIComponent(t)}catch(n){return Hi(!1,'The value for the URL param "'+e+'" will not be decoded because'+(' the string "'+t+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),t}}function Zi(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function fS(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?On(t):t;return{pathname:n?n.startsWith("/")?n:pS(n,e):e,search:gS(r),hash:_S(i)}}function pS(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Gu(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Da(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function Ih(t,e,n,r){r===void 0&&(r=!1);let i;typeof t=="string"?i=On(t):(i=pe({},t),q(!i.pathname||!i.pathname.includes("?"),Gu("?","pathname","search",i)),q(!i.pathname||!i.pathname.includes("#"),Gu("#","pathname","hash",i)),q(!i.search||!i.search.includes("#"),Gu("#","search","hash",i)));let s=t===""||i.pathname==="",o=s?"/":i.pathname,l;if(r||o==null)l=n;else{let d=e.length-1;if(o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),d-=1;i.pathname=h.join("/")}l=d>=0?e[d]:"/"}let a=fS(i,l),u=o&&o!=="/"&&o.endsWith("/"),c=(s||o===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(u||c)&&(a.pathname+="/"),a}const xn=t=>t.join("/").replace(/\/\/+/g,"/"),mS=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),gS=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,_S=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class Ph{constructor(e,n,r,i){i===void 0&&(i=!1),this.status=e,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Ay(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const Oy=["post","put","patch","delete"],yS=new Set(Oy),vS=["get",...Oy],wS=new Set(vS),ES=new Set([301,302,303,307,308]),CS=new Set([307,308]),Qu={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},SS={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},vs={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Ly=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,xS=t=>({hasErrorBoundary:!!t.hasErrorBoundary});function kS(t){const e=t.window?t.window:typeof window<"u"?window:void 0,n=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",r=!n;q(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(t.mapRouteProperties)i=t.mapRouteProperties;else if(t.detectErrorBoundary){let E=t.detectErrorBoundary;i=C=>({hasErrorBoundary:E(C)})}else i=xS;let s={},o=nd(t.routes,i,void 0,s),l,a=t.basename||"/",u=pe({v7_normalizeFormMethod:!1,v7_prependBasename:!1},t.future),c=null,d=new Set,h=null,_=null,v=null,w=t.hydrationData!=null,S=ki(o,t.history.location,a),g=null;if(S==null){let E=Tt(404,{pathname:t.history.location.pathname}),{matches:C,route:k}=em(o);S=C,g={[k.id]:E}}let m=!S.some(E=>E.route.lazy)&&(!S.some(E=>E.route.loader)||t.hydrationData!=null),y,p={historyAction:t.history.action,location:t.history.location,matches:S,initialized:m,navigation:Qu,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||g,fetchers:new Map,blockers:new Map},x=Ie.Pop,I=!1,N,D=!1,Q=!1,B=[],Le=[],oe=new Map,Jt=0,Mn=-1,jn=new Map,_t=new Set,Zt=new Map,b=new Map,F=new Map,H=!1;function _e(){return c=t.history.listen(E=>{let{action:C,location:k,delta:O}=E;if(H){H=!1;return}Hi(F.size===0||O!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let W=Pf({currentLocation:p.location,nextLocation:k,historyAction:C});if(W&&O!=null){H=!0,t.history.go(O*-1),Wo(W,{state:"blocked",location:k,proceed(){Wo(W,{state:"proceeding",proceed:void 0,reset:void 0,location:k}),t.history.go(O)},reset(){let z=new Map(p.blockers);z.set(W,vs),le({blockers:z})}});return}return Fn(C,k)}),p.initialized||Fn(Ie.Pop,p.location),y}function Ne(){c&&c(),d.clear(),N&&N.abort(),p.fetchers.forEach((E,C)=>fu(C)),p.blockers.forEach((E,C)=>If(C))}function si(E){return d.add(E),()=>d.delete(E)}function le(E){p=pe({},p,E),d.forEach(C=>C(p))}function fn(E,C){var k,O;let W=p.actionData!=null&&p.navigation.formMethod!=null&&Wt(p.navigation.formMethod)&&p.navigation.state==="loading"&&((k=E.state)==null?void 0:k._isRedirect)!==!0,z;C.actionData?Object.keys(C.actionData).length>0?z=C.actionData:z=null:W?z=p.actionData:z=null;let $=C.loaderData?Zp(p.loaderData,C.loaderData,C.matches||[],C.errors):p.loaderData,M=p.blockers;M.size>0&&(M=new Map(M),M.forEach((re,He)=>M.set(He,vs)));let L=I===!0||p.navigation.formMethod!=null&&Wt(p.navigation.formMethod)&&((O=E.state)==null?void 0:O._isRedirect)!==!0;l&&(o=l,l=void 0),D||x===Ie.Pop||(x===Ie.Push?t.history.push(E,E.state):x===Ie.Replace&&t.history.replace(E,E.state)),le(pe({},C,{actionData:z,loaderData:$,historyAction:x,location:E,initialized:!0,navigation:Qu,revalidation:"idle",restoreScrollPosition:Df(E,C.matches||p.matches),preventScrollReset:L,blockers:M})),x=Ie.Pop,I=!1,D=!1,Q=!1,B=[],Le=[]}async function en(E,C){if(typeof E=="number"){t.history.go(E);return}let k=rd(p.location,p.matches,a,u.v7_prependBasename,E,C==null?void 0:C.fromRouteId,C==null?void 0:C.relative),{path:O,submission:W,error:z}=Qp(u.v7_normalizeFormMethod,!1,k,C),$=p.location,M=co(p.location,O,C&&C.state);M=pe({},M,t.history.encodeLocation(M));let L=C&&C.replace!=null?C.replace:void 0,re=Ie.Push;L===!0?re=Ie.Replace:L===!1||W!=null&&Wt(W.formMethod)&&W.formAction===p.location.pathname+p.location.search&&(re=Ie.Replace);let He=C&&"preventScrollReset"in C?C.preventScrollReset===!0:void 0,te=Pf({currentLocation:$,nextLocation:M,historyAction:re});if(te){Wo(te,{state:"blocked",location:M,proceed(){Wo(te,{state:"proceeding",proceed:void 0,reset:void 0,location:M}),en(E,C)},reset(){let xe=new Map(p.blockers);xe.set(te,vs),le({blockers:xe})}});return}return await Fn(re,M,{submission:W,pendingError:z,preventScrollReset:He,replace:C&&C.replace})}function oi(){if(hu(),le({revalidation:"loading"}),p.navigation.state!=="submitting"){if(p.navigation.state==="idle"){Fn(p.historyAction,p.location,{startUninterruptedRevalidation:!0});return}Fn(x||p.historyAction,p.navigation.location,{overrideNavigation:p.navigation})}}async function Fn(E,C,k){N&&N.abort(),N=null,x=E,D=(k&&k.startUninterruptedRevalidation)===!0,c0(p.location,p.matches),I=(k&&k.preventScrollReset)===!0;let O=l||o,W=k&&k.overrideNavigation,z=ki(O,C,a);if(!z){let xe=Tt(404,{pathname:C.pathname}),{matches:Me,route:Sr}=em(O);pu(),fn(C,{matches:Me,loaderData:{},errors:{[Sr.id]:xe}});return}if(p.initialized&&!Q&&PS(p.location,C)&&!(k&&k.submission&&Wt(k.submission.formMethod))){fn(C,{matches:z});return}N=new AbortController;let $=Es(t.history,C,N.signal,k&&k.submission),M,L;if(k&&k.pendingError)L={[Ti(z).route.id]:k.pendingError};else if(k&&k.submission&&Wt(k.submission.formMethod)){let xe=await r0($,C,k.submission,z,{replace:k.replace});if(xe.shortCircuited)return;M=xe.pendingActionData,L=xe.pendingActionError,W=al(C,k.submission),$=new Request($.url,{signal:$.signal})}let{shortCircuited:re,loaderData:He,errors:te}=await i0($,C,z,W,k&&k.submission,k&&k.fetcherSubmission,k&&k.replace,M,L);re||(N=null,fn(C,pe({matches:z},M?{actionData:M}:{},{loaderData:He,errors:te})))}async function r0(E,C,k,O,W){W===void 0&&(W={}),hu();let z=LS(C,k);le({navigation:z});let $,M=sd(O,C);if(!M.route.action&&!M.route.lazy)$={type:ke.error,error:Tt(405,{method:E.method,pathname:C.pathname,routeId:M.route.id})};else if($=await ws("action",E,M,O,s,i,a),E.signal.aborted)return{shortCircuited:!0};if(Ai($)){let L;return W&&W.replace!=null?L=W.replace:L=$.location===p.location.pathname+p.location.search,await as(p,$,{submission:k,replace:L}),{shortCircuited:!0}}if(zs($)){let L=Ti(O,M.route.id);return(W&&W.replace)!==!0&&(x=Ie.Push),{pendingActionData:{},pendingActionError:{[L.route.id]:$.error}}}if(Dr($))throw Tt(400,{type:"defer-action"});return{pendingActionData:{[M.route.id]:$.data}}}async function i0(E,C,k,O,W,z,$,M,L){let re=O||al(C,W),He=W||z||rm(re),te=l||o,[xe,Me]=Kp(t.history,p,k,He,C,Q,B,Le,Zt,_t,te,a,M,L);if(pu(ne=>!(k&&k.some(Ft=>Ft.route.id===ne))||xe&&xe.some(Ft=>Ft.route.id===ne)),Mn=++Jt,xe.length===0&&Me.length===0){let ne=Rf();return fn(C,pe({matches:k,loaderData:{},errors:L||null},M?{actionData:M}:{},ne?{fetchers:new Map(p.fetchers)}:{})),{shortCircuited:!0}}if(!D){Me.forEach(Ft=>{let Bn=p.fetchers.get(Ft.key),vu=Cs(void 0,Bn?Bn.data:void 0);p.fetchers.set(Ft.key,vu)});let ne=M||p.actionData;le(pe({navigation:re},ne?Object.keys(ne).length===0?{actionData:null}:{actionData:ne}:{},Me.length>0?{fetchers:new Map(p.fetchers)}:{}))}Me.forEach(ne=>{oe.has(ne.key)&&Un(ne.key),ne.controller&&oe.set(ne.key,ne.controller)});let Sr=()=>Me.forEach(ne=>Un(ne.key));N&&N.signal.addEventListener("abort",Sr);let{results:xr,loaderResults:us,fetcherResults:mu}=await kf(p.matches,k,xe,Me,E);if(E.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener("abort",Sr),Me.forEach(ne=>oe.delete(ne.key));let pn=tm(xr);if(pn){if(pn.idx>=xe.length){let ne=Me[pn.idx-xe.length].key;_t.add(ne)}return await as(p,pn.result,{replace:$}),{shortCircuited:!0}}let{loaderData:mn,errors:Ho}=Jp(p,k,xe,us,L,Me,mu,b);b.forEach((ne,Ft)=>{ne.subscribe(Bn=>{(Bn||ne.done)&&b.delete(Ft)})});let gu=Rf(),_u=Nf(Mn),yu=gu||_u||Me.length>0;return pe({loaderData:mn,errors:Ho},yu?{fetchers:new Map(p.fetchers)}:{})}function xf(E){return p.fetchers.get(E)||SS}function s0(E,C,k,O){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");oe.has(E)&&Un(E);let W=l||o,z=rd(p.location,p.matches,a,u.v7_prependBasename,k,C,O==null?void 0:O.relative),$=ki(W,z,a);if(!$){$o(E,C,Tt(404,{pathname:z}));return}let{path:M,submission:L,error:re}=Qp(u.v7_normalizeFormMethod,!0,z,O);if(re){$o(E,C,re);return}let He=sd($,M);if(I=(O&&O.preventScrollReset)===!0,L&&Wt(L.formMethod)){o0(E,C,M,He,$,L);return}Zt.set(E,{routeId:C,path:M}),l0(E,C,M,He,$,L)}async function o0(E,C,k,O,W,z){if(hu(),Zt.delete(E),!O.route.action&&!O.route.lazy){let be=Tt(405,{method:z.formMethod,pathname:k,routeId:C});$o(E,C,be);return}let $=p.fetchers.get(E),M=MS(z,$);p.fetchers.set(E,M),le({fetchers:new Map(p.fetchers)});let L=new AbortController,re=Es(t.history,k,L.signal,z);oe.set(E,L);let He=Jt,te=await ws("action",re,O,W,s,i,a);if(re.signal.aborted){oe.get(E)===L&&oe.delete(E);return}if(Ai(te))if(oe.delete(E),Mn>He){let be=di(void 0);p.fetchers.set(E,be),le({fetchers:new Map(p.fetchers)});return}else{_t.add(E);let be=Cs(z);return p.fetchers.set(E,be),le({fetchers:new Map(p.fetchers)}),as(p,te,{submission:z,isFetchActionRedirect:!0})}if(zs(te)){$o(E,C,te.error);return}if(Dr(te))throw Tt(400,{type:"defer-action"});let xe=p.navigation.location||p.location,Me=Es(t.history,xe,L.signal),Sr=l||o,xr=p.navigation.state!=="idle"?ki(Sr,p.navigation.location,a):p.matches;q(xr,"Didn't find any matches after fetcher action");let us=++Jt;jn.set(E,us);let mu=Cs(z,te.data);p.fetchers.set(E,mu);let[pn,mn]=Kp(t.history,p,xr,z,xe,Q,B,Le,Zt,_t,Sr,a,{[O.route.id]:te.data},void 0);mn.filter(be=>be.key!==E).forEach(be=>{let cs=be.key,Af=p.fetchers.get(cs),h0=Cs(void 0,Af?Af.data:void 0);p.fetchers.set(cs,h0),oe.has(cs)&&Un(cs),be.controller&&oe.set(cs,be.controller)}),le({fetchers:new Map(p.fetchers)});let Ho=()=>mn.forEach(be=>Un(be.key));L.signal.addEventListener("abort",Ho);let{results:gu,loaderResults:_u,fetcherResults:yu}=await kf(p.matches,xr,pn,mn,Me);if(L.signal.aborted)return;L.signal.removeEventListener("abort",Ho),jn.delete(E),oe.delete(E),mn.forEach(be=>oe.delete(be.key));let ne=tm(gu);if(ne){if(ne.idx>=pn.length){let be=mn[ne.idx-pn.length].key;_t.add(be)}return as(p,ne.result)}let{loaderData:Ft,errors:Bn}=Jp(p,p.matches,pn,_u,void 0,mn,yu,b);if(p.fetchers.has(E)){let be=di(te.data);p.fetchers.set(E,be)}let vu=Nf(us);p.navigation.state==="loading"&&us>Mn?(q(x,"Expected pending action"),N&&N.abort(),fn(p.navigation.location,{matches:xr,loaderData:Ft,errors:Bn,fetchers:new Map(p.fetchers)})):(le(pe({errors:Bn,loaderData:Zp(p.loaderData,Ft,xr,Bn)},vu||mn.length>0?{fetchers:new Map(p.fetchers)}:{})),Q=!1)}async function l0(E,C,k,O,W,z){let $=p.fetchers.get(E),M=Cs(z,$?$.data:void 0);p.fetchers.set(E,M),le({fetchers:new Map(p.fetchers)});let L=new AbortController,re=Es(t.history,k,L.signal);oe.set(E,L);let He=Jt,te=await ws("loader",re,O,W,s,i,a);if(Dr(te)&&(te=await Fy(te,re.signal,!0)||te),oe.get(E)===L&&oe.delete(E),re.signal.aborted)return;if(Ai(te))if(Mn>He){let Me=di(void 0);p.fetchers.set(E,Me),le({fetchers:new Map(p.fetchers)});return}else{_t.add(E),await as(p,te);return}if(zs(te)){let Me=Ti(p.matches,C);p.fetchers.delete(E),le({fetchers:new Map(p.fetchers),errors:{[Me.route.id]:te.error}});return}q(!Dr(te),"Unhandled fetcher deferred data");let xe=di(te.data);p.fetchers.set(E,xe),le({fetchers:new Map(p.fetchers)})}async function as(E,C,k){let{submission:O,replace:W,isFetchActionRedirect:z}=k===void 0?{}:k;C.revalidate&&(Q=!0);let $=co(E.location,C.location,pe({_isRedirect:!0},z?{_isFetchActionRedirect:!0}:{}));if(q($,"Expected a location on the redirect navigation"),n){let re=!1;if(C.reloadDocument)re=!0;else if(Ly.test(C.location)){const He=t.history.createURL(C.location);re=He.origin!==e.location.origin||Zi(He.pathname,a)==null}if(re){W?e.location.replace(C.location):e.location.assign(C.location);return}}N=null;let M=W===!0?Ie.Replace:Ie.Push,L=O||rm(E.navigation);if(CS.has(C.status)&&L&&Wt(L.formMethod))await Fn(M,$,{submission:pe({},L,{formAction:C.location}),preventScrollReset:I});else if(z)await Fn(M,$,{overrideNavigation:al($),fetcherSubmission:L,preventScrollReset:I});else{let re=al($,L);await Fn(M,$,{overrideNavigation:re,preventScrollReset:I})}}async function kf(E,C,k,O,W){let z=await Promise.all([...k.map(L=>ws("loader",W,L,C,s,i,a)),...O.map(L=>L.matches&&L.match&&L.controller?ws("loader",Es(t.history,L.path,L.controller.signal),L.match,L.matches,s,i,a):{type:ke.error,error:Tt(404,{pathname:L.path})})]),$=z.slice(0,k.length),M=z.slice(k.length);return await Promise.all([nm(E,k,$,$.map(()=>W.signal),!1,p.loaderData),nm(E,O.map(L=>L.match),M,O.map(L=>L.controller?L.controller.signal:null),!0)]),{results:z,loaderResults:$,fetcherResults:M}}function hu(){Q=!0,B.push(...pu()),Zt.forEach((E,C)=>{oe.has(C)&&(Le.push(C),Un(C))})}function $o(E,C,k){let O=Ti(p.matches,C);fu(E),le({errors:{[O.route.id]:k},fetchers:new Map(p.fetchers)})}function fu(E){let C=p.fetchers.get(E);oe.has(E)&&!(C&&C.state==="loading"&&jn.has(E))&&Un(E),Zt.delete(E),jn.delete(E),_t.delete(E),p.fetchers.delete(E)}function Un(E){let C=oe.get(E);q(C,"Expected fetch controller: "+E),C.abort(),oe.delete(E)}function Tf(E){for(let C of E){let k=xf(C),O=di(k.data);p.fetchers.set(C,O)}}function Rf(){let E=[],C=!1;for(let k of _t){let O=p.fetchers.get(k);q(O,"Expected fetcher: "+k),O.state==="loading"&&(_t.delete(k),E.push(k),C=!0)}return Tf(E),C}function Nf(E){let C=[];for(let[k,O]of jn)if(O0}function a0(E,C){let k=p.blockers.get(E)||vs;return F.get(E)!==C&&F.set(E,C),k}function If(E){p.blockers.delete(E),F.delete(E)}function Wo(E,C){let k=p.blockers.get(E)||vs;q(k.state==="unblocked"&&C.state==="blocked"||k.state==="blocked"&&C.state==="blocked"||k.state==="blocked"&&C.state==="proceeding"||k.state==="blocked"&&C.state==="unblocked"||k.state==="proceeding"&&C.state==="unblocked","Invalid blocker state transition: "+k.state+" -> "+C.state);let O=new Map(p.blockers);O.set(E,C),le({blockers:O})}function Pf(E){let{currentLocation:C,nextLocation:k,historyAction:O}=E;if(F.size===0)return;F.size>1&&Hi(!1,"A router only supports one blocker at a time");let W=Array.from(F.entries()),[z,$]=W[W.length-1],M=p.blockers.get(z);if(!(M&&M.state==="proceeding")&&$({currentLocation:C,nextLocation:k,historyAction:O}))return z}function pu(E){let C=[];return b.forEach((k,O)=>{(!E||E(O))&&(k.cancel(),C.push(O),b.delete(O))}),C}function u0(E,C,k){if(h=E,v=C,_=k||null,!w&&p.navigation===Qu){w=!0;let O=Df(p.location,p.matches);O!=null&&le({restoreScrollPosition:O})}return()=>{h=null,v=null,_=null}}function bf(E,C){return _&&_(E,C.map(O=>OS(O,p.loaderData)))||E.key}function c0(E,C){if(h&&v){let k=bf(E,C);h[k]=v()}}function Df(E,C){if(h){let k=bf(E,C),O=h[k];if(typeof O=="number")return O}return null}function d0(E){s={},l=nd(E,i,void 0,s)}return y={get basename(){return a},get state(){return p},get routes(){return o},initialize:_e,subscribe:si,enableScrollRestoration:u0,navigate:en,fetch:s0,revalidate:oi,createHref:E=>t.history.createHref(E),encodeLocation:E=>t.history.encodeLocation(E),getFetcher:xf,deleteFetcher:fu,dispose:Ne,getBlocker:a0,deleteBlocker:If,_internalFetchControllers:oe,_internalActiveDeferreds:b,_internalSetRoutes:d0},y}function TS(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function rd(t,e,n,r,i,s,o){let l,a;if(s!=null&&o!=="path"){l=[];for(let c of e)if(l.push(c),c.route.id===s){a=c;break}}else l=e,a=e[e.length-1];let u=Ih(i||".",Da(l).map(c=>c.pathnameBase),Zi(t.pathname,n)||t.pathname,o==="path");return i==null&&(u.search=t.search,u.hash=t.hash),(i==null||i===""||i===".")&&a&&a.route.index&&!bh(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:xn([n,u.pathname])),Hr(u)}function Qp(t,e,n,r){if(!r||!TS(r))return{path:n};if(r.formMethod&&!AS(r.formMethod))return{path:n,error:Tt(405,{method:r.formMethod})};let i=()=>({path:n,error:Tt(400,{type:"invalid-body"})}),s=r.formMethod||"get",o=t?s.toUpperCase():s.toLowerCase(),l=jy(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Wt(o))return i();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((_,v)=>{let[w,S]=v;return""+_+w+"="+S+` +`},""):String(r.body);return{path:n,submission:{formMethod:o,formAction:l,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!Wt(o))return i();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:o,formAction:l,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return i()}}}q(typeof FormData=="function","FormData is not available in this environment");let a,u;if(r.formData)a=id(r.formData),u=r.formData;else if(r.body instanceof FormData)a=id(r.body),u=r.body;else if(r.body instanceof URLSearchParams)a=r.body,u=Xp(a);else if(r.body==null)a=new URLSearchParams,u=new FormData;else try{a=new URLSearchParams(r.body),u=Xp(a)}catch{return i()}let c={formMethod:o,formAction:l,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(Wt(c.formMethod))return{path:n,submission:c};let d=On(n);return e&&d.search&&bh(d.search)&&a.append("index",""),d.search="?"+a,{path:Hr(d),submission:c}}function RS(t,e){let n=t;if(e){let r=t.findIndex(i=>i.route.id===e);r>=0&&(n=t.slice(0,r))}return n}function Kp(t,e,n,r,i,s,o,l,a,u,c,d,h,_){let v=_?Object.values(_)[0]:h?Object.values(h)[0]:void 0,w=t.createURL(e.location),S=t.createURL(i),g=_?Object.keys(_)[0]:void 0,y=RS(n,g).filter((x,I)=>{if(x.route.lazy)return!0;if(x.route.loader==null)return!1;if(NS(e.loaderData,e.matches[I],x)||o.some(Q=>Q===x.route.id))return!0;let N=e.matches[I],D=x;return qp(x,pe({currentUrl:w,currentParams:N.params,nextUrl:S,nextParams:D.params},r,{actionResult:v,defaultShouldRevalidate:s||w.pathname+w.search===S.pathname+S.search||w.search!==S.search||My(N,D)}))}),p=[];return a.forEach((x,I)=>{if(!n.some(Le=>Le.route.id===x.routeId))return;let N=ki(c,x.path,d);if(!N){p.push({key:I,routeId:x.routeId,path:x.path,matches:null,match:null,controller:null});return}let D=e.fetchers.get(I),Q=sd(N,x.path),B=!1;u.has(I)?B=!1:l.includes(I)?B=!0:D&&D.state!=="idle"&&D.data===void 0?B=s:B=qp(Q,pe({currentUrl:w,currentParams:e.matches[e.matches.length-1].params,nextUrl:S,nextParams:n[n.length-1].params},r,{actionResult:v,defaultShouldRevalidate:s})),B&&p.push({key:I,routeId:x.routeId,path:x.path,matches:N,match:Q,controller:new AbortController})}),[y,p]}function NS(t,e,n){let r=!e||n.route.id!==e.route.id,i=t[n.route.id]===void 0;return r||i}function My(t,e){let n=t.route.path;return t.pathname!==e.pathname||n!=null&&n.endsWith("*")&&t.params["*"]!==e.params["*"]}function qp(t,e){if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate(e);if(typeof n=="boolean")return n}return e.defaultShouldRevalidate}async function Yp(t,e,n){if(!t.lazy)return;let r=await t.lazy();if(!t.lazy)return;let i=n[t.id];q(i,"No route found in manifest");let s={};for(let o in r){let a=i[o]!==void 0&&o!=="hasErrorBoundary";Hi(!a,'Route "'+i.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!a&&!XC.has(o)&&(s[o]=r[o])}Object.assign(i,s),Object.assign(i,pe({},e(i),{lazy:void 0}))}async function ws(t,e,n,r,i,s,o,l){l===void 0&&(l={});let a,u,c,d=v=>{let w,S=new Promise((g,m)=>w=m);return c=()=>w(),e.signal.addEventListener("abort",c),Promise.race([v({request:e,params:n.params,context:l.requestContext}),S])};try{let v=n.route[t];if(n.route.lazy)if(v)u=(await Promise.all([d(v),Yp(n.route,s,i)]))[0];else if(await Yp(n.route,s,i),v=n.route[t],v)u=await d(v);else if(t==="action"){let w=new URL(e.url),S=w.pathname+w.search;throw Tt(405,{method:e.method,pathname:S,routeId:n.route.id})}else return{type:ke.data,data:void 0};else if(v)u=await d(v);else{let w=new URL(e.url),S=w.pathname+w.search;throw Tt(404,{pathname:S})}q(u!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(v){a=ke.error,u=v}finally{c&&e.signal.removeEventListener("abort",c)}if(DS(u)){let v=u.status;if(ES.has(v)){let g=u.headers.get("Location");if(q(g,"Redirects returned/thrown from loaders/actions must have a Location header"),!Ly.test(g))g=rd(new URL(e.url),r.slice(0,r.indexOf(n)+1),o,!0,g);else if(!l.isStaticRequest){let m=new URL(e.url),y=g.startsWith("//")?new URL(m.protocol+g):new URL(g),p=Zi(y.pathname,o)!=null;y.origin===m.origin&&p&&(g=y.pathname+y.search+y.hash)}if(l.isStaticRequest)throw u.headers.set("Location",g),u;return{type:ke.redirect,status:v,location:g,revalidate:u.headers.get("X-Remix-Revalidate")!==null,reloadDocument:u.headers.get("X-Remix-Reload-Document")!==null}}if(l.isRouteRequest)throw{type:a===ke.error?ke.error:ke.data,response:u};let w,S=u.headers.get("Content-Type");return S&&/\bapplication\/json\b/.test(S)?w=await u.json():w=await u.text(),a===ke.error?{type:a,error:new Ph(v,u.statusText,w),headers:u.headers}:{type:ke.data,data:w,statusCode:u.status,headers:u.headers}}if(a===ke.error)return{type:a,error:u};if(bS(u)){var h,_;return{type:ke.deferred,deferredData:u,statusCode:(h=u.init)==null?void 0:h.status,headers:((_=u.init)==null?void 0:_.headers)&&new Headers(u.init.headers)}}return{type:ke.data,data:u}}function Es(t,e,n,r){let i=t.createURL(jy(e)).toString(),s={signal:n};if(r&&Wt(r.formMethod)){let{formMethod:o,formEncType:l}=r;s.method=o.toUpperCase(),l==="application/json"?(s.headers=new Headers({"Content-Type":l}),s.body=JSON.stringify(r.json)):l==="text/plain"?s.body=r.text:l==="application/x-www-form-urlencoded"&&r.formData?s.body=id(r.formData):s.body=r.formData}return new Request(i,s)}function id(t){let e=new URLSearchParams;for(let[n,r]of t.entries())e.append(n,typeof r=="string"?r:r.name);return e}function Xp(t){let e=new FormData;for(let[n,r]of t.entries())e.append(n,r);return e}function IS(t,e,n,r,i){let s={},o=null,l,a=!1,u={};return n.forEach((c,d)=>{let h=e[d].route.id;if(q(!Ai(c),"Cannot handle redirect results in processLoaderData"),zs(c)){let _=Ti(t,h),v=c.error;r&&(v=Object.values(r)[0],r=void 0),o=o||{},o[_.route.id]==null&&(o[_.route.id]=v),s[h]=void 0,a||(a=!0,l=Ay(c.error)?c.error.status:500),c.headers&&(u[h]=c.headers)}else Dr(c)?(i.set(h,c.deferredData),s[h]=c.deferredData.data):s[h]=c.data,c.statusCode!=null&&c.statusCode!==200&&!a&&(l=c.statusCode),c.headers&&(u[h]=c.headers)}),r&&(o=r,s[Object.keys(r)[0]]=void 0),{loaderData:s,errors:o,statusCode:l||200,loaderHeaders:u}}function Jp(t,e,n,r,i,s,o,l){let{loaderData:a,errors:u}=IS(e,n,r,i,l);for(let c=0;cr.route.id===e)+1):[...t]).reverse().find(r=>r.route.hasErrorBoundary===!0)||t[0]}function em(t){let e=t.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function Tt(t,e){let{pathname:n,routeId:r,method:i,type:s}=e===void 0?{}:e,o="Unknown Server Error",l="Unknown @remix-run/router error";return t===400?(o="Bad Request",i&&n&&r?l="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":s==="defer-action"?l="defer() is not supported in actions":s==="invalid-body"&&(l="Unable to encode submission body")):t===403?(o="Forbidden",l='Route "'+r+'" does not match URL "'+n+'"'):t===404?(o="Not Found",l='No route matches URL "'+n+'"'):t===405&&(o="Method Not Allowed",i&&n&&r?l="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(l='Invalid request method "'+i.toUpperCase()+'"')),new Ph(t||500,o,new Error(l),!0)}function tm(t){for(let e=t.length-1;e>=0;e--){let n=t[e];if(Ai(n))return{result:n,idx:e}}}function jy(t){let e=typeof t=="string"?On(t):t;return Hr(pe({},e,{hash:""}))}function PS(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function Dr(t){return t.type===ke.deferred}function zs(t){return t.type===ke.error}function Ai(t){return(t&&t.type)===ke.redirect}function bS(t){let e=t;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function DS(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function AS(t){return wS.has(t.toLowerCase())}function Wt(t){return yS.has(t.toLowerCase())}async function nm(t,e,n,r,i,s){for(let o=0;od.route.id===a.route.id),c=u!=null&&!My(u,a)&&(s&&s[a.route.id])!==void 0;if(Dr(l)&&(i||c)){let d=r[o];q(d,"Expected an AbortSignal for revalidating fetcher deferred result"),await Fy(l,d,i).then(h=>{h&&(n[o]=h||n[o])})}}}async function Fy(t,e,n){if(n===void 0&&(n=!1),!await t.deferredData.resolveData(e)){if(n)try{return{type:ke.data,data:t.deferredData.unwrappedData}}catch(i){return{type:ke.error,error:i}}return{type:ke.data,data:t.deferredData.data}}}function bh(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function OS(t,e){let{route:n,pathname:r,params:i}=t;return{id:n.id,pathname:r,params:i,data:e[n.id],handle:n.handle}}function sd(t,e){let n=typeof e=="string"?On(e).search:e.search;if(t[t.length-1].route.index&&bh(n||""))return t[t.length-1];let r=Da(t);return r[r.length-1]}function rm(t){let{formMethod:e,formAction:n,formEncType:r,text:i,formData:s,json:o}=t;if(!(!e||!n||!r)){if(i!=null)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(s!=null)return{formMethod:e,formAction:n,formEncType:r,formData:s,json:void 0,text:void 0};if(o!==void 0)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function al(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function LS(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function Cs(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e," _hasFetcherDoneAnything ":!0}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e," _hasFetcherDoneAnything ":!0}}function MS(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0," _hasFetcherDoneAnything ":!0}}function di(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t," _hasFetcherDoneAnything ":!0}}/** * React Router v6.15.0 * * Copyright (c) Remix Software Inc. @@ -56,7 +56,7 @@ Error generating stack: `+s.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Kl(){return Kl=Object.assign?Object.assign.bind():function(t){for(var e=1;ea.pathnameBase)),o=P.useRef(!1);return My(()=>{o.current=!0}),P.useCallback(function(a,u){if(u===void 0&&(u={}),!o.current)return;if(typeof a=="number"){n.go(a);return}let c=Th(a,JSON.parse(s),i,u.relative==="path");t==null&&e!=="/"&&(c.pathname=c.pathname==="/"?e:Sn([e,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[e,n,s,i,t])}function jy(t,e){let{relative:n}=e===void 0?{}:e,{matches:r}=P.useContext(Jr),{pathname:i}=Aa(),s=JSON.stringify(Pa(r).map(o=>o.pathnameBase));return P.useMemo(()=>Th(t,JSON.parse(s),i,n==="path"),[t,s,i,n])}function PS(t,e,n){Io()||q(!1);let{navigator:r}=P.useContext(Ji),{matches:i}=P.useContext(Jr),s=i[i.length-1],o=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let a=Aa(),u;if(e){var c;let w=typeof e=="string"?An(e):e;l==="/"||(c=w.pathname)!=null&&c.startsWith(l)||q(!1),u=w}else u=a;let d=u.pathname||"/",h=l==="/"?d:d.slice(l.length)||"/",_=Si(t,{pathname:h}),v=LS(_&&_.map(w=>Object.assign({},w,{params:Object.assign({},o,w.params),pathname:Sn([l,r.encodeLocation?r.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:Sn([l,r.encodeLocation?r.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),i,n);return e&&v?P.createElement(Da.Provider,{value:{location:Kl({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Ie.Pop}},v):v}function bS(){let t=US(),e=Ny(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},s=null;return P.createElement(P.Fragment,null,P.createElement("h2",null,"Unexpected Application Error!"),P.createElement("h3",{style:{fontStyle:"italic"}},e),n?P.createElement("pre",{style:i},n):null,s)}const DS=P.createElement(bS,null);class AS extends P.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error?P.createElement(Jr.Provider,{value:this.props.routeContext},P.createElement(Ly.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function OS(t){let{routeContext:e,match:n,children:r}=t,i=P.useContext(ba);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),P.createElement(Jr.Provider,{value:e},r)}function LS(t,e,n){var r;if(e===void 0&&(e=[]),n===void 0&&(n=null),t==null){var i;if((i=n)!=null&&i.errors)t=n.matches;else return null}let s=t,o=(r=n)==null?void 0:r.errors;if(o!=null){let l=s.findIndex(a=>a.route.id&&(o==null?void 0:o[a.route.id]));l>=0||q(!1),s=s.slice(0,Math.min(s.length,l+1))}return s.reduceRight((l,a,u)=>{let c=a.route.id?o==null?void 0:o[a.route.id]:null,d=null;n&&(d=a.route.errorElement||DS);let h=e.concat(s.slice(0,u+1)),_=()=>{let v;return c?v=d:a.route.Component?v=P.createElement(a.route.Component,null):a.route.element?v=a.route.element:v=l,P.createElement(OS,{match:a,routeContext:{outlet:l,matches:h,isDataRoute:n!=null},children:v})};return n&&(a.route.ErrorBoundary||a.route.errorElement||u===0)?P.createElement(AS,{location:n.location,revalidation:n.revalidation,component:d,error:c,children:_(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):_()},null)}var Fy=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(Fy||{}),ql=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(ql||{});function MS(t){let e=P.useContext(ba);return e||q(!1),e}function jS(t){let e=P.useContext(Oy);return e||q(!1),e}function FS(t){let e=P.useContext(Jr);return e||q(!1),e}function Uy(t){let e=FS(),n=e.matches[e.matches.length-1];return n.route.id||q(!1),n.route.id}function US(){var t;let e=P.useContext(Ly),n=jS(ql.UseRouteError),r=Uy(ql.UseRouteError);return e||((t=n.errors)==null?void 0:t[r])}function BS(){let{router:t}=MS(Fy.UseNavigateStable),e=Uy(ql.UseNavigateStable),n=P.useRef(!1);return My(()=>{n.current=!0}),P.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,Kl({fromRouteId:e},s)))},[t,e])}const zS="startTransition",em=k0[zS];function $S(t){let{fallbackElement:e,router:n,future:r}=t,[i,s]=P.useState(n.state),{v7_startTransition:o}=r||{},l=P.useCallback(d=>{o&&em?em(()=>s(d)):s(d)},[s,o]);P.useLayoutEffect(()=>n.subscribe(l),[n,l]);let a=P.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:d=>n.navigate(d),push:(d,h,_)=>n.navigate(d,{state:h,preventScrollReset:_==null?void 0:_.preventScrollReset}),replace:(d,h,_)=>n.navigate(d,{replace:!0,state:h,preventScrollReset:_==null?void 0:_.preventScrollReset})}),[n]),u=n.basename||"/",c=P.useMemo(()=>({router:n,navigator:a,static:!1,basename:u}),[n,a,u]);return P.createElement(P.Fragment,null,P.createElement(ba.Provider,{value:c},P.createElement(Oy.Provider,{value:i},P.createElement(HS,{basename:u,location:i.location,navigationType:i.historyAction,navigator:a},i.initialized?P.createElement(WS,{routes:n.routes,state:i}):e))),null)}function WS(t){let{routes:e,state:n}=t;return PS(e,void 0,n)}function HS(t){let{basename:e="/",children:n=null,location:r,navigationType:i=Ie.Pop,navigator:s,static:o=!1}=t;Io()&&q(!1);let l=e.replace(/^\/*/,"/"),a=P.useMemo(()=>({basename:l,navigator:s,static:o}),[l,s,o]);typeof r=="string"&&(r=An(r));let{pathname:u="/",search:c="",hash:d="",state:h=null,key:_="default"}=r,v=P.useMemo(()=>{let w=Xi(u,l);return w==null?null:{location:{pathname:w,search:c,hash:d,state:h,key:_},navigationType:i}},[l,u,c,d,h,_,i]);return v==null?null:P.createElement(Ji.Provider,{value:a},P.createElement(Da.Provider,{children:n,value:v}))}new Promise(()=>{});function VS(t){let e={hasErrorBoundary:t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&Object.assign(e,{element:P.createElement(t.Component),Component:void 0}),t.ErrorBoundary&&Object.assign(e,{errorElement:P.createElement(t.ErrorBoundary),ErrorBoundary:void 0}),e}/** + */function Yl(){return Yl=Object.assign?Object.assign.bind():function(t){for(var e=1;ea.pathnameBase)),o=P.useRef(!1);return zy(()=>{o.current=!0}),P.useCallback(function(a,u){if(u===void 0&&(u={}),!o.current)return;if(typeof a=="number"){n.go(a);return}let c=Ih(a,JSON.parse(s),i,u.relative==="path");t==null&&e!=="/"&&(c.pathname=c.pathname==="/"?e:xn([e,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[e,n,s,i,t])}function $y(t,e){let{relative:n}=e===void 0?{}:e,{matches:r}=P.useContext(ei),{pathname:i}=La(),s=JSON.stringify(Da(r).map(o=>o.pathnameBase));return P.useMemo(()=>Ih(t,JSON.parse(s),i,n==="path"),[t,s,i,n])}function BS(t,e,n){bo()||q(!1);let{navigator:r}=P.useContext(es),{matches:i}=P.useContext(ei),s=i[i.length-1],o=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let a=La(),u;if(e){var c;let w=typeof e=="string"?On(e):e;l==="/"||(c=w.pathname)!=null&&c.startsWith(l)||q(!1),u=w}else u=a;let d=u.pathname||"/",h=l==="/"?d:d.slice(l.length)||"/",_=ki(t,{pathname:h}),v=VS(_&&_.map(w=>Object.assign({},w,{params:Object.assign({},o,w.params),pathname:xn([l,r.encodeLocation?r.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:xn([l,r.encodeLocation?r.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),i,n);return e&&v?P.createElement(Oa.Provider,{value:{location:Yl({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Ie.Pop}},v):v}function zS(){let t=qS(),e=Ay(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},s=null;return P.createElement(P.Fragment,null,P.createElement("h2",null,"Unexpected Application Error!"),P.createElement("h3",{style:{fontStyle:"italic"}},e),n?P.createElement("pre",{style:i},n):null,s)}const $S=P.createElement(zS,null);class WS extends P.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error?P.createElement(ei.Provider,{value:this.props.routeContext},P.createElement(By.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function HS(t){let{routeContext:e,match:n,children:r}=t,i=P.useContext(Aa);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),P.createElement(ei.Provider,{value:e},r)}function VS(t,e,n){var r;if(e===void 0&&(e=[]),n===void 0&&(n=null),t==null){var i;if((i=n)!=null&&i.errors)t=n.matches;else return null}let s=t,o=(r=n)==null?void 0:r.errors;if(o!=null){let l=s.findIndex(a=>a.route.id&&(o==null?void 0:o[a.route.id]));l>=0||q(!1),s=s.slice(0,Math.min(s.length,l+1))}return s.reduceRight((l,a,u)=>{let c=a.route.id?o==null?void 0:o[a.route.id]:null,d=null;n&&(d=a.route.errorElement||$S);let h=e.concat(s.slice(0,u+1)),_=()=>{let v;return c?v=d:a.route.Component?v=P.createElement(a.route.Component,null):a.route.element?v=a.route.element:v=l,P.createElement(HS,{match:a,routeContext:{outlet:l,matches:h,isDataRoute:n!=null},children:v})};return n&&(a.route.ErrorBoundary||a.route.errorElement||u===0)?P.createElement(WS,{location:n.location,revalidation:n.revalidation,component:d,error:c,children:_(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):_()},null)}var Wy=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(Wy||{}),Xl=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(Xl||{});function GS(t){let e=P.useContext(Aa);return e||q(!1),e}function QS(t){let e=P.useContext(Uy);return e||q(!1),e}function KS(t){let e=P.useContext(ei);return e||q(!1),e}function Hy(t){let e=KS(),n=e.matches[e.matches.length-1];return n.route.id||q(!1),n.route.id}function qS(){var t;let e=P.useContext(By),n=QS(Xl.UseRouteError),r=Hy(Xl.UseRouteError);return e||((t=n.errors)==null?void 0:t[r])}function YS(){let{router:t}=GS(Wy.UseNavigateStable),e=Hy(Xl.UseNavigateStable),n=P.useRef(!1);return zy(()=>{n.current=!0}),P.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,Yl({fromRouteId:e},s)))},[t,e])}const XS="startTransition",im=P0[XS];function JS(t){let{fallbackElement:e,router:n,future:r}=t,[i,s]=P.useState(n.state),{v7_startTransition:o}=r||{},l=P.useCallback(d=>{o&&im?im(()=>s(d)):s(d)},[s,o]);P.useLayoutEffect(()=>n.subscribe(l),[n,l]);let a=P.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:d=>n.navigate(d),push:(d,h,_)=>n.navigate(d,{state:h,preventScrollReset:_==null?void 0:_.preventScrollReset}),replace:(d,h,_)=>n.navigate(d,{replace:!0,state:h,preventScrollReset:_==null?void 0:_.preventScrollReset})}),[n]),u=n.basename||"/",c=P.useMemo(()=>({router:n,navigator:a,static:!1,basename:u}),[n,a,u]);return P.createElement(P.Fragment,null,P.createElement(Aa.Provider,{value:c},P.createElement(Uy.Provider,{value:i},P.createElement(ex,{basename:u,location:i.location,navigationType:i.historyAction,navigator:a},i.initialized?P.createElement(ZS,{routes:n.routes,state:i}):e))),null)}function ZS(t){let{routes:e,state:n}=t;return BS(e,void 0,n)}function ex(t){let{basename:e="/",children:n=null,location:r,navigationType:i=Ie.Pop,navigator:s,static:o=!1}=t;bo()&&q(!1);let l=e.replace(/^\/*/,"/"),a=P.useMemo(()=>({basename:l,navigator:s,static:o}),[l,s,o]);typeof r=="string"&&(r=On(r));let{pathname:u="/",search:c="",hash:d="",state:h=null,key:_="default"}=r,v=P.useMemo(()=>{let w=Zi(u,l);return w==null?null:{location:{pathname:w,search:c,hash:d,state:h,key:_},navigationType:i}},[l,u,c,d,h,_,i]);return v==null?null:P.createElement(es.Provider,{value:a},P.createElement(Oa.Provider,{children:n,value:v}))}new Promise(()=>{});function tx(t){let e={hasErrorBoundary:t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&Object.assign(e,{element:P.createElement(t.Component),Component:void 0}),t.ErrorBoundary&&Object.assign(e,{errorElement:P.createElement(t.ErrorBoundary),ErrorBoundary:void 0}),e}/** * React Router DOM v6.15.0 * * Copyright (c) Remix Software Inc. @@ -65,7 +65,7 @@ Error generating stack: `+s.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function uo(){return uo=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function QS(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function KS(t,e){return t.button===0&&(!e||e==="_self")&&!QS(t)}const qS=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function YS(t,e){return mS({basename:e==null?void 0:e.basename,future:uo({},e==null?void 0:e.future,{v7_prependBasename:!0}),history:FC({window:e==null?void 0:e.window}),hydrationData:(e==null?void 0:e.hydrationData)||XS(),routes:t,mapRouteProperties:VS}).initialize()}function XS(){var t;let e=(t=window)==null?void 0:t.__staticRouterHydrationData;return e&&e.errors&&(e=uo({},e,{errors:JS(e.errors)})),e}function JS(t){if(!t)return null;let e=Object.entries(t),n={};for(let[r,i]of e)if(i&&i.__type==="RouteErrorResponse")n[r]=new Rh(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let s=window[i.__subType];if(typeof s=="function")try{let o=new s(i.message);o.stack="",n[r]=o}catch{}}if(n[r]==null){let s=new Error(i.message);s.stack="",n[r]=s}}else n[r]=i;return n}const ZS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ex=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,oi=P.forwardRef(function(e,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:l,target:a,to:u,preventScrollReset:c}=e,d=GS(e,qS),{basename:h}=P.useContext(Ji),_,v=!1;if(typeof u=="string"&&ex.test(u)&&(_=u,ZS))try{let m=new URL(window.location.href),y=u.startsWith("//")?new URL(m.protocol+u):new URL(u),p=Xi(y.pathname,h);y.origin===m.origin&&p!=null?u=p+y.search+y.hash:v=!0}catch{}let w=RS(u,{relative:i}),S=tx(u,{replace:o,state:l,target:a,preventScrollReset:c,relative:i});function g(m){r&&r(m),m.defaultPrevented||S(m)}return P.createElement("a",uo({},d,{href:_||w,onClick:v||s?r:g,ref:n,target:a}))});var tm;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher"})(tm||(tm={}));var nm;(function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(nm||(nm={}));function tx(t,e){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o}=e===void 0?{}:e,l=NS(),a=Aa(),u=jy(t,{relative:o});return P.useCallback(c=>{if(KS(c,n)){c.preventDefault();let d=r!==void 0?r:$r(a)===$r(u);l(t,{replace:d,state:i,preventScrollReset:s,relative:o})}},[a,l,u,r,i,n,t,s,o])}function Oa(){const[t,e]=P.useState(!1),n=()=>{e(!t)},r=()=>{e(!1)},i={transition:"max-height 0.9s ease",maxHeight:t?"350px":"60px",overflow:"hidden",paddingRight:"2%",paddingLeft:"2%"},s={width:"40%",maxWidth:"300px",overflow:"hidden"};return f.jsx(f.Fragment,{children:f.jsx("div",{className:"navbar sticky-top navbar-expand-lg navbar-light navcus frosted-glass",style:i,children:f.jsxs("div",{className:"container-fluid",children:[f.jsx(oi,{to:"/",className:"navbar-brand",style:s,children:f.jsx("img",{src:"./img/logo.png",height:"100%",width:"100%",alt:"",loading:"lazy",style:{backgroundColor:"transparent"}})}),f.jsx("button",{className:"navbar-toggler",type:"button",onClick:n,children:f.jsx("span",{className:"navbar-toggler-icon"})}),f.jsx("div",{className:`collapse navbar-collapse justify-content-end ${t?"show":""}`,id:"navbarNavAltMarkup",children:f.jsxs("div",{className:"navbar-nav",children:[f.jsx(oi,{to:"/",className:"text-black fw-bold nav-link active","aria-current":"page",onClick:r,children:"Home"}),f.jsx(oi,{to:"/app",className:"text-black fw-bold nav-link active ","aria-current":"page",onClick:r,children:"App"}),f.jsx(oi,{to:"/team",className:"text-black fw-bold nav-link active link-hover-effect","aria-current":"page",onClick:r,children:"Team"}),f.jsx(oi,{to:"/blogs",className:"text-black fw-bold nav-link active link-hover-effect","aria-current":"page",onClick:r,children:"Blogs"}),f.jsx(oi,{to:"/contact",className:"text-black fw-bold nav-link active link-hover-effect","aria-current":"page",onClick:r,children:"Contact"})]})})]})})})}function nx(){return f.jsxs(f.Fragment,{children:[f.jsx(Oa,{}),f.jsx(jC,{})]})}function rx(){return P.useEffect(()=>{const t=setTimeout(()=>{window.location.replace("https://play.google.com/store/apps/details?id=com.gdscsmit.gdsc")},1e3);return()=>clearTimeout(t)},[]),f.jsx(f.Fragment,{children:"Redirecting..."})}/** + */function ho(){return ho=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function rx(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function ix(t,e){return t.button===0&&(!e||e==="_self")&&!rx(t)}const sx=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function ox(t,e){return kS({basename:e==null?void 0:e.basename,future:ho({},e==null?void 0:e.future,{v7_prependBasename:!0}),history:KC({window:e==null?void 0:e.window}),hydrationData:(e==null?void 0:e.hydrationData)||lx(),routes:t,mapRouteProperties:tx}).initialize()}function lx(){var t;let e=(t=window)==null?void 0:t.__staticRouterHydrationData;return e&&e.errors&&(e=ho({},e,{errors:ax(e.errors)})),e}function ax(t){if(!t)return null;let e=Object.entries(t),n={};for(let[r,i]of e)if(i&&i.__type==="RouteErrorResponse")n[r]=new Ph(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let s=window[i.__subType];if(typeof s=="function")try{let o=new s(i.message);o.stack="",n[r]=o}catch{}}if(n[r]==null){let s=new Error(i.message);s.stack="",n[r]=s}}else n[r]=i;return n}const ux=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",cx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ai=P.forwardRef(function(e,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:l,target:a,to:u,preventScrollReset:c}=e,d=nx(e,sx),{basename:h}=P.useContext(es),_,v=!1;if(typeof u=="string"&&cx.test(u)&&(_=u,ux))try{let m=new URL(window.location.href),y=u.startsWith("//")?new URL(m.protocol+u):new URL(u),p=Zi(y.pathname,h);y.origin===m.origin&&p!=null?u=p+y.search+y.hash:v=!0}catch{}let w=jS(u,{relative:i}),S=dx(u,{replace:o,state:l,target:a,preventScrollReset:c,relative:i});function g(m){r&&r(m),m.defaultPrevented||S(m)}return P.createElement("a",ho({},d,{href:_||w,onClick:v||s?r:g,ref:n,target:a}))});var sm;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher"})(sm||(sm={}));var om;(function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(om||(om={}));function dx(t,e){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o}=e===void 0?{}:e,l=FS(),a=La(),u=$y(t,{relative:o});return P.useCallback(c=>{if(ix(c,n)){c.preventDefault();let d=r!==void 0?r:Hr(a)===Hr(u);l(t,{replace:d,state:i,preventScrollReset:s,relative:o})}},[a,l,u,r,i,n,t,s,o])}function Ma(){const[t,e]=P.useState(!1),n=()=>{e(!t)},r=()=>{e(!1)},i={transition:"max-height 0.9s ease",maxHeight:t?"350px":"60px",overflow:"hidden",paddingRight:"2%",paddingLeft:"2%"},s={width:"40%",maxWidth:"300px",overflow:"hidden"};return f.jsx(f.Fragment,{children:f.jsx("div",{className:"navbar sticky-top navbar-expand-lg navbar-light navcus frosted-glass",style:i,children:f.jsxs("div",{className:"container-fluid",children:[f.jsx(ai,{to:"/",className:"navbar-brand",style:s,children:f.jsx("img",{src:"./img/logo.png",height:"100%",width:"100%",alt:"",loading:"lazy",style:{backgroundColor:"transparent"}})}),f.jsx("button",{className:"navbar-toggler",type:"button",onClick:n,children:f.jsx("span",{className:"navbar-toggler-icon"})}),f.jsx("div",{className:`collapse navbar-collapse justify-content-end ${t?"show":""}`,id:"navbarNavAltMarkup",children:f.jsxs("div",{className:"navbar-nav",children:[f.jsx(ai,{to:"/",className:"text-black fw-bold nav-link active","aria-current":"page",onClick:r,children:"Home"}),f.jsx(ai,{to:"/app",className:"text-black fw-bold nav-link active ","aria-current":"page",onClick:r,children:"App"}),f.jsx(ai,{to:"/team",className:"text-black fw-bold nav-link active link-hover-effect","aria-current":"page",onClick:r,children:"Team"}),f.jsx(ai,{to:"/blogs",className:"text-black fw-bold nav-link active link-hover-effect","aria-current":"page",onClick:r,children:"Blogs"}),f.jsx(ai,{to:"/contact",className:"text-black fw-bold nav-link active link-hover-effect","aria-current":"page",onClick:r,children:"Contact"})]})})]})})})}const ja=()=>f.jsx("div",{className:"loader",children:f.jsx("div",{className:"loader-item",children:f.jsx("img",{src:"./loader-unscreen.gif",alt:"loader"})})});function hx(){const[t,e]=P.useState(!0);return P.useEffect(()=>{setTimeout(()=>{e(!1)},2e3)},[]),f.jsx(f.Fragment,{children:t?f.jsx(ja,{}):f.jsxs(f.Fragment,{children:[f.jsx(Ma,{}),f.jsx(QC,{})]})})}function fx(){const[t,e]=P.useState(!0);return P.useEffect(()=>{const n=setTimeout(()=>{e(!1),window.location.replace("https://play.google.com/store/apps/details?id=com.gdscsmit.gdsc")},2e3);return()=>clearTimeout(n)},[]),f.jsx(f.Fragment,{children:t&&f.jsx(ja,{})})}/** * @license * Copyright 2017 Google LLC * @@ -80,7 +80,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const By={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"};/** + */const Vy={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"};/** * @license * Copyright 2017 Google LLC * @@ -95,7 +95,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const R=function(t,e){if(!t)throw Zi(e)},Zi=function(t){return new Error("Firebase Database ("+By.SDK_VERSION+") INTERNAL ASSERT FAILED: "+t)};/** + */const R=function(t,e){if(!t)throw ts(e)},ts=function(t){return new Error("Firebase Database ("+Vy.SDK_VERSION+") INTERNAL ASSERT FAILED: "+t)};/** * @license * Copyright 2017 Google LLC * @@ -110,7 +110,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const zy=function(t){const e=[];let n=0;for(let r=0;r>6|192,e[n++]=i&63|128):(i&64512)===55296&&r+1>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=i&63|128):(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=i&63|128)}return e},ix=function(t){const e=[];let n=0,r=0;for(;n191&&i<224){const s=t[n++];e[r++]=String.fromCharCode((i&31)<<6|s&63)}else if(i>239&&i<365){const s=t[n++],o=t[n++],l=t[n++],a=((i&7)<<18|(s&63)<<12|(o&63)<<6|l&63)-65536;e[r++]=String.fromCharCode(55296+(a>>10)),e[r++]=String.fromCharCode(56320+(a&1023))}else{const s=t[n++],o=t[n++];e[r++]=String.fromCharCode((i&15)<<12|(s&63)<<6|o&63)}}return e.join("")},Ih={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i>2,d=(s&3)<<4|l>>4;let h=(l&15)<<2|u>>6,_=u&63;a||(_=64,o||(h=64)),r.push(n[c],n[d],n[h],n[_])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(zy(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):ix(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i>4;if(r.push(h),u!==64){const _=l<<4&240|u>>2;if(r.push(_),d!==64){const v=u<<6&192|d;r.push(v)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}};class sx extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const $y=function(t){const e=zy(t);return Ih.encodeByteArray(e,!0)},Yl=function(t){return $y(t).replace(/\./g,"")},rd=function(t){try{return Ih.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/** + */const Gy=function(t){const e=[];let n=0;for(let r=0;r>6|192,e[n++]=i&63|128):(i&64512)===55296&&r+1>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=i&63|128):(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=i&63|128)}return e},px=function(t){const e=[];let n=0,r=0;for(;n191&&i<224){const s=t[n++];e[r++]=String.fromCharCode((i&31)<<6|s&63)}else if(i>239&&i<365){const s=t[n++],o=t[n++],l=t[n++],a=((i&7)<<18|(s&63)<<12|(o&63)<<6|l&63)-65536;e[r++]=String.fromCharCode(55296+(a>>10)),e[r++]=String.fromCharCode(56320+(a&1023))}else{const s=t[n++],o=t[n++];e[r++]=String.fromCharCode((i&15)<<12|(s&63)<<6|o&63)}}return e.join("")},Dh={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i>2,d=(s&3)<<4|l>>4;let h=(l&15)<<2|u>>6,_=u&63;a||(_=64,o||(h=64)),r.push(n[c],n[d],n[h],n[_])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(Gy(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):px(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i>4;if(r.push(h),u!==64){const _=l<<4&240|u>>2;if(r.push(_),d!==64){const v=u<<6&192|d;r.push(v)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}};class mx extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const Qy=function(t){const e=Gy(t);return Dh.encodeByteArray(e,!0)},Jl=function(t){return Qy(t).replace(/\./g,"")},od=function(t){try{return Dh.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/** * @license * Copyright 2017 Google LLC * @@ -125,7 +125,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function ox(t){return co(void 0,t)}function co(t,e){if(!(e instanceof Object))return e;switch(e.constructor){case Date:const n=e;return new Date(n.getTime());case Object:t===void 0&&(t={});break;case Array:t=[];break;default:return e}for(const n in e)!e.hasOwnProperty(n)||!lx(n)||(t[n]=co(t[n],e[n]));return t}function lx(t){return t!=="__proto__"}/** + */function gx(t){return fo(void 0,t)}function fo(t,e){if(!(e instanceof Object))return e;switch(e.constructor){case Date:const n=e;return new Date(n.getTime());case Object:t===void 0&&(t={});break;case Array:t=[];break;default:return e}for(const n in e)!e.hasOwnProperty(n)||!_x(n)||(t[n]=fo(t[n],e[n]));return t}function _x(t){return t!=="__proto__"}/** * @license * Copyright 2022 Google LLC * @@ -140,7 +140,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function ax(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}/** + */function yx(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}/** * @license * Copyright 2022 Google LLC * @@ -155,7 +155,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const ux=()=>ax().__FIREBASE_DEFAULTS__,cx=()=>{if(typeof process>"u"||typeof process.env>"u")return;const t={}.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},dx=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=t&&rd(t[1]);return e&&JSON.parse(e)},Wy=()=>{try{return ux()||cx()||dx()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},Hy=()=>{var t;return(t=Wy())===null||t===void 0?void 0:t.config};/** + */const vx=()=>yx().__FIREBASE_DEFAULTS__,wx=()=>{if(typeof process>"u"||typeof process.env>"u")return;const t={}.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},Ex=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=t&&od(t[1]);return e&&JSON.parse(e)},Ky=()=>{try{return vx()||wx()||Ex()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},qy=()=>{var t;return(t=Ky())===null||t===void 0?void 0:t.config};/** * @license * Copyright 2017 Google LLC * @@ -185,7 +185,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function Vy(t,e){if(t.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n={alg:"none",type:"JWT"},r=e||"demo-project",i=t.iat||0,s=t.sub||t.user_id;if(!s)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const o=Object.assign({iss:`https://securetoken.google.com/${r}`,aud:r,iat:i,exp:i+3600,auth_time:i,sub:s,user_id:s,firebase:{sign_in_provider:"custom",identities:{}}},t),l="";return[Yl(JSON.stringify(n)),Yl(JSON.stringify(o)),l].join(".")}/** + */function Yy(t,e){if(t.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n={alg:"none",type:"JWT"},r=e||"demo-project",i=t.iat||0,s=t.sub||t.user_id;if(!s)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const o=Object.assign({iss:`https://securetoken.google.com/${r}`,aud:r,iat:i,exp:i+3600,auth_time:i,sub:s,user_id:s,firebase:{sign_in_provider:"custom",identities:{}}},t),l="";return[Jl(JSON.stringify(n)),Jl(JSON.stringify(o)),l].join(".")}/** * @license * Copyright 2017 Google LLC * @@ -200,7 +200,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function hx(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function Gy(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(hx())}function fx(){var t;const e=(t=Wy())===null||t===void 0?void 0:t.forceEnvironment;if(e==="node")return!0;if(e==="browser")return!1;try{return Object.prototype.toString.call(global.process)==="[object process]"}catch{return!1}}function px(){return typeof self=="object"&&self.self===self}function mx(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function Qy(){return By.NODE_ADMIN===!0}function gx(){try{return typeof indexedDB=="object"}catch{return!1}}function _x(){return new Promise((t,e)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),t(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var s;e(((s=i.error)===null||s===void 0?void 0:s.message)||"")}}catch(n){e(n)}})}/** + */function Cx(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function Xy(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(Cx())}function Sx(){var t;const e=(t=Ky())===null||t===void 0?void 0:t.forceEnvironment;if(e==="node")return!0;if(e==="browser")return!1;try{return Object.prototype.toString.call(global.process)==="[object process]"}catch{return!1}}function xx(){return typeof self=="object"&&self.self===self}function kx(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function Jy(){return Vy.NODE_ADMIN===!0}function Tx(){try{return typeof indexedDB=="object"}catch{return!1}}function Rx(){return new Promise((t,e)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),t(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var s;e(((s=i.error)===null||s===void 0?void 0:s.message)||"")}}catch(n){e(n)}})}/** * @license * Copyright 2017 Google LLC * @@ -215,7 +215,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const yx="FirebaseError";class Zr extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=yx,Object.setPrototypeOf(this,Zr.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,La.prototype.create)}}class La{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},i=`${this.service}/${e}`,s=this.errors[e],o=s?vx(s,r):"Error",l=`${this.serviceName}: ${o} (${i}).`;return new Zr(i,l,r)}}function vx(t,e){return t.replace(wx,(n,r)=>{const i=e[r];return i!=null?String(i):`<${r}?>`})}const wx=/\{\$([^}]+)}/g;/** + */const Nx="FirebaseError";class ti extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=Nx,Object.setPrototypeOf(this,ti.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Fa.prototype.create)}}class Fa{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},i=`${this.service}/${e}`,s=this.errors[e],o=s?Ix(s,r):"Error",l=`${this.serviceName}: ${o} (${i}).`;return new ti(i,l,r)}}function Ix(t,e){return t.replace(Px,(n,r)=>{const i=e[r];return i!=null?String(i):`<${r}?>`})}const Px=/\{\$([^}]+)}/g;/** * @license * Copyright 2017 Google LLC * @@ -230,7 +230,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function ho(t){return JSON.parse(t)}function Ae(t){return JSON.stringify(t)}/** + */function po(t){return JSON.parse(t)}function Ae(t){return JSON.stringify(t)}/** * @license * Copyright 2017 Google LLC * @@ -245,7 +245,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const Ky=function(t){let e={},n={},r={},i="";try{const s=t.split(".");e=ho(rd(s[0])||""),n=ho(rd(s[1])||""),i=s[2],r=n.d||{},delete n.d}catch{}return{header:e,claims:n,data:r,signature:i}},Ex=function(t){const e=Ky(t),n=e.claims;return!!n&&typeof n=="object"&&n.hasOwnProperty("iat")},Cx=function(t){const e=Ky(t).claims;return typeof e=="object"&&e.admin===!0};/** + */const Zy=function(t){let e={},n={},r={},i="";try{const s=t.split(".");e=po(od(s[0])||""),n=po(od(s[1])||""),i=s[2],r=n.d||{},delete n.d}catch{}return{header:e,claims:n,data:r,signature:i}},bx=function(t){const e=Zy(t),n=e.claims;return!!n&&typeof n=="object"&&n.hasOwnProperty("iat")},Dx=function(t){const e=Zy(t).claims;return typeof e=="object"&&e.admin===!0};/** * @license * Copyright 2017 Google LLC * @@ -260,7 +260,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function Ct(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Wr(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]}function id(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function Xl(t,e,n){const r={};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=e.call(n,t[i],i,t));return r}function sd(t,e){if(t===e)return!0;const n=Object.keys(t),r=Object.keys(e);for(const i of n){if(!r.includes(i))return!1;const s=t[i],o=e[i];if(rm(s)&&rm(o)){if(!sd(s,o))return!1}else if(s!==o)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function rm(t){return t!==null&&typeof t=="object"}/** + */function Ct(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Vr(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]}function ld(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function Zl(t,e,n){const r={};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=e.call(n,t[i],i,t));return r}function ad(t,e){if(t===e)return!0;const n=Object.keys(t),r=Object.keys(e);for(const i of n){if(!r.includes(i))return!1;const s=t[i],o=e[i];if(lm(s)&&lm(o)){if(!ad(s,o))return!1}else if(s!==o)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function lm(t){return t!==null&&typeof t=="object"}/** * @license * Copyright 2017 Google LLC * @@ -275,7 +275,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function Sx(t){const e=[];for(const[n,r]of Object.entries(t))Array.isArray(r)?r.forEach(i=>{e.push(encodeURIComponent(n)+"="+encodeURIComponent(i))}):e.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return e.length?"&"+e.join("&"):""}/** + */function Ax(t){const e=[];for(const[n,r]of Object.entries(t))Array.isArray(r)?r.forEach(i=>{e.push(encodeURIComponent(n)+"="+encodeURIComponent(i))}):e.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return e.length?"&"+e.join("&"):""}/** * @license * Copyright 2017 Google LLC * @@ -290,7 +290,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class xx{constructor(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=512/8,this.pad_[0]=128;for(let e=1;e>>31)&4294967295}let i=this.chain_[0],s=this.chain_[1],o=this.chain_[2],l=this.chain_[3],a=this.chain_[4],u,c;for(let d=0;d<80;d++){d<40?d<20?(u=l^s&(o^l),c=1518500249):(u=s^o^l,c=1859775393):d<60?(u=s&o|l&(s|o),c=2400959708):(u=s^o^l,c=3395469782);const h=(i<<5|i>>>27)+u+a+c+r[d]&4294967295;a=l,l=o,o=(s<<30|s>>>2)&4294967295,s=i,i=h}this.chain_[0]=this.chain_[0]+i&4294967295,this.chain_[1]=this.chain_[1]+s&4294967295,this.chain_[2]=this.chain_[2]+o&4294967295,this.chain_[3]=this.chain_[3]+l&4294967295,this.chain_[4]=this.chain_[4]+a&4294967295}update(e,n){if(e==null)return;n===void 0&&(n=e.length);const r=n-this.blockSize;let i=0;const s=this.buf_;let o=this.inbuf_;for(;i=56;i--)this.buf_[i]=n&255,n/=256;this.compress_(this.buf_);let r=0;for(let i=0;i<5;i++)for(let s=24;s>=0;s-=8)e[r]=this.chain_[i]>>s&255,++r;return e}}function kx(t,e){const n=new Tx(t,e);return n.subscribe.bind(n)}class Tx{constructor(e,n){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then(()=>{e(this)}).catch(r=>{this.error(r)})}next(e){this.forEachObserver(n=>{n.next(e)})}error(e){this.forEachObserver(n=>{n.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,n,r){let i;if(e===void 0&&n===void 0&&r===void 0)throw new Error("Missing Observer.");Rx(e,["next","error","complete"])?i=e:i={next:e,error:n,complete:r},i.next===void 0&&(i.next=Vu),i.error===void 0&&(i.error=Vu),i.complete===void 0&&(i.complete=Vu);const s=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?i.error(this.finalError):i.complete()}catch{}}),this.observers.push(i),s}unsubscribeOne(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let n=0;n{if(this.observers!==void 0&&this.observers[e]!==void 0)try{n(this.observers[e])}catch(r){typeof console<"u"&&console.error&&console.error(r)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function Rx(t,e){if(typeof t!="object"||t===null)return!1;for(const n of e)if(n in t&&typeof t[n]=="function")return!0;return!1}function Vu(){}/** + */class Ox{constructor(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=512/8,this.pad_[0]=128;for(let e=1;e>>31)&4294967295}let i=this.chain_[0],s=this.chain_[1],o=this.chain_[2],l=this.chain_[3],a=this.chain_[4],u,c;for(let d=0;d<80;d++){d<40?d<20?(u=l^s&(o^l),c=1518500249):(u=s^o^l,c=1859775393):d<60?(u=s&o|l&(s|o),c=2400959708):(u=s^o^l,c=3395469782);const h=(i<<5|i>>>27)+u+a+c+r[d]&4294967295;a=l,l=o,o=(s<<30|s>>>2)&4294967295,s=i,i=h}this.chain_[0]=this.chain_[0]+i&4294967295,this.chain_[1]=this.chain_[1]+s&4294967295,this.chain_[2]=this.chain_[2]+o&4294967295,this.chain_[3]=this.chain_[3]+l&4294967295,this.chain_[4]=this.chain_[4]+a&4294967295}update(e,n){if(e==null)return;n===void 0&&(n=e.length);const r=n-this.blockSize;let i=0;const s=this.buf_;let o=this.inbuf_;for(;i=56;i--)this.buf_[i]=n&255,n/=256;this.compress_(this.buf_);let r=0;for(let i=0;i<5;i++)for(let s=24;s>=0;s-=8)e[r]=this.chain_[i]>>s&255,++r;return e}}function Lx(t,e){const n=new Mx(t,e);return n.subscribe.bind(n)}class Mx{constructor(e,n){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then(()=>{e(this)}).catch(r=>{this.error(r)})}next(e){this.forEachObserver(n=>{n.next(e)})}error(e){this.forEachObserver(n=>{n.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,n,r){let i;if(e===void 0&&n===void 0&&r===void 0)throw new Error("Missing Observer.");jx(e,["next","error","complete"])?i=e:i={next:e,error:n,complete:r},i.next===void 0&&(i.next=Ku),i.error===void 0&&(i.error=Ku),i.complete===void 0&&(i.complete=Ku);const s=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?i.error(this.finalError):i.complete()}catch{}}),this.observers.push(i),s}unsubscribeOne(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let n=0;n{if(this.observers!==void 0&&this.observers[e]!==void 0)try{n(this.observers[e])}catch(r){typeof console<"u"&&console.error&&console.error(r)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function jx(t,e){if(typeof t!="object"||t===null)return!1;for(const n of e)if(n in t&&typeof t[n]=="function")return!0;return!1}function Ku(){}/** * @license * Copyright 2017 Google LLC * @@ -305,7 +305,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const U=function(t,e,n,r){let i;if(rn&&(i=n===0?"none":"no more than "+n),i){const s=t+" failed: Was called with "+r+(r===1?" argument.":" arguments.")+" Expects "+i+".";throw new Error(s)}};function mt(t,e){return`${t} failed: ${e} argument `}function Ue(t,e,n,r){if(!(r&&!n)&&typeof n!="function")throw new Error(mt(t,e)+"must be a valid function.")}function im(t,e,n,r){if(!(r&&!n)&&(typeof n!="object"||n===null))throw new Error(mt(t,e)+"must be a valid context object.")}/** + */const U=function(t,e,n,r){let i;if(rn&&(i=n===0?"none":"no more than "+n),i){const s=t+" failed: Was called with "+r+(r===1?" argument.":" arguments.")+" Expects "+i+".";throw new Error(s)}};function mt(t,e){return`${t} failed: ${e} argument `}function Ue(t,e,n,r){if(!(r&&!n)&&typeof n!="function")throw new Error(mt(t,e)+"must be a valid function.")}function am(t,e,n,r){if(!(r&&!n)&&(typeof n!="object"||n===null))throw new Error(mt(t,e)+"must be a valid context object.")}/** * @license * Copyright 2017 Google LLC * @@ -320,7 +320,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const Nx=function(t){const e=[];let n=0;for(let r=0;r=55296&&i<=56319){const s=i-55296;r++,R(r>6|192,e[n++]=i&63|128):i<65536?(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=i&63|128):(e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=i&63|128)}return e},Ma=function(t){let e=0;for(let n=0;n=55296&&r<=56319?(e+=4,n++):e+=3}return e};/** + */const Fx=function(t){const e=[];let n=0;for(let r=0;r=55296&&i<=56319){const s=i-55296;r++,R(r>6|192,e[n++]=i&63|128):i<65536?(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=i&63|128):(e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=i&63|128)}return e},Ua=function(t){let e=0;for(let n=0;n=55296&&r<=56319?(e+=4,n++):e+=3}return e};/** * @license * Copyright 2021 Google LLC * @@ -350,7 +350,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const kr="[DEFAULT]";/** + */const Rr="[DEFAULT]";/** * @license * Copyright 2019 Google LLC * @@ -365,7 +365,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class od{constructor(e,n){this.name=e,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const n=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(n)){const r=new ut;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const i=this.getOrInitializeService({instanceIdentifier:n});i&&r.resolve(i)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(e){var n;const r=this.normalizeInstanceIdentifier(e==null?void 0:e.identifier),i=(n=e==null?void 0:e.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(s){if(i)return null;throw s}else{if(i)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(Px(e))try{this.getOrInitializeService({instanceIdentifier:kr})}catch{}for(const[n,r]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(n);try{const s=this.getOrInitializeService({instanceIdentifier:i});r.resolve(s)}catch{}}}}clearInstance(e=kr){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...e.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=kr){return this.instances.has(e)}getOptions(e=kr){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:n={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const i=this.getOrInitializeService({instanceIdentifier:r,options:n});for(const[s,o]of this.instancesDeferred.entries()){const l=this.normalizeInstanceIdentifier(s);r===l&&o.resolve(i)}return i}onInit(e,n){var r;const i=this.normalizeInstanceIdentifier(n),s=(r=this.onInitCallbacks.get(i))!==null&&r!==void 0?r:new Set;s.add(e),this.onInitCallbacks.set(i,s);const o=this.instances.get(i);return o&&e(o,i),()=>{s.delete(e)}}invokeOnInitCallbacks(e,n){const r=this.onInitCallbacks.get(n);if(r)for(const i of r)try{i(e,n)}catch{}}getOrInitializeService({instanceIdentifier:e,options:n={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:Ix(e),options:n}),this.instances.set(e,r),this.instancesOptions.set(e,n),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch{}return r||null}normalizeInstanceIdentifier(e=kr){return this.component?this.component.multipleInstances?e:kr:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function Ix(t){return t===kr?void 0:t}function Px(t){return t.instantiationMode==="EAGER"}/** + */class ud{constructor(e,n){this.name=e,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const n=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(n)){const r=new ut;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const i=this.getOrInitializeService({instanceIdentifier:n});i&&r.resolve(i)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(e){var n;const r=this.normalizeInstanceIdentifier(e==null?void 0:e.identifier),i=(n=e==null?void 0:e.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(s){if(i)return null;throw s}else{if(i)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(Bx(e))try{this.getOrInitializeService({instanceIdentifier:Rr})}catch{}for(const[n,r]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(n);try{const s=this.getOrInitializeService({instanceIdentifier:i});r.resolve(s)}catch{}}}}clearInstance(e=Rr){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...e.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=Rr){return this.instances.has(e)}getOptions(e=Rr){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:n={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const i=this.getOrInitializeService({instanceIdentifier:r,options:n});for(const[s,o]of this.instancesDeferred.entries()){const l=this.normalizeInstanceIdentifier(s);r===l&&o.resolve(i)}return i}onInit(e,n){var r;const i=this.normalizeInstanceIdentifier(n),s=(r=this.onInitCallbacks.get(i))!==null&&r!==void 0?r:new Set;s.add(e),this.onInitCallbacks.set(i,s);const o=this.instances.get(i);return o&&e(o,i),()=>{s.delete(e)}}invokeOnInitCallbacks(e,n){const r=this.onInitCallbacks.get(n);if(r)for(const i of r)try{i(e,n)}catch{}}getOrInitializeService({instanceIdentifier:e,options:n={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:Ux(e),options:n}),this.instances.set(e,r),this.instancesOptions.set(e,n),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch{}return r||null}normalizeInstanceIdentifier(e=Rr){return this.component?this.component.multipleInstances?e:Rr:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function Ux(t){return t===Rr?void 0:t}function Bx(t){return t.instantiationMode==="EAGER"}/** * @license * Copyright 2019 Google LLC * @@ -380,7 +380,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class qy{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const n=this.getProvider(e.name);if(n.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);n.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const n=new od(e,this);return this.providers.set(e,n),n}getProviders(){return Array.from(this.providers.values())}}/** + */class ev{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const n=this.getProvider(e.name);if(n.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);n.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const n=new ud(e,this);return this.providers.set(e,n),n}getProviders(){return Array.from(this.providers.values())}}/** * @license * Copyright 2017 Google LLC * @@ -395,7 +395,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const Ph=[];var ie;(function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"})(ie||(ie={}));const Yy={debug:ie.DEBUG,verbose:ie.VERBOSE,info:ie.INFO,warn:ie.WARN,error:ie.ERROR,silent:ie.SILENT},bx=ie.INFO,Dx={[ie.DEBUG]:"log",[ie.VERBOSE]:"log",[ie.INFO]:"info",[ie.WARN]:"warn",[ie.ERROR]:"error"},Ax=(t,e,...n)=>{if(e{e.setLogLevel(t)})}function Lx(t,e){for(const n of Ph){let r=null;e&&e.level&&(r=Yy[e.level]),t===null?n.userLogHandler=null:n.userLogHandler=(i,s,...o)=>{const l=o.map(a=>{if(a==null)return null;if(typeof a=="string")return a;if(typeof a=="number"||typeof a=="boolean")return a.toString();if(a instanceof Error)return a.message;try{return JSON.stringify(a)}catch{return null}}).filter(a=>a).join(" ");s>=(r??i.logLevel)&&t({level:ie[s].toLowerCase(),message:l,args:o,type:i.name})}}}const Mx=(t,e)=>e.some(n=>t instanceof n);let sm,om;function jx(){return sm||(sm=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Fx(){return om||(om=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Xy=new WeakMap,ld=new WeakMap,Jy=new WeakMap,Gu=new WeakMap,bh=new WeakMap;function Ux(t){const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{n(rr(t.result)),i()},o=()=>{r(t.error),i()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(n=>{n instanceof IDBCursor&&Xy.set(n,t)}).catch(()=>{}),bh.set(e,t),e}function Bx(t){if(ld.has(t))return;const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("complete",s),t.removeEventListener("error",o),t.removeEventListener("abort",o)},s=()=>{n(),i()},o=()=>{r(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",s),t.addEventListener("error",o),t.addEventListener("abort",o)});ld.set(t,e)}let ad={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return ld.get(t);if(e==="objectStoreNames")return t.objectStoreNames||Jy.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return rr(t[e])},set(t,e,n){return t[e]=n,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function zx(t){ad=t(ad)}function $x(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...n){const r=t.call(Qu(this),e,...n);return Jy.set(r,e.sort?e.sort():[e]),rr(r)}:Fx().includes(t)?function(...e){return t.apply(Qu(this),e),rr(Xy.get(this))}:function(...e){return rr(t.apply(Qu(this),e))}}function Wx(t){return typeof t=="function"?$x(t):(t instanceof IDBTransaction&&Bx(t),Mx(t,jx())?new Proxy(t,ad):t)}function rr(t){if(t instanceof IDBRequest)return Ux(t);if(Gu.has(t))return Gu.get(t);const e=Wx(t);return e!==t&&(Gu.set(t,e),bh.set(e,t)),e}const Qu=t=>bh.get(t);function Hx(t,e,{blocked:n,upgrade:r,blocking:i,terminated:s}={}){const o=indexedDB.open(t,e),l=rr(o);return r&&o.addEventListener("upgradeneeded",a=>{r(rr(o.result),a.oldVersion,a.newVersion,rr(o.transaction),a)}),n&&o.addEventListener("blocked",a=>n(a.oldVersion,a.newVersion,a)),l.then(a=>{s&&a.addEventListener("close",()=>s()),i&&a.addEventListener("versionchange",u=>i(u.oldVersion,u.newVersion,u))}).catch(()=>{}),l}const Vx=["get","getKey","getAll","getAllKeys","count"],Gx=["put","add","delete","clear"],Ku=new Map;function lm(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(Ku.get(e))return Ku.get(e);const n=e.replace(/FromIndex$/,""),r=e!==n,i=Gx.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||Vx.includes(n)))return;const s=async function(o,...l){const a=this.transaction(o,i?"readwrite":"readonly");let u=a.store;return r&&(u=u.index(l.shift())),(await Promise.all([u[n](...l),i&&a.done]))[0]};return Ku.set(e,s),s}zx(t=>({...t,get:(e,n,r)=>lm(e,n)||t.get(e,n,r),has:(e,n)=>!!lm(e,n)||t.has(e,n)}));/** + */const Ah=[];var ie;(function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"})(ie||(ie={}));const tv={debug:ie.DEBUG,verbose:ie.VERBOSE,info:ie.INFO,warn:ie.WARN,error:ie.ERROR,silent:ie.SILENT},zx=ie.INFO,$x={[ie.DEBUG]:"log",[ie.VERBOSE]:"log",[ie.INFO]:"info",[ie.WARN]:"warn",[ie.ERROR]:"error"},Wx=(t,e,...n)=>{if(e{e.setLogLevel(t)})}function Vx(t,e){for(const n of Ah){let r=null;e&&e.level&&(r=tv[e.level]),t===null?n.userLogHandler=null:n.userLogHandler=(i,s,...o)=>{const l=o.map(a=>{if(a==null)return null;if(typeof a=="string")return a;if(typeof a=="number"||typeof a=="boolean")return a.toString();if(a instanceof Error)return a.message;try{return JSON.stringify(a)}catch{return null}}).filter(a=>a).join(" ");s>=(r??i.logLevel)&&t({level:ie[s].toLowerCase(),message:l,args:o,type:i.name})}}}const Gx=(t,e)=>e.some(n=>t instanceof n);let um,cm;function Qx(){return um||(um=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Kx(){return cm||(cm=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const nv=new WeakMap,cd=new WeakMap,rv=new WeakMap,qu=new WeakMap,Oh=new WeakMap;function qx(t){const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{n(sr(t.result)),i()},o=()=>{r(t.error),i()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(n=>{n instanceof IDBCursor&&nv.set(n,t)}).catch(()=>{}),Oh.set(e,t),e}function Yx(t){if(cd.has(t))return;const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("complete",s),t.removeEventListener("error",o),t.removeEventListener("abort",o)},s=()=>{n(),i()},o=()=>{r(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",s),t.addEventListener("error",o),t.addEventListener("abort",o)});cd.set(t,e)}let dd={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return cd.get(t);if(e==="objectStoreNames")return t.objectStoreNames||rv.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return sr(t[e])},set(t,e,n){return t[e]=n,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function Xx(t){dd=t(dd)}function Jx(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...n){const r=t.call(Yu(this),e,...n);return rv.set(r,e.sort?e.sort():[e]),sr(r)}:Kx().includes(t)?function(...e){return t.apply(Yu(this),e),sr(nv.get(this))}:function(...e){return sr(t.apply(Yu(this),e))}}function Zx(t){return typeof t=="function"?Jx(t):(t instanceof IDBTransaction&&Yx(t),Gx(t,Qx())?new Proxy(t,dd):t)}function sr(t){if(t instanceof IDBRequest)return qx(t);if(qu.has(t))return qu.get(t);const e=Zx(t);return e!==t&&(qu.set(t,e),Oh.set(e,t)),e}const Yu=t=>Oh.get(t);function e1(t,e,{blocked:n,upgrade:r,blocking:i,terminated:s}={}){const o=indexedDB.open(t,e),l=sr(o);return r&&o.addEventListener("upgradeneeded",a=>{r(sr(o.result),a.oldVersion,a.newVersion,sr(o.transaction),a)}),n&&o.addEventListener("blocked",a=>n(a.oldVersion,a.newVersion,a)),l.then(a=>{s&&a.addEventListener("close",()=>s()),i&&a.addEventListener("versionchange",u=>i(u.oldVersion,u.newVersion,u))}).catch(()=>{}),l}const t1=["get","getKey","getAll","getAllKeys","count"],n1=["put","add","delete","clear"],Xu=new Map;function dm(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(Xu.get(e))return Xu.get(e);const n=e.replace(/FromIndex$/,""),r=e!==n,i=n1.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||t1.includes(n)))return;const s=async function(o,...l){const a=this.transaction(o,i?"readwrite":"readonly");let u=a.store;return r&&(u=u.index(l.shift())),(await Promise.all([u[n](...l),i&&a.done]))[0]};return Xu.set(e,s),s}Xx(t=>({...t,get:(e,n,r)=>dm(e,n)||t.get(e,n,r),has:(e,n)=>!!dm(e,n)||t.has(e,n)}));/** * @license * Copyright 2019 Google LLC * @@ -410,7 +410,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class Qx{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(Kx(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function Kx(t){const e=t.getComponent();return(e==null?void 0:e.type)==="VERSION"}const ud="@firebase/app",am="0.9.19";/** + */class r1{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(i1(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function i1(t){const e=t.getComponent();return(e==null?void 0:e.type)==="VERSION"}const hd="@firebase/app",hm="0.9.20";/** * @license * Copyright 2019 Google LLC * @@ -425,7 +425,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const Hr=new ja("@firebase/app"),qx="@firebase/app-compat",Yx="@firebase/analytics-compat",Xx="@firebase/analytics",Jx="@firebase/app-check-compat",Zx="@firebase/app-check",e1="@firebase/auth",t1="@firebase/auth-compat",n1="@firebase/database",r1="@firebase/database-compat",i1="@firebase/functions",s1="@firebase/functions-compat",o1="@firebase/installations",l1="@firebase/installations-compat",a1="@firebase/messaging",u1="@firebase/messaging-compat",c1="@firebase/performance",d1="@firebase/performance-compat",h1="@firebase/remote-config",f1="@firebase/remote-config-compat",p1="@firebase/storage",m1="@firebase/storage-compat",g1="@firebase/firestore",_1="@firebase/firestore-compat",y1="firebase",v1="10.4.0";/** + */const Gr=new Ba("@firebase/app"),s1="@firebase/app-compat",o1="@firebase/analytics-compat",l1="@firebase/analytics",a1="@firebase/app-check-compat",u1="@firebase/app-check",c1="@firebase/auth",d1="@firebase/auth-compat",h1="@firebase/database",f1="@firebase/database-compat",p1="@firebase/functions",m1="@firebase/functions-compat",g1="@firebase/installations",_1="@firebase/installations-compat",y1="@firebase/messaging",v1="@firebase/messaging-compat",w1="@firebase/performance",E1="@firebase/performance-compat",C1="@firebase/remote-config",S1="@firebase/remote-config-compat",x1="@firebase/storage",k1="@firebase/storage-compat",T1="@firebase/firestore",R1="@firebase/firestore-compat",N1="firebase",I1="10.5.0";/** * @license * Copyright 2019 Google LLC * @@ -440,7 +440,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const ur="[DEFAULT]",w1={[ud]:"fire-core",[qx]:"fire-core-compat",[Xx]:"fire-analytics",[Yx]:"fire-analytics-compat",[Zx]:"fire-app-check",[Jx]:"fire-app-check-compat",[e1]:"fire-auth",[t1]:"fire-auth-compat",[n1]:"fire-rtdb",[r1]:"fire-rtdb-compat",[i1]:"fire-fn",[s1]:"fire-fn-compat",[o1]:"fire-iid",[l1]:"fire-iid-compat",[a1]:"fire-fcm",[u1]:"fire-fcm-compat",[c1]:"fire-perf",[d1]:"fire-perf-compat",[h1]:"fire-rc",[f1]:"fire-rc-compat",[p1]:"fire-gcs",[m1]:"fire-gcs-compat",[g1]:"fire-fst",[_1]:"fire-fst-compat","fire-js":"fire-js",[y1]:"fire-js-all"};/** + */const dr="[DEFAULT]",P1={[hd]:"fire-core",[s1]:"fire-core-compat",[l1]:"fire-analytics",[o1]:"fire-analytics-compat",[u1]:"fire-app-check",[a1]:"fire-app-check-compat",[c1]:"fire-auth",[d1]:"fire-auth-compat",[h1]:"fire-rtdb",[f1]:"fire-rtdb-compat",[p1]:"fire-fn",[m1]:"fire-fn-compat",[g1]:"fire-iid",[_1]:"fire-iid-compat",[y1]:"fire-fcm",[v1]:"fire-fcm-compat",[w1]:"fire-perf",[E1]:"fire-perf-compat",[C1]:"fire-rc",[S1]:"fire-rc-compat",[x1]:"fire-gcs",[k1]:"fire-gcs-compat",[T1]:"fire-fst",[R1]:"fire-fst-compat","fire-js":"fire-js",[N1]:"fire-js-all"};/** * @license * Copyright 2019 Google LLC * @@ -455,7 +455,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const cr=new Map,fo=new Map;function Jl(t,e){try{t.container.addComponent(e)}catch(n){Hr.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,n)}}function Zy(t,e){t.container.addOrOverwriteComponent(e)}function Vr(t){const e=t.name;if(fo.has(e))return Hr.debug(`There were multiple attempts to register component ${e}.`),!1;fo.set(e,t);for(const n of cr.values())Jl(n,t);return!0}function ev(t,e){const n=t.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),t.container.getProvider(e)}function E1(t,e,n=ur){ev(t,e).clearInstance(n)}function C1(){fo.clear()}/** + */const hr=new Map,mo=new Map;function ea(t,e){try{t.container.addComponent(e)}catch(n){Gr.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,n)}}function iv(t,e){t.container.addOrOverwriteComponent(e)}function Qr(t){const e=t.name;if(mo.has(e))return Gr.debug(`There were multiple attempts to register component ${e}.`),!1;mo.set(e,t);for(const n of hr.values())ea(n,t);return!0}function sv(t,e){const n=t.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),t.container.getProvider(e)}function b1(t,e,n=dr){sv(t,e).clearInstance(n)}function D1(){mo.clear()}/** * @license * Copyright 2019 Google LLC * @@ -470,7 +470,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const S1={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."},xn=new La("app","Firebase",S1);/** + */const A1={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."},kn=new Fa("app","Firebase",A1);/** * @license * Copyright 2019 Google LLC * @@ -485,7 +485,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */let x1=class{constructor(e,n,r){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new Yt("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw xn.create("app-deleted",{appName:this._name})}};/** + */let O1=class{constructor(e,n,r){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new Yt("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw kn.create("app-deleted",{appName:this._name})}};/** * @license * Copyright 2019 Google LLC * @@ -500,7 +500,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const Fa=v1;function Dh(t,e={}){let n=t;typeof e!="object"&&(e={name:e});const r=Object.assign({name:ur,automaticDataCollectionEnabled:!1},e),i=r.name;if(typeof i!="string"||!i)throw xn.create("bad-app-name",{appName:String(i)});if(n||(n=Hy()),!n)throw xn.create("no-options");const s=cr.get(i);if(s){if(sd(n,s.options)&&sd(r,s.config))return s;throw xn.create("duplicate-app",{appName:i})}const o=new qy(i);for(const a of fo.values())o.addComponent(a);const l=new x1(n,r,o);return cr.set(i,l),l}function k1(t=ur){const e=cr.get(t);if(!e&&t===ur&&Hy())return Dh();if(!e)throw xn.create("no-app",{appName:t});return e}function T1(){return Array.from(cr.values())}async function tv(t){const e=t.name;cr.has(e)&&(cr.delete(e),await Promise.all(t.container.getProviders().map(n=>n.delete())),t.isDeleted=!0)}function an(t,e,n){var r;let i=(r=w1[t])!==null&&r!==void 0?r:t;n&&(i+=`-${n}`);const s=i.match(/\s|\//),o=e.match(/\s|\//);if(s||o){const l=[`Unable to register library "${i}" with version "${e}":`];s&&l.push(`library name "${i}" contains illegal characters (whitespace or "/")`),s&&o&&l.push("and"),o&&l.push(`version name "${e}" contains illegal characters (whitespace or "/")`),Hr.warn(l.join(" "));return}Vr(new Yt(`${i}-version`,()=>({library:i,version:e}),"VERSION"))}function nv(t,e){if(t!==null&&typeof t!="function")throw xn.create("invalid-log-argument");Lx(t,e)}function rv(t){Ox(t)}/** + */const za=I1;function Lh(t,e={}){let n=t;typeof e!="object"&&(e={name:e});const r=Object.assign({name:dr,automaticDataCollectionEnabled:!1},e),i=r.name;if(typeof i!="string"||!i)throw kn.create("bad-app-name",{appName:String(i)});if(n||(n=qy()),!n)throw kn.create("no-options");const s=hr.get(i);if(s){if(ad(n,s.options)&&ad(r,s.config))return s;throw kn.create("duplicate-app",{appName:i})}const o=new ev(i);for(const a of mo.values())o.addComponent(a);const l=new O1(n,r,o);return hr.set(i,l),l}function L1(t=dr){const e=hr.get(t);if(!e&&t===dr&&qy())return Lh();if(!e)throw kn.create("no-app",{appName:t});return e}function M1(){return Array.from(hr.values())}async function ov(t){const e=t.name;hr.has(e)&&(hr.delete(e),await Promise.all(t.container.getProviders().map(n=>n.delete())),t.isDeleted=!0)}function an(t,e,n){var r;let i=(r=P1[t])!==null&&r!==void 0?r:t;n&&(i+=`-${n}`);const s=i.match(/\s|\//),o=e.match(/\s|\//);if(s||o){const l=[`Unable to register library "${i}" with version "${e}":`];s&&l.push(`library name "${i}" contains illegal characters (whitespace or "/")`),s&&o&&l.push("and"),o&&l.push(`version name "${e}" contains illegal characters (whitespace or "/")`),Gr.warn(l.join(" "));return}Qr(new Yt(`${i}-version`,()=>({library:i,version:e}),"VERSION"))}function lv(t,e){if(t!==null&&typeof t!="function")throw kn.create("invalid-log-argument");Vx(t,e)}function av(t){Hx(t)}/** * @license * Copyright 2021 Google LLC * @@ -515,7 +515,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const R1="firebase-heartbeat-database",N1=1,po="firebase-heartbeat-store";let qu=null;function iv(){return qu||(qu=Hx(R1,N1,{upgrade:(t,e)=>{switch(e){case 0:t.createObjectStore(po)}}}).catch(t=>{throw xn.create("idb-open",{originalErrorMessage:t.message})})),qu}async function I1(t){try{return await(await iv()).transaction(po).objectStore(po).get(sv(t))}catch(e){if(e instanceof Zr)Hr.warn(e.message);else{const n=xn.create("idb-get",{originalErrorMessage:e==null?void 0:e.message});Hr.warn(n.message)}}}async function um(t,e){try{const r=(await iv()).transaction(po,"readwrite");await r.objectStore(po).put(e,sv(t)),await r.done}catch(n){if(n instanceof Zr)Hr.warn(n.message);else{const r=xn.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});Hr.warn(r.message)}}}function sv(t){return`${t.name}!${t.options.appId}`}/** + */const j1="firebase-heartbeat-database",F1=1,go="firebase-heartbeat-store";let Ju=null;function uv(){return Ju||(Ju=e1(j1,F1,{upgrade:(t,e)=>{switch(e){case 0:t.createObjectStore(go)}}}).catch(t=>{throw kn.create("idb-open",{originalErrorMessage:t.message})})),Ju}async function U1(t){try{return await(await uv()).transaction(go).objectStore(go).get(cv(t))}catch(e){if(e instanceof ti)Gr.warn(e.message);else{const n=kn.create("idb-get",{originalErrorMessage:e==null?void 0:e.message});Gr.warn(n.message)}}}async function fm(t,e){try{const r=(await uv()).transaction(go,"readwrite");await r.objectStore(go).put(e,cv(t)),await r.done}catch(n){if(n instanceof ti)Gr.warn(n.message);else{const r=kn.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});Gr.warn(r.message)}}}function cv(t){return`${t.name}!${t.options.appId}`}/** * @license * Copyright 2021 Google LLC * @@ -530,7 +530,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const P1=1024,b1=30*24*60*60*1e3;class D1{constructor(e){this.container=e,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new O1(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){const n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),r=cm();if(this._heartbeatsCache===null&&(this._heartbeatsCache=await this._heartbeatsCachePromise),!(this._heartbeatsCache.lastSentHeartbeatDate===r||this._heartbeatsCache.heartbeats.some(i=>i.date===r)))return this._heartbeatsCache.heartbeats.push({date:r,agent:n}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(i=>{const s=new Date(i.date).valueOf();return Date.now()-s<=b1}),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,this._heartbeatsCache===null||this._heartbeatsCache.heartbeats.length===0)return"";const e=cm(),{heartbeatsToSend:n,unsentEntries:r}=A1(this._heartbeatsCache.heartbeats),i=Yl(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=e,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}}function cm(){return new Date().toISOString().substring(0,10)}function A1(t,e=P1){const n=[];let r=t.slice();for(const i of t){const s=n.find(o=>o.agent===i.agent);if(s){if(s.dates.push(i.date),dm(n)>e){s.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),dm(n)>e){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class O1{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return gx()?_x().then(()=>!0).catch(()=>!1):!1}async read(){return await this._canUseIndexedDBPromise?await I1(this.app)||{heartbeats:[]}:{heartbeats:[]}}async overwrite(e){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return um(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return um(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:[...i.heartbeats,...e.heartbeats]})}else return}}function dm(t){return Yl(JSON.stringify({version:2,heartbeats:t})).length}/** + */const B1=1024,z1=30*24*60*60*1e3;class $1{constructor(e){this.container=e,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new H1(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){const n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),r=pm();if(this._heartbeatsCache===null&&(this._heartbeatsCache=await this._heartbeatsCachePromise),!(this._heartbeatsCache.lastSentHeartbeatDate===r||this._heartbeatsCache.heartbeats.some(i=>i.date===r)))return this._heartbeatsCache.heartbeats.push({date:r,agent:n}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(i=>{const s=new Date(i.date).valueOf();return Date.now()-s<=z1}),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,this._heartbeatsCache===null||this._heartbeatsCache.heartbeats.length===0)return"";const e=pm(),{heartbeatsToSend:n,unsentEntries:r}=W1(this._heartbeatsCache.heartbeats),i=Jl(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=e,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}}function pm(){return new Date().toISOString().substring(0,10)}function W1(t,e=B1){const n=[];let r=t.slice();for(const i of t){const s=n.find(o=>o.agent===i.agent);if(s){if(s.dates.push(i.date),mm(n)>e){s.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),mm(n)>e){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class H1{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return Tx()?Rx().then(()=>!0).catch(()=>!1):!1}async read(){return await this._canUseIndexedDBPromise?await U1(this.app)||{heartbeats:[]}:{heartbeats:[]}}async overwrite(e){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return fm(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return fm(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:[...i.heartbeats,...e.heartbeats]})}else return}}function mm(t){return Jl(JSON.stringify({version:2,heartbeats:t})).length}/** * @license * Copyright 2019 Google LLC * @@ -545,7 +545,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function L1(t){Vr(new Yt("platform-logger",e=>new Qx(e),"PRIVATE")),Vr(new Yt("heartbeat",e=>new D1(e),"PRIVATE")),an(ud,am,t),an(ud,am,"esm2017"),an("fire-js","")}L1("");const M1=Object.freeze(Object.defineProperty({__proto__:null,FirebaseError:Zr,SDK_VERSION:Fa,_DEFAULT_ENTRY_NAME:ur,_addComponent:Jl,_addOrOverwriteComponent:Zy,_apps:cr,_clearComponents:C1,_components:fo,_getProvider:ev,_registerComponent:Vr,_removeServiceInstance:E1,deleteApp:tv,getApp:k1,getApps:T1,initializeApp:Dh,onLog:nv,registerVersion:an,setLogLevel:rv},Symbol.toStringTag,{value:"Module"}));/** + */function V1(t){Qr(new Yt("platform-logger",e=>new r1(e),"PRIVATE")),Qr(new Yt("heartbeat",e=>new $1(e),"PRIVATE")),an(hd,hm,t),an(hd,hm,"esm2017"),an("fire-js","")}V1("");const G1=Object.freeze(Object.defineProperty({__proto__:null,FirebaseError:ti,SDK_VERSION:za,_DEFAULT_ENTRY_NAME:dr,_addComponent:ea,_addOrOverwriteComponent:iv,_apps:hr,_clearComponents:D1,_components:mo,_getProvider:sv,_registerComponent:Qr,_removeServiceInstance:b1,deleteApp:ov,getApp:L1,getApps:M1,initializeApp:Lh,onLog:lv,registerVersion:an,setLogLevel:av},Symbol.toStringTag,{value:"Module"}));/** * @license * Copyright 2020 Google LLC * @@ -560,7 +560,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class j1{constructor(e,n){this._delegate=e,this.firebase=n,Jl(e,new Yt("app-compat",()=>this,"PUBLIC")),this.container=e.container}get automaticDataCollectionEnabled(){return this._delegate.automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this._delegate.automaticDataCollectionEnabled=e}get name(){return this._delegate.name}get options(){return this._delegate.options}delete(){return new Promise(e=>{this._delegate.checkDestroyed(),e()}).then(()=>(this.firebase.INTERNAL.removeApp(this.name),tv(this._delegate)))}_getService(e,n=ur){var r;this._delegate.checkDestroyed();const i=this._delegate.container.getProvider(e);return!i.isInitialized()&&((r=i.getComponent())===null||r===void 0?void 0:r.instantiationMode)==="EXPLICIT"&&i.initialize(),i.getImmediate({identifier:n})}_removeServiceInstance(e,n=ur){this._delegate.container.getProvider(e).clearInstance(n)}_addComponent(e){Jl(this._delegate,e)}_addOrOverwriteComponent(e){Zy(this._delegate,e)}toJSON(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}}}/** + */class Q1{constructor(e,n){this._delegate=e,this.firebase=n,ea(e,new Yt("app-compat",()=>this,"PUBLIC")),this.container=e.container}get automaticDataCollectionEnabled(){return this._delegate.automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this._delegate.automaticDataCollectionEnabled=e}get name(){return this._delegate.name}get options(){return this._delegate.options}delete(){return new Promise(e=>{this._delegate.checkDestroyed(),e()}).then(()=>(this.firebase.INTERNAL.removeApp(this.name),ov(this._delegate)))}_getService(e,n=dr){var r;this._delegate.checkDestroyed();const i=this._delegate.container.getProvider(e);return!i.isInitialized()&&((r=i.getComponent())===null||r===void 0?void 0:r.instantiationMode)==="EXPLICIT"&&i.initialize(),i.getImmediate({identifier:n})}_removeServiceInstance(e,n=dr){this._delegate.container.getProvider(e).clearInstance(n)}_addComponent(e){ea(this._delegate,e)}_addOrOverwriteComponent(e){iv(this._delegate,e)}toJSON(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}}}/** * @license * Copyright 2019 Google LLC * @@ -575,7 +575,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const F1={"no-app":"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance."},hm=new La("app-compat","Firebase",F1);/** + */const K1={"no-app":"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance."},gm=new Fa("app-compat","Firebase",K1);/** * @license * Copyright 2019 Google LLC * @@ -590,7 +590,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function U1(t){const e={},n={__esModule:!0,initializeApp:s,app:i,registerVersion:an,setLogLevel:rv,onLog:nv,apps:null,SDK_VERSION:Fa,INTERNAL:{registerComponent:l,removeApp:r,useAsService:a,modularAPIs:M1}};n.default=n,Object.defineProperty(n,"apps",{get:o});function r(u){delete e[u]}function i(u){if(u=u||ur,!Ct(e,u))throw hm.create("no-app",{appName:u});return e[u]}i.App=t;function s(u,c={}){const d=Dh(u,c);if(Ct(e,d.name))return e[d.name];const h=new t(d,n);return e[d.name]=h,h}function o(){return Object.keys(e).map(u=>e[u])}function l(u){const c=u.name,d=c.replace("-compat","");if(Vr(u)&&u.type==="PUBLIC"){const h=(_=i())=>{if(typeof _[d]!="function")throw hm.create("invalid-app-argument",{appName:c});return _[d]()};u.serviceProps!==void 0&&co(h,u.serviceProps),n[d]=h,t.prototype[d]=function(..._){return this._getService.bind(this,c).apply(this,u.multipleInstances?_:[])}}return u.type==="PUBLIC"?n[d]:null}function a(u,c){return c==="serverAuth"?null:c}return n}/** + */function q1(t){const e={},n={__esModule:!0,initializeApp:s,app:i,registerVersion:an,setLogLevel:av,onLog:lv,apps:null,SDK_VERSION:za,INTERNAL:{registerComponent:l,removeApp:r,useAsService:a,modularAPIs:G1}};n.default=n,Object.defineProperty(n,"apps",{get:o});function r(u){delete e[u]}function i(u){if(u=u||dr,!Ct(e,u))throw gm.create("no-app",{appName:u});return e[u]}i.App=t;function s(u,c={}){const d=Lh(u,c);if(Ct(e,d.name))return e[d.name];const h=new t(d,n);return e[d.name]=h,h}function o(){return Object.keys(e).map(u=>e[u])}function l(u){const c=u.name,d=c.replace("-compat","");if(Qr(u)&&u.type==="PUBLIC"){const h=(_=i())=>{if(typeof _[d]!="function")throw gm.create("invalid-app-argument",{appName:c});return _[d]()};u.serviceProps!==void 0&&fo(h,u.serviceProps),n[d]=h,t.prototype[d]=function(..._){return this._getService.bind(this,c).apply(this,u.multipleInstances?_:[])}}return u.type==="PUBLIC"?n[d]:null}function a(u,c){return c==="serverAuth"?null:c}return n}/** * @license * Copyright 2019 Google LLC * @@ -605,7 +605,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function ov(){const t=U1(j1);t.INTERNAL=Object.assign(Object.assign({},t.INTERNAL),{createFirebaseNamespace:ov,extendNamespace:e,createSubscribe:kx,ErrorFactory:La,deepExtend:co});function e(n){co(t,n)}return t}const B1=ov();/** + */function dv(){const t=q1(Q1);t.INTERNAL=Object.assign(Object.assign({},t.INTERNAL),{createFirebaseNamespace:dv,extendNamespace:e,createSubscribe:Lx,ErrorFactory:Fa,deepExtend:fo});function e(n){fo(t,n)}return t}const Y1=dv();/** * @license * Copyright 2019 Google LLC * @@ -620,7 +620,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const fm=new ja("@firebase/app-compat"),z1="@firebase/app-compat",$1="0.2.19";/** + */const _m=new Ba("@firebase/app-compat"),X1="@firebase/app-compat",J1="0.2.20";/** * @license * Copyright 2019 Google LLC * @@ -635,7 +635,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function W1(t){an(z1,$1,t)}/** + */function Z1(t){an(X1,J1,t)}/** * @license * Copyright 2020 Google LLC * @@ -650,13 +650,13 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */if(px()&&self.firebase!==void 0){fm.warn(` + */if(xx()&&self.firebase!==void 0){_m.warn(` Warning: Firebase is already defined in the global scope. Please make sure Firebase library is only loaded once. - `);const t=self.firebase.SDK_VERSION;t&&t.indexOf("LITE")>=0&&fm.warn(` + `);const t=self.firebase.SDK_VERSION;t&&t.indexOf("LITE")>=0&&_m.warn(` Warning: You are trying to load Firebase while using Firebase Performance standalone script. You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code. - `)}const es=B1;W1();var H1="firebase",V1="10.4.0";/** + `)}const ns=Y1;Z1();var ek="firebase",tk="10.5.0";/** * @license * Copyright 2020 Google LLC * @@ -671,7 +671,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */es.registerVersion(H1,V1,"app-compat");const pm="@firebase/database",mm="1.0.1";/** + */ns.registerVersion(ek,tk,"app-compat");const ym="@firebase/database",vm="1.0.1";/** * @license * Copyright 2019 Google LLC * @@ -686,7 +686,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */let lv="";function av(t){lv=t}/** + */let hv="";function fv(t){hv=t}/** * @license * Copyright 2017 Google LLC * @@ -701,7 +701,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class G1{constructor(e){this.domStorage_=e,this.prefix_="firebase:"}set(e,n){n==null?this.domStorage_.removeItem(this.prefixedName_(e)):this.domStorage_.setItem(this.prefixedName_(e),Ae(n))}get(e){const n=this.domStorage_.getItem(this.prefixedName_(e));return n==null?null:ho(n)}remove(e){this.domStorage_.removeItem(this.prefixedName_(e))}prefixedName_(e){return this.prefix_+e}toString(){return this.domStorage_.toString()}}/** + */class nk{constructor(e){this.domStorage_=e,this.prefix_="firebase:"}set(e,n){n==null?this.domStorage_.removeItem(this.prefixedName_(e)):this.domStorage_.setItem(this.prefixedName_(e),Ae(n))}get(e){const n=this.domStorage_.getItem(this.prefixedName_(e));return n==null?null:po(n)}remove(e){this.domStorage_.removeItem(this.prefixedName_(e))}prefixedName_(e){return this.prefix_+e}toString(){return this.domStorage_.toString()}}/** * @license * Copyright 2017 Google LLC * @@ -716,7 +716,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class Q1{constructor(){this.cache_={},this.isInMemoryStorage=!0}set(e,n){n==null?delete this.cache_[e]:this.cache_[e]=n}get(e){return Ct(this.cache_,e)?this.cache_[e]:null}remove(e){delete this.cache_[e]}}/** + */class rk{constructor(){this.cache_={},this.isInMemoryStorage=!0}set(e,n){n==null?delete this.cache_[e]:this.cache_[e]=n}get(e){return Ct(this.cache_,e)?this.cache_[e]:null}remove(e){delete this.cache_[e]}}/** * @license * Copyright 2017 Google LLC * @@ -731,7 +731,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const uv=function(t){try{if(typeof window<"u"&&typeof window[t]<"u"){const e=window[t];return e.setItem("firebase:sentinel","cache"),e.removeItem("firebase:sentinel"),new G1(e)}}catch{}return new Q1},br=uv("localStorage"),cd=uv("sessionStorage");/** + */const pv=function(t){try{if(typeof window<"u"&&typeof window[t]<"u"){const e=window[t];return e.setItem("firebase:sentinel","cache"),e.removeItem("firebase:sentinel"),new nk(e)}}catch{}return new rk},Ar=pv("localStorage"),fd=pv("sessionStorage");/** * @license * Copyright 2017 Google LLC * @@ -746,7 +746,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const Di=new ja("@firebase/database"),cv=function(){let t=1;return function(){return t++}}(),dv=function(t){const e=Nx(t),n=new xx;n.update(e);const r=n.digest();return Ih.encodeByteArray(r)},Po=function(...t){let e="";for(let n=0;n{document.readyState==="complete"&&n()}),window.attachEvent("onload",n))}},dr="[MIN_NAME]",bn="[MAX_NAME]",ei=function(t,e){if(t===e)return 0;if(t===dr||e===bn)return-1;if(e===dr||t===bn)return 1;{const n=_m(t),r=_m(e);return n!==null?r!==null?n-r===0?t.length-e.length:n-r:-1:r!==null?1:tn?r.push(t.substring(i,n)):r.push(t.substring(i,i+e));return r};function We(t,e){for(const n in t)t.hasOwnProperty(n)&&e(n,t[n])}const pv=function(t){R(!Ua(t),"Invalid JSON number");const e=11,n=52,r=(1<=Math.pow(2,1-r)?(l=Math.min(Math.floor(Math.log(t)/Math.LN2),r),s=l+r,o=Math.round(t*Math.pow(2,n-l)-Math.pow(2,n))):(s=0,o=Math.round(t/Math.pow(2,1-r-n))));const u=[];for(a=n;a;a-=1)u.push(o%2?1:0),o=Math.floor(o/2);for(a=e;a;a-=1)u.push(s%2?1:0),s=Math.floor(s/2);u.push(i?1:0),u.reverse();const c=u.join("");let d="";for(a=0;a<64;a+=8){let h=parseInt(c.substr(a,8),2).toString(16);h.length===1&&(h="0"+h),d=d+h}return d.toLowerCase()},X1=function(){return!!(typeof window=="object"&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))},J1=function(){return typeof Windows=="object"&&typeof Windows.UI=="object"};function Z1(t,e){let n="Unknown Error";t==="too_big"?n="The data requested exceeds the maximum size that can be accessed with a single request.":t==="permission_denied"?n="Client doesn't have permission to access the desired data.":t==="unavailable"&&(n="The service is unavailable");const r=new Error(t+" at "+e._path.toString()+": "+n);return r.code=t.toUpperCase(),r}const ek=new RegExp("^-?(0*)\\d{1,10}$"),tk=-2147483648,nk=2147483647,_m=function(t){if(ek.test(t)){const e=Number(t);if(e>=tk&&e<=nk)return e}return null},ts=function(t){try{t()}catch(e){setTimeout(()=>{const n=e.stack||"";throw Ze("Exception was thrown by user callback.",n),e},Math.floor(0))}},rk=function(){return(typeof window=="object"&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0},Bs=function(t,e){const n=setTimeout(t,e);return typeof n=="number"&&typeof Deno<"u"&&Deno.unrefTimer?Deno.unrefTimer(n):typeof n=="object"&&n.unref&&n.unref(),n};/** + */const Oi=new Ba("@firebase/database"),mv=function(){let t=1;return function(){return t++}}(),gv=function(t){const e=Fx(t),n=new Ox;n.update(e);const r=n.digest();return Dh.encodeByteArray(r)},Do=function(...t){let e="";for(let n=0;n{document.readyState==="complete"&&n()}),window.attachEvent("onload",n))}},fr="[MIN_NAME]",Dn="[MAX_NAME]",ni=function(t,e){if(t===e)return 0;if(t===fr||e===Dn)return-1;if(e===fr||t===Dn)return 1;{const n=Em(t),r=Em(e);return n!==null?r!==null?n-r===0?t.length-e.length:n-r:-1:r!==null?1:tn?r.push(t.substring(i,n)):r.push(t.substring(i,i+e));return r};function We(t,e){for(const n in t)t.hasOwnProperty(n)&&e(n,t[n])}const vv=function(t){R(!$a(t),"Invalid JSON number");const e=11,n=52,r=(1<=Math.pow(2,1-r)?(l=Math.min(Math.floor(Math.log(t)/Math.LN2),r),s=l+r,o=Math.round(t*Math.pow(2,n-l)-Math.pow(2,n))):(s=0,o=Math.round(t/Math.pow(2,1-r-n))));const u=[];for(a=n;a;a-=1)u.push(o%2?1:0),o=Math.floor(o/2);for(a=e;a;a-=1)u.push(s%2?1:0),s=Math.floor(s/2);u.push(i?1:0),u.reverse();const c=u.join("");let d="";for(a=0;a<64;a+=8){let h=parseInt(c.substr(a,8),2).toString(16);h.length===1&&(h="0"+h),d=d+h}return d.toLowerCase()},lk=function(){return!!(typeof window=="object"&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))},ak=function(){return typeof Windows=="object"&&typeof Windows.UI=="object"};function uk(t,e){let n="Unknown Error";t==="too_big"?n="The data requested exceeds the maximum size that can be accessed with a single request.":t==="permission_denied"?n="Client doesn't have permission to access the desired data.":t==="unavailable"&&(n="The service is unavailable");const r=new Error(t+" at "+e._path.toString()+": "+n);return r.code=t.toUpperCase(),r}const ck=new RegExp("^-?(0*)\\d{1,10}$"),dk=-2147483648,hk=2147483647,Em=function(t){if(ck.test(t)){const e=Number(t);if(e>=dk&&e<=hk)return e}return null},rs=function(t){try{t()}catch(e){setTimeout(()=>{const n=e.stack||"";throw Ze("Exception was thrown by user callback.",n),e},Math.floor(0))}},fk=function(){return(typeof window=="object"&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0},$s=function(t,e){const n=setTimeout(t,e);return typeof n=="number"&&typeof Deno<"u"&&Deno.unrefTimer?Deno.unrefTimer(n):typeof n=="object"&&n.unref&&n.unref(),n};/** * @license * Copyright 2021 Google LLC * @@ -761,7 +761,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class ik{constructor(e,n){this.appName_=e,this.appCheckProvider=n,this.appCheck=n==null?void 0:n.getImmediate({optional:!0}),this.appCheck||n==null||n.get().then(r=>this.appCheck=r)}getToken(e){return this.appCheck?this.appCheck.getToken(e):new Promise((n,r)=>{setTimeout(()=>{this.appCheck?this.getToken(e).then(n,r):n(null)},0)})}addTokenChangeListener(e){var n;(n=this.appCheckProvider)===null||n===void 0||n.get().then(r=>r.addTokenListener(e))}notifyForInvalidToken(){Ze(`Provided AppCheck credentials for the app named "${this.appName_}" are invalid. This usually indicates your app was not initialized correctly.`)}}/** + */class pk{constructor(e,n){this.appName_=e,this.appCheckProvider=n,this.appCheck=n==null?void 0:n.getImmediate({optional:!0}),this.appCheck||n==null||n.get().then(r=>this.appCheck=r)}getToken(e){return this.appCheck?this.appCheck.getToken(e):new Promise((n,r)=>{setTimeout(()=>{this.appCheck?this.getToken(e).then(n,r):n(null)},0)})}addTokenChangeListener(e){var n;(n=this.appCheckProvider)===null||n===void 0||n.get().then(r=>r.addTokenListener(e))}notifyForInvalidToken(){Ze(`Provided AppCheck credentials for the app named "${this.appName_}" are invalid. This usually indicates your app was not initialized correctly.`)}}/** * @license * Copyright 2017 Google LLC * @@ -776,7 +776,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class sk{constructor(e,n,r){this.appName_=e,this.firebaseOptions_=n,this.authProvider_=r,this.auth_=null,this.auth_=r.getImmediate({optional:!0}),this.auth_||r.onInit(i=>this.auth_=i)}getToken(e){return this.auth_?this.auth_.getToken(e).catch(n=>n&&n.code==="auth/token-not-initialized"?(ze("Got auth/token-not-initialized error. Treating as null token."),null):Promise.reject(n)):new Promise((n,r)=>{setTimeout(()=>{this.auth_?this.getToken(e).then(n,r):n(null)},0)})}addTokenChangeListener(e){this.auth_?this.auth_.addAuthTokenListener(e):this.authProvider_.get().then(n=>n.addAuthTokenListener(e))}removeTokenChangeListener(e){this.authProvider_.get().then(n=>n.removeAuthTokenListener(e))}notifyForInvalidToken(){let e='Provided authentication credentials for the app named "'+this.appName_+'" are invalid. This usually indicates your app was not initialized correctly. ';"credential"in this.firebaseOptions_?e+='Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.firebaseOptions_?e+='Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':e+='Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',Ze(e)}}class Ai{constructor(e){this.accessToken=e}getToken(e){return Promise.resolve({accessToken:this.accessToken})}addTokenChangeListener(e){e(this.accessToken)}removeTokenChangeListener(e){}notifyForInvalidToken(){}}Ai.OWNER="owner";/** + */class mk{constructor(e,n,r){this.appName_=e,this.firebaseOptions_=n,this.authProvider_=r,this.auth_=null,this.auth_=r.getImmediate({optional:!0}),this.auth_||r.onInit(i=>this.auth_=i)}getToken(e){return this.auth_?this.auth_.getToken(e).catch(n=>n&&n.code==="auth/token-not-initialized"?(ze("Got auth/token-not-initialized error. Treating as null token."),null):Promise.reject(n)):new Promise((n,r)=>{setTimeout(()=>{this.auth_?this.getToken(e).then(n,r):n(null)},0)})}addTokenChangeListener(e){this.auth_?this.auth_.addAuthTokenListener(e):this.authProvider_.get().then(n=>n.addAuthTokenListener(e))}removeTokenChangeListener(e){this.authProvider_.get().then(n=>n.removeAuthTokenListener(e))}notifyForInvalidToken(){let e='Provided authentication credentials for the app named "'+this.appName_+'" are invalid. This usually indicates your app was not initialized correctly. ';"credential"in this.firebaseOptions_?e+='Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.firebaseOptions_?e+='Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':e+='Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',Ze(e)}}class Li{constructor(e){this.accessToken=e}getToken(e){return Promise.resolve({accessToken:this.accessToken})}addTokenChangeListener(e){e(this.accessToken)}removeTokenChangeListener(e){}notifyForInvalidToken(){}}Li.OWNER="owner";/** * @license * Copyright 2017 Google LLC * @@ -791,7 +791,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const Oh="5",mv="v",gv="s",_v="r",yv="f",vv=/(console\.firebase|firebase-console-\w+\.corp|firebase\.corp)\.google\.com/,wv="ls",Ev="p",hd="ac",Cv="websocket",Sv="long_polling";/** + */const jh="5",wv="v",Ev="s",Cv="r",Sv="f",xv=/(console\.firebase|firebase-console-\w+\.corp|firebase\.corp)\.google\.com/,kv="ls",Tv="p",md="ac",Rv="websocket",Nv="long_polling";/** * @license * Copyright 2017 Google LLC * @@ -806,7 +806,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class xv{constructor(e,n,r,i,s=!1,o="",l=!1,a=!1){this.secure=n,this.namespace=r,this.webSocketOnly=i,this.nodeAdmin=s,this.persistenceKey=o,this.includeNamespaceInQueryParams=l,this.isUsingEmulator=a,this._host=e.toLowerCase(),this._domain=this._host.substr(this._host.indexOf(".")+1),this.internalHost=br.get("host:"+e)||this._host}isCacheableHost(){return this.internalHost.substr(0,2)==="s-"}isCustomHost(){return this._domain!=="firebaseio.com"&&this._domain!=="firebaseio-demo.com"}get host(){return this._host}set host(e){e!==this.internalHost&&(this.internalHost=e,this.isCacheableHost()&&br.set("host:"+this._host,this.internalHost))}toString(){let e=this.toURLString();return this.persistenceKey&&(e+="<"+this.persistenceKey+">"),e}toURLString(){const e=this.secure?"https://":"http://",n=this.includeNamespaceInQueryParams?`?ns=${this.namespace}`:"";return`${e}${this.host}/${n}`}}function ok(t){return t.host!==t.internalHost||t.isCustomHost()||t.includeNamespaceInQueryParams}function kv(t,e,n){R(typeof e=="string","typeof type must == string"),R(typeof n=="object","typeof params must == object");let r;if(e===Cv)r=(t.secure?"wss://":"ws://")+t.internalHost+"/.ws?";else if(e===Sv)r=(t.secure?"https://":"http://")+t.internalHost+"/.lp?";else throw new Error("Unknown connection type: "+e);ok(t)&&(n.ns=t.namespace);const i=[];return We(n,(s,o)=>{i.push(s+"="+o)}),r+i.join("&")}/** + */class Iv{constructor(e,n,r,i,s=!1,o="",l=!1,a=!1){this.secure=n,this.namespace=r,this.webSocketOnly=i,this.nodeAdmin=s,this.persistenceKey=o,this.includeNamespaceInQueryParams=l,this.isUsingEmulator=a,this._host=e.toLowerCase(),this._domain=this._host.substr(this._host.indexOf(".")+1),this.internalHost=Ar.get("host:"+e)||this._host}isCacheableHost(){return this.internalHost.substr(0,2)==="s-"}isCustomHost(){return this._domain!=="firebaseio.com"&&this._domain!=="firebaseio-demo.com"}get host(){return this._host}set host(e){e!==this.internalHost&&(this.internalHost=e,this.isCacheableHost()&&Ar.set("host:"+this._host,this.internalHost))}toString(){let e=this.toURLString();return this.persistenceKey&&(e+="<"+this.persistenceKey+">"),e}toURLString(){const e=this.secure?"https://":"http://",n=this.includeNamespaceInQueryParams?`?ns=${this.namespace}`:"";return`${e}${this.host}/${n}`}}function gk(t){return t.host!==t.internalHost||t.isCustomHost()||t.includeNamespaceInQueryParams}function Pv(t,e,n){R(typeof e=="string","typeof type must == string"),R(typeof n=="object","typeof params must == object");let r;if(e===Rv)r=(t.secure?"wss://":"ws://")+t.internalHost+"/.ws?";else if(e===Nv)r=(t.secure?"https://":"http://")+t.internalHost+"/.lp?";else throw new Error("Unknown connection type: "+e);gk(t)&&(n.ns=t.namespace);const i=[];return We(n,(s,o)=>{i.push(s+"="+o)}),r+i.join("&")}/** * @license * Copyright 2017 Google LLC * @@ -821,7 +821,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class lk{constructor(){this.counters_={}}incrementCounter(e,n=1){Ct(this.counters_,e)||(this.counters_[e]=0),this.counters_[e]+=n}get(){return ox(this.counters_)}}/** + */class _k{constructor(){this.counters_={}}incrementCounter(e,n=1){Ct(this.counters_,e)||(this.counters_[e]=0),this.counters_[e]+=n}get(){return gx(this.counters_)}}/** * @license * Copyright 2017 Google LLC * @@ -836,7 +836,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const Yu={},Xu={};function Lh(t){const e=t.toString();return Yu[e]||(Yu[e]=new lk),Yu[e]}function ak(t,e){const n=t.toString();return Xu[n]||(Xu[n]=e()),Xu[n]}/** + */const Zu={},ec={};function Fh(t){const e=t.toString();return Zu[e]||(Zu[e]=new _k),Zu[e]}function yk(t,e){const n=t.toString();return ec[n]||(ec[n]=e()),ec[n]}/** * @license * Copyright 2017 Google LLC * @@ -851,7 +851,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class uk{constructor(e){this.onMessage_=e,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}closeAfter(e,n){this.closeAfterResponse=e,this.onClose=n,this.closeAfterResponse{this.onMessage_(r[i])});if(this.currentResponseNum===this.closeAfterResponse){this.onClose&&(this.onClose(),this.onClose=null);break}this.currentResponseNum++}}}/** + */class vk{constructor(e){this.onMessage_=e,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}closeAfter(e,n){this.closeAfterResponse=e,this.onClose=n,this.closeAfterResponse{this.onMessage_(r[i])});if(this.currentResponseNum===this.closeAfterResponse){this.onClose&&(this.onClose(),this.onClose=null);break}this.currentResponseNum++}}}/** * @license * Copyright 2017 Google LLC * @@ -866,7 +866,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const ym="start",ck="close",dk="pLPCommand",hk="pRTLPCB",Tv="id",Rv="pw",Nv="ser",fk="cb",pk="seg",mk="ts",gk="d",_k="dframe",Iv=1870,Pv=30,yk=Iv-Pv,vk=25e3,wk=3e4;class Qn{constructor(e,n,r,i,s,o,l){this.connId=e,this.repoInfo=n,this.applicationId=r,this.appCheckToken=i,this.authToken=s,this.transportSessionId=o,this.lastSessionId=l,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=bo(e),this.stats_=Lh(n),this.urlFn=a=>(this.appCheckToken&&(a[hd]=this.appCheckToken),kv(n,Sv,a))}open(e,n){this.curSegmentNum=0,this.onDisconnect_=n,this.myPacketOrderer=new uk(e),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout(()=>{this.log_("Timed out trying to connect."),this.onClosed_(),this.connectTimeoutTimer_=null},Math.floor(wk)),q1(()=>{if(this.isClosed_)return;this.scriptTagHolder=new Mh((...s)=>{const[o,l,a,u,c]=s;if(this.incrementIncomingBytes_(s),!!this.scriptTagHolder)if(this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null),this.everConnected_=!0,o===ym)this.id=l,this.password=a;else if(o===ck)l?(this.scriptTagHolder.sendNewPolls=!1,this.myPacketOrderer.closeAfter(l,()=>{this.onClosed_()})):this.onClosed_();else throw new Error("Unrecognized command received: "+o)},(...s)=>{const[o,l]=s;this.incrementIncomingBytes_(s),this.myPacketOrderer.handleResponse(o,l)},()=>{this.onClosed_()},this.urlFn);const r={};r[ym]="t",r[Nv]=Math.floor(Math.random()*1e8),this.scriptTagHolder.uniqueCallbackIdentifier&&(r[fk]=this.scriptTagHolder.uniqueCallbackIdentifier),r[mv]=Oh,this.transportSessionId&&(r[gv]=this.transportSessionId),this.lastSessionId&&(r[wv]=this.lastSessionId),this.applicationId&&(r[Ev]=this.applicationId),this.appCheckToken&&(r[hd]=this.appCheckToken),typeof location<"u"&&location.hostname&&vv.test(location.hostname)&&(r[_v]=yv);const i=this.urlFn(r);this.log_("Connecting via long-poll to "+i),this.scriptTagHolder.addTag(i,()=>{})})}start(){this.scriptTagHolder.startLongPoll(this.id,this.password),this.addDisconnectPingFrame(this.id,this.password)}static forceAllow(){Qn.forceAllow_=!0}static forceDisallow(){Qn.forceDisallow_=!0}static isAvailable(){return Qn.forceAllow_?!0:!Qn.forceDisallow_&&typeof document<"u"&&document.createElement!=null&&!X1()&&!J1()}markConnectionHealthy(){}shutdown_(){this.isClosed_=!0,this.scriptTagHolder&&(this.scriptTagHolder.close(),this.scriptTagHolder=null),this.myDisconnFrame&&(document.body.removeChild(this.myDisconnFrame),this.myDisconnFrame=null),this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null)}onClosed_(){this.isClosed_||(this.log_("Longpoll is closing itself"),this.shutdown_(),this.onDisconnect_&&(this.onDisconnect_(this.everConnected_),this.onDisconnect_=null))}close(){this.isClosed_||(this.log_("Longpoll is being closed."),this.shutdown_())}send(e){const n=Ae(e);this.bytesSent+=n.length,this.stats_.incrementCounter("bytes_sent",n.length);const r=$y(n),i=fv(r,yk);for(let s=0;sdocument.domain="'+document.domain+'";<\/script>');const o=""+s+"";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(o),this.myIFrame.doc.close()}catch(l){ze("frame writing exception"),l.stack&&ze(l.stack),ze(l)}}}static createIFrame_(){const e=document.createElement("iframe");if(e.style.display="none",document.body){document.body.appendChild(e);try{e.contentWindow.document||ze("No IE domain setting required")}catch{const r=document.domain;e.src="javascript:void((function(){document.open();document.domain='"+r+"';document.close();})())"}}else throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";return e.contentDocument?e.doc=e.contentDocument:e.contentWindow?e.doc=e.contentWindow.document:e.document&&(e.doc=e.document),e}close(){this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.textContent="",setTimeout(()=>{this.myIFrame!==null&&(document.body.removeChild(this.myIFrame),this.myIFrame=null)},Math.floor(0)));const e=this.onDisconnect;e&&(this.onDisconnect=null,e())}startLongPoll(e,n){for(this.myID=e,this.myPW=n,this.alive=!0;this.newRequest_(););}newRequest_(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.size<(this.pendingSegs.length>0?2:1)){this.currentSerial++;const e={};e[Tv]=this.myID,e[Rv]=this.myPW,e[Nv]=this.currentSerial;let n=this.urlFn(e),r="",i=0;for(;this.pendingSegs.length>0&&this.pendingSegs[0].d.length+Pv+r.length<=Iv;){const o=this.pendingSegs.shift();r=r+"&"+pk+i+"="+o.seg+"&"+mk+i+"="+o.ts+"&"+gk+i+"="+o.d,i++}return n=n+r,this.addLongPollTag_(n,this.currentSerial),!0}else return!1}enqueueSegment(e,n,r){this.pendingSegs.push({seg:e,ts:n,d:r}),this.alive&&this.newRequest_()}addLongPollTag_(e,n){this.outstandingRequests.add(n);const r=()=>{this.outstandingRequests.delete(n),this.newRequest_()},i=setTimeout(r,Math.floor(vk)),s=()=>{clearTimeout(i),r()};this.addTag(e,s)}addTag(e,n){setTimeout(()=>{try{if(!this.sendNewPolls)return;const r=this.myIFrame.doc.createElement("script");r.type="text/javascript",r.async=!0,r.src=e,r.onload=r.onreadystatechange=function(){const i=r.readyState;(!i||i==="loaded"||i==="complete")&&(r.onload=r.onreadystatechange=null,r.parentNode&&r.parentNode.removeChild(r),n())},r.onerror=()=>{ze("Long-poll script failed to load: "+e),this.sendNewPolls=!1,this.close()},this.myIFrame.doc.body.appendChild(r)}catch{}},Math.floor(1))}}/** + */const Cm="start",wk="close",Ek="pLPCommand",Ck="pRTLPCB",bv="id",Dv="pw",Av="ser",Sk="cb",xk="seg",kk="ts",Tk="d",Rk="dframe",Ov=1870,Lv=30,Nk=Ov-Lv,Ik=25e3,Pk=3e4;class Kn{constructor(e,n,r,i,s,o,l){this.connId=e,this.repoInfo=n,this.applicationId=r,this.appCheckToken=i,this.authToken=s,this.transportSessionId=o,this.lastSessionId=l,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=Ao(e),this.stats_=Fh(n),this.urlFn=a=>(this.appCheckToken&&(a[md]=this.appCheckToken),Pv(n,Nv,a))}open(e,n){this.curSegmentNum=0,this.onDisconnect_=n,this.myPacketOrderer=new vk(e),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout(()=>{this.log_("Timed out trying to connect."),this.onClosed_(),this.connectTimeoutTimer_=null},Math.floor(Pk)),sk(()=>{if(this.isClosed_)return;this.scriptTagHolder=new Uh((...s)=>{const[o,l,a,u,c]=s;if(this.incrementIncomingBytes_(s),!!this.scriptTagHolder)if(this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null),this.everConnected_=!0,o===Cm)this.id=l,this.password=a;else if(o===wk)l?(this.scriptTagHolder.sendNewPolls=!1,this.myPacketOrderer.closeAfter(l,()=>{this.onClosed_()})):this.onClosed_();else throw new Error("Unrecognized command received: "+o)},(...s)=>{const[o,l]=s;this.incrementIncomingBytes_(s),this.myPacketOrderer.handleResponse(o,l)},()=>{this.onClosed_()},this.urlFn);const r={};r[Cm]="t",r[Av]=Math.floor(Math.random()*1e8),this.scriptTagHolder.uniqueCallbackIdentifier&&(r[Sk]=this.scriptTagHolder.uniqueCallbackIdentifier),r[wv]=jh,this.transportSessionId&&(r[Ev]=this.transportSessionId),this.lastSessionId&&(r[kv]=this.lastSessionId),this.applicationId&&(r[Tv]=this.applicationId),this.appCheckToken&&(r[md]=this.appCheckToken),typeof location<"u"&&location.hostname&&xv.test(location.hostname)&&(r[Cv]=Sv);const i=this.urlFn(r);this.log_("Connecting via long-poll to "+i),this.scriptTagHolder.addTag(i,()=>{})})}start(){this.scriptTagHolder.startLongPoll(this.id,this.password),this.addDisconnectPingFrame(this.id,this.password)}static forceAllow(){Kn.forceAllow_=!0}static forceDisallow(){Kn.forceDisallow_=!0}static isAvailable(){return Kn.forceAllow_?!0:!Kn.forceDisallow_&&typeof document<"u"&&document.createElement!=null&&!lk()&&!ak()}markConnectionHealthy(){}shutdown_(){this.isClosed_=!0,this.scriptTagHolder&&(this.scriptTagHolder.close(),this.scriptTagHolder=null),this.myDisconnFrame&&(document.body.removeChild(this.myDisconnFrame),this.myDisconnFrame=null),this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null)}onClosed_(){this.isClosed_||(this.log_("Longpoll is closing itself"),this.shutdown_(),this.onDisconnect_&&(this.onDisconnect_(this.everConnected_),this.onDisconnect_=null))}close(){this.isClosed_||(this.log_("Longpoll is being closed."),this.shutdown_())}send(e){const n=Ae(e);this.bytesSent+=n.length,this.stats_.incrementCounter("bytes_sent",n.length);const r=Qy(n),i=yv(r,Nk);for(let s=0;sdocument.domain="'+document.domain+'";<\/script>');const o=""+s+"";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(o),this.myIFrame.doc.close()}catch(l){ze("frame writing exception"),l.stack&&ze(l.stack),ze(l)}}}static createIFrame_(){const e=document.createElement("iframe");if(e.style.display="none",document.body){document.body.appendChild(e);try{e.contentWindow.document||ze("No IE domain setting required")}catch{const r=document.domain;e.src="javascript:void((function(){document.open();document.domain='"+r+"';document.close();})())"}}else throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";return e.contentDocument?e.doc=e.contentDocument:e.contentWindow?e.doc=e.contentWindow.document:e.document&&(e.doc=e.document),e}close(){this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.textContent="",setTimeout(()=>{this.myIFrame!==null&&(document.body.removeChild(this.myIFrame),this.myIFrame=null)},Math.floor(0)));const e=this.onDisconnect;e&&(this.onDisconnect=null,e())}startLongPoll(e,n){for(this.myID=e,this.myPW=n,this.alive=!0;this.newRequest_(););}newRequest_(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.size<(this.pendingSegs.length>0?2:1)){this.currentSerial++;const e={};e[bv]=this.myID,e[Dv]=this.myPW,e[Av]=this.currentSerial;let n=this.urlFn(e),r="",i=0;for(;this.pendingSegs.length>0&&this.pendingSegs[0].d.length+Lv+r.length<=Ov;){const o=this.pendingSegs.shift();r=r+"&"+xk+i+"="+o.seg+"&"+kk+i+"="+o.ts+"&"+Tk+i+"="+o.d,i++}return n=n+r,this.addLongPollTag_(n,this.currentSerial),!0}else return!1}enqueueSegment(e,n,r){this.pendingSegs.push({seg:e,ts:n,d:r}),this.alive&&this.newRequest_()}addLongPollTag_(e,n){this.outstandingRequests.add(n);const r=()=>{this.outstandingRequests.delete(n),this.newRequest_()},i=setTimeout(r,Math.floor(Ik)),s=()=>{clearTimeout(i),r()};this.addTag(e,s)}addTag(e,n){setTimeout(()=>{try{if(!this.sendNewPolls)return;const r=this.myIFrame.doc.createElement("script");r.type="text/javascript",r.async=!0,r.src=e,r.onload=r.onreadystatechange=function(){const i=r.readyState;(!i||i==="loaded"||i==="complete")&&(r.onload=r.onreadystatechange=null,r.parentNode&&r.parentNode.removeChild(r),n())},r.onerror=()=>{ze("Long-poll script failed to load: "+e),this.sendNewPolls=!1,this.close()},this.myIFrame.doc.body.appendChild(r)}catch{}},Math.floor(1))}}/** * @license * Copyright 2017 Google LLC * @@ -881,7 +881,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const Ek=16384,Ck=45e3;let Zl=null;typeof MozWebSocket<"u"?Zl=MozWebSocket:typeof WebSocket<"u"&&(Zl=WebSocket);class It{constructor(e,n,r,i,s,o,l){this.connId=e,this.applicationId=r,this.appCheckToken=i,this.authToken=s,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=bo(this.connId),this.stats_=Lh(n),this.connURL=It.connectionURL_(n,o,l,i,r),this.nodeAdmin=n.nodeAdmin}static connectionURL_(e,n,r,i,s){const o={};return o[mv]=Oh,typeof location<"u"&&location.hostname&&vv.test(location.hostname)&&(o[_v]=yv),n&&(o[gv]=n),r&&(o[wv]=r),i&&(o[hd]=i),s&&(o[Ev]=s),kv(e,Cv,o)}open(e,n){this.onDisconnect=n,this.onMessage=e,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,br.set("previous_websocket_failure",!0);try{let r;Qy(),this.mySock=new Zl(this.connURL,[],r)}catch(r){this.log_("Error instantiating WebSocket.");const i=r.message||r.data;i&&this.log_(i),this.onClosed_();return}this.mySock.onopen=()=>{this.log_("Websocket connected."),this.everConnected_=!0},this.mySock.onclose=()=>{this.log_("Websocket connection was disconnected."),this.mySock=null,this.onClosed_()},this.mySock.onmessage=r=>{this.handleIncomingFrame(r)},this.mySock.onerror=r=>{this.log_("WebSocket error. Closing connection.");const i=r.message||r.data;i&&this.log_(i),this.onClosed_()}}start(){}static forceDisallow(){It.forceDisallow_=!0}static isAvailable(){let e=!1;if(typeof navigator<"u"&&navigator.userAgent){const n=/Android ([0-9]{0,}\.[0-9]{0,})/,r=navigator.userAgent.match(n);r&&r.length>1&&parseFloat(r[1])<4.4&&(e=!0)}return!e&&Zl!==null&&!It.forceDisallow_}static previouslyFailed(){return br.isInMemoryStorage||br.get("previous_websocket_failure")===!0}markConnectionHealthy(){br.remove("previous_websocket_failure")}appendFrame_(e){if(this.frames.push(e),this.frames.length===this.totalFrames){const n=this.frames.join("");this.frames=null;const r=ho(n);this.onMessage(r)}}handleNewFrameCount_(e){this.totalFrames=e,this.frames=[]}extractFrameCount_(e){if(R(this.frames===null,"We already have a frame buffer"),e.length<=6){const n=Number(e);if(!isNaN(n))return this.handleNewFrameCount_(n),null}return this.handleNewFrameCount_(1),e}handleIncomingFrame(e){if(this.mySock===null)return;const n=e.data;if(this.bytesReceived+=n.length,this.stats_.incrementCounter("bytes_received",n.length),this.resetKeepAlive(),this.frames!==null)this.appendFrame_(n);else{const r=this.extractFrameCount_(n);r!==null&&this.appendFrame_(r)}}send(e){this.resetKeepAlive();const n=Ae(e);this.bytesSent+=n.length,this.stats_.incrementCounter("bytes_sent",n.length);const r=fv(n,Ek);r.length>1&&this.sendString_(String(r.length));for(let i=0;i{this.mySock&&this.sendString_("0"),this.resetKeepAlive()},Math.floor(Ck))}sendString_(e){try{this.mySock.send(e)}catch(n){this.log_("Exception thrown from WebSocket.send():",n.message||n.data,"Closing connection."),setTimeout(this.onClosed_.bind(this),0)}}}It.responsesRequiredToBeHealthy=2;It.healthyTimeout=3e4;/** + */const bk=16384,Dk=45e3;let ta=null;typeof MozWebSocket<"u"?ta=MozWebSocket:typeof WebSocket<"u"&&(ta=WebSocket);class It{constructor(e,n,r,i,s,o,l){this.connId=e,this.applicationId=r,this.appCheckToken=i,this.authToken=s,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=Ao(this.connId),this.stats_=Fh(n),this.connURL=It.connectionURL_(n,o,l,i,r),this.nodeAdmin=n.nodeAdmin}static connectionURL_(e,n,r,i,s){const o={};return o[wv]=jh,typeof location<"u"&&location.hostname&&xv.test(location.hostname)&&(o[Cv]=Sv),n&&(o[Ev]=n),r&&(o[kv]=r),i&&(o[md]=i),s&&(o[Tv]=s),Pv(e,Rv,o)}open(e,n){this.onDisconnect=n,this.onMessage=e,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,Ar.set("previous_websocket_failure",!0);try{let r;Jy(),this.mySock=new ta(this.connURL,[],r)}catch(r){this.log_("Error instantiating WebSocket.");const i=r.message||r.data;i&&this.log_(i),this.onClosed_();return}this.mySock.onopen=()=>{this.log_("Websocket connected."),this.everConnected_=!0},this.mySock.onclose=()=>{this.log_("Websocket connection was disconnected."),this.mySock=null,this.onClosed_()},this.mySock.onmessage=r=>{this.handleIncomingFrame(r)},this.mySock.onerror=r=>{this.log_("WebSocket error. Closing connection.");const i=r.message||r.data;i&&this.log_(i),this.onClosed_()}}start(){}static forceDisallow(){It.forceDisallow_=!0}static isAvailable(){let e=!1;if(typeof navigator<"u"&&navigator.userAgent){const n=/Android ([0-9]{0,}\.[0-9]{0,})/,r=navigator.userAgent.match(n);r&&r.length>1&&parseFloat(r[1])<4.4&&(e=!0)}return!e&&ta!==null&&!It.forceDisallow_}static previouslyFailed(){return Ar.isInMemoryStorage||Ar.get("previous_websocket_failure")===!0}markConnectionHealthy(){Ar.remove("previous_websocket_failure")}appendFrame_(e){if(this.frames.push(e),this.frames.length===this.totalFrames){const n=this.frames.join("");this.frames=null;const r=po(n);this.onMessage(r)}}handleNewFrameCount_(e){this.totalFrames=e,this.frames=[]}extractFrameCount_(e){if(R(this.frames===null,"We already have a frame buffer"),e.length<=6){const n=Number(e);if(!isNaN(n))return this.handleNewFrameCount_(n),null}return this.handleNewFrameCount_(1),e}handleIncomingFrame(e){if(this.mySock===null)return;const n=e.data;if(this.bytesReceived+=n.length,this.stats_.incrementCounter("bytes_received",n.length),this.resetKeepAlive(),this.frames!==null)this.appendFrame_(n);else{const r=this.extractFrameCount_(n);r!==null&&this.appendFrame_(r)}}send(e){this.resetKeepAlive();const n=Ae(e);this.bytesSent+=n.length,this.stats_.incrementCounter("bytes_sent",n.length);const r=yv(n,bk);r.length>1&&this.sendString_(String(r.length));for(let i=0;i{this.mySock&&this.sendString_("0"),this.resetKeepAlive()},Math.floor(Dk))}sendString_(e){try{this.mySock.send(e)}catch(n){this.log_("Exception thrown from WebSocket.send():",n.message||n.data,"Closing connection."),setTimeout(this.onClosed_.bind(this),0)}}}It.responsesRequiredToBeHealthy=2;It.healthyTimeout=3e4;/** * @license * Copyright 2017 Google LLC * @@ -896,7 +896,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class Wi{constructor(e){this.initTransports_(e)}static get ALL_TRANSPORTS(){return[Qn,It]}static get IS_TRANSPORT_INITIALIZED(){return this.globalTransportInitialized_}initTransports_(e){const n=It&&It.isAvailable();let r=n&&!It.previouslyFailed();if(e.webSocketOnly&&(n||Ze("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),r=!0),r)this.transports_=[It];else{const i=this.transports_=[];for(const s of Wi.ALL_TRANSPORTS)s&&s.isAvailable()&&i.push(s);Wi.globalTransportInitialized_=!0}}initialTransport(){if(this.transports_.length>0)return this.transports_[0];throw new Error("No transports available")}upgradeTransport(){return this.transports_.length>1?this.transports_[1]:null}}Wi.globalTransportInitialized_=!1;/** + */class Vi{constructor(e){this.initTransports_(e)}static get ALL_TRANSPORTS(){return[Kn,It]}static get IS_TRANSPORT_INITIALIZED(){return this.globalTransportInitialized_}initTransports_(e){const n=It&&It.isAvailable();let r=n&&!It.previouslyFailed();if(e.webSocketOnly&&(n||Ze("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),r=!0),r)this.transports_=[It];else{const i=this.transports_=[];for(const s of Vi.ALL_TRANSPORTS)s&&s.isAvailable()&&i.push(s);Vi.globalTransportInitialized_=!0}}initialTransport(){if(this.transports_.length>0)return this.transports_[0];throw new Error("No transports available")}upgradeTransport(){return this.transports_.length>1?this.transports_[1]:null}}Vi.globalTransportInitialized_=!1;/** * @license * Copyright 2017 Google LLC * @@ -911,7 +911,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const Sk=6e4,xk=5e3,kk=10*1024,Tk=100*1024,Ju="t",vm="d",Rk="s",wm="r",Nk="e",Em="o",Cm="a",Sm="n",xm="p",Ik="h";class Pk{constructor(e,n,r,i,s,o,l,a,u,c){this.id=e,this.repoInfo_=n,this.applicationId_=r,this.appCheckToken_=i,this.authToken_=s,this.onMessage_=o,this.onReady_=l,this.onDisconnect_=a,this.onKill_=u,this.lastSessionId=c,this.connectionCount=0,this.pendingDataMessages=[],this.state_=0,this.log_=bo("c:"+this.id+":"),this.transportManager_=new Wi(n),this.log_("Connection created"),this.start_()}start_(){const e=this.transportManager_.initialTransport();this.conn_=new e(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,null,this.lastSessionId),this.primaryResponsesRequired_=e.responsesRequiredToBeHealthy||0;const n=this.connReceiver_(this.conn_),r=this.disconnReceiver_(this.conn_);this.tx_=this.conn_,this.rx_=this.conn_,this.secondaryConn_=null,this.isHealthy_=!1,setTimeout(()=>{this.conn_&&this.conn_.open(n,r)},Math.floor(0));const i=e.healthyTimeout||0;i>0&&(this.healthyTimeout_=Bs(()=>{this.healthyTimeout_=null,this.isHealthy_||(this.conn_&&this.conn_.bytesReceived>Tk?(this.log_("Connection exceeded healthy timeout but has received "+this.conn_.bytesReceived+" bytes. Marking connection healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()):this.conn_&&this.conn_.bytesSent>kk?this.log_("Connection exceeded healthy timeout but has sent "+this.conn_.bytesSent+" bytes. Leaving connection alive."):(this.log_("Closing unhealthy connection after timeout."),this.close()))},Math.floor(i)))}nextTransportId_(){return"c:"+this.id+":"+this.connectionCount++}disconnReceiver_(e){return n=>{e===this.conn_?this.onConnectionLost_(n):e===this.secondaryConn_?(this.log_("Secondary connection lost."),this.onSecondaryConnectionLost_()):this.log_("closing an old connection")}}connReceiver_(e){return n=>{this.state_!==2&&(e===this.rx_?this.onPrimaryMessageReceived_(n):e===this.secondaryConn_?this.onSecondaryMessageReceived_(n):this.log_("message on old connection"))}}sendRequest(e){const n={t:"d",d:e};this.sendData_(n)}tryCleanupConnection(){this.tx_===this.secondaryConn_&&this.rx_===this.secondaryConn_&&(this.log_("cleaning up and promoting a connection: "+this.secondaryConn_.connId),this.conn_=this.secondaryConn_,this.secondaryConn_=null)}onSecondaryControl_(e){if(Ju in e){const n=e[Ju];n===Cm?this.upgradeIfSecondaryHealthy_():n===wm?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),(this.tx_===this.secondaryConn_||this.rx_===this.secondaryConn_)&&this.close()):n===Em&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}}onSecondaryMessageReceived_(e){const n=Es("t",e),r=Es("d",e);if(n==="c")this.onSecondaryControl_(r);else if(n==="d")this.pendingDataMessages.push(r);else throw new Error("Unknown protocol layer: "+n)}upgradeIfSecondaryHealthy_(){this.secondaryResponsesRequired_<=0?(this.log_("Secondary connection is healthy."),this.isHealthy_=!0,this.secondaryConn_.markConnectionHealthy(),this.proceedWithUpgrade_()):(this.log_("sending ping on secondary."),this.secondaryConn_.send({t:"c",d:{t:xm,d:{}}}))}proceedWithUpgrade_(){this.secondaryConn_.start(),this.log_("sending client ack on secondary"),this.secondaryConn_.send({t:"c",d:{t:Cm,d:{}}}),this.log_("Ending transmission on primary"),this.conn_.send({t:"c",d:{t:Sm,d:{}}}),this.tx_=this.secondaryConn_,this.tryCleanupConnection()}onPrimaryMessageReceived_(e){const n=Es("t",e),r=Es("d",e);n==="c"?this.onControl_(r):n==="d"&&this.onDataMessage_(r)}onDataMessage_(e){this.onPrimaryResponse_(),this.onMessage_(e)}onPrimaryResponse_(){this.isHealthy_||(this.primaryResponsesRequired_--,this.primaryResponsesRequired_<=0&&(this.log_("Primary connection is healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()))}onControl_(e){const n=Es(Ju,e);if(vm in e){const r=e[vm];if(n===Ik){const i=Object.assign({},r);this.repoInfo_.isUsingEmulator&&(i.h=this.repoInfo_.host),this.onHandshake_(i)}else if(n===Sm){this.log_("recvd end transmission on primary"),this.rx_=this.secondaryConn_;for(let i=0;i{this.secondaryConn_&&(this.log_("Timed out trying to upgrade."),this.secondaryConn_.close())},Math.floor(Sk))}onReset_(e){this.log_("Reset packet received. New host: "+e),this.repoInfo_.host=e,this.state_===1?this.close():(this.closeConnections_(),this.start_())}onConnectionEstablished_(e,n){this.log_("Realtime connection established."),this.conn_=e,this.state_=1,this.onReady_&&(this.onReady_(n,this.sessionId),this.onReady_=null),this.primaryResponsesRequired_===0?(this.log_("Primary connection is healthy."),this.isHealthy_=!0):Bs(()=>{this.sendPingOnPrimaryIfNecessary_()},Math.floor(xk))}sendPingOnPrimaryIfNecessary_(){!this.isHealthy_&&this.state_===1&&(this.log_("sending ping on primary."),this.sendData_({t:"c",d:{t:xm,d:{}}}))}onSecondaryConnectionLost_(){const e=this.secondaryConn_;this.secondaryConn_=null,(this.tx_===e||this.rx_===e)&&this.close()}onConnectionLost_(e){this.conn_=null,!e&&this.state_===0?(this.log_("Realtime connection failed."),this.repoInfo_.isCacheableHost()&&(br.remove("host:"+this.repoInfo_.host),this.repoInfo_.internalHost=this.repoInfo_.host)):this.state_===1&&this.log_("Realtime connection lost."),this.close()}onConnectionShutdown_(e){this.log_("Connection shutdown command received. Shutting down..."),this.onKill_&&(this.onKill_(e),this.onKill_=null),this.onDisconnect_=null,this.close()}sendData_(e){if(this.state_!==1)throw"Connection is not connected";this.tx_.send(e)}close(){this.state_!==2&&(this.log_("Closing realtime connection."),this.state_=2,this.closeConnections_(),this.onDisconnect_&&(this.onDisconnect_(),this.onDisconnect_=null))}closeConnections_(){this.log_("Shutting down all connections"),this.conn_&&(this.conn_.close(),this.conn_=null),this.secondaryConn_&&(this.secondaryConn_.close(),this.secondaryConn_=null),this.healthyTimeout_&&(clearTimeout(this.healthyTimeout_),this.healthyTimeout_=null)}}/** + */const Ak=6e4,Ok=5e3,Lk=10*1024,Mk=100*1024,tc="t",Sm="d",jk="s",xm="r",Fk="e",km="o",Tm="a",Rm="n",Nm="p",Uk="h";class Bk{constructor(e,n,r,i,s,o,l,a,u,c){this.id=e,this.repoInfo_=n,this.applicationId_=r,this.appCheckToken_=i,this.authToken_=s,this.onMessage_=o,this.onReady_=l,this.onDisconnect_=a,this.onKill_=u,this.lastSessionId=c,this.connectionCount=0,this.pendingDataMessages=[],this.state_=0,this.log_=Ao("c:"+this.id+":"),this.transportManager_=new Vi(n),this.log_("Connection created"),this.start_()}start_(){const e=this.transportManager_.initialTransport();this.conn_=new e(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,null,this.lastSessionId),this.primaryResponsesRequired_=e.responsesRequiredToBeHealthy||0;const n=this.connReceiver_(this.conn_),r=this.disconnReceiver_(this.conn_);this.tx_=this.conn_,this.rx_=this.conn_,this.secondaryConn_=null,this.isHealthy_=!1,setTimeout(()=>{this.conn_&&this.conn_.open(n,r)},Math.floor(0));const i=e.healthyTimeout||0;i>0&&(this.healthyTimeout_=$s(()=>{this.healthyTimeout_=null,this.isHealthy_||(this.conn_&&this.conn_.bytesReceived>Mk?(this.log_("Connection exceeded healthy timeout but has received "+this.conn_.bytesReceived+" bytes. Marking connection healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()):this.conn_&&this.conn_.bytesSent>Lk?this.log_("Connection exceeded healthy timeout but has sent "+this.conn_.bytesSent+" bytes. Leaving connection alive."):(this.log_("Closing unhealthy connection after timeout."),this.close()))},Math.floor(i)))}nextTransportId_(){return"c:"+this.id+":"+this.connectionCount++}disconnReceiver_(e){return n=>{e===this.conn_?this.onConnectionLost_(n):e===this.secondaryConn_?(this.log_("Secondary connection lost."),this.onSecondaryConnectionLost_()):this.log_("closing an old connection")}}connReceiver_(e){return n=>{this.state_!==2&&(e===this.rx_?this.onPrimaryMessageReceived_(n):e===this.secondaryConn_?this.onSecondaryMessageReceived_(n):this.log_("message on old connection"))}}sendRequest(e){const n={t:"d",d:e};this.sendData_(n)}tryCleanupConnection(){this.tx_===this.secondaryConn_&&this.rx_===this.secondaryConn_&&(this.log_("cleaning up and promoting a connection: "+this.secondaryConn_.connId),this.conn_=this.secondaryConn_,this.secondaryConn_=null)}onSecondaryControl_(e){if(tc in e){const n=e[tc];n===Tm?this.upgradeIfSecondaryHealthy_():n===xm?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),(this.tx_===this.secondaryConn_||this.rx_===this.secondaryConn_)&&this.close()):n===km&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}}onSecondaryMessageReceived_(e){const n=Ss("t",e),r=Ss("d",e);if(n==="c")this.onSecondaryControl_(r);else if(n==="d")this.pendingDataMessages.push(r);else throw new Error("Unknown protocol layer: "+n)}upgradeIfSecondaryHealthy_(){this.secondaryResponsesRequired_<=0?(this.log_("Secondary connection is healthy."),this.isHealthy_=!0,this.secondaryConn_.markConnectionHealthy(),this.proceedWithUpgrade_()):(this.log_("sending ping on secondary."),this.secondaryConn_.send({t:"c",d:{t:Nm,d:{}}}))}proceedWithUpgrade_(){this.secondaryConn_.start(),this.log_("sending client ack on secondary"),this.secondaryConn_.send({t:"c",d:{t:Tm,d:{}}}),this.log_("Ending transmission on primary"),this.conn_.send({t:"c",d:{t:Rm,d:{}}}),this.tx_=this.secondaryConn_,this.tryCleanupConnection()}onPrimaryMessageReceived_(e){const n=Ss("t",e),r=Ss("d",e);n==="c"?this.onControl_(r):n==="d"&&this.onDataMessage_(r)}onDataMessage_(e){this.onPrimaryResponse_(),this.onMessage_(e)}onPrimaryResponse_(){this.isHealthy_||(this.primaryResponsesRequired_--,this.primaryResponsesRequired_<=0&&(this.log_("Primary connection is healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()))}onControl_(e){const n=Ss(tc,e);if(Sm in e){const r=e[Sm];if(n===Uk){const i=Object.assign({},r);this.repoInfo_.isUsingEmulator&&(i.h=this.repoInfo_.host),this.onHandshake_(i)}else if(n===Rm){this.log_("recvd end transmission on primary"),this.rx_=this.secondaryConn_;for(let i=0;i{this.secondaryConn_&&(this.log_("Timed out trying to upgrade."),this.secondaryConn_.close())},Math.floor(Ak))}onReset_(e){this.log_("Reset packet received. New host: "+e),this.repoInfo_.host=e,this.state_===1?this.close():(this.closeConnections_(),this.start_())}onConnectionEstablished_(e,n){this.log_("Realtime connection established."),this.conn_=e,this.state_=1,this.onReady_&&(this.onReady_(n,this.sessionId),this.onReady_=null),this.primaryResponsesRequired_===0?(this.log_("Primary connection is healthy."),this.isHealthy_=!0):$s(()=>{this.sendPingOnPrimaryIfNecessary_()},Math.floor(Ok))}sendPingOnPrimaryIfNecessary_(){!this.isHealthy_&&this.state_===1&&(this.log_("sending ping on primary."),this.sendData_({t:"c",d:{t:Nm,d:{}}}))}onSecondaryConnectionLost_(){const e=this.secondaryConn_;this.secondaryConn_=null,(this.tx_===e||this.rx_===e)&&this.close()}onConnectionLost_(e){this.conn_=null,!e&&this.state_===0?(this.log_("Realtime connection failed."),this.repoInfo_.isCacheableHost()&&(Ar.remove("host:"+this.repoInfo_.host),this.repoInfo_.internalHost=this.repoInfo_.host)):this.state_===1&&this.log_("Realtime connection lost."),this.close()}onConnectionShutdown_(e){this.log_("Connection shutdown command received. Shutting down..."),this.onKill_&&(this.onKill_(e),this.onKill_=null),this.onDisconnect_=null,this.close()}sendData_(e){if(this.state_!==1)throw"Connection is not connected";this.tx_.send(e)}close(){this.state_!==2&&(this.log_("Closing realtime connection."),this.state_=2,this.closeConnections_(),this.onDisconnect_&&(this.onDisconnect_(),this.onDisconnect_=null))}closeConnections_(){this.log_("Shutting down all connections"),this.conn_&&(this.conn_.close(),this.conn_=null),this.secondaryConn_&&(this.secondaryConn_.close(),this.secondaryConn_=null),this.healthyTimeout_&&(clearTimeout(this.healthyTimeout_),this.healthyTimeout_=null)}}/** * @license * Copyright 2017 Google LLC * @@ -926,7 +926,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class bv{put(e,n,r,i){}merge(e,n,r,i){}refreshAuthToken(e){}refreshAppCheckToken(e){}onDisconnectPut(e,n,r){}onDisconnectMerge(e,n,r){}onDisconnectCancel(e,n){}reportStats(e){}}/** + */class Mv{put(e,n,r,i){}merge(e,n,r,i){}refreshAuthToken(e){}refreshAppCheckToken(e){}onDisconnectPut(e,n,r){}onDisconnectMerge(e,n,r){}onDisconnectCancel(e,n){}reportStats(e){}}/** * @license * Copyright 2017 Google LLC * @@ -941,7 +941,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class Dv{constructor(e){this.allowedEvents_=e,this.listeners_={},R(Array.isArray(e)&&e.length>0,"Requires a non-empty array")}trigger(e,...n){if(Array.isArray(this.listeners_[e])){const r=[...this.listeners_[e]];for(let i=0;in===e),"Unknown event: "+e)}}/** + */class jv{constructor(e){this.allowedEvents_=e,this.listeners_={},R(Array.isArray(e)&&e.length>0,"Requires a non-empty array")}trigger(e,...n){if(Array.isArray(this.listeners_[e])){const r=[...this.listeners_[e]];for(let i=0;in===e),"Unknown event: "+e)}}/** * @license * Copyright 2017 Google LLC * @@ -956,7 +956,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class ea extends Dv{constructor(){super(["online"]),this.online_=!0,typeof window<"u"&&typeof window.addEventListener<"u"&&!Gy()&&(window.addEventListener("online",()=>{this.online_||(this.online_=!0,this.trigger("online",!0))},!1),window.addEventListener("offline",()=>{this.online_&&(this.online_=!1,this.trigger("online",!1))},!1))}static getInstance(){return new ea}getInitialEvent(e){return R(e==="online","Unknown event type: "+e),[this.online_]}currentlyOnline(){return this.online_}}/** + */class na extends jv{constructor(){super(["online"]),this.online_=!0,typeof window<"u"&&typeof window.addEventListener<"u"&&!Xy()&&(window.addEventListener("online",()=>{this.online_||(this.online_=!0,this.trigger("online",!0))},!1),window.addEventListener("offline",()=>{this.online_&&(this.online_=!1,this.trigger("online",!1))},!1))}static getInstance(){return new na}getInitialEvent(e){return R(e==="online","Unknown event type: "+e),[this.online_]}currentlyOnline(){return this.online_}}/** * @license * Copyright 2017 Google LLC * @@ -971,7 +971,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const km=32,Tm=768;class Z{constructor(e,n){if(n===void 0){this.pieces_=e.split("/");let r=0;for(let i=0;i0&&(this.pieces_[r]=this.pieces_[i],r++);this.pieces_.length=r,this.pieceNum_=0}else this.pieces_=e,this.pieceNum_=n}toString(){let e="";for(let n=this.pieceNum_;n=t.pieces_.length?null:t.pieces_[t.pieceNum_]}function hr(t){return t.pieces_.length-t.pieceNum_}function se(t){let e=t.pieceNum_;return e=t.pieces_.length)return null;const e=[];for(let n=t.pieceNum_;n0&&n.push(r[i])}return new Z(n,0)}function G(t){return t.pieceNum_>=t.pieces_.length}function it(t,e){const n=V(t),r=V(e);if(n===null)return e;if(n===r)return it(se(t),se(e));throw new Error("INTERNAL ERROR: innerPath ("+e+") is not within outerPath ("+t+")")}function Dk(t,e){const n=mo(t,0),r=mo(e,0);for(let i=0;ihr(e))return!1;for(;n0&&(t.byteLength_+=1),t.parts_.push(e),t.byteLength_+=Ma(e),Ov(t)}function Lk(t){const e=t.parts_.pop();t.byteLength_-=Ma(e),t.parts_.length>0&&(t.byteLength_-=1)}function Ov(t){if(t.byteLength_>Tm)throw new Error(t.errorPrefix_+"has a key path longer than "+Tm+" bytes ("+t.byteLength_+").");if(t.parts_.length>km)throw new Error(t.errorPrefix_+"path specified exceeds the maximum depth that can be written ("+km+") or object contains a cycle "+Tr(t))}function Tr(t){return t.parts_.length===0?"":"in property '"+t.parts_.join(".")+"'"}/** + */const Im=32,Pm=768;class Z{constructor(e,n){if(n===void 0){this.pieces_=e.split("/");let r=0;for(let i=0;i0&&(this.pieces_[r]=this.pieces_[i],r++);this.pieces_.length=r,this.pieceNum_=0}else this.pieces_=e,this.pieceNum_=n}toString(){let e="";for(let n=this.pieceNum_;n=t.pieces_.length?null:t.pieces_[t.pieceNum_]}function pr(t){return t.pieces_.length-t.pieceNum_}function se(t){let e=t.pieceNum_;return e=t.pieces_.length)return null;const e=[];for(let n=t.pieceNum_;n0&&n.push(r[i])}return new Z(n,0)}function G(t){return t.pieceNum_>=t.pieces_.length}function it(t,e){const n=V(t),r=V(e);if(n===null)return e;if(n===r)return it(se(t),se(e));throw new Error("INTERNAL ERROR: innerPath ("+e+") is not within outerPath ("+t+")")}function $k(t,e){const n=_o(t,0),r=_o(e,0);for(let i=0;ipr(e))return!1;for(;n0&&(t.byteLength_+=1),t.parts_.push(e),t.byteLength_+=Ua(e),Uv(t)}function Vk(t){const e=t.parts_.pop();t.byteLength_-=Ua(e),t.parts_.length>0&&(t.byteLength_-=1)}function Uv(t){if(t.byteLength_>Pm)throw new Error(t.errorPrefix_+"has a key path longer than "+Pm+" bytes ("+t.byteLength_+").");if(t.parts_.length>Im)throw new Error(t.errorPrefix_+"path specified exceeds the maximum depth that can be written ("+Im+") or object contains a cycle "+Nr(t))}function Nr(t){return t.parts_.length===0?"":"in property '"+t.parts_.join(".")+"'"}/** * @license * Copyright 2017 Google LLC * @@ -986,7 +986,7 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class Uh extends Dv{constructor(){super(["visible"]);let e,n;typeof document<"u"&&typeof document.addEventListener<"u"&&(typeof document.hidden<"u"?(n="visibilitychange",e="hidden"):typeof document.mozHidden<"u"?(n="mozvisibilitychange",e="mozHidden"):typeof document.msHidden<"u"?(n="msvisibilitychange",e="msHidden"):typeof document.webkitHidden<"u"&&(n="webkitvisibilitychange",e="webkitHidden")),this.visible_=!0,n&&document.addEventListener(n,()=>{const r=!document[e];r!==this.visible_&&(this.visible_=r,this.trigger("visible",r))},!1)}static getInstance(){return new Uh}getInitialEvent(e){return R(e==="visible","Unknown event type: "+e),[this.visible_]}}/** + */class $h extends jv{constructor(){super(["visible"]);let e,n;typeof document<"u"&&typeof document.addEventListener<"u"&&(typeof document.hidden<"u"?(n="visibilitychange",e="hidden"):typeof document.mozHidden<"u"?(n="mozvisibilitychange",e="mozHidden"):typeof document.msHidden<"u"?(n="msvisibilitychange",e="msHidden"):typeof document.webkitHidden<"u"&&(n="webkitvisibilitychange",e="webkitHidden")),this.visible_=!0,n&&document.addEventListener(n,()=>{const r=!document[e];r!==this.visible_&&(this.visible_=r,this.trigger("visible",r))},!1)}static getInstance(){return new $h}getInitialEvent(e){return R(e==="visible","Unknown event type: "+e),[this.visible_]}}/** * @license * Copyright 2017 Google LLC * @@ -1001,10 +1001,10 @@ Error generating stack: `+s.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const Cs=1e3,Mk=60*5*1e3,Rm=30*1e3,jk=1.3,Fk=3e4,Uk="server_kill",Nm=3;class kn extends bv{constructor(e,n,r,i,s,o,l,a){if(super(),this.repoInfo_=e,this.applicationId_=n,this.onDataUpdate_=r,this.onConnectStatus_=i,this.onServerInfoUpdate_=s,this.authTokenProvider_=o,this.appCheckTokenProvider_=l,this.authOverride_=a,this.id=kn.nextPersistentConnectionId_++,this.log_=bo("p:"+this.id+":"),this.interruptReasons_={},this.listens=new Map,this.outstandingPuts_=[],this.outstandingGets_=[],this.outstandingPutCount_=0,this.outstandingGetCount_=0,this.onDisconnectRequestQueue_=[],this.connected_=!1,this.reconnectDelay_=Cs,this.maxReconnectDelay_=Mk,this.securityDebugCallback_=null,this.lastSessionId=null,this.establishConnectionTimer_=null,this.visible_=!1,this.requestCBHash_={},this.requestNumber_=0,this.realtime_=null,this.authToken_=null,this.appCheckToken_=null,this.forceTokenRefresh_=!1,this.invalidAuthTokenCount_=0,this.invalidAppCheckTokenCount_=0,this.firstConnection_=!0,this.lastConnectionAttemptTime_=null,this.lastConnectionEstablishedTime_=null,a&&!Qy())throw new Error("Auth override specified in options, but not supported on non Node.js platforms");Uh.getInstance().on("visible",this.onVisible_,this),e.host.indexOf("fblocal")===-1&&ea.getInstance().on("online",this.onOnline_,this)}sendRequest(e,n,r){const i=++this.requestNumber_,s={r:i,a:e,b:n};this.log_(Ae(s)),R(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(s),r&&(this.requestCBHash_[i]=r)}get(e){this.initConnection_();const n=new ut,i={action:"g",request:{p:e._path.toString(),q:e._queryObject},onComplete:o=>{const l=o.d;o.s==="ok"?n.resolve(l):n.reject(l)}};this.outstandingGets_.push(i),this.outstandingGetCount_++;const s=this.outstandingGets_.length-1;return this.connected_&&this.sendGet_(s),n.promise}listen(e,n,r,i){this.initConnection_();const s=e._queryIdentifier,o=e._path.toString();this.log_("Listen called for "+o+" "+s),this.listens.has(o)||this.listens.set(o,new Map),R(e._queryParams.isDefault()||!e._queryParams.loadsAllData(),"listen() called for non-default but complete query"),R(!this.listens.get(o).has(s),"listen() called twice for same path/queryId.");const l={onComplete:i,hashFn:n,query:e,tag:r};this.listens.get(o).set(s,l),this.connected_&&this.sendListen_(l)}sendGet_(e){const n=this.outstandingGets_[e];this.sendRequest("g",n.request,r=>{delete this.outstandingGets_[e],this.outstandingGetCount_--,this.outstandingGetCount_===0&&(this.outstandingGets_=[]),n.onComplete&&n.onComplete(r)})}sendListen_(e){const n=e.query,r=n._path.toString(),i=n._queryIdentifier;this.log_("Listen on "+r+" for "+i);const s={p:r},o="q";e.tag&&(s.q=n._queryObject,s.t=e.tag),s.h=e.hashFn(),this.sendRequest(o,s,l=>{const a=l.d,u=l.s;kn.warnOnListenWarnings_(a,n),(this.listens.get(r)&&this.listens.get(r).get(i))===e&&(this.log_("listen response",l),u!=="ok"&&this.removeListen_(r,i),e.onComplete&&e.onComplete(u,a))})}static warnOnListenWarnings_(e,n){if(e&&typeof e=="object"&&Ct(e,"w")){const r=Wr(e,"w");if(Array.isArray(r)&&~r.indexOf("no_index")){const i='".indexOn": "'+n._queryParams.getIndex().toString()+'"',s=n._path.toString();Ze(`Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding ${i} at ${s} to your security rules for better performance.`)}}}refreshAuthToken(e){this.authToken_=e,this.log_("Auth token refreshed"),this.authToken_?this.tryAuth():this.connected_&&this.sendRequest("unauth",{},()=>{}),this.reduceReconnectDelayIfAdminCredential_(e)}reduceReconnectDelayIfAdminCredential_(e){(e&&e.length===40||Cx(e))&&(this.log_("Admin auth credential detected. Reducing max reconnect time."),this.maxReconnectDelay_=Rm)}refreshAppCheckToken(e){this.appCheckToken_=e,this.log_("App check token refreshed"),this.appCheckToken_?this.tryAppCheck():this.connected_&&this.sendRequest("unappeck",{},()=>{})}tryAuth(){if(this.connected_&&this.authToken_){const e=this.authToken_,n=Ex(e)?"auth":"gauth",r={cred:e};this.authOverride_===null?r.noauth=!0:typeof this.authOverride_=="object"&&(r.authvar=this.authOverride_),this.sendRequest(n,r,i=>{const s=i.s,o=i.d||"error";this.authToken_===e&&(s==="ok"?this.invalidAuthTokenCount_=0:this.onAuthRevoked_(s,o))})}}tryAppCheck(){this.connected_&&this.appCheckToken_&&this.sendRequest("appcheck",{token:this.appCheckToken_},e=>{const n=e.s,r=e.d||"error";n==="ok"?this.invalidAppCheckTokenCount_=0:this.onAppCheckRevoked_(n,r)})}unlisten(e,n){const r=e._path.toString(),i=e._queryIdentifier;this.log_("Unlisten called for "+r+" "+i),R(e._queryParams.isDefault()||!e._queryParams.loadsAllData(),"unlisten() called for non-default but complete query"),this.removeListen_(r,i)&&this.connected_&&this.sendUnlisten_(r,i,e._queryObject,n)}sendUnlisten_(e,n,r,i){this.log_("Unlisten on "+e+" for "+n);const s={p:e},o="n";i&&(s.q=r,s.t=i),this.sendRequest(o,s)}onDisconnectPut(e,n,r){this.initConnection_(),this.connected_?this.sendOnDisconnect_("o",e,n,r):this.onDisconnectRequestQueue_.push({pathString:e,action:"o",data:n,onComplete:r})}onDisconnectMerge(e,n,r){this.initConnection_(),this.connected_?this.sendOnDisconnect_("om",e,n,r):this.onDisconnectRequestQueue_.push({pathString:e,action:"om",data:n,onComplete:r})}onDisconnectCancel(e,n){this.initConnection_(),this.connected_?this.sendOnDisconnect_("oc",e,null,n):this.onDisconnectRequestQueue_.push({pathString:e,action:"oc",data:null,onComplete:n})}sendOnDisconnect_(e,n,r,i){const s={p:n,d:r};this.log_("onDisconnect "+e,s),this.sendRequest(e,s,o=>{i&&setTimeout(()=>{i(o.s,o.d)},Math.floor(0))})}put(e,n,r,i){this.putInternal("p",e,n,r,i)}merge(e,n,r,i){this.putInternal("m",e,n,r,i)}putInternal(e,n,r,i,s){this.initConnection_();const o={p:n,d:r};s!==void 0&&(o.h=s),this.outstandingPuts_.push({action:e,request:o,onComplete:i}),this.outstandingPutCount_++;const l=this.outstandingPuts_.length-1;this.connected_?this.sendPut_(l):this.log_("Buffering put: "+n)}sendPut_(e){const n=this.outstandingPuts_[e].action,r=this.outstandingPuts_[e].request,i=this.outstandingPuts_[e].onComplete;this.outstandingPuts_[e].queued=this.connected_,this.sendRequest(n,r,s=>{this.log_(n+" response",s),delete this.outstandingPuts_[e],this.outstandingPutCount_--,this.outstandingPutCount_===0&&(this.outstandingPuts_=[]),i&&i(s.s,s.d)})}reportStats(e){if(this.connected_){const n={c:e};this.log_("reportStats",n),this.sendRequest("s",n,r=>{if(r.s!=="ok"){const s=r.d;this.log_("reportStats","Error sending stats: "+s)}})}}onDataMessage_(e){if("r"in e){this.log_("from server: "+Ae(e));const n=e.r,r=this.requestCBHash_[n];r&&(delete this.requestCBHash_[n],r(e.b))}else{if("error"in e)throw"A server-side error has occurred: "+e.error;"a"in e&&this.onDataPush_(e.a,e.b)}}onDataPush_(e,n){this.log_("handleServerMessage",e,n),e==="d"?this.onDataUpdate_(n.p,n.d,!1,n.t):e==="m"?this.onDataUpdate_(n.p,n.d,!0,n.t):e==="c"?this.onListenRevoked_(n.p,n.q):e==="ac"?this.onAuthRevoked_(n.s,n.d):e==="apc"?this.onAppCheckRevoked_(n.s,n.d):e==="sd"?this.onSecurityDebugPacket_(n):dd("Unrecognized action received from server: "+Ae(e)+` -Are you using the latest client?`)}onReady_(e,n){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=new Date().getTime(),this.handleTimestamp_(e),this.lastSessionId=n,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)}scheduleConnect_(e){R(!this.realtime_,"Scheduling a connect when we're already connected/ing?"),this.establishConnectionTimer_&&clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=setTimeout(()=>{this.establishConnectionTimer_=null,this.establishConnection_()},Math.floor(e))}initConnection_(){!this.realtime_&&this.firstConnection_&&this.scheduleConnect_(0)}onVisible_(e){e&&!this.visible_&&this.reconnectDelay_===this.maxReconnectDelay_&&(this.log_("Window became visible. Reducing delay."),this.reconnectDelay_=Cs,this.realtime_||this.scheduleConnect_(0)),this.visible_=e}onOnline_(e){e?(this.log_("Browser went online."),this.reconnectDelay_=Cs,this.realtime_||this.scheduleConnect_(0)):(this.log_("Browser went offline. Killing connection."),this.realtime_&&this.realtime_.close())}onRealtimeDisconnect_(){if(this.log_("data client disconnected"),this.connected_=!1,this.realtime_=null,this.cancelSentTransactions_(),this.requestCBHash_={},this.shouldReconnect_()){this.visible_?this.lastConnectionEstablishedTime_&&(new Date().getTime()-this.lastConnectionEstablishedTime_>Fk&&(this.reconnectDelay_=Cs),this.lastConnectionEstablishedTime_=null):(this.log_("Window isn't visible. Delaying reconnect."),this.reconnectDelay_=this.maxReconnectDelay_,this.lastConnectionAttemptTime_=new Date().getTime());const e=new Date().getTime()-this.lastConnectionAttemptTime_;let n=Math.max(0,this.reconnectDelay_-e);n=Math.random()*n,this.log_("Trying to reconnect in "+n+"ms"),this.scheduleConnect_(n),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,this.reconnectDelay_*jk)}this.onConnectStatus_(!1)}async establishConnection_(){if(this.shouldReconnect_()){this.log_("Making a connection attempt"),this.lastConnectionAttemptTime_=new Date().getTime(),this.lastConnectionEstablishedTime_=null;const e=this.onDataMessage_.bind(this),n=this.onReady_.bind(this),r=this.onRealtimeDisconnect_.bind(this),i=this.id+":"+kn.nextConnectionId_++,s=this.lastSessionId;let o=!1,l=null;const a=function(){l?l.close():(o=!0,r())},u=function(d){R(l,"sendRequest call when we're not connected not allowed."),l.sendRequest(d)};this.realtime_={close:a,sendRequest:u};const c=this.forceTokenRefresh_;this.forceTokenRefresh_=!1;try{const[d,h]=await Promise.all([this.authTokenProvider_.getToken(c),this.appCheckTokenProvider_.getToken(c)]);o?ze("getToken() completed but was canceled"):(ze("getToken() completed. Creating connection."),this.authToken_=d&&d.accessToken,this.appCheckToken_=h&&h.token,l=new Pk(i,this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,e,n,r,_=>{Ze(_+" ("+this.repoInfo_.toString()+")"),this.interrupt(Uk)},s))}catch(d){this.log_("Failed to get token: "+d),o||(this.repoInfo_.nodeAdmin&&Ze(d),a())}}}interrupt(e){ze("Interrupting connection for reason: "+e),this.interruptReasons_[e]=!0,this.realtime_?this.realtime_.close():(this.establishConnectionTimer_&&(clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=null),this.connected_&&this.onRealtimeDisconnect_())}resume(e){ze("Resuming connection for reason: "+e),delete this.interruptReasons_[e],id(this.interruptReasons_)&&(this.reconnectDelay_=Cs,this.realtime_||this.scheduleConnect_(0))}handleTimestamp_(e){const n=e-new Date().getTime();this.onServerInfoUpdate_({serverTimeOffset:n})}cancelSentTransactions_(){for(let e=0;eAh(s)).join("$"):r="default";const i=this.removeListen_(e,r);i&&i.onComplete&&i.onComplete("permission_denied")}removeListen_(e,n){const r=new Z(e).toString();let i;if(this.listens.has(r)){const s=this.listens.get(r);i=s.get(n),s.delete(n),s.size===0&&this.listens.delete(r)}else i=void 0;return i}onAuthRevoked_(e,n){ze("Auth token revoked: "+e+"/"+n),this.authToken_=null,this.forceTokenRefresh_=!0,this.realtime_.close(),(e==="invalid_token"||e==="permission_denied")&&(this.invalidAuthTokenCount_++,this.invalidAuthTokenCount_>=Nm&&(this.reconnectDelay_=Rm,this.authTokenProvider_.notifyForInvalidToken()))}onAppCheckRevoked_(e,n){ze("App check token revoked: "+e+"/"+n),this.appCheckToken_=null,this.forceTokenRefresh_=!0,(e==="invalid_token"||e==="permission_denied")&&(this.invalidAppCheckTokenCount_++,this.invalidAppCheckTokenCount_>=Nm&&this.appCheckTokenProvider_.notifyForInvalidToken())}onSecurityDebugPacket_(e){this.securityDebugCallback_?this.securityDebugCallback_(e):"msg"in e&&console.log("FIREBASE: "+e.msg.replace(` + */const xs=1e3,Gk=60*5*1e3,bm=30*1e3,Qk=1.3,Kk=3e4,qk="server_kill",Dm=3;class Tn extends Mv{constructor(e,n,r,i,s,o,l,a){if(super(),this.repoInfo_=e,this.applicationId_=n,this.onDataUpdate_=r,this.onConnectStatus_=i,this.onServerInfoUpdate_=s,this.authTokenProvider_=o,this.appCheckTokenProvider_=l,this.authOverride_=a,this.id=Tn.nextPersistentConnectionId_++,this.log_=Ao("p:"+this.id+":"),this.interruptReasons_={},this.listens=new Map,this.outstandingPuts_=[],this.outstandingGets_=[],this.outstandingPutCount_=0,this.outstandingGetCount_=0,this.onDisconnectRequestQueue_=[],this.connected_=!1,this.reconnectDelay_=xs,this.maxReconnectDelay_=Gk,this.securityDebugCallback_=null,this.lastSessionId=null,this.establishConnectionTimer_=null,this.visible_=!1,this.requestCBHash_={},this.requestNumber_=0,this.realtime_=null,this.authToken_=null,this.appCheckToken_=null,this.forceTokenRefresh_=!1,this.invalidAuthTokenCount_=0,this.invalidAppCheckTokenCount_=0,this.firstConnection_=!0,this.lastConnectionAttemptTime_=null,this.lastConnectionEstablishedTime_=null,a&&!Jy())throw new Error("Auth override specified in options, but not supported on non Node.js platforms");$h.getInstance().on("visible",this.onVisible_,this),e.host.indexOf("fblocal")===-1&&na.getInstance().on("online",this.onOnline_,this)}sendRequest(e,n,r){const i=++this.requestNumber_,s={r:i,a:e,b:n};this.log_(Ae(s)),R(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(s),r&&(this.requestCBHash_[i]=r)}get(e){this.initConnection_();const n=new ut,i={action:"g",request:{p:e._path.toString(),q:e._queryObject},onComplete:o=>{const l=o.d;o.s==="ok"?n.resolve(l):n.reject(l)}};this.outstandingGets_.push(i),this.outstandingGetCount_++;const s=this.outstandingGets_.length-1;return this.connected_&&this.sendGet_(s),n.promise}listen(e,n,r,i){this.initConnection_();const s=e._queryIdentifier,o=e._path.toString();this.log_("Listen called for "+o+" "+s),this.listens.has(o)||this.listens.set(o,new Map),R(e._queryParams.isDefault()||!e._queryParams.loadsAllData(),"listen() called for non-default but complete query"),R(!this.listens.get(o).has(s),"listen() called twice for same path/queryId.");const l={onComplete:i,hashFn:n,query:e,tag:r};this.listens.get(o).set(s,l),this.connected_&&this.sendListen_(l)}sendGet_(e){const n=this.outstandingGets_[e];this.sendRequest("g",n.request,r=>{delete this.outstandingGets_[e],this.outstandingGetCount_--,this.outstandingGetCount_===0&&(this.outstandingGets_=[]),n.onComplete&&n.onComplete(r)})}sendListen_(e){const n=e.query,r=n._path.toString(),i=n._queryIdentifier;this.log_("Listen on "+r+" for "+i);const s={p:r},o="q";e.tag&&(s.q=n._queryObject,s.t=e.tag),s.h=e.hashFn(),this.sendRequest(o,s,l=>{const a=l.d,u=l.s;Tn.warnOnListenWarnings_(a,n),(this.listens.get(r)&&this.listens.get(r).get(i))===e&&(this.log_("listen response",l),u!=="ok"&&this.removeListen_(r,i),e.onComplete&&e.onComplete(u,a))})}static warnOnListenWarnings_(e,n){if(e&&typeof e=="object"&&Ct(e,"w")){const r=Vr(e,"w");if(Array.isArray(r)&&~r.indexOf("no_index")){const i='".indexOn": "'+n._queryParams.getIndex().toString()+'"',s=n._path.toString();Ze(`Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding ${i} at ${s} to your security rules for better performance.`)}}}refreshAuthToken(e){this.authToken_=e,this.log_("Auth token refreshed"),this.authToken_?this.tryAuth():this.connected_&&this.sendRequest("unauth",{},()=>{}),this.reduceReconnectDelayIfAdminCredential_(e)}reduceReconnectDelayIfAdminCredential_(e){(e&&e.length===40||Dx(e))&&(this.log_("Admin auth credential detected. Reducing max reconnect time."),this.maxReconnectDelay_=bm)}refreshAppCheckToken(e){this.appCheckToken_=e,this.log_("App check token refreshed"),this.appCheckToken_?this.tryAppCheck():this.connected_&&this.sendRequest("unappeck",{},()=>{})}tryAuth(){if(this.connected_&&this.authToken_){const e=this.authToken_,n=bx(e)?"auth":"gauth",r={cred:e};this.authOverride_===null?r.noauth=!0:typeof this.authOverride_=="object"&&(r.authvar=this.authOverride_),this.sendRequest(n,r,i=>{const s=i.s,o=i.d||"error";this.authToken_===e&&(s==="ok"?this.invalidAuthTokenCount_=0:this.onAuthRevoked_(s,o))})}}tryAppCheck(){this.connected_&&this.appCheckToken_&&this.sendRequest("appcheck",{token:this.appCheckToken_},e=>{const n=e.s,r=e.d||"error";n==="ok"?this.invalidAppCheckTokenCount_=0:this.onAppCheckRevoked_(n,r)})}unlisten(e,n){const r=e._path.toString(),i=e._queryIdentifier;this.log_("Unlisten called for "+r+" "+i),R(e._queryParams.isDefault()||!e._queryParams.loadsAllData(),"unlisten() called for non-default but complete query"),this.removeListen_(r,i)&&this.connected_&&this.sendUnlisten_(r,i,e._queryObject,n)}sendUnlisten_(e,n,r,i){this.log_("Unlisten on "+e+" for "+n);const s={p:e},o="n";i&&(s.q=r,s.t=i),this.sendRequest(o,s)}onDisconnectPut(e,n,r){this.initConnection_(),this.connected_?this.sendOnDisconnect_("o",e,n,r):this.onDisconnectRequestQueue_.push({pathString:e,action:"o",data:n,onComplete:r})}onDisconnectMerge(e,n,r){this.initConnection_(),this.connected_?this.sendOnDisconnect_("om",e,n,r):this.onDisconnectRequestQueue_.push({pathString:e,action:"om",data:n,onComplete:r})}onDisconnectCancel(e,n){this.initConnection_(),this.connected_?this.sendOnDisconnect_("oc",e,null,n):this.onDisconnectRequestQueue_.push({pathString:e,action:"oc",data:null,onComplete:n})}sendOnDisconnect_(e,n,r,i){const s={p:n,d:r};this.log_("onDisconnect "+e,s),this.sendRequest(e,s,o=>{i&&setTimeout(()=>{i(o.s,o.d)},Math.floor(0))})}put(e,n,r,i){this.putInternal("p",e,n,r,i)}merge(e,n,r,i){this.putInternal("m",e,n,r,i)}putInternal(e,n,r,i,s){this.initConnection_();const o={p:n,d:r};s!==void 0&&(o.h=s),this.outstandingPuts_.push({action:e,request:o,onComplete:i}),this.outstandingPutCount_++;const l=this.outstandingPuts_.length-1;this.connected_?this.sendPut_(l):this.log_("Buffering put: "+n)}sendPut_(e){const n=this.outstandingPuts_[e].action,r=this.outstandingPuts_[e].request,i=this.outstandingPuts_[e].onComplete;this.outstandingPuts_[e].queued=this.connected_,this.sendRequest(n,r,s=>{this.log_(n+" response",s),delete this.outstandingPuts_[e],this.outstandingPutCount_--,this.outstandingPutCount_===0&&(this.outstandingPuts_=[]),i&&i(s.s,s.d)})}reportStats(e){if(this.connected_){const n={c:e};this.log_("reportStats",n),this.sendRequest("s",n,r=>{if(r.s!=="ok"){const s=r.d;this.log_("reportStats","Error sending stats: "+s)}})}}onDataMessage_(e){if("r"in e){this.log_("from server: "+Ae(e));const n=e.r,r=this.requestCBHash_[n];r&&(delete this.requestCBHash_[n],r(e.b))}else{if("error"in e)throw"A server-side error has occurred: "+e.error;"a"in e&&this.onDataPush_(e.a,e.b)}}onDataPush_(e,n){this.log_("handleServerMessage",e,n),e==="d"?this.onDataUpdate_(n.p,n.d,!1,n.t):e==="m"?this.onDataUpdate_(n.p,n.d,!0,n.t):e==="c"?this.onListenRevoked_(n.p,n.q):e==="ac"?this.onAuthRevoked_(n.s,n.d):e==="apc"?this.onAppCheckRevoked_(n.s,n.d):e==="sd"?this.onSecurityDebugPacket_(n):pd("Unrecognized action received from server: "+Ae(e)+` +Are you using the latest client?`)}onReady_(e,n){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=new Date().getTime(),this.handleTimestamp_(e),this.lastSessionId=n,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)}scheduleConnect_(e){R(!this.realtime_,"Scheduling a connect when we're already connected/ing?"),this.establishConnectionTimer_&&clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=setTimeout(()=>{this.establishConnectionTimer_=null,this.establishConnection_()},Math.floor(e))}initConnection_(){!this.realtime_&&this.firstConnection_&&this.scheduleConnect_(0)}onVisible_(e){e&&!this.visible_&&this.reconnectDelay_===this.maxReconnectDelay_&&(this.log_("Window became visible. Reducing delay."),this.reconnectDelay_=xs,this.realtime_||this.scheduleConnect_(0)),this.visible_=e}onOnline_(e){e?(this.log_("Browser went online."),this.reconnectDelay_=xs,this.realtime_||this.scheduleConnect_(0)):(this.log_("Browser went offline. Killing connection."),this.realtime_&&this.realtime_.close())}onRealtimeDisconnect_(){if(this.log_("data client disconnected"),this.connected_=!1,this.realtime_=null,this.cancelSentTransactions_(),this.requestCBHash_={},this.shouldReconnect_()){this.visible_?this.lastConnectionEstablishedTime_&&(new Date().getTime()-this.lastConnectionEstablishedTime_>Kk&&(this.reconnectDelay_=xs),this.lastConnectionEstablishedTime_=null):(this.log_("Window isn't visible. Delaying reconnect."),this.reconnectDelay_=this.maxReconnectDelay_,this.lastConnectionAttemptTime_=new Date().getTime());const e=new Date().getTime()-this.lastConnectionAttemptTime_;let n=Math.max(0,this.reconnectDelay_-e);n=Math.random()*n,this.log_("Trying to reconnect in "+n+"ms"),this.scheduleConnect_(n),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,this.reconnectDelay_*Qk)}this.onConnectStatus_(!1)}async establishConnection_(){if(this.shouldReconnect_()){this.log_("Making a connection attempt"),this.lastConnectionAttemptTime_=new Date().getTime(),this.lastConnectionEstablishedTime_=null;const e=this.onDataMessage_.bind(this),n=this.onReady_.bind(this),r=this.onRealtimeDisconnect_.bind(this),i=this.id+":"+Tn.nextConnectionId_++,s=this.lastSessionId;let o=!1,l=null;const a=function(){l?l.close():(o=!0,r())},u=function(d){R(l,"sendRequest call when we're not connected not allowed."),l.sendRequest(d)};this.realtime_={close:a,sendRequest:u};const c=this.forceTokenRefresh_;this.forceTokenRefresh_=!1;try{const[d,h]=await Promise.all([this.authTokenProvider_.getToken(c),this.appCheckTokenProvider_.getToken(c)]);o?ze("getToken() completed but was canceled"):(ze("getToken() completed. Creating connection."),this.authToken_=d&&d.accessToken,this.appCheckToken_=h&&h.token,l=new Bk(i,this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,e,n,r,_=>{Ze(_+" ("+this.repoInfo_.toString()+")"),this.interrupt(qk)},s))}catch(d){this.log_("Failed to get token: "+d),o||(this.repoInfo_.nodeAdmin&&Ze(d),a())}}}interrupt(e){ze("Interrupting connection for reason: "+e),this.interruptReasons_[e]=!0,this.realtime_?this.realtime_.close():(this.establishConnectionTimer_&&(clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=null),this.connected_&&this.onRealtimeDisconnect_())}resume(e){ze("Resuming connection for reason: "+e),delete this.interruptReasons_[e],ld(this.interruptReasons_)&&(this.reconnectDelay_=xs,this.realtime_||this.scheduleConnect_(0))}handleTimestamp_(e){const n=e-new Date().getTime();this.onServerInfoUpdate_({serverTimeOffset:n})}cancelSentTransactions_(){for(let e=0;eMh(s)).join("$"):r="default";const i=this.removeListen_(e,r);i&&i.onComplete&&i.onComplete("permission_denied")}removeListen_(e,n){const r=new Z(e).toString();let i;if(this.listens.has(r)){const s=this.listens.get(r);i=s.get(n),s.delete(n),s.size===0&&this.listens.delete(r)}else i=void 0;return i}onAuthRevoked_(e,n){ze("Auth token revoked: "+e+"/"+n),this.authToken_=null,this.forceTokenRefresh_=!0,this.realtime_.close(),(e==="invalid_token"||e==="permission_denied")&&(this.invalidAuthTokenCount_++,this.invalidAuthTokenCount_>=Dm&&(this.reconnectDelay_=bm,this.authTokenProvider_.notifyForInvalidToken()))}onAppCheckRevoked_(e,n){ze("App check token revoked: "+e+"/"+n),this.appCheckToken_=null,this.forceTokenRefresh_=!0,(e==="invalid_token"||e==="permission_denied")&&(this.invalidAppCheckTokenCount_++,this.invalidAppCheckTokenCount_>=Dm&&this.appCheckTokenProvider_.notifyForInvalidToken())}onSecurityDebugPacket_(e){this.securityDebugCallback_?this.securityDebugCallback_(e):"msg"in e&&console.log("FIREBASE: "+e.msg.replace(` `,` -FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of this.listens.values())for(const n of e.values())this.sendListen_(n);for(let e=0;e0}peek(){if(this.nodeStack_.length===0)return null;const e=this.nodeStack_[this.nodeStack_.length-1];return this.resultGenerator_?this.resultGenerator_(e.key,e.value):{key:e.key,value:e.value}}}class Be{constructor(e,n,r,i,s){this.key=e,this.value=n,this.color=r??Be.RED,this.left=i??dt.EMPTY_NODE,this.right=s??dt.EMPTY_NODE}copy(e,n,r,i,s){return new Be(e??this.key,n??this.value,r??this.color,i??this.left,s??this.right)}count(){return this.left.count()+1+this.right.count()}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||!!e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min_(){return this.left.isEmpty()?this:this.left.min_()}minKey(){return this.min_().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,n,r){let i=this;const s=r(e,i.key);return s<0?i=i.copy(null,null,null,i.left.insert(e,n,r),null):s===0?i=i.copy(null,n,null,null,null):i=i.copy(null,null,null,null,i.right.insert(e,n,r)),i.fixUp_()}removeMin_(){if(this.left.isEmpty())return dt.EMPTY_NODE;let e=this;return!e.left.isRed_()&&!e.left.left.isRed_()&&(e=e.moveRedLeft_()),e=e.copy(null,null,null,e.left.removeMin_(),null),e.fixUp_()}remove(e,n){let r,i;if(r=this,n(e,r.key)<0)!r.left.isEmpty()&&!r.left.isRed_()&&!r.left.left.isRed_()&&(r=r.moveRedLeft_()),r=r.copy(null,null,null,r.left.remove(e,n),null);else{if(r.left.isRed_()&&(r=r.rotateRight_()),!r.right.isEmpty()&&!r.right.isRed_()&&!r.right.left.isRed_()&&(r=r.moveRedRight_()),n(e,r.key)===0){if(r.right.isEmpty())return dt.EMPTY_NODE;i=r.right.min_(),r=r.copy(i.key,i.value,null,null,r.right.removeMin_())}r=r.copy(null,null,null,null,r.right.remove(e,n))}return r.fixUp_()}isRed_(){return this.color}fixUp_(){let e=this;return e.right.isRed_()&&!e.left.isRed_()&&(e=e.rotateLeft_()),e.left.isRed_()&&e.left.left.isRed_()&&(e=e.rotateRight_()),e.left.isRed_()&&e.right.isRed_()&&(e=e.colorFlip_()),e}moveRedLeft_(){let e=this.colorFlip_();return e.right.left.isRed_()&&(e=e.copy(null,null,null,null,e.right.rotateRight_()),e=e.rotateLeft_(),e=e.colorFlip_()),e}moveRedRight_(){let e=this.colorFlip_();return e.left.left.isRed_()&&(e=e.rotateRight_(),e=e.colorFlip_()),e}rotateLeft_(){const e=this.copy(null,null,Be.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight_(){const e=this.copy(null,null,Be.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip_(){const e=this.left.copy(null,null,!this.left.color,null,null),n=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,n)}checkMaxDepth_(){const e=this.check_();return Math.pow(2,e)<=this.count()+1}check_(){if(this.isRed_()&&this.left.isRed_())throw new Error("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed_())throw new Error("Right child of ("+this.key+","+this.value+") is red");const e=this.left.check_();if(e!==this.right.check_())throw new Error("Black depths differ");return e+(this.isRed_()?0:1)}}Be.RED=!0;Be.BLACK=!1;class Bk{copy(e,n,r,i,s){return this}insert(e,n,r){return new Be(e,n,null)}remove(e,n){return this}count(){return 0}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}check_(){return 0}isRed_(){return!1}}class dt{constructor(e,n=dt.EMPTY_NODE){this.comparator_=e,this.root_=n}insert(e,n){return new dt(this.comparator_,this.root_.insert(e,n,this.comparator_).copy(null,null,Be.BLACK,null,null))}remove(e){return new dt(this.comparator_,this.root_.remove(e,this.comparator_).copy(null,null,Be.BLACK,null,null))}get(e){let n,r=this.root_;for(;!r.isEmpty();){if(n=this.comparator_(e,r.key),n===0)return r.value;n<0?r=r.left:n>0&&(r=r.right)}return null}getPredecessorKey(e){let n,r=this.root_,i=null;for(;!r.isEmpty();)if(n=this.comparator_(e,r.key),n===0){if(r.left.isEmpty())return i?i.key:null;for(r=r.left;!r.right.isEmpty();)r=r.right;return r.key}else n<0?r=r.left:n>0&&(i=r,r=r.right);throw new Error("Attempted to find predecessor key for a nonexistent key. What gives?")}isEmpty(){return this.root_.isEmpty()}count(){return this.root_.count()}minKey(){return this.root_.minKey()}maxKey(){return this.root_.maxKey()}inorderTraversal(e){return this.root_.inorderTraversal(e)}reverseTraversal(e){return this.root_.reverseTraversal(e)}getIterator(e){return new al(this.root_,null,this.comparator_,!1,e)}getIteratorFrom(e,n){return new al(this.root_,e,this.comparator_,!1,n)}getReverseIteratorFrom(e,n){return new al(this.root_,e,this.comparator_,!0,n)}getReverseIterator(e){return new al(this.root_,null,this.comparator_,!0,e)}}dt.EMPTY_NODE=new Bk;/** + */class cl{constructor(e,n,r,i,s=null){this.isReverse_=i,this.resultGenerator_=s,this.nodeStack_=[];let o=1;for(;!e.isEmpty();)if(e=e,o=n?r(e.key,n):1,i&&(o*=-1),o<0)this.isReverse_?e=e.left:e=e.right;else if(o===0){this.nodeStack_.push(e);break}else this.nodeStack_.push(e),this.isReverse_?e=e.right:e=e.left}getNext(){if(this.nodeStack_.length===0)return null;let e=this.nodeStack_.pop(),n;if(this.resultGenerator_?n=this.resultGenerator_(e.key,e.value):n={key:e.key,value:e.value},this.isReverse_)for(e=e.left;!e.isEmpty();)this.nodeStack_.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack_.push(e),e=e.left;return n}hasNext(){return this.nodeStack_.length>0}peek(){if(this.nodeStack_.length===0)return null;const e=this.nodeStack_[this.nodeStack_.length-1];return this.resultGenerator_?this.resultGenerator_(e.key,e.value):{key:e.key,value:e.value}}}class Be{constructor(e,n,r,i,s){this.key=e,this.value=n,this.color=r??Be.RED,this.left=i??dt.EMPTY_NODE,this.right=s??dt.EMPTY_NODE}copy(e,n,r,i,s){return new Be(e??this.key,n??this.value,r??this.color,i??this.left,s??this.right)}count(){return this.left.count()+1+this.right.count()}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||!!e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min_(){return this.left.isEmpty()?this:this.left.min_()}minKey(){return this.min_().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,n,r){let i=this;const s=r(e,i.key);return s<0?i=i.copy(null,null,null,i.left.insert(e,n,r),null):s===0?i=i.copy(null,n,null,null,null):i=i.copy(null,null,null,null,i.right.insert(e,n,r)),i.fixUp_()}removeMin_(){if(this.left.isEmpty())return dt.EMPTY_NODE;let e=this;return!e.left.isRed_()&&!e.left.left.isRed_()&&(e=e.moveRedLeft_()),e=e.copy(null,null,null,e.left.removeMin_(),null),e.fixUp_()}remove(e,n){let r,i;if(r=this,n(e,r.key)<0)!r.left.isEmpty()&&!r.left.isRed_()&&!r.left.left.isRed_()&&(r=r.moveRedLeft_()),r=r.copy(null,null,null,r.left.remove(e,n),null);else{if(r.left.isRed_()&&(r=r.rotateRight_()),!r.right.isEmpty()&&!r.right.isRed_()&&!r.right.left.isRed_()&&(r=r.moveRedRight_()),n(e,r.key)===0){if(r.right.isEmpty())return dt.EMPTY_NODE;i=r.right.min_(),r=r.copy(i.key,i.value,null,null,r.right.removeMin_())}r=r.copy(null,null,null,null,r.right.remove(e,n))}return r.fixUp_()}isRed_(){return this.color}fixUp_(){let e=this;return e.right.isRed_()&&!e.left.isRed_()&&(e=e.rotateLeft_()),e.left.isRed_()&&e.left.left.isRed_()&&(e=e.rotateRight_()),e.left.isRed_()&&e.right.isRed_()&&(e=e.colorFlip_()),e}moveRedLeft_(){let e=this.colorFlip_();return e.right.left.isRed_()&&(e=e.copy(null,null,null,null,e.right.rotateRight_()),e=e.rotateLeft_(),e=e.colorFlip_()),e}moveRedRight_(){let e=this.colorFlip_();return e.left.left.isRed_()&&(e=e.rotateRight_(),e=e.colorFlip_()),e}rotateLeft_(){const e=this.copy(null,null,Be.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight_(){const e=this.copy(null,null,Be.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip_(){const e=this.left.copy(null,null,!this.left.color,null,null),n=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,n)}checkMaxDepth_(){const e=this.check_();return Math.pow(2,e)<=this.count()+1}check_(){if(this.isRed_()&&this.left.isRed_())throw new Error("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed_())throw new Error("Right child of ("+this.key+","+this.value+") is red");const e=this.left.check_();if(e!==this.right.check_())throw new Error("Black depths differ");return e+(this.isRed_()?0:1)}}Be.RED=!0;Be.BLACK=!1;class Yk{copy(e,n,r,i,s){return this}insert(e,n,r){return new Be(e,n,null)}remove(e,n){return this}count(){return 0}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}check_(){return 0}isRed_(){return!1}}class dt{constructor(e,n=dt.EMPTY_NODE){this.comparator_=e,this.root_=n}insert(e,n){return new dt(this.comparator_,this.root_.insert(e,n,this.comparator_).copy(null,null,Be.BLACK,null,null))}remove(e){return new dt(this.comparator_,this.root_.remove(e,this.comparator_).copy(null,null,Be.BLACK,null,null))}get(e){let n,r=this.root_;for(;!r.isEmpty();){if(n=this.comparator_(e,r.key),n===0)return r.value;n<0?r=r.left:n>0&&(r=r.right)}return null}getPredecessorKey(e){let n,r=this.root_,i=null;for(;!r.isEmpty();)if(n=this.comparator_(e,r.key),n===0){if(r.left.isEmpty())return i?i.key:null;for(r=r.left;!r.right.isEmpty();)r=r.right;return r.key}else n<0?r=r.left:n>0&&(i=r,r=r.right);throw new Error("Attempted to find predecessor key for a nonexistent key. What gives?")}isEmpty(){return this.root_.isEmpty()}count(){return this.root_.count()}minKey(){return this.root_.minKey()}maxKey(){return this.root_.maxKey()}inorderTraversal(e){return this.root_.inorderTraversal(e)}reverseTraversal(e){return this.root_.reverseTraversal(e)}getIterator(e){return new cl(this.root_,null,this.comparator_,!1,e)}getIteratorFrom(e,n){return new cl(this.root_,e,this.comparator_,!1,n)}getReverseIteratorFrom(e,n){return new cl(this.root_,e,this.comparator_,!0,n)}getReverseIterator(e){return new cl(this.root_,null,this.comparator_,!0,e)}}dt.EMPTY_NODE=new Yk;/** * @license * Copyright 2017 Google LLC * @@ -1079,7 +1079,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function zk(t,e){return ei(t.name,e.name)}function Bh(t,e){return ei(t,e)}/** + */function Xk(t,e){return ni(t.name,e.name)}function Wh(t,e){return ni(t,e)}/** * @license * Copyright 2017 Google LLC * @@ -1094,7 +1094,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */let fd;function $k(t){fd=t}const Mv=function(t){return typeof t=="number"?"number:"+pv(t):"string:"+t},jv=function(t){if(t.isLeafNode()){const e=t.val();R(typeof e=="string"||typeof e=="number"||typeof e=="object"&&Ct(e,".sv"),"Priority must be a string or number.")}else R(t===fd||t.isEmpty(),"priority of unexpected type.");R(t===fd||t.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")};/** + */let gd;function Jk(t){gd=t}const zv=function(t){return typeof t=="number"?"number:"+vv(t):"string:"+t},$v=function(t){if(t.isLeafNode()){const e=t.val();R(typeof e=="string"||typeof e=="number"||typeof e=="object"&&Ct(e,".sv"),"Priority must be a string or number.")}else R(t===gd||t.isEmpty(),"priority of unexpected type.");R(t===gd||t.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")};/** * @license * Copyright 2017 Google LLC * @@ -1109,7 +1109,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */let Im;class je{constructor(e,n=je.__childrenNodeConstructor.EMPTY_NODE){this.value_=e,this.priorityNode_=n,this.lazyHash_=null,R(this.value_!==void 0&&this.value_!==null,"LeafNode shouldn't be created with null/undefined value."),jv(this.priorityNode_)}static set __childrenNodeConstructor(e){Im=e}static get __childrenNodeConstructor(){return Im}isLeafNode(){return!0}getPriority(){return this.priorityNode_}updatePriority(e){return new je(this.value_,e)}getImmediateChild(e){return e===".priority"?this.priorityNode_:je.__childrenNodeConstructor.EMPTY_NODE}getChild(e){return G(e)?this:V(e)===".priority"?this.priorityNode_:je.__childrenNodeConstructor.EMPTY_NODE}hasChild(){return!1}getPredecessorChildName(e,n){return null}updateImmediateChild(e,n){return e===".priority"?this.updatePriority(n):n.isEmpty()&&e!==".priority"?this:je.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(e,n).updatePriority(this.priorityNode_)}updateChild(e,n){const r=V(e);return r===null?n:n.isEmpty()&&r!==".priority"?this:(R(r!==".priority"||hr(e)===1,".priority must be the last token in a path"),this.updateImmediateChild(r,je.__childrenNodeConstructor.EMPTY_NODE.updateChild(se(e),n)))}isEmpty(){return!1}numChildren(){return 0}forEachChild(e,n){return!1}val(e){return e&&!this.getPriority().isEmpty()?{".value":this.getValue(),".priority":this.getPriority().val()}:this.getValue()}hash(){if(this.lazyHash_===null){let e="";this.priorityNode_.isEmpty()||(e+="priority:"+Mv(this.priorityNode_.val())+":");const n=typeof this.value_;e+=n+":",n==="number"?e+=pv(this.value_):e+=this.value_,this.lazyHash_=dv(e)}return this.lazyHash_}getValue(){return this.value_}compareTo(e){return e===je.__childrenNodeConstructor.EMPTY_NODE?1:e instanceof je.__childrenNodeConstructor?-1:(R(e.isLeafNode(),"Unknown node type"),this.compareToLeafNode_(e))}compareToLeafNode_(e){const n=typeof e.value_,r=typeof this.value_,i=je.VALUE_TYPE_ORDER.indexOf(n),s=je.VALUE_TYPE_ORDER.indexOf(r);return R(i>=0,"Unknown leaf type: "+n),R(s>=0,"Unknown leaf type: "+r),i===s?r==="object"?0:this.value_=0,"Unknown leaf type: "+n),R(s>=0,"Unknown leaf type: "+r),i===s?r==="object"?0:this.value_parseInt(Math.log(s)/Gk,10),r=s=>parseInt(Array(s+1).join("1"),2);this.count=n(e+1),this.current_=this.count-1;const i=r(this.count);this.bits_=e+1&i}nextBitIsOne(){const e=!(this.bits_&1<parseInt(Math.log(s)/nT,10),r=s=>parseInt(Array(s+1).join("1"),2);this.count=n(e+1),this.current_=this.count-1;const i=r(this.count);this.bits_=e+1&i}nextBitIsOne(){const e=!(this.bits_&1<{const o=Wr(this.indexSet_,s);if(R(o,"Missing index implementation for "+s),i===li)if(o.isDefinedOn(e.node)){const l=[],a=n.getIterator(K.Wrap);let u=a.getNext();for(;u;)u.name!==e.name&&l.push(u),u=a.getNext();return l.push(e),ta(l,o.getCompare())}else return li;else{const l=n.get(e.name);let a=i;return l&&(a=a.remove(new K(e.name,l))),a.insert(e,e.node)}});return new En(r,this.indexSet_)}removeFromIndexes(e,n){const r=Xl(this.indexes_,i=>{if(i===li)return i;{const s=n.get(e.name);return s?i.remove(new K(e.name,s)):i}});return new En(r,this.indexSet_)}}/** + */let nc;const ui={};class En{constructor(e,n){this.indexes_=e,this.indexSet_=n}static get Default(){return R(ui&&ce,"ChildrenNode.ts has not been loaded"),nc=nc||new En({".priority":ui},{".priority":ce}),nc}get(e){const n=Vr(this.indexes_,e);if(!n)throw new Error("No index defined for "+e);return n instanceof dt?n:null}hasIndex(e){return Ct(this.indexSet_,e.toString())}addIndex(e,n){R(e!==un,"KeyIndex always exists and isn't meant to be added to the IndexMap.");const r=[];let i=!1;const s=n.getIterator(K.Wrap);let o=s.getNext();for(;o;)i=i||e.isDefinedOn(o.node),r.push(o),o=s.getNext();let l;i?l=ra(r,e.getCompare()):l=ui;const a=e.toString(),u=Object.assign({},this.indexSet_);u[a]=e;const c=Object.assign({},this.indexes_);return c[a]=l,new En(c,u)}addToIndexes(e,n){const r=Zl(this.indexes_,(i,s)=>{const o=Vr(this.indexSet_,s);if(R(o,"Missing index implementation for "+s),i===ui)if(o.isDefinedOn(e.node)){const l=[],a=n.getIterator(K.Wrap);let u=a.getNext();for(;u;)u.name!==e.name&&l.push(u),u=a.getNext();return l.push(e),ra(l,o.getCompare())}else return ui;else{const l=n.get(e.name);let a=i;return l&&(a=a.remove(new K(e.name,l))),a.insert(e,e.node)}});return new En(r,this.indexSet_)}removeFromIndexes(e,n){const r=Zl(this.indexes_,i=>{if(i===ui)return i;{const s=n.get(e.name);return s?i.remove(new K(e.name,s)):i}});return new En(r,this.indexSet_)}}/** * @license * Copyright 2017 Google LLC * @@ -1169,7 +1169,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */let Ss;class j{constructor(e,n,r){this.children_=e,this.priorityNode_=n,this.indexMap_=r,this.lazyHash_=null,this.priorityNode_&&jv(this.priorityNode_),this.children_.isEmpty()&&R(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}static get EMPTY_NODE(){return Ss||(Ss=new j(new dt(Bh),null,En.Default))}isLeafNode(){return!1}getPriority(){return this.priorityNode_||Ss}updatePriority(e){return this.children_.isEmpty()?this:new j(this.children_,e,this.indexMap_)}getImmediateChild(e){if(e===".priority")return this.getPriority();{const n=this.children_.get(e);return n===null?Ss:n}}getChild(e){const n=V(e);return n===null?this:this.getImmediateChild(n).getChild(se(e))}hasChild(e){return this.children_.get(e)!==null}updateImmediateChild(e,n){if(R(n,"We should always be passing snapshot nodes"),e===".priority")return this.updatePriority(n);{const r=new K(e,n);let i,s;n.isEmpty()?(i=this.children_.remove(e),s=this.indexMap_.removeFromIndexes(r,this.children_)):(i=this.children_.insert(e,n),s=this.indexMap_.addToIndexes(r,this.children_));const o=i.isEmpty()?Ss:this.priorityNode_;return new j(i,o,s)}}updateChild(e,n){const r=V(e);if(r===null)return n;{R(V(e)!==".priority"||hr(e)===1,".priority must be the last token in a path");const i=this.getImmediateChild(r).updateChild(se(e),n);return this.updateImmediateChild(r,i)}}isEmpty(){return this.children_.isEmpty()}numChildren(){return this.children_.count()}val(e){if(this.isEmpty())return null;const n={};let r=0,i=0,s=!0;if(this.forEachChild(ce,(o,l)=>{n[o]=l.val(e),r++,s&&j.INTEGER_REGEXP_.test(o)?i=Math.max(i,Number(o)):s=!1}),!e&&s&&i<2*r){const o=[];for(const l in n)o[l]=n[l];return o}else return e&&!this.getPriority().isEmpty()&&(n[".priority"]=this.getPriority().val()),n}hash(){if(this.lazyHash_===null){let e="";this.getPriority().isEmpty()||(e+="priority:"+Mv(this.getPriority().val())+":"),this.forEachChild(ce,(n,r)=>{const i=r.hash();i!==""&&(e+=":"+n+":"+i)}),this.lazyHash_=e===""?"":dv(e)}return this.lazyHash_}getPredecessorChildName(e,n,r){const i=this.resolveIndex_(r);if(i){const s=i.getPredecessorKey(new K(e,n));return s?s.name:null}else return this.children_.getPredecessorKey(e)}getFirstChildName(e){const n=this.resolveIndex_(e);if(n){const r=n.minKey();return r&&r.name}else return this.children_.minKey()}getFirstChild(e){const n=this.getFirstChildName(e);return n?new K(n,this.children_.get(n)):null}getLastChildName(e){const n=this.resolveIndex_(e);if(n){const r=n.maxKey();return r&&r.name}else return this.children_.maxKey()}getLastChild(e){const n=this.getLastChildName(e);return n?new K(n,this.children_.get(n)):null}forEachChild(e,n){const r=this.resolveIndex_(e);return r?r.inorderTraversal(i=>n(i.name,i.node)):this.children_.inorderTraversal(n)}getIterator(e){return this.getIteratorFrom(e.minPost(),e)}getIteratorFrom(e,n){const r=this.resolveIndex_(n);if(r)return r.getIteratorFrom(e,i=>i);{const i=this.children_.getIteratorFrom(e.name,K.Wrap);let s=i.peek();for(;s!=null&&n.compare(s,e)<0;)i.getNext(),s=i.peek();return i}}getReverseIterator(e){return this.getReverseIteratorFrom(e.maxPost(),e)}getReverseIteratorFrom(e,n){const r=this.resolveIndex_(n);if(r)return r.getReverseIteratorFrom(e,i=>i);{const i=this.children_.getReverseIteratorFrom(e.name,K.Wrap);let s=i.peek();for(;s!=null&&n.compare(s,e)>0;)i.getNext(),s=i.peek();return i}}compareTo(e){return this.isEmpty()?e.isEmpty()?0:-1:e.isLeafNode()||e.isEmpty()?1:e===Do?-1:0}withIndex(e){if(e===un||this.indexMap_.hasIndex(e))return this;{const n=this.indexMap_.addIndex(e,this.children_);return new j(this.children_,this.priorityNode_,n)}}isIndexed(e){return e===un||this.indexMap_.hasIndex(e)}equals(e){if(e===this)return!0;if(e.isLeafNode())return!1;{const n=e;if(this.getPriority().equals(n.getPriority()))if(this.children_.count()===n.children_.count()){const r=this.getIterator(ce),i=n.getIterator(ce);let s=r.getNext(),o=i.getNext();for(;s&&o;){if(s.name!==o.name||!s.node.equals(o.node))return!1;s=r.getNext(),o=i.getNext()}return s===null&&o===null}else return!1;else return!1}}resolveIndex_(e){return e===un?null:this.indexMap_.get(e.toString())}}j.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/;class Kk extends j{constructor(){super(new dt(Bh),j.EMPTY_NODE,En.Default)}compareTo(e){return e===this?0:1}equals(e){return e===this}getPriority(){return this}getImmediateChild(e){return j.EMPTY_NODE}isEmpty(){return!1}}const Do=new Kk;Object.defineProperties(K,{MIN:{value:new K(dr,j.EMPTY_NODE)},MAX:{value:new K(bn,Do)}});Lv.__EMPTY_NODE=j.EMPTY_NODE;je.__childrenNodeConstructor=j;$k(Do);Hk(Do);/** + */let ks;class j{constructor(e,n,r){this.children_=e,this.priorityNode_=n,this.indexMap_=r,this.lazyHash_=null,this.priorityNode_&&$v(this.priorityNode_),this.children_.isEmpty()&&R(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}static get EMPTY_NODE(){return ks||(ks=new j(new dt(Wh),null,En.Default))}isLeafNode(){return!1}getPriority(){return this.priorityNode_||ks}updatePriority(e){return this.children_.isEmpty()?this:new j(this.children_,e,this.indexMap_)}getImmediateChild(e){if(e===".priority")return this.getPriority();{const n=this.children_.get(e);return n===null?ks:n}}getChild(e){const n=V(e);return n===null?this:this.getImmediateChild(n).getChild(se(e))}hasChild(e){return this.children_.get(e)!==null}updateImmediateChild(e,n){if(R(n,"We should always be passing snapshot nodes"),e===".priority")return this.updatePriority(n);{const r=new K(e,n);let i,s;n.isEmpty()?(i=this.children_.remove(e),s=this.indexMap_.removeFromIndexes(r,this.children_)):(i=this.children_.insert(e,n),s=this.indexMap_.addToIndexes(r,this.children_));const o=i.isEmpty()?ks:this.priorityNode_;return new j(i,o,s)}}updateChild(e,n){const r=V(e);if(r===null)return n;{R(V(e)!==".priority"||pr(e)===1,".priority must be the last token in a path");const i=this.getImmediateChild(r).updateChild(se(e),n);return this.updateImmediateChild(r,i)}}isEmpty(){return this.children_.isEmpty()}numChildren(){return this.children_.count()}val(e){if(this.isEmpty())return null;const n={};let r=0,i=0,s=!0;if(this.forEachChild(ce,(o,l)=>{n[o]=l.val(e),r++,s&&j.INTEGER_REGEXP_.test(o)?i=Math.max(i,Number(o)):s=!1}),!e&&s&&i<2*r){const o=[];for(const l in n)o[l]=n[l];return o}else return e&&!this.getPriority().isEmpty()&&(n[".priority"]=this.getPriority().val()),n}hash(){if(this.lazyHash_===null){let e="";this.getPriority().isEmpty()||(e+="priority:"+zv(this.getPriority().val())+":"),this.forEachChild(ce,(n,r)=>{const i=r.hash();i!==""&&(e+=":"+n+":"+i)}),this.lazyHash_=e===""?"":gv(e)}return this.lazyHash_}getPredecessorChildName(e,n,r){const i=this.resolveIndex_(r);if(i){const s=i.getPredecessorKey(new K(e,n));return s?s.name:null}else return this.children_.getPredecessorKey(e)}getFirstChildName(e){const n=this.resolveIndex_(e);if(n){const r=n.minKey();return r&&r.name}else return this.children_.minKey()}getFirstChild(e){const n=this.getFirstChildName(e);return n?new K(n,this.children_.get(n)):null}getLastChildName(e){const n=this.resolveIndex_(e);if(n){const r=n.maxKey();return r&&r.name}else return this.children_.maxKey()}getLastChild(e){const n=this.getLastChildName(e);return n?new K(n,this.children_.get(n)):null}forEachChild(e,n){const r=this.resolveIndex_(e);return r?r.inorderTraversal(i=>n(i.name,i.node)):this.children_.inorderTraversal(n)}getIterator(e){return this.getIteratorFrom(e.minPost(),e)}getIteratorFrom(e,n){const r=this.resolveIndex_(n);if(r)return r.getIteratorFrom(e,i=>i);{const i=this.children_.getIteratorFrom(e.name,K.Wrap);let s=i.peek();for(;s!=null&&n.compare(s,e)<0;)i.getNext(),s=i.peek();return i}}getReverseIterator(e){return this.getReverseIteratorFrom(e.maxPost(),e)}getReverseIteratorFrom(e,n){const r=this.resolveIndex_(n);if(r)return r.getReverseIteratorFrom(e,i=>i);{const i=this.children_.getReverseIteratorFrom(e.name,K.Wrap);let s=i.peek();for(;s!=null&&n.compare(s,e)>0;)i.getNext(),s=i.peek();return i}}compareTo(e){return this.isEmpty()?e.isEmpty()?0:-1:e.isLeafNode()||e.isEmpty()?1:e===Oo?-1:0}withIndex(e){if(e===un||this.indexMap_.hasIndex(e))return this;{const n=this.indexMap_.addIndex(e,this.children_);return new j(this.children_,this.priorityNode_,n)}}isIndexed(e){return e===un||this.indexMap_.hasIndex(e)}equals(e){if(e===this)return!0;if(e.isLeafNode())return!1;{const n=e;if(this.getPriority().equals(n.getPriority()))if(this.children_.count()===n.children_.count()){const r=this.getIterator(ce),i=n.getIterator(ce);let s=r.getNext(),o=i.getNext();for(;s&&o;){if(s.name!==o.name||!s.node.equals(o.node))return!1;s=r.getNext(),o=i.getNext()}return s===null&&o===null}else return!1;else return!1}}resolveIndex_(e){return e===un?null:this.indexMap_.get(e.toString())}}j.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/;class iT extends j{constructor(){super(new dt(Wh),j.EMPTY_NODE,En.Default)}compareTo(e){return e===this?0:1}equals(e){return e===this}getPriority(){return this}getImmediateChild(e){return j.EMPTY_NODE}isEmpty(){return!1}}const Oo=new iT;Object.defineProperties(K,{MIN:{value:new K(fr,j.EMPTY_NODE)},MAX:{value:new K(Dn,Oo)}});Bv.__EMPTY_NODE=j.EMPTY_NODE;je.__childrenNodeConstructor=j;Jk(Oo);eT(Oo);/** * @license * Copyright 2017 Google LLC * @@ -1184,7 +1184,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const qk=!0;function ve(t,e=null){if(t===null)return j.EMPTY_NODE;if(typeof t=="object"&&".priority"in t&&(e=t[".priority"]),R(e===null||typeof e=="string"||typeof e=="number"||typeof e=="object"&&".sv"in e,"Invalid priority type found: "+typeof e),typeof t=="object"&&".value"in t&&t[".value"]!==null&&(t=t[".value"]),typeof t!="object"||".sv"in t){const n=t;return new je(n,ve(e))}if(!(t instanceof Array)&&qk){const n=[];let r=!1;if(We(t,(o,l)=>{if(o.substring(0,1)!=="."){const a=ve(l);a.isEmpty()||(r=r||!a.getPriority().isEmpty(),n.push(new K(o,a)))}}),n.length===0)return j.EMPTY_NODE;const s=ta(n,zk,o=>o.name,Bh);if(r){const o=ta(n,ce.getCompare());return new j(s,ve(e),new En({".priority":o},{".priority":ce}))}else return new j(s,ve(e),En.Default)}else{let n=j.EMPTY_NODE;return We(t,(r,i)=>{if(Ct(t,r)&&r.substring(0,1)!=="."){const s=ve(i);(s.isLeafNode()||!s.isEmpty())&&(n=n.updateImmediateChild(r,s))}}),n.updatePriority(ve(e))}}Wk(ve);/** + */const sT=!0;function ve(t,e=null){if(t===null)return j.EMPTY_NODE;if(typeof t=="object"&&".priority"in t&&(e=t[".priority"]),R(e===null||typeof e=="string"||typeof e=="number"||typeof e=="object"&&".sv"in e,"Invalid priority type found: "+typeof e),typeof t=="object"&&".value"in t&&t[".value"]!==null&&(t=t[".value"]),typeof t!="object"||".sv"in t){const n=t;return new je(n,ve(e))}if(!(t instanceof Array)&&sT){const n=[];let r=!1;if(We(t,(o,l)=>{if(o.substring(0,1)!=="."){const a=ve(l);a.isEmpty()||(r=r||!a.getPriority().isEmpty(),n.push(new K(o,a)))}}),n.length===0)return j.EMPTY_NODE;const s=ra(n,Xk,o=>o.name,Wh);if(r){const o=ra(n,ce.getCompare());return new j(s,ve(e),new En({".priority":o},{".priority":ce}))}else return new j(s,ve(e),En.Default)}else{let n=j.EMPTY_NODE;return We(t,(r,i)=>{if(Ct(t,r)&&r.substring(0,1)!=="."){const s=ve(i);(s.isLeafNode()||!s.isEmpty())&&(n=n.updateImmediateChild(r,s))}}),n.updatePriority(ve(e))}}Zk(ve);/** * @license * Copyright 2017 Google LLC * @@ -1199,7 +1199,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class zh extends Ba{constructor(e){super(),this.indexPath_=e,R(!G(e)&&V(e)!==".priority","Can't create PathIndex with empty path or .priority key")}extractChild(e){return e.getChild(this.indexPath_)}isDefinedOn(e){return!e.getChild(this.indexPath_).isEmpty()}compare(e,n){const r=this.extractChild(e.node),i=this.extractChild(n.node),s=r.compareTo(i);return s===0?ei(e.name,n.name):s}makePost(e,n){const r=ve(e),i=j.EMPTY_NODE.updateChild(this.indexPath_,r);return new K(n,i)}maxPost(){const e=j.EMPTY_NODE.updateChild(this.indexPath_,Do);return new K(bn,e)}toString(){return mo(this.indexPath_,0).join("/")}}/** + */class Hh extends Wa{constructor(e){super(),this.indexPath_=e,R(!G(e)&&V(e)!==".priority","Can't create PathIndex with empty path or .priority key")}extractChild(e){return e.getChild(this.indexPath_)}isDefinedOn(e){return!e.getChild(this.indexPath_).isEmpty()}compare(e,n){const r=this.extractChild(e.node),i=this.extractChild(n.node),s=r.compareTo(i);return s===0?ni(e.name,n.name):s}makePost(e,n){const r=ve(e),i=j.EMPTY_NODE.updateChild(this.indexPath_,r);return new K(n,i)}maxPost(){const e=j.EMPTY_NODE.updateChild(this.indexPath_,Oo);return new K(Dn,e)}toString(){return _o(this.indexPath_,0).join("/")}}/** * @license * Copyright 2017 Google LLC * @@ -1214,7 +1214,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class Yk extends Ba{compare(e,n){const r=e.node.compareTo(n.node);return r===0?ei(e.name,n.name):r}isDefinedOn(e){return!0}indexedValueChanged(e,n){return!e.equals(n)}minPost(){return K.MIN}maxPost(){return K.MAX}makePost(e,n){const r=ve(e);return new K(n,r)}toString(){return".value"}}const $h=new Yk;/** + */class oT extends Wa{compare(e,n){const r=e.node.compareTo(n.node);return r===0?ni(e.name,n.name):r}isDefinedOn(e){return!0}indexedValueChanged(e,n){return!e.equals(n)}minPost(){return K.MIN}maxPost(){return K.MAX}makePost(e,n){const r=ve(e);return new K(n,r)}toString(){return".value"}}const Vh=new oT;/** * @license * Copyright 2017 Google LLC * @@ -1229,7 +1229,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function Bv(t){return{type:"value",snapshotNode:t}}function Hi(t,e){return{type:"child_added",snapshotNode:e,childName:t}}function go(t,e){return{type:"child_removed",snapshotNode:e,childName:t}}function _o(t,e,n){return{type:"child_changed",snapshotNode:e,childName:t,oldSnap:n}}function Xk(t,e){return{type:"child_moved",snapshotNode:e,childName:t}}/** + */function Vv(t){return{type:"value",snapshotNode:t}}function Gi(t,e){return{type:"child_added",snapshotNode:e,childName:t}}function yo(t,e){return{type:"child_removed",snapshotNode:e,childName:t}}function vo(t,e,n){return{type:"child_changed",snapshotNode:e,childName:t,oldSnap:n}}function lT(t,e){return{type:"child_moved",snapshotNode:e,childName:t}}/** * @license * Copyright 2017 Google LLC * @@ -1244,7 +1244,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class Wh{constructor(e){this.index_=e}updateChild(e,n,r,i,s,o){R(e.isIndexed(this.index_),"A node must be indexed if only a child is updated");const l=e.getImmediateChild(n);return l.getChild(i).equals(r.getChild(i))&&l.isEmpty()===r.isEmpty()||(o!=null&&(r.isEmpty()?e.hasChild(n)?o.trackChildChange(go(n,l)):R(e.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):l.isEmpty()?o.trackChildChange(Hi(n,r)):o.trackChildChange(_o(n,r,l))),e.isLeafNode()&&r.isEmpty())?e:e.updateImmediateChild(n,r).withIndex(this.index_)}updateFullNode(e,n,r){return r!=null&&(e.isLeafNode()||e.forEachChild(ce,(i,s)=>{n.hasChild(i)||r.trackChildChange(go(i,s))}),n.isLeafNode()||n.forEachChild(ce,(i,s)=>{if(e.hasChild(i)){const o=e.getImmediateChild(i);o.equals(s)||r.trackChildChange(_o(i,s,o))}else r.trackChildChange(Hi(i,s))})),n.withIndex(this.index_)}updatePriority(e,n){return e.isEmpty()?j.EMPTY_NODE:e.updatePriority(n)}filtersNodes(){return!1}getIndexedFilter(){return this}getIndex(){return this.index_}}/** + */class Gh{constructor(e){this.index_=e}updateChild(e,n,r,i,s,o){R(e.isIndexed(this.index_),"A node must be indexed if only a child is updated");const l=e.getImmediateChild(n);return l.getChild(i).equals(r.getChild(i))&&l.isEmpty()===r.isEmpty()||(o!=null&&(r.isEmpty()?e.hasChild(n)?o.trackChildChange(yo(n,l)):R(e.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):l.isEmpty()?o.trackChildChange(Gi(n,r)):o.trackChildChange(vo(n,r,l))),e.isLeafNode()&&r.isEmpty())?e:e.updateImmediateChild(n,r).withIndex(this.index_)}updateFullNode(e,n,r){return r!=null&&(e.isLeafNode()||e.forEachChild(ce,(i,s)=>{n.hasChild(i)||r.trackChildChange(yo(i,s))}),n.isLeafNode()||n.forEachChild(ce,(i,s)=>{if(e.hasChild(i)){const o=e.getImmediateChild(i);o.equals(s)||r.trackChildChange(vo(i,s,o))}else r.trackChildChange(Gi(i,s))})),n.withIndex(this.index_)}updatePriority(e,n){return e.isEmpty()?j.EMPTY_NODE:e.updatePriority(n)}filtersNodes(){return!1}getIndexedFilter(){return this}getIndex(){return this.index_}}/** * @license * Copyright 2017 Google LLC * @@ -1259,7 +1259,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class yo{constructor(e){this.indexedFilter_=new Wh(e.getIndex()),this.index_=e.getIndex(),this.startPost_=yo.getStartPost_(e),this.endPost_=yo.getEndPost_(e),this.startIsInclusive_=!e.startAfterSet_,this.endIsInclusive_=!e.endBeforeSet_}getStartPost(){return this.startPost_}getEndPost(){return this.endPost_}matches(e){const n=this.startIsInclusive_?this.index_.compare(this.getStartPost(),e)<=0:this.index_.compare(this.getStartPost(),e)<0,r=this.endIsInclusive_?this.index_.compare(e,this.getEndPost())<=0:this.index_.compare(e,this.getEndPost())<0;return n&&r}updateChild(e,n,r,i,s,o){return this.matches(new K(n,r))||(r=j.EMPTY_NODE),this.indexedFilter_.updateChild(e,n,r,i,s,o)}updateFullNode(e,n,r){n.isLeafNode()&&(n=j.EMPTY_NODE);let i=n.withIndex(this.index_);i=i.updatePriority(j.EMPTY_NODE);const s=this;return n.forEachChild(ce,(o,l)=>{s.matches(new K(o,l))||(i=i.updateImmediateChild(o,j.EMPTY_NODE))}),this.indexedFilter_.updateFullNode(e,i,r)}updatePriority(e,n){return e}filtersNodes(){return!0}getIndexedFilter(){return this.indexedFilter_}getIndex(){return this.index_}static getStartPost_(e){if(e.hasStart()){const n=e.getIndexStartName();return e.getIndex().makePost(e.getIndexStartValue(),n)}else return e.getIndex().minPost()}static getEndPost_(e){if(e.hasEnd()){const n=e.getIndexEndName();return e.getIndex().makePost(e.getIndexEndValue(),n)}else return e.getIndex().maxPost()}}/** + */class wo{constructor(e){this.indexedFilter_=new Gh(e.getIndex()),this.index_=e.getIndex(),this.startPost_=wo.getStartPost_(e),this.endPost_=wo.getEndPost_(e),this.startIsInclusive_=!e.startAfterSet_,this.endIsInclusive_=!e.endBeforeSet_}getStartPost(){return this.startPost_}getEndPost(){return this.endPost_}matches(e){const n=this.startIsInclusive_?this.index_.compare(this.getStartPost(),e)<=0:this.index_.compare(this.getStartPost(),e)<0,r=this.endIsInclusive_?this.index_.compare(e,this.getEndPost())<=0:this.index_.compare(e,this.getEndPost())<0;return n&&r}updateChild(e,n,r,i,s,o){return this.matches(new K(n,r))||(r=j.EMPTY_NODE),this.indexedFilter_.updateChild(e,n,r,i,s,o)}updateFullNode(e,n,r){n.isLeafNode()&&(n=j.EMPTY_NODE);let i=n.withIndex(this.index_);i=i.updatePriority(j.EMPTY_NODE);const s=this;return n.forEachChild(ce,(o,l)=>{s.matches(new K(o,l))||(i=i.updateImmediateChild(o,j.EMPTY_NODE))}),this.indexedFilter_.updateFullNode(e,i,r)}updatePriority(e,n){return e}filtersNodes(){return!0}getIndexedFilter(){return this.indexedFilter_}getIndex(){return this.index_}static getStartPost_(e){if(e.hasStart()){const n=e.getIndexStartName();return e.getIndex().makePost(e.getIndexStartValue(),n)}else return e.getIndex().minPost()}static getEndPost_(e){if(e.hasEnd()){const n=e.getIndexEndName();return e.getIndex().makePost(e.getIndexEndValue(),n)}else return e.getIndex().maxPost()}}/** * @license * Copyright 2017 Google LLC * @@ -1274,7 +1274,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class Jk{constructor(e){this.withinDirectionalStart=n=>this.reverse_?this.withinEndPost(n):this.withinStartPost(n),this.withinDirectionalEnd=n=>this.reverse_?this.withinStartPost(n):this.withinEndPost(n),this.withinStartPost=n=>{const r=this.index_.compare(this.rangedFilter_.getStartPost(),n);return this.startIsInclusive_?r<=0:r<0},this.withinEndPost=n=>{const r=this.index_.compare(n,this.rangedFilter_.getEndPost());return this.endIsInclusive_?r<=0:r<0},this.rangedFilter_=new yo(e),this.index_=e.getIndex(),this.limit_=e.getLimit(),this.reverse_=!e.isViewFromLeft(),this.startIsInclusive_=!e.startAfterSet_,this.endIsInclusive_=!e.endBeforeSet_}updateChild(e,n,r,i,s,o){return this.rangedFilter_.matches(new K(n,r))||(r=j.EMPTY_NODE),e.getImmediateChild(n).equals(r)?e:e.numChildren()d(_,h)}else o=this.index_.getCompare();const l=e;R(l.numChildren()===this.limit_,"");const a=new K(n,r),u=this.reverse_?l.getFirstChild(this.index_):l.getLastChild(this.index_),c=this.rangedFilter_.matches(a);if(l.hasChild(n)){const d=l.getImmediateChild(n);let h=i.getChildAfterChild(this.index_,u,this.reverse_);for(;h!=null&&(h.name===n||l.hasChild(h.name));)h=i.getChildAfterChild(this.index_,h,this.reverse_);const _=h==null?1:o(h,a);if(c&&!r.isEmpty()&&_>=0)return s!=null&&s.trackChildChange(_o(n,r,d)),l.updateImmediateChild(n,r);{s!=null&&s.trackChildChange(go(n,d));const w=l.updateImmediateChild(n,j.EMPTY_NODE);return h!=null&&this.rangedFilter_.matches(h)?(s!=null&&s.trackChildChange(Hi(h.name,h.node)),w.updateImmediateChild(h.name,h.node)):w}}else return r.isEmpty()?e:c&&o(u,a)>=0?(s!=null&&(s.trackChildChange(go(u.name,u.node)),s.trackChildChange(Hi(n,r))),l.updateImmediateChild(n,r).updateImmediateChild(u.name,j.EMPTY_NODE)):e}}/** + */class aT{constructor(e){this.withinDirectionalStart=n=>this.reverse_?this.withinEndPost(n):this.withinStartPost(n),this.withinDirectionalEnd=n=>this.reverse_?this.withinStartPost(n):this.withinEndPost(n),this.withinStartPost=n=>{const r=this.index_.compare(this.rangedFilter_.getStartPost(),n);return this.startIsInclusive_?r<=0:r<0},this.withinEndPost=n=>{const r=this.index_.compare(n,this.rangedFilter_.getEndPost());return this.endIsInclusive_?r<=0:r<0},this.rangedFilter_=new wo(e),this.index_=e.getIndex(),this.limit_=e.getLimit(),this.reverse_=!e.isViewFromLeft(),this.startIsInclusive_=!e.startAfterSet_,this.endIsInclusive_=!e.endBeforeSet_}updateChild(e,n,r,i,s,o){return this.rangedFilter_.matches(new K(n,r))||(r=j.EMPTY_NODE),e.getImmediateChild(n).equals(r)?e:e.numChildren()d(_,h)}else o=this.index_.getCompare();const l=e;R(l.numChildren()===this.limit_,"");const a=new K(n,r),u=this.reverse_?l.getFirstChild(this.index_):l.getLastChild(this.index_),c=this.rangedFilter_.matches(a);if(l.hasChild(n)){const d=l.getImmediateChild(n);let h=i.getChildAfterChild(this.index_,u,this.reverse_);for(;h!=null&&(h.name===n||l.hasChild(h.name));)h=i.getChildAfterChild(this.index_,h,this.reverse_);const _=h==null?1:o(h,a);if(c&&!r.isEmpty()&&_>=0)return s!=null&&s.trackChildChange(vo(n,r,d)),l.updateImmediateChild(n,r);{s!=null&&s.trackChildChange(yo(n,d));const w=l.updateImmediateChild(n,j.EMPTY_NODE);return h!=null&&this.rangedFilter_.matches(h)?(s!=null&&s.trackChildChange(Gi(h.name,h.node)),w.updateImmediateChild(h.name,h.node)):w}}else return r.isEmpty()?e:c&&o(u,a)>=0?(s!=null&&(s.trackChildChange(yo(u.name,u.node)),s.trackChildChange(Gi(n,r))),l.updateImmediateChild(n,r).updateImmediateChild(u.name,j.EMPTY_NODE)):e}}/** * @license * Copyright 2017 Google LLC * @@ -1289,7 +1289,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class za{constructor(){this.limitSet_=!1,this.startSet_=!1,this.startNameSet_=!1,this.startAfterSet_=!1,this.endSet_=!1,this.endNameSet_=!1,this.endBeforeSet_=!1,this.limit_=0,this.viewFrom_="",this.indexStartValue_=null,this.indexStartName_="",this.indexEndValue_=null,this.indexEndName_="",this.index_=ce}hasStart(){return this.startSet_}isViewFromLeft(){return this.viewFrom_===""?this.startSet_:this.viewFrom_==="l"}getIndexStartValue(){return R(this.startSet_,"Only valid if start has been set"),this.indexStartValue_}getIndexStartName(){return R(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:dr}hasEnd(){return this.endSet_}getIndexEndValue(){return R(this.endSet_,"Only valid if end has been set"),this.indexEndValue_}getIndexEndName(){return R(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:bn}hasLimit(){return this.limitSet_}hasAnchoredLimit(){return this.limitSet_&&this.viewFrom_!==""}getLimit(){return R(this.limitSet_,"Only valid if limit has been set"),this.limit_}getIndex(){return this.index_}loadsAllData(){return!(this.startSet_||this.endSet_||this.limitSet_)}isDefault(){return this.loadsAllData()&&this.index_===ce}copy(){const e=new za;return e.limitSet_=this.limitSet_,e.limit_=this.limit_,e.startSet_=this.startSet_,e.startAfterSet_=this.startAfterSet_,e.indexStartValue_=this.indexStartValue_,e.startNameSet_=this.startNameSet_,e.indexStartName_=this.indexStartName_,e.endSet_=this.endSet_,e.endBeforeSet_=this.endBeforeSet_,e.indexEndValue_=this.indexEndValue_,e.endNameSet_=this.endNameSet_,e.indexEndName_=this.indexEndName_,e.index_=this.index_,e.viewFrom_=this.viewFrom_,e}}function Zk(t){return t.loadsAllData()?new Wh(t.getIndex()):t.hasLimit()?new Jk(t):new yo(t)}function eT(t,e){const n=t.copy();return n.limitSet_=!0,n.limit_=e,n.viewFrom_="l",n}function tT(t,e){const n=t.copy();return n.limitSet_=!0,n.limit_=e,n.viewFrom_="r",n}function pd(t,e,n){const r=t.copy();return r.startSet_=!0,e===void 0&&(e=null),r.indexStartValue_=e,n!=null?(r.startNameSet_=!0,r.indexStartName_=n):(r.startNameSet_=!1,r.indexStartName_=""),r}function nT(t,e,n){let r;return t.index_===un||n?r=pd(t,e,n):r=pd(t,e,bn),r.startAfterSet_=!0,r}function md(t,e,n){const r=t.copy();return r.endSet_=!0,e===void 0&&(e=null),r.indexEndValue_=e,n!==void 0?(r.endNameSet_=!0,r.indexEndName_=n):(r.endNameSet_=!1,r.indexEndName_=""),r}function rT(t,e,n){let r;return t.index_===un||n?r=md(t,e,n):r=md(t,e,dr),r.endBeforeSet_=!0,r}function $a(t,e){const n=t.copy();return n.index_=e,n}function Pm(t){const e={};if(t.isDefault())return e;let n;if(t.index_===ce?n="$priority":t.index_===$h?n="$value":t.index_===un?n="$key":(R(t.index_ instanceof zh,"Unrecognized index type!"),n=t.index_.toString()),e.orderBy=Ae(n),t.startSet_){const r=t.startAfterSet_?"startAfter":"startAt";e[r]=Ae(t.indexStartValue_),t.startNameSet_&&(e[r]+=","+Ae(t.indexStartName_))}if(t.endSet_){const r=t.endBeforeSet_?"endBefore":"endAt";e[r]=Ae(t.indexEndValue_),t.endNameSet_&&(e[r]+=","+Ae(t.indexEndName_))}return t.limitSet_&&(t.isViewFromLeft()?e.limitToFirst=t.limit_:e.limitToLast=t.limit_),e}function bm(t){const e={};if(t.startSet_&&(e.sp=t.indexStartValue_,t.startNameSet_&&(e.sn=t.indexStartName_),e.sin=!t.startAfterSet_),t.endSet_&&(e.ep=t.indexEndValue_,t.endNameSet_&&(e.en=t.indexEndName_),e.ein=!t.endBeforeSet_),t.limitSet_){e.l=t.limit_;let n=t.viewFrom_;n===""&&(t.isViewFromLeft()?n="l":n="r"),e.vf=n}return t.index_!==ce&&(e.i=t.index_.toString()),e}/** + */class Ha{constructor(){this.limitSet_=!1,this.startSet_=!1,this.startNameSet_=!1,this.startAfterSet_=!1,this.endSet_=!1,this.endNameSet_=!1,this.endBeforeSet_=!1,this.limit_=0,this.viewFrom_="",this.indexStartValue_=null,this.indexStartName_="",this.indexEndValue_=null,this.indexEndName_="",this.index_=ce}hasStart(){return this.startSet_}isViewFromLeft(){return this.viewFrom_===""?this.startSet_:this.viewFrom_==="l"}getIndexStartValue(){return R(this.startSet_,"Only valid if start has been set"),this.indexStartValue_}getIndexStartName(){return R(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:fr}hasEnd(){return this.endSet_}getIndexEndValue(){return R(this.endSet_,"Only valid if end has been set"),this.indexEndValue_}getIndexEndName(){return R(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:Dn}hasLimit(){return this.limitSet_}hasAnchoredLimit(){return this.limitSet_&&this.viewFrom_!==""}getLimit(){return R(this.limitSet_,"Only valid if limit has been set"),this.limit_}getIndex(){return this.index_}loadsAllData(){return!(this.startSet_||this.endSet_||this.limitSet_)}isDefault(){return this.loadsAllData()&&this.index_===ce}copy(){const e=new Ha;return e.limitSet_=this.limitSet_,e.limit_=this.limit_,e.startSet_=this.startSet_,e.startAfterSet_=this.startAfterSet_,e.indexStartValue_=this.indexStartValue_,e.startNameSet_=this.startNameSet_,e.indexStartName_=this.indexStartName_,e.endSet_=this.endSet_,e.endBeforeSet_=this.endBeforeSet_,e.indexEndValue_=this.indexEndValue_,e.endNameSet_=this.endNameSet_,e.indexEndName_=this.indexEndName_,e.index_=this.index_,e.viewFrom_=this.viewFrom_,e}}function uT(t){return t.loadsAllData()?new Gh(t.getIndex()):t.hasLimit()?new aT(t):new wo(t)}function cT(t,e){const n=t.copy();return n.limitSet_=!0,n.limit_=e,n.viewFrom_="l",n}function dT(t,e){const n=t.copy();return n.limitSet_=!0,n.limit_=e,n.viewFrom_="r",n}function _d(t,e,n){const r=t.copy();return r.startSet_=!0,e===void 0&&(e=null),r.indexStartValue_=e,n!=null?(r.startNameSet_=!0,r.indexStartName_=n):(r.startNameSet_=!1,r.indexStartName_=""),r}function hT(t,e,n){let r;return t.index_===un||n?r=_d(t,e,n):r=_d(t,e,Dn),r.startAfterSet_=!0,r}function yd(t,e,n){const r=t.copy();return r.endSet_=!0,e===void 0&&(e=null),r.indexEndValue_=e,n!==void 0?(r.endNameSet_=!0,r.indexEndName_=n):(r.endNameSet_=!1,r.indexEndName_=""),r}function fT(t,e,n){let r;return t.index_===un||n?r=yd(t,e,n):r=yd(t,e,fr),r.endBeforeSet_=!0,r}function Va(t,e){const n=t.copy();return n.index_=e,n}function Om(t){const e={};if(t.isDefault())return e;let n;if(t.index_===ce?n="$priority":t.index_===Vh?n="$value":t.index_===un?n="$key":(R(t.index_ instanceof Hh,"Unrecognized index type!"),n=t.index_.toString()),e.orderBy=Ae(n),t.startSet_){const r=t.startAfterSet_?"startAfter":"startAt";e[r]=Ae(t.indexStartValue_),t.startNameSet_&&(e[r]+=","+Ae(t.indexStartName_))}if(t.endSet_){const r=t.endBeforeSet_?"endBefore":"endAt";e[r]=Ae(t.indexEndValue_),t.endNameSet_&&(e[r]+=","+Ae(t.indexEndName_))}return t.limitSet_&&(t.isViewFromLeft()?e.limitToFirst=t.limit_:e.limitToLast=t.limit_),e}function Lm(t){const e={};if(t.startSet_&&(e.sp=t.indexStartValue_,t.startNameSet_&&(e.sn=t.indexStartName_),e.sin=!t.startAfterSet_),t.endSet_&&(e.ep=t.indexEndValue_,t.endNameSet_&&(e.en=t.indexEndName_),e.ein=!t.endBeforeSet_),t.limitSet_){e.l=t.limit_;let n=t.viewFrom_;n===""&&(t.isViewFromLeft()?n="l":n="r"),e.vf=n}return t.index_!==ce&&(e.i=t.index_.toString()),e}/** * @license * Copyright 2017 Google LLC * @@ -1304,7 +1304,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class na extends bv{constructor(e,n,r,i){super(),this.repoInfo_=e,this.onDataUpdate_=n,this.authTokenProvider_=r,this.appCheckTokenProvider_=i,this.log_=bo("p:rest:"),this.listens_={}}reportStats(e){throw new Error("Method not implemented.")}static getListenId_(e,n){return n!==void 0?"tag$"+n:(R(e._queryParams.isDefault(),"should have a tag if it's not a default query."),e._path.toString())}listen(e,n,r,i){const s=e._path.toString();this.log_("Listen called for "+s+" "+e._queryIdentifier);const o=na.getListenId_(e,r),l={};this.listens_[o]=l;const a=Pm(e._queryParams);this.restRequest_(s+".json",a,(u,c)=>{let d=c;if(u===404&&(d=null,u=null),u===null&&this.onDataUpdate_(s,d,!1,r),Wr(this.listens_,o)===l){let h;u?u===401?h="permission_denied":h="rest_error:"+u:h="ok",i(h,null)}})}unlisten(e,n){const r=na.getListenId_(e,n);delete this.listens_[r]}get(e){const n=Pm(e._queryParams),r=e._path.toString(),i=new ut;return this.restRequest_(r+".json",n,(s,o)=>{let l=o;s===404&&(l=null,s=null),s===null?(this.onDataUpdate_(r,l,!1,null),i.resolve(l)):i.reject(new Error(l))}),i.promise}refreshAuthToken(e){}restRequest_(e,n={},r){return n.format="export",Promise.all([this.authTokenProvider_.getToken(!1),this.appCheckTokenProvider_.getToken(!1)]).then(([i,s])=>{i&&i.accessToken&&(n.auth=i.accessToken),s&&s.token&&(n.ac=s.token);const o=(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host+e+"?ns="+this.repoInfo_.namespace+Sx(n);this.log_("Sending REST request for "+o);const l=new XMLHttpRequest;l.onreadystatechange=()=>{if(r&&l.readyState===4){this.log_("REST Response for "+o+" received. status:",l.status,"response:",l.responseText);let a=null;if(l.status>=200&&l.status<300){try{a=ho(l.responseText)}catch{Ze("Failed to parse JSON response for "+o+": "+l.responseText)}r(null,a)}else l.status!==401&&l.status!==404&&Ze("Got unsuccessful REST response for "+o+" Status: "+l.status),r(l.status);r=null}},l.open("GET",o,!0),l.send()})}}/** + */class ia extends Mv{constructor(e,n,r,i){super(),this.repoInfo_=e,this.onDataUpdate_=n,this.authTokenProvider_=r,this.appCheckTokenProvider_=i,this.log_=Ao("p:rest:"),this.listens_={}}reportStats(e){throw new Error("Method not implemented.")}static getListenId_(e,n){return n!==void 0?"tag$"+n:(R(e._queryParams.isDefault(),"should have a tag if it's not a default query."),e._path.toString())}listen(e,n,r,i){const s=e._path.toString();this.log_("Listen called for "+s+" "+e._queryIdentifier);const o=ia.getListenId_(e,r),l={};this.listens_[o]=l;const a=Om(e._queryParams);this.restRequest_(s+".json",a,(u,c)=>{let d=c;if(u===404&&(d=null,u=null),u===null&&this.onDataUpdate_(s,d,!1,r),Vr(this.listens_,o)===l){let h;u?u===401?h="permission_denied":h="rest_error:"+u:h="ok",i(h,null)}})}unlisten(e,n){const r=ia.getListenId_(e,n);delete this.listens_[r]}get(e){const n=Om(e._queryParams),r=e._path.toString(),i=new ut;return this.restRequest_(r+".json",n,(s,o)=>{let l=o;s===404&&(l=null,s=null),s===null?(this.onDataUpdate_(r,l,!1,null),i.resolve(l)):i.reject(new Error(l))}),i.promise}refreshAuthToken(e){}restRequest_(e,n={},r){return n.format="export",Promise.all([this.authTokenProvider_.getToken(!1),this.appCheckTokenProvider_.getToken(!1)]).then(([i,s])=>{i&&i.accessToken&&(n.auth=i.accessToken),s&&s.token&&(n.ac=s.token);const o=(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host+e+"?ns="+this.repoInfo_.namespace+Ax(n);this.log_("Sending REST request for "+o);const l=new XMLHttpRequest;l.onreadystatechange=()=>{if(r&&l.readyState===4){this.log_("REST Response for "+o+" received. status:",l.status,"response:",l.responseText);let a=null;if(l.status>=200&&l.status<300){try{a=po(l.responseText)}catch{Ze("Failed to parse JSON response for "+o+": "+l.responseText)}r(null,a)}else l.status!==401&&l.status!==404&&Ze("Got unsuccessful REST response for "+o+" Status: "+l.status),r(l.status);r=null}},l.open("GET",o,!0),l.send()})}}/** * @license * Copyright 2017 Google LLC * @@ -1319,7 +1319,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class iT{constructor(){this.rootNode_=j.EMPTY_NODE}getNode(e){return this.rootNode_.getChild(e)}updateSnapshot(e,n){this.rootNode_=this.rootNode_.updateChild(e,n)}}/** + */class pT{constructor(){this.rootNode_=j.EMPTY_NODE}getNode(e){return this.rootNode_.getChild(e)}updateSnapshot(e,n){this.rootNode_=this.rootNode_.updateChild(e,n)}}/** * @license * Copyright 2017 Google LLC * @@ -1334,7 +1334,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function ra(){return{value:null,children:new Map}}function ns(t,e,n){if(G(e))t.value=n,t.children.clear();else if(t.value!==null)t.value=t.value.updateChild(e,n);else{const r=V(e);t.children.has(r)||t.children.set(r,ra());const i=t.children.get(r);e=se(e),ns(i,e,n)}}function gd(t,e){if(G(e))return t.value=null,t.children.clear(),!0;if(t.value!==null){if(t.value.isLeafNode())return!1;{const n=t.value;return t.value=null,n.forEachChild(ce,(r,i)=>{ns(t,new Z(r),i)}),gd(t,e)}}else if(t.children.size>0){const n=V(e);return e=se(e),t.children.has(n)&&gd(t.children.get(n),e)&&t.children.delete(n),t.children.size===0}else return!0}function _d(t,e,n){t.value!==null?n(e,t.value):sT(t,(r,i)=>{const s=new Z(e.toString()+"/"+r);_d(i,s,n)})}function sT(t,e){t.children.forEach((n,r)=>{e(r,n)})}/** + */function sa(){return{value:null,children:new Map}}function is(t,e,n){if(G(e))t.value=n,t.children.clear();else if(t.value!==null)t.value=t.value.updateChild(e,n);else{const r=V(e);t.children.has(r)||t.children.set(r,sa());const i=t.children.get(r);e=se(e),is(i,e,n)}}function vd(t,e){if(G(e))return t.value=null,t.children.clear(),!0;if(t.value!==null){if(t.value.isLeafNode())return!1;{const n=t.value;return t.value=null,n.forEachChild(ce,(r,i)=>{is(t,new Z(r),i)}),vd(t,e)}}else if(t.children.size>0){const n=V(e);return e=se(e),t.children.has(n)&&vd(t.children.get(n),e)&&t.children.delete(n),t.children.size===0}else return!0}function wd(t,e,n){t.value!==null?n(e,t.value):mT(t,(r,i)=>{const s=new Z(e.toString()+"/"+r);wd(i,s,n)})}function mT(t,e){t.children.forEach((n,r)=>{e(r,n)})}/** * @license * Copyright 2017 Google LLC * @@ -1349,7 +1349,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class oT{constructor(e){this.collection_=e,this.last_=null}get(){const e=this.collection_.get(),n=Object.assign({},e);return this.last_&&We(this.last_,(r,i)=>{n[r]=n[r]-i}),this.last_=e,n}}/** + */class gT{constructor(e){this.collection_=e,this.last_=null}get(){const e=this.collection_.get(),n=Object.assign({},e);return this.last_&&We(this.last_,(r,i)=>{n[r]=n[r]-i}),this.last_=e,n}}/** * @license * Copyright 2017 Google LLC * @@ -1364,7 +1364,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const Dm=10*1e3,lT=30*1e3,aT=5*60*1e3;class uT{constructor(e,n){this.server_=n,this.statsToReport_={},this.statsListener_=new oT(e);const r=Dm+(lT-Dm)*Math.random();Bs(this.reportStats_.bind(this),Math.floor(r))}reportStats_(){const e=this.statsListener_.get(),n={};let r=!1;We(e,(i,s)=>{s>0&&Ct(this.statsToReport_,i)&&(n[i]=s,r=!0)}),r&&this.server_.reportStats(n),Bs(this.reportStats_.bind(this),Math.floor(Math.random()*2*aT))}}/** + */const Mm=10*1e3,_T=30*1e3,yT=5*60*1e3;class vT{constructor(e,n){this.server_=n,this.statsToReport_={},this.statsListener_=new gT(e);const r=Mm+(_T-Mm)*Math.random();$s(this.reportStats_.bind(this),Math.floor(r))}reportStats_(){const e=this.statsListener_.get(),n={};let r=!1;We(e,(i,s)=>{s>0&&Ct(this.statsToReport_,i)&&(n[i]=s,r=!0)}),r&&this.server_.reportStats(n),$s(this.reportStats_.bind(this),Math.floor(Math.random()*2*yT))}}/** * @license * Copyright 2017 Google LLC * @@ -1379,7 +1379,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var Vt;(function(t){t[t.OVERWRITE=0]="OVERWRITE",t[t.MERGE=1]="MERGE",t[t.ACK_USER_WRITE=2]="ACK_USER_WRITE",t[t.LISTEN_COMPLETE=3]="LISTEN_COMPLETE"})(Vt||(Vt={}));function Hh(){return{fromUser:!0,fromServer:!1,queryId:null,tagged:!1}}function Vh(){return{fromUser:!1,fromServer:!0,queryId:null,tagged:!1}}function Gh(t){return{fromUser:!1,fromServer:!0,queryId:t,tagged:!0}}/** + */var Vt;(function(t){t[t.OVERWRITE=0]="OVERWRITE",t[t.MERGE=1]="MERGE",t[t.ACK_USER_WRITE=2]="ACK_USER_WRITE",t[t.LISTEN_COMPLETE=3]="LISTEN_COMPLETE"})(Vt||(Vt={}));function Qh(){return{fromUser:!0,fromServer:!1,queryId:null,tagged:!1}}function Kh(){return{fromUser:!1,fromServer:!0,queryId:null,tagged:!1}}function qh(t){return{fromUser:!1,fromServer:!0,queryId:t,tagged:!0}}/** * @license * Copyright 2017 Google LLC * @@ -1394,7 +1394,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class ia{constructor(e,n,r){this.path=e,this.affectedTree=n,this.revert=r,this.type=Vt.ACK_USER_WRITE,this.source=Hh()}operationForChild(e){if(G(this.path)){if(this.affectedTree.value!=null)return R(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;{const n=this.affectedTree.subtree(new Z(e));return new ia(J(),n,this.revert)}}else return R(V(this.path)===e,"operationForChild called for unrelated child."),new ia(se(this.path),this.affectedTree,this.revert)}}/** + */class oa{constructor(e,n,r){this.path=e,this.affectedTree=n,this.revert=r,this.type=Vt.ACK_USER_WRITE,this.source=Qh()}operationForChild(e){if(G(this.path)){if(this.affectedTree.value!=null)return R(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;{const n=this.affectedTree.subtree(new Z(e));return new oa(J(),n,this.revert)}}else return R(V(this.path)===e,"operationForChild called for unrelated child."),new oa(se(this.path),this.affectedTree,this.revert)}}/** * @license * Copyright 2017 Google LLC * @@ -1409,7 +1409,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class vo{constructor(e,n){this.source=e,this.path=n,this.type=Vt.LISTEN_COMPLETE}operationForChild(e){return G(this.path)?new vo(this.source,J()):new vo(this.source,se(this.path))}}/** + */class Eo{constructor(e,n){this.source=e,this.path=n,this.type=Vt.LISTEN_COMPLETE}operationForChild(e){return G(this.path)?new Eo(this.source,J()):new Eo(this.source,se(this.path))}}/** * @license * Copyright 2017 Google LLC * @@ -1424,7 +1424,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class Gr{constructor(e,n,r){this.source=e,this.path=n,this.snap=r,this.type=Vt.OVERWRITE}operationForChild(e){return G(this.path)?new Gr(this.source,J(),this.snap.getImmediateChild(e)):new Gr(this.source,se(this.path),this.snap)}}/** + */class Kr{constructor(e,n,r){this.source=e,this.path=n,this.snap=r,this.type=Vt.OVERWRITE}operationForChild(e){return G(this.path)?new Kr(this.source,J(),this.snap.getImmediateChild(e)):new Kr(this.source,se(this.path),this.snap)}}/** * @license * Copyright 2017 Google LLC * @@ -1439,7 +1439,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class Vi{constructor(e,n,r){this.source=e,this.path=n,this.children=r,this.type=Vt.MERGE}operationForChild(e){if(G(this.path)){const n=this.children.subtree(new Z(e));return n.isEmpty()?null:n.value?new Gr(this.source,J(),n.value):new Vi(this.source,J(),n)}else return R(V(this.path)===e,"Can't get a merge for a child not on the path of the operation"),new Vi(this.source,se(this.path),this.children)}toString(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"}}/** + */class Qi{constructor(e,n,r){this.source=e,this.path=n,this.children=r,this.type=Vt.MERGE}operationForChild(e){if(G(this.path)){const n=this.children.subtree(new Z(e));return n.isEmpty()?null:n.value?new Kr(this.source,J(),n.value):new Qi(this.source,J(),n)}else return R(V(this.path)===e,"Can't get a merge for a child not on the path of the operation"),new Qi(this.source,se(this.path),this.children)}toString(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"}}/** * @license * Copyright 2017 Google LLC * @@ -1454,7 +1454,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class fr{constructor(e,n,r){this.node_=e,this.fullyInitialized_=n,this.filtered_=r}isFullyInitialized(){return this.fullyInitialized_}isFiltered(){return this.filtered_}isCompleteForPath(e){if(G(e))return this.isFullyInitialized()&&!this.filtered_;const n=V(e);return this.isCompleteForChild(n)}isCompleteForChild(e){return this.isFullyInitialized()&&!this.filtered_||this.node_.hasChild(e)}getNode(){return this.node_}}/** + */class mr{constructor(e,n,r){this.node_=e,this.fullyInitialized_=n,this.filtered_=r}isFullyInitialized(){return this.fullyInitialized_}isFiltered(){return this.filtered_}isCompleteForPath(e){if(G(e))return this.isFullyInitialized()&&!this.filtered_;const n=V(e);return this.isCompleteForChild(n)}isCompleteForChild(e){return this.isFullyInitialized()&&!this.filtered_||this.node_.hasChild(e)}getNode(){return this.node_}}/** * @license * Copyright 2017 Google LLC * @@ -1469,7 +1469,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class cT{constructor(e){this.query_=e,this.index_=this.query_._queryParams.getIndex()}}function dT(t,e,n,r){const i=[],s=[];return e.forEach(o=>{o.type==="child_changed"&&t.index_.indexedValueChanged(o.oldSnap,o.snapshotNode)&&s.push(Xk(o.childName,o.snapshotNode))}),xs(t,i,"child_removed",e,r,n),xs(t,i,"child_added",e,r,n),xs(t,i,"child_moved",s,r,n),xs(t,i,"child_changed",e,r,n),xs(t,i,"value",e,r,n),i}function xs(t,e,n,r,i,s){const o=r.filter(l=>l.type===n);o.sort((l,a)=>fT(t,l,a)),o.forEach(l=>{const a=hT(t,l,s);i.forEach(u=>{u.respondsTo(l.type)&&e.push(u.createEvent(a,t.query_))})})}function hT(t,e,n){return e.type==="value"||e.type==="child_removed"||(e.prevName=n.getPredecessorChildName(e.childName,e.snapshotNode,t.index_)),e}function fT(t,e,n){if(e.childName==null||n.childName==null)throw Zi("Should only compare child_ events.");const r=new K(e.childName,e.snapshotNode),i=new K(n.childName,n.snapshotNode);return t.index_.compare(r,i)}/** + */class wT{constructor(e){this.query_=e,this.index_=this.query_._queryParams.getIndex()}}function ET(t,e,n,r){const i=[],s=[];return e.forEach(o=>{o.type==="child_changed"&&t.index_.indexedValueChanged(o.oldSnap,o.snapshotNode)&&s.push(lT(o.childName,o.snapshotNode))}),Ts(t,i,"child_removed",e,r,n),Ts(t,i,"child_added",e,r,n),Ts(t,i,"child_moved",s,r,n),Ts(t,i,"child_changed",e,r,n),Ts(t,i,"value",e,r,n),i}function Ts(t,e,n,r,i,s){const o=r.filter(l=>l.type===n);o.sort((l,a)=>ST(t,l,a)),o.forEach(l=>{const a=CT(t,l,s);i.forEach(u=>{u.respondsTo(l.type)&&e.push(u.createEvent(a,t.query_))})})}function CT(t,e,n){return e.type==="value"||e.type==="child_removed"||(e.prevName=n.getPredecessorChildName(e.childName,e.snapshotNode,t.index_)),e}function ST(t,e,n){if(e.childName==null||n.childName==null)throw ts("Should only compare child_ events.");const r=new K(e.childName,e.snapshotNode),i=new K(n.childName,n.snapshotNode);return t.index_.compare(r,i)}/** * @license * Copyright 2017 Google LLC * @@ -1484,7 +1484,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function Wa(t,e){return{eventCache:t,serverCache:e}}function zs(t,e,n,r){return Wa(new fr(e,n,r),t.serverCache)}function zv(t,e,n,r){return Wa(t.eventCache,new fr(e,n,r))}function sa(t){return t.eventCache.isFullyInitialized()?t.eventCache.getNode():null}function Qr(t){return t.serverCache.isFullyInitialized()?t.serverCache.getNode():null}/** + */function Ga(t,e){return{eventCache:t,serverCache:e}}function Ws(t,e,n,r){return Ga(new mr(e,n,r),t.serverCache)}function Gv(t,e,n,r){return Ga(t.eventCache,new mr(e,n,r))}function la(t){return t.eventCache.isFullyInitialized()?t.eventCache.getNode():null}function qr(t){return t.serverCache.isFullyInitialized()?t.serverCache.getNode():null}/** * @license * Copyright 2017 Google LLC * @@ -1499,7 +1499,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */let ec;const pT=()=>(ec||(ec=new dt(Y1)),ec);class ae{constructor(e,n=pT()){this.value=e,this.children=n}static fromObject(e){let n=new ae(null);return We(e,(r,i)=>{n=n.set(new Z(r),i)}),n}isEmpty(){return this.value===null&&this.children.isEmpty()}findRootMostMatchingPathAndValue(e,n){if(this.value!=null&&n(this.value))return{path:J(),value:this.value};if(G(e))return null;{const r=V(e),i=this.children.get(r);if(i!==null){const s=i.findRootMostMatchingPathAndValue(se(e),n);return s!=null?{path:ge(new Z(r),s.path),value:s.value}:null}else return null}}findRootMostValueAndPath(e){return this.findRootMostMatchingPathAndValue(e,()=>!0)}subtree(e){if(G(e))return this;{const n=V(e),r=this.children.get(n);return r!==null?r.subtree(se(e)):new ae(null)}}set(e,n){if(G(e))return new ae(n,this.children);{const r=V(e),s=(this.children.get(r)||new ae(null)).set(se(e),n),o=this.children.insert(r,s);return new ae(this.value,o)}}remove(e){if(G(e))return this.children.isEmpty()?new ae(null):new ae(null,this.children);{const n=V(e),r=this.children.get(n);if(r){const i=r.remove(se(e));let s;return i.isEmpty()?s=this.children.remove(n):s=this.children.insert(n,i),this.value===null&&s.isEmpty()?new ae(null):new ae(this.value,s)}else return this}}get(e){if(G(e))return this.value;{const n=V(e),r=this.children.get(n);return r?r.get(se(e)):null}}setTree(e,n){if(G(e))return n;{const r=V(e),s=(this.children.get(r)||new ae(null)).setTree(se(e),n);let o;return s.isEmpty()?o=this.children.remove(r):o=this.children.insert(r,s),new ae(this.value,o)}}fold(e){return this.fold_(J(),e)}fold_(e,n){const r={};return this.children.inorderTraversal((i,s)=>{r[i]=s.fold_(ge(e,i),n)}),n(e,this.value,r)}findOnPath(e,n){return this.findOnPath_(e,J(),n)}findOnPath_(e,n,r){const i=this.value?r(n,this.value):!1;if(i)return i;if(G(e))return null;{const s=V(e),o=this.children.get(s);return o?o.findOnPath_(se(e),ge(n,s),r):null}}foreachOnPath(e,n){return this.foreachOnPath_(e,J(),n)}foreachOnPath_(e,n,r){if(G(e))return this;{this.value&&r(n,this.value);const i=V(e),s=this.children.get(i);return s?s.foreachOnPath_(se(e),ge(n,i),r):new ae(null)}}foreach(e){this.foreach_(J(),e)}foreach_(e,n){this.children.inorderTraversal((r,i)=>{i.foreach_(ge(e,r),n)}),this.value&&n(e,this.value)}foreachChild(e){this.children.inorderTraversal((n,r)=>{r.value&&e(n,r.value)})}}/** + */let rc;const xT=()=>(rc||(rc=new dt(ok)),rc);class ae{constructor(e,n=xT()){this.value=e,this.children=n}static fromObject(e){let n=new ae(null);return We(e,(r,i)=>{n=n.set(new Z(r),i)}),n}isEmpty(){return this.value===null&&this.children.isEmpty()}findRootMostMatchingPathAndValue(e,n){if(this.value!=null&&n(this.value))return{path:J(),value:this.value};if(G(e))return null;{const r=V(e),i=this.children.get(r);if(i!==null){const s=i.findRootMostMatchingPathAndValue(se(e),n);return s!=null?{path:ge(new Z(r),s.path),value:s.value}:null}else return null}}findRootMostValueAndPath(e){return this.findRootMostMatchingPathAndValue(e,()=>!0)}subtree(e){if(G(e))return this;{const n=V(e),r=this.children.get(n);return r!==null?r.subtree(se(e)):new ae(null)}}set(e,n){if(G(e))return new ae(n,this.children);{const r=V(e),s=(this.children.get(r)||new ae(null)).set(se(e),n),o=this.children.insert(r,s);return new ae(this.value,o)}}remove(e){if(G(e))return this.children.isEmpty()?new ae(null):new ae(null,this.children);{const n=V(e),r=this.children.get(n);if(r){const i=r.remove(se(e));let s;return i.isEmpty()?s=this.children.remove(n):s=this.children.insert(n,i),this.value===null&&s.isEmpty()?new ae(null):new ae(this.value,s)}else return this}}get(e){if(G(e))return this.value;{const n=V(e),r=this.children.get(n);return r?r.get(se(e)):null}}setTree(e,n){if(G(e))return n;{const r=V(e),s=(this.children.get(r)||new ae(null)).setTree(se(e),n);let o;return s.isEmpty()?o=this.children.remove(r):o=this.children.insert(r,s),new ae(this.value,o)}}fold(e){return this.fold_(J(),e)}fold_(e,n){const r={};return this.children.inorderTraversal((i,s)=>{r[i]=s.fold_(ge(e,i),n)}),n(e,this.value,r)}findOnPath(e,n){return this.findOnPath_(e,J(),n)}findOnPath_(e,n,r){const i=this.value?r(n,this.value):!1;if(i)return i;if(G(e))return null;{const s=V(e),o=this.children.get(s);return o?o.findOnPath_(se(e),ge(n,s),r):null}}foreachOnPath(e,n){return this.foreachOnPath_(e,J(),n)}foreachOnPath_(e,n,r){if(G(e))return this;{this.value&&r(n,this.value);const i=V(e),s=this.children.get(i);return s?s.foreachOnPath_(se(e),ge(n,i),r):new ae(null)}}foreach(e){this.foreach_(J(),e)}foreach_(e,n){this.children.inorderTraversal((r,i)=>{i.foreach_(ge(e,r),n)}),this.value&&n(e,this.value)}foreachChild(e){this.children.inorderTraversal((n,r)=>{r.value&&e(n,r.value)})}}/** * @license * Copyright 2017 Google LLC * @@ -1514,7 +1514,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class Kt{constructor(e){this.writeTree_=e}static empty(){return new Kt(new ae(null))}}function $s(t,e,n){if(G(e))return new Kt(new ae(n));{const r=t.writeTree_.findRootMostValueAndPath(e);if(r!=null){const i=r.path;let s=r.value;const o=it(i,e);return s=s.updateChild(o,n),new Kt(t.writeTree_.set(i,s))}else{const i=new ae(n),s=t.writeTree_.setTree(e,i);return new Kt(s)}}}function yd(t,e,n){let r=t;return We(n,(i,s)=>{r=$s(r,ge(e,i),s)}),r}function Am(t,e){if(G(e))return Kt.empty();{const n=t.writeTree_.setTree(e,new ae(null));return new Kt(n)}}function vd(t,e){return ti(t,e)!=null}function ti(t,e){const n=t.writeTree_.findRootMostValueAndPath(e);return n!=null?t.writeTree_.get(n.path).getChild(it(n.path,e)):null}function Om(t){const e=[],n=t.writeTree_.value;return n!=null?n.isLeafNode()||n.forEachChild(ce,(r,i)=>{e.push(new K(r,i))}):t.writeTree_.children.inorderTraversal((r,i)=>{i.value!=null&&e.push(new K(r,i.value))}),e}function ir(t,e){if(G(e))return t;{const n=ti(t,e);return n!=null?new Kt(new ae(n)):new Kt(t.writeTree_.subtree(e))}}function wd(t){return t.writeTree_.isEmpty()}function Gi(t,e){return $v(J(),t.writeTree_,e)}function $v(t,e,n){if(e.value!=null)return n.updateChild(t,e.value);{let r=null;return e.children.inorderTraversal((i,s)=>{i===".priority"?(R(s.value!==null,"Priority writes must always be leaf nodes"),r=s.value):n=$v(ge(t,i),s,n)}),!n.getChild(t).isEmpty()&&r!==null&&(n=n.updateChild(ge(t,".priority"),r)),n}}/** + */class Kt{constructor(e){this.writeTree_=e}static empty(){return new Kt(new ae(null))}}function Hs(t,e,n){if(G(e))return new Kt(new ae(n));{const r=t.writeTree_.findRootMostValueAndPath(e);if(r!=null){const i=r.path;let s=r.value;const o=it(i,e);return s=s.updateChild(o,n),new Kt(t.writeTree_.set(i,s))}else{const i=new ae(n),s=t.writeTree_.setTree(e,i);return new Kt(s)}}}function Ed(t,e,n){let r=t;return We(n,(i,s)=>{r=Hs(r,ge(e,i),s)}),r}function jm(t,e){if(G(e))return Kt.empty();{const n=t.writeTree_.setTree(e,new ae(null));return new Kt(n)}}function Cd(t,e){return ri(t,e)!=null}function ri(t,e){const n=t.writeTree_.findRootMostValueAndPath(e);return n!=null?t.writeTree_.get(n.path).getChild(it(n.path,e)):null}function Fm(t){const e=[],n=t.writeTree_.value;return n!=null?n.isLeafNode()||n.forEachChild(ce,(r,i)=>{e.push(new K(r,i))}):t.writeTree_.children.inorderTraversal((r,i)=>{i.value!=null&&e.push(new K(r,i.value))}),e}function or(t,e){if(G(e))return t;{const n=ri(t,e);return n!=null?new Kt(new ae(n)):new Kt(t.writeTree_.subtree(e))}}function Sd(t){return t.writeTree_.isEmpty()}function Ki(t,e){return Qv(J(),t.writeTree_,e)}function Qv(t,e,n){if(e.value!=null)return n.updateChild(t,e.value);{let r=null;return e.children.inorderTraversal((i,s)=>{i===".priority"?(R(s.value!==null,"Priority writes must always be leaf nodes"),r=s.value):n=Qv(ge(t,i),s,n)}),!n.getChild(t).isEmpty()&&r!==null&&(n=n.updateChild(ge(t,".priority"),r)),n}}/** * @license * Copyright 2017 Google LLC * @@ -1529,7 +1529,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function Ha(t,e){return Gv(e,t)}function mT(t,e,n,r,i){R(r>t.lastWriteId,"Stacking an older write on top of newer ones"),i===void 0&&(i=!0),t.allWrites.push({path:e,snap:n,writeId:r,visible:i}),i&&(t.visibleWrites=$s(t.visibleWrites,e,n)),t.lastWriteId=r}function gT(t,e,n,r){R(r>t.lastWriteId,"Stacking an older merge on top of newer ones"),t.allWrites.push({path:e,children:n,writeId:r,visible:!0}),t.visibleWrites=yd(t.visibleWrites,e,n),t.lastWriteId=r}function _T(t,e){for(let n=0;nl.writeId===e);R(n>=0,"removeWrite called with nonexistent writeId.");const r=t.allWrites[n];t.allWrites.splice(n,1);let i=r.visible,s=!1,o=t.allWrites.length-1;for(;i&&o>=0;){const l=t.allWrites[o];l.visible&&(o>=n&&vT(l,r.path)?i=!1:bt(r.path,l.path)&&(s=!0)),o--}if(i){if(s)return wT(t),!0;if(r.snap)t.visibleWrites=Am(t.visibleWrites,r.path);else{const l=r.children;We(l,a=>{t.visibleWrites=Am(t.visibleWrites,ge(r.path,a))})}return!0}else return!1}function vT(t,e){if(t.snap)return bt(t.path,e);for(const n in t.children)if(t.children.hasOwnProperty(n)&&bt(ge(t.path,n),e))return!0;return!1}function wT(t){t.visibleWrites=Wv(t.allWrites,ET,J()),t.allWrites.length>0?t.lastWriteId=t.allWrites[t.allWrites.length-1].writeId:t.lastWriteId=-1}function ET(t){return t.visible}function Wv(t,e,n){let r=Kt.empty();for(let i=0;i{r=r.updateImmediateChild(s,o)}),r;if(n){const s=ir(t.visibleWrites,e);return n.forEachChild(ce,(o,l)=>{const a=Gi(ir(s,new Z(o)),l);r=r.updateImmediateChild(o,a)}),Om(s).forEach(o=>{r=r.updateImmediateChild(o.name,o.node)}),r}else{const s=ir(t.visibleWrites,e);return Om(s).forEach(o=>{r=r.updateImmediateChild(o.name,o.node)}),r}}function ST(t,e,n,r,i){R(r||i,"Either existingEventSnap or existingServerSnap must exist");const s=ge(e,n);if(vd(t.visibleWrites,s))return null;{const o=ir(t.visibleWrites,s);return wd(o)?i.getChild(n):Gi(o,i.getChild(n))}}function xT(t,e,n,r){const i=ge(e,n),s=ti(t.visibleWrites,i);if(s!=null)return s;if(r.isCompleteForChild(n)){const o=ir(t.visibleWrites,i);return Gi(o,r.getNode().getImmediateChild(n))}else return null}function kT(t,e){return ti(t.visibleWrites,e)}function TT(t,e,n,r,i,s,o){let l;const a=ir(t.visibleWrites,e),u=ti(a,J());if(u!=null)l=u;else if(n!=null)l=Gi(a,n);else return[];if(l=l.withIndex(o),!l.isEmpty()&&!l.isLeafNode()){const c=[],d=o.getCompare(),h=s?l.getReverseIteratorFrom(r,o):l.getIteratorFrom(r,o);let _=h.getNext();for(;_&&c.lengtht.lastWriteId,"Stacking an older write on top of newer ones"),i===void 0&&(i=!0),t.allWrites.push({path:e,snap:n,writeId:r,visible:i}),i&&(t.visibleWrites=Hs(t.visibleWrites,e,n)),t.lastWriteId=r}function TT(t,e,n,r){R(r>t.lastWriteId,"Stacking an older merge on top of newer ones"),t.allWrites.push({path:e,children:n,writeId:r,visible:!0}),t.visibleWrites=Ed(t.visibleWrites,e,n),t.lastWriteId=r}function RT(t,e){for(let n=0;nl.writeId===e);R(n>=0,"removeWrite called with nonexistent writeId.");const r=t.allWrites[n];t.allWrites.splice(n,1);let i=r.visible,s=!1,o=t.allWrites.length-1;for(;i&&o>=0;){const l=t.allWrites[o];l.visible&&(o>=n&&IT(l,r.path)?i=!1:bt(r.path,l.path)&&(s=!0)),o--}if(i){if(s)return PT(t),!0;if(r.snap)t.visibleWrites=jm(t.visibleWrites,r.path);else{const l=r.children;We(l,a=>{t.visibleWrites=jm(t.visibleWrites,ge(r.path,a))})}return!0}else return!1}function IT(t,e){if(t.snap)return bt(t.path,e);for(const n in t.children)if(t.children.hasOwnProperty(n)&&bt(ge(t.path,n),e))return!0;return!1}function PT(t){t.visibleWrites=Kv(t.allWrites,bT,J()),t.allWrites.length>0?t.lastWriteId=t.allWrites[t.allWrites.length-1].writeId:t.lastWriteId=-1}function bT(t){return t.visible}function Kv(t,e,n){let r=Kt.empty();for(let i=0;i{r=r.updateImmediateChild(s,o)}),r;if(n){const s=or(t.visibleWrites,e);return n.forEachChild(ce,(o,l)=>{const a=Ki(or(s,new Z(o)),l);r=r.updateImmediateChild(o,a)}),Fm(s).forEach(o=>{r=r.updateImmediateChild(o.name,o.node)}),r}else{const s=or(t.visibleWrites,e);return Fm(s).forEach(o=>{r=r.updateImmediateChild(o.name,o.node)}),r}}function AT(t,e,n,r,i){R(r||i,"Either existingEventSnap or existingServerSnap must exist");const s=ge(e,n);if(Cd(t.visibleWrites,s))return null;{const o=or(t.visibleWrites,s);return Sd(o)?i.getChild(n):Ki(o,i.getChild(n))}}function OT(t,e,n,r){const i=ge(e,n),s=ri(t.visibleWrites,i);if(s!=null)return s;if(r.isCompleteForChild(n)){const o=or(t.visibleWrites,i);return Ki(o,r.getNode().getImmediateChild(n))}else return null}function LT(t,e){return ri(t.visibleWrites,e)}function MT(t,e,n,r,i,s,o){let l;const a=or(t.visibleWrites,e),u=ri(a,J());if(u!=null)l=u;else if(n!=null)l=Ki(a,n);else return[];if(l=l.withIndex(o),!l.isEmpty()&&!l.isLeafNode()){const c=[],d=o.getCompare(),h=s?l.getReverseIteratorFrom(r,o):l.getIteratorFrom(r,o);let _=h.getNext();for(;_&&c.length0||!t.eventCache.isFullyInitialized()||i&&!r.getNode().equals(s)||!r.getNode().getPriority().equals(s.getPriority()))&&n.push(Bv(sa(e)))}}function Kv(t,e,n,r,i,s){const o=e.eventCache;if(la(r,n)!=null)return e;{let l,a;if(G(n))if(R(e.serverCache.isFullyInitialized(),"If change path is empty, we must have complete server data"),e.serverCache.isFiltered()){const u=Qr(e),c=u instanceof j?u:j.EMPTY_NODE,d=Qh(r,c);l=t.filter.updateFullNode(e.eventCache.getNode(),d,s)}else{const u=oa(r,Qr(e));l=t.filter.updateFullNode(e.eventCache.getNode(),u,s)}else{const u=V(n);if(u===".priority"){R(hr(n)===1,"Can't have a priority with additional path components");const c=o.getNode();a=e.serverCache.getNode();const d=Lm(r,n,c,a);d!=null?l=t.filter.updatePriority(c,d):l=o.getNode()}else{const c=se(n);let d;if(o.isCompleteForChild(u)){a=e.serverCache.getNode();const h=Lm(r,n,o.getNode(),a);h!=null?d=o.getNode().getImmediateChild(u).updateChild(c,h):d=o.getNode().getImmediateChild(u)}else d=Kh(r,u,e.serverCache);d!=null?l=t.filter.updateChild(o.getNode(),u,d,c,i,s):l=o.getNode()}}return zs(e,l,o.isFullyInitialized()||G(n),t.filter.filtersNodes())}}function aa(t,e,n,r,i,s,o,l){const a=e.serverCache;let u;const c=o?t.filter:t.filter.getIndexedFilter();if(G(n))u=c.updateFullNode(a.getNode(),r,null);else if(c.filtersNodes()&&!a.isFiltered()){const _=a.getNode().updateChild(n,r);u=c.updateFullNode(a.getNode(),_,null)}else{const _=V(n);if(!a.isCompleteForPath(n)&&hr(n)>1)return e;const v=se(n),S=a.getNode().getImmediateChild(_).updateChild(v,r);_===".priority"?u=c.updatePriority(a.getNode(),S):u=c.updateChild(a.getNode(),_,S,v,Qv,null)}const d=zv(e,u,a.isFullyInitialized()||G(n),c.filtersNodes()),h=new qh(i,d,s);return Kv(t,d,n,i,h,l)}function Ed(t,e,n,r,i,s,o){const l=e.eventCache;let a,u;const c=new qh(i,e,s);if(G(n))u=t.filter.updateFullNode(e.eventCache.getNode(),r,o),a=zs(e,u,!0,t.filter.filtersNodes());else{const d=V(n);if(d===".priority")u=t.filter.updatePriority(e.eventCache.getNode(),r),a=zs(e,u,l.isFullyInitialized(),l.isFiltered());else{const h=se(n),_=l.getNode().getImmediateChild(d);let v;if(G(h))v=r;else{const w=c.getCompleteChild(d);w!=null?jh(h)===".priority"&&w.getChild(Av(h)).isEmpty()?v=w:v=w.updateChild(h,r):v=j.EMPTY_NODE}if(_.equals(v))a=e;else{const w=t.filter.updateChild(l.getNode(),d,v,h,c,o);a=zs(e,w,l.isFullyInitialized(),t.filter.filtersNodes())}}}return a}function Mm(t,e){return t.eventCache.isCompleteForChild(e)}function LT(t,e,n,r,i,s,o){let l=e;return r.foreach((a,u)=>{const c=ge(n,a);Mm(e,V(c))&&(l=Ed(t,l,c,u,i,s,o))}),r.foreach((a,u)=>{const c=ge(n,a);Mm(e,V(c))||(l=Ed(t,l,c,u,i,s,o))}),l}function jm(t,e,n){return n.foreach((r,i)=>{e=e.updateChild(r,i)}),e}function Cd(t,e,n,r,i,s,o,l){if(e.serverCache.getNode().isEmpty()&&!e.serverCache.isFullyInitialized())return e;let a=e,u;G(n)?u=r:u=new ae(null).setTree(n,r);const c=e.serverCache.getNode();return u.children.inorderTraversal((d,h)=>{if(c.hasChild(d)){const _=e.serverCache.getNode().getImmediateChild(d),v=jm(t,_,h);a=aa(t,a,new Z(d),v,i,s,o,l)}}),u.children.inorderTraversal((d,h)=>{const _=!e.serverCache.isCompleteForChild(d)&&h.value===null;if(!c.hasChild(d)&&!_){const v=e.serverCache.getNode().getImmediateChild(d),w=jm(t,v,h);a=aa(t,a,new Z(d),w,i,s,o,l)}}),a}function MT(t,e,n,r,i,s,o){if(la(i,n)!=null)return e;const l=e.serverCache.isFiltered(),a=e.serverCache;if(r.value!=null){if(G(n)&&a.isFullyInitialized()||a.isCompleteForPath(n))return aa(t,e,n,a.getNode().getChild(n),i,s,l,o);if(G(n)){let u=new ae(null);return a.getNode().forEachChild(un,(c,d)=>{u=u.set(new Z(c),d)}),Cd(t,e,n,u,i,s,l,o)}else return e}else{let u=new ae(null);return r.foreach((c,d)=>{const h=ge(n,c);a.isCompleteForPath(h)&&(u=u.set(c,a.getNode().getChild(h)))}),Cd(t,e,n,u,i,s,l,o)}}function jT(t,e,n,r,i){const s=e.serverCache,o=zv(e,s.getNode(),s.isFullyInitialized()||G(n),s.isFiltered());return Kv(t,o,n,r,Qv,i)}function FT(t,e,n,r,i,s){let o;if(la(r,n)!=null)return e;{const l=new qh(r,e,i),a=e.eventCache.getNode();let u;if(G(n)||V(n)===".priority"){let c;if(e.serverCache.isFullyInitialized())c=oa(r,Qr(e));else{const d=e.serverCache.getNode();R(d instanceof j,"serverChildren would be complete if leaf node"),c=Qh(r,d)}c=c,u=t.filter.updateFullNode(a,c,s)}else{const c=V(n);let d=Kh(r,c,e.serverCache);d==null&&e.serverCache.isCompleteForChild(c)&&(d=a.getImmediateChild(c)),d!=null?u=t.filter.updateChild(a,c,d,se(n),l,s):e.eventCache.getNode().hasChild(c)?u=t.filter.updateChild(a,c,j.EMPTY_NODE,se(n),l,s):u=a,u.isEmpty()&&e.serverCache.isFullyInitialized()&&(o=oa(r,Qr(e)),o.isLeafNode()&&(u=t.filter.updateFullNode(u,o,s)))}return o=e.serverCache.isFullyInitialized()||la(r,J())!=null,zs(e,u,o,t.filter.filtersNodes())}}/** + */function zT(t){return{filter:t}}function $T(t,e){R(e.eventCache.getNode().isIndexed(t.filter.getIndex()),"Event snap not indexed"),R(e.serverCache.getNode().isIndexed(t.filter.getIndex()),"Server snap not indexed")}function WT(t,e,n,r,i){const s=new UT;let o,l;if(n.type===Vt.OVERWRITE){const u=n;u.source.fromUser?o=xd(t,e,u.path,u.snap,r,i,s):(R(u.source.fromServer,"Unknown source."),l=u.source.tagged||e.serverCache.isFiltered()&&!G(u.path),o=ca(t,e,u.path,u.snap,r,i,l,s))}else if(n.type===Vt.MERGE){const u=n;u.source.fromUser?o=VT(t,e,u.path,u.children,r,i,s):(R(u.source.fromServer,"Unknown source."),l=u.source.tagged||e.serverCache.isFiltered(),o=kd(t,e,u.path,u.children,r,i,l,s))}else if(n.type===Vt.ACK_USER_WRITE){const u=n;u.revert?o=KT(t,e,u.path,r,i,s):o=GT(t,e,u.path,u.affectedTree,r,i,s)}else if(n.type===Vt.LISTEN_COMPLETE)o=QT(t,e,n.path,r,s);else throw ts("Unknown operation type: "+n.type);const a=s.getChanges();return HT(e,o,a),{viewCache:o,changes:a}}function HT(t,e,n){const r=e.eventCache;if(r.isFullyInitialized()){const i=r.getNode().isLeafNode()||r.getNode().isEmpty(),s=la(t);(n.length>0||!t.eventCache.isFullyInitialized()||i&&!r.getNode().equals(s)||!r.getNode().getPriority().equals(s.getPriority()))&&n.push(Vv(la(e)))}}function Zv(t,e,n,r,i,s){const o=e.eventCache;if(ua(r,n)!=null)return e;{let l,a;if(G(n))if(R(e.serverCache.isFullyInitialized(),"If change path is empty, we must have complete server data"),e.serverCache.isFiltered()){const u=qr(e),c=u instanceof j?u:j.EMPTY_NODE,d=Yh(r,c);l=t.filter.updateFullNode(e.eventCache.getNode(),d,s)}else{const u=aa(r,qr(e));l=t.filter.updateFullNode(e.eventCache.getNode(),u,s)}else{const u=V(n);if(u===".priority"){R(pr(n)===1,"Can't have a priority with additional path components");const c=o.getNode();a=e.serverCache.getNode();const d=Um(r,n,c,a);d!=null?l=t.filter.updatePriority(c,d):l=o.getNode()}else{const c=se(n);let d;if(o.isCompleteForChild(u)){a=e.serverCache.getNode();const h=Um(r,n,o.getNode(),a);h!=null?d=o.getNode().getImmediateChild(u).updateChild(c,h):d=o.getNode().getImmediateChild(u)}else d=Xh(r,u,e.serverCache);d!=null?l=t.filter.updateChild(o.getNode(),u,d,c,i,s):l=o.getNode()}}return Ws(e,l,o.isFullyInitialized()||G(n),t.filter.filtersNodes())}}function ca(t,e,n,r,i,s,o,l){const a=e.serverCache;let u;const c=o?t.filter:t.filter.getIndexedFilter();if(G(n))u=c.updateFullNode(a.getNode(),r,null);else if(c.filtersNodes()&&!a.isFiltered()){const _=a.getNode().updateChild(n,r);u=c.updateFullNode(a.getNode(),_,null)}else{const _=V(n);if(!a.isCompleteForPath(n)&&pr(n)>1)return e;const v=se(n),S=a.getNode().getImmediateChild(_).updateChild(v,r);_===".priority"?u=c.updatePriority(a.getNode(),S):u=c.updateChild(a.getNode(),_,S,v,Jv,null)}const d=Gv(e,u,a.isFullyInitialized()||G(n),c.filtersNodes()),h=new Jh(i,d,s);return Zv(t,d,n,i,h,l)}function xd(t,e,n,r,i,s,o){const l=e.eventCache;let a,u;const c=new Jh(i,e,s);if(G(n))u=t.filter.updateFullNode(e.eventCache.getNode(),r,o),a=Ws(e,u,!0,t.filter.filtersNodes());else{const d=V(n);if(d===".priority")u=t.filter.updatePriority(e.eventCache.getNode(),r),a=Ws(e,u,l.isFullyInitialized(),l.isFiltered());else{const h=se(n),_=l.getNode().getImmediateChild(d);let v;if(G(h))v=r;else{const w=c.getCompleteChild(d);w!=null?Bh(h)===".priority"&&w.getChild(Fv(h)).isEmpty()?v=w:v=w.updateChild(h,r):v=j.EMPTY_NODE}if(_.equals(v))a=e;else{const w=t.filter.updateChild(l.getNode(),d,v,h,c,o);a=Ws(e,w,l.isFullyInitialized(),t.filter.filtersNodes())}}}return a}function Bm(t,e){return t.eventCache.isCompleteForChild(e)}function VT(t,e,n,r,i,s,o){let l=e;return r.foreach((a,u)=>{const c=ge(n,a);Bm(e,V(c))&&(l=xd(t,l,c,u,i,s,o))}),r.foreach((a,u)=>{const c=ge(n,a);Bm(e,V(c))||(l=xd(t,l,c,u,i,s,o))}),l}function zm(t,e,n){return n.foreach((r,i)=>{e=e.updateChild(r,i)}),e}function kd(t,e,n,r,i,s,o,l){if(e.serverCache.getNode().isEmpty()&&!e.serverCache.isFullyInitialized())return e;let a=e,u;G(n)?u=r:u=new ae(null).setTree(n,r);const c=e.serverCache.getNode();return u.children.inorderTraversal((d,h)=>{if(c.hasChild(d)){const _=e.serverCache.getNode().getImmediateChild(d),v=zm(t,_,h);a=ca(t,a,new Z(d),v,i,s,o,l)}}),u.children.inorderTraversal((d,h)=>{const _=!e.serverCache.isCompleteForChild(d)&&h.value===null;if(!c.hasChild(d)&&!_){const v=e.serverCache.getNode().getImmediateChild(d),w=zm(t,v,h);a=ca(t,a,new Z(d),w,i,s,o,l)}}),a}function GT(t,e,n,r,i,s,o){if(ua(i,n)!=null)return e;const l=e.serverCache.isFiltered(),a=e.serverCache;if(r.value!=null){if(G(n)&&a.isFullyInitialized()||a.isCompleteForPath(n))return ca(t,e,n,a.getNode().getChild(n),i,s,l,o);if(G(n)){let u=new ae(null);return a.getNode().forEachChild(un,(c,d)=>{u=u.set(new Z(c),d)}),kd(t,e,n,u,i,s,l,o)}else return e}else{let u=new ae(null);return r.foreach((c,d)=>{const h=ge(n,c);a.isCompleteForPath(h)&&(u=u.set(c,a.getNode().getChild(h)))}),kd(t,e,n,u,i,s,l,o)}}function QT(t,e,n,r,i){const s=e.serverCache,o=Gv(e,s.getNode(),s.isFullyInitialized()||G(n),s.isFiltered());return Zv(t,o,n,r,Jv,i)}function KT(t,e,n,r,i,s){let o;if(ua(r,n)!=null)return e;{const l=new Jh(r,e,i),a=e.eventCache.getNode();let u;if(G(n)||V(n)===".priority"){let c;if(e.serverCache.isFullyInitialized())c=aa(r,qr(e));else{const d=e.serverCache.getNode();R(d instanceof j,"serverChildren would be complete if leaf node"),c=Yh(r,d)}c=c,u=t.filter.updateFullNode(a,c,s)}else{const c=V(n);let d=Xh(r,c,e.serverCache);d==null&&e.serverCache.isCompleteForChild(c)&&(d=a.getImmediateChild(c)),d!=null?u=t.filter.updateChild(a,c,d,se(n),l,s):e.eventCache.getNode().hasChild(c)?u=t.filter.updateChild(a,c,j.EMPTY_NODE,se(n),l,s):u=a,u.isEmpty()&&e.serverCache.isFullyInitialized()&&(o=aa(r,qr(e)),o.isLeafNode()&&(u=t.filter.updateFullNode(u,o,s)))}return o=e.serverCache.isFullyInitialized()||ua(r,J())!=null,Ws(e,u,o,t.filter.filtersNodes())}}/** * @license * Copyright 2017 Google LLC * @@ -1589,7 +1589,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class UT{constructor(e,n){this.query_=e,this.eventRegistrations_=[];const r=this.query_._queryParams,i=new Wh(r.getIndex()),s=Zk(r);this.processor_=bT(s);const o=n.serverCache,l=n.eventCache,a=i.updateFullNode(j.EMPTY_NODE,o.getNode(),null),u=s.updateFullNode(j.EMPTY_NODE,l.getNode(),null),c=new fr(a,o.isFullyInitialized(),i.filtersNodes()),d=new fr(u,l.isFullyInitialized(),s.filtersNodes());this.viewCache_=Wa(d,c),this.eventGenerator_=new cT(this.query_)}get query(){return this.query_}}function BT(t){return t.viewCache_.serverCache.getNode()}function zT(t){return sa(t.viewCache_)}function $T(t,e){const n=Qr(t.viewCache_);return n&&(t.query._queryParams.loadsAllData()||!G(e)&&!n.getImmediateChild(V(e)).isEmpty())?n.getChild(e):null}function Fm(t){return t.eventRegistrations_.length===0}function WT(t,e){t.eventRegistrations_.push(e)}function Um(t,e,n){const r=[];if(n){R(e==null,"A cancel should cancel all event registrations.");const i=t.query._path;t.eventRegistrations_.forEach(s=>{const o=s.createCancelEvent(n,i);o&&r.push(o)})}if(e){let i=[];for(let s=0;s{r.push(Hi(s,o))}),n.isFullyInitialized()&&r.push(Bv(n.getNode())),qv(t,r,n.getNode(),e)}function qv(t,e,n,r){const i=r?[r]:t.eventRegistrations_;return dT(t.eventGenerator_,e,n,i)}/** + */class qT{constructor(e,n){this.query_=e,this.eventRegistrations_=[];const r=this.query_._queryParams,i=new Gh(r.getIndex()),s=uT(r);this.processor_=zT(s);const o=n.serverCache,l=n.eventCache,a=i.updateFullNode(j.EMPTY_NODE,o.getNode(),null),u=s.updateFullNode(j.EMPTY_NODE,l.getNode(),null),c=new mr(a,o.isFullyInitialized(),i.filtersNodes()),d=new mr(u,l.isFullyInitialized(),s.filtersNodes());this.viewCache_=Ga(d,c),this.eventGenerator_=new wT(this.query_)}get query(){return this.query_}}function YT(t){return t.viewCache_.serverCache.getNode()}function XT(t){return la(t.viewCache_)}function JT(t,e){const n=qr(t.viewCache_);return n&&(t.query._queryParams.loadsAllData()||!G(e)&&!n.getImmediateChild(V(e)).isEmpty())?n.getChild(e):null}function $m(t){return t.eventRegistrations_.length===0}function ZT(t,e){t.eventRegistrations_.push(e)}function Wm(t,e,n){const r=[];if(n){R(e==null,"A cancel should cancel all event registrations.");const i=t.query._path;t.eventRegistrations_.forEach(s=>{const o=s.createCancelEvent(n,i);o&&r.push(o)})}if(e){let i=[];for(let s=0;s{r.push(Gi(s,o))}),n.isFullyInitialized()&&r.push(Vv(n.getNode())),ew(t,r,n.getNode(),e)}function ew(t,e,n,r){const i=r?[r]:t.eventRegistrations_;return ET(t.eventGenerator_,e,n,i)}/** * @license * Copyright 2017 Google LLC * @@ -1604,7 +1604,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */let ua;class Yv{constructor(){this.views=new Map}}function VT(t){R(!ua,"__referenceConstructor has already been defined"),ua=t}function GT(){return R(ua,"Reference.ts has not been loaded"),ua}function QT(t){return t.views.size===0}function Yh(t,e,n,r){const i=e.source.queryId;if(i!==null){const s=t.views.get(i);return R(s!=null,"SyncTree gave us an op for an invalid query."),Bm(s,e,n,r)}else{let s=[];for(const o of t.views.values())s=s.concat(Bm(o,e,n,r));return s}}function Xv(t,e,n,r,i){const s=e._queryIdentifier,o=t.views.get(s);if(!o){let l=oa(n,i?r:null),a=!1;l?a=!0:r instanceof j?(l=Qh(n,r),a=!1):(l=j.EMPTY_NODE,a=!1);const u=Wa(new fr(l,a,!1),new fr(r,i,!1));return new UT(e,u)}return o}function KT(t,e,n,r,i,s){const o=Xv(t,e,r,i,s);return t.views.has(e._queryIdentifier)||t.views.set(e._queryIdentifier,o),WT(o,n),HT(o,n)}function qT(t,e,n,r){const i=e._queryIdentifier,s=[];let o=[];const l=pr(t);if(i==="default")for(const[a,u]of t.views.entries())o=o.concat(Um(u,n,r)),Fm(u)&&(t.views.delete(a),u.query._queryParams.loadsAllData()||s.push(u.query));else{const a=t.views.get(i);a&&(o=o.concat(Um(a,n,r)),Fm(a)&&(t.views.delete(i),a.query._queryParams.loadsAllData()||s.push(a.query)))}return l&&!pr(t)&&s.push(new(GT())(e._repo,e._path)),{removed:s,events:o}}function Jv(t){const e=[];for(const n of t.views.values())n.query._queryParams.loadsAllData()||e.push(n);return e}function sr(t,e){let n=null;for(const r of t.views.values())n=n||$T(r,e);return n}function Zv(t,e){if(e._queryParams.loadsAllData())return Va(t);{const r=e._queryIdentifier;return t.views.get(r)}}function ew(t,e){return Zv(t,e)!=null}function pr(t){return Va(t)!=null}function Va(t){for(const e of t.views.values())if(e.query._queryParams.loadsAllData())return e;return null}/** + */let da;class tw{constructor(){this.views=new Map}}function tR(t){R(!da,"__referenceConstructor has already been defined"),da=t}function nR(){return R(da,"Reference.ts has not been loaded"),da}function rR(t){return t.views.size===0}function Zh(t,e,n,r){const i=e.source.queryId;if(i!==null){const s=t.views.get(i);return R(s!=null,"SyncTree gave us an op for an invalid query."),Hm(s,e,n,r)}else{let s=[];for(const o of t.views.values())s=s.concat(Hm(o,e,n,r));return s}}function nw(t,e,n,r,i){const s=e._queryIdentifier,o=t.views.get(s);if(!o){let l=aa(n,i?r:null),a=!1;l?a=!0:r instanceof j?(l=Yh(n,r),a=!1):(l=j.EMPTY_NODE,a=!1);const u=Ga(new mr(l,a,!1),new mr(r,i,!1));return new qT(e,u)}return o}function iR(t,e,n,r,i,s){const o=nw(t,e,r,i,s);return t.views.has(e._queryIdentifier)||t.views.set(e._queryIdentifier,o),ZT(o,n),eR(o,n)}function sR(t,e,n,r){const i=e._queryIdentifier,s=[];let o=[];const l=gr(t);if(i==="default")for(const[a,u]of t.views.entries())o=o.concat(Wm(u,n,r)),$m(u)&&(t.views.delete(a),u.query._queryParams.loadsAllData()||s.push(u.query));else{const a=t.views.get(i);a&&(o=o.concat(Wm(a,n,r)),$m(a)&&(t.views.delete(i),a.query._queryParams.loadsAllData()||s.push(a.query)))}return l&&!gr(t)&&s.push(new(nR())(e._repo,e._path)),{removed:s,events:o}}function rw(t){const e=[];for(const n of t.views.values())n.query._queryParams.loadsAllData()||e.push(n);return e}function lr(t,e){let n=null;for(const r of t.views.values())n=n||JT(r,e);return n}function iw(t,e){if(e._queryParams.loadsAllData())return Ka(t);{const r=e._queryIdentifier;return t.views.get(r)}}function sw(t,e){return iw(t,e)!=null}function gr(t){return Ka(t)!=null}function Ka(t){for(const e of t.views.values())if(e.query._queryParams.loadsAllData())return e;return null}/** * @license * Copyright 2017 Google LLC * @@ -1619,7 +1619,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */let ca;function YT(t){R(!ca,"__referenceConstructor has already been defined"),ca=t}function XT(){return R(ca,"Reference.ts has not been loaded"),ca}let JT=1;class zm{constructor(e){this.listenProvider_=e,this.syncPointTree_=new ae(null),this.pendingWriteTree_=RT(),this.tagToQueryMap=new Map,this.queryToTagMap=new Map}}function Xh(t,e,n,r,i){return mT(t.pendingWriteTree_,e,n,r,i),i?rs(t,new Gr(Hh(),e,n)):[]}function ZT(t,e,n,r){gT(t.pendingWriteTree_,e,n,r);const i=ae.fromObject(n);return rs(t,new Vi(Hh(),e,i))}function Kn(t,e,n=!1){const r=_T(t.pendingWriteTree_,e);if(yT(t.pendingWriteTree_,e)){let s=new ae(null);return r.snap!=null?s=s.set(J(),!0):We(r.children,o=>{s=s.set(new Z(o),!0)}),rs(t,new ia(r.path,s,n))}else return[]}function Ao(t,e,n){return rs(t,new Gr(Vh(),e,n))}function eR(t,e,n){const r=ae.fromObject(n);return rs(t,new Vi(Vh(),e,r))}function tR(t,e){return rs(t,new vo(Vh(),e))}function nR(t,e,n){const r=Jh(t,n);if(r){const i=Zh(r),s=i.path,o=i.queryId,l=it(s,e),a=new vo(Gh(o),l);return ef(t,s,a)}else return[]}function da(t,e,n,r,i=!1){const s=e._path,o=t.syncPointTree_.get(s);let l=[];if(o&&(e._queryIdentifier==="default"||ew(o,e))){const a=qT(o,e,n,r);QT(o)&&(t.syncPointTree_=t.syncPointTree_.remove(s));const u=a.removed;if(l=a.events,!i){const c=u.findIndex(h=>h._queryParams.loadsAllData())!==-1,d=t.syncPointTree_.findOnPath(s,(h,_)=>pr(_));if(c&&!d){const h=t.syncPointTree_.subtree(s);if(!h.isEmpty()){const _=sR(h);for(let v=0;v<_.length;++v){const w=_[v],S=w.query,g=iw(t,w);t.listenProvider_.startListening(Ws(S),wo(t,S),g.hashFn,g.onComplete)}}}!d&&u.length>0&&!r&&(c?t.listenProvider_.stopListening(Ws(e),null):u.forEach(h=>{const _=t.queryToTagMap.get(Qa(h));t.listenProvider_.stopListening(Ws(h),_)}))}oR(t,u)}return l}function tw(t,e,n,r){const i=Jh(t,r);if(i!=null){const s=Zh(i),o=s.path,l=s.queryId,a=it(o,e),u=new Gr(Gh(l),a,n);return ef(t,o,u)}else return[]}function rR(t,e,n,r){const i=Jh(t,r);if(i){const s=Zh(i),o=s.path,l=s.queryId,a=it(o,e),u=ae.fromObject(n),c=new Vi(Gh(l),a,u);return ef(t,o,c)}else return[]}function Sd(t,e,n,r=!1){const i=e._path;let s=null,o=!1;t.syncPointTree_.foreachOnPath(i,(h,_)=>{const v=it(h,i);s=s||sr(_,v),o=o||pr(_)});let l=t.syncPointTree_.get(i);l?(o=o||pr(l),s=s||sr(l,J())):(l=new Yv,t.syncPointTree_=t.syncPointTree_.set(i,l));let a;s!=null?a=!0:(a=!1,s=j.EMPTY_NODE,t.syncPointTree_.subtree(i).foreachChild((_,v)=>{const w=sr(v,J());w&&(s=s.updateImmediateChild(_,w))}));const u=ew(l,e);if(!u&&!e._queryParams.loadsAllData()){const h=Qa(e);R(!t.queryToTagMap.has(h),"View does not exist, but we have a tag");const _=lR();t.queryToTagMap.set(h,_),t.tagToQueryMap.set(_,h)}const c=Ha(t.pendingWriteTree_,i);let d=KT(l,e,n,c,s,a);if(!u&&!o&&!r){const h=Zv(l,e);d=d.concat(aR(t,e,h))}return d}function Ga(t,e,n){const i=t.pendingWriteTree_,s=t.syncPointTree_.findOnPath(e,(o,l)=>{const a=it(o,e),u=sr(l,a);if(u)return u});return Hv(i,e,s,n,!0)}function iR(t,e){const n=e._path;let r=null;t.syncPointTree_.foreachOnPath(n,(u,c)=>{const d=it(u,n);r=r||sr(c,d)});let i=t.syncPointTree_.get(n);i?r=r||sr(i,J()):(i=new Yv,t.syncPointTree_=t.syncPointTree_.set(n,i));const s=r!=null,o=s?new fr(r,!0,!1):null,l=Ha(t.pendingWriteTree_,e._path),a=Xv(i,e,l,s?o.getNode():j.EMPTY_NODE,s);return zT(a)}function rs(t,e){return nw(e,t.syncPointTree_,null,Ha(t.pendingWriteTree_,J()))}function nw(t,e,n,r){if(G(t.path))return rw(t,e,n,r);{const i=e.get(J());n==null&&i!=null&&(n=sr(i,J()));let s=[];const o=V(t.path),l=t.operationForChild(o),a=e.children.get(o);if(a&&l){const u=n?n.getImmediateChild(o):null,c=Vv(r,o);s=s.concat(nw(l,a,u,c))}return i&&(s=s.concat(Yh(i,t,r,n))),s}}function rw(t,e,n,r){const i=e.get(J());n==null&&i!=null&&(n=sr(i,J()));let s=[];return e.children.inorderTraversal((o,l)=>{const a=n?n.getImmediateChild(o):null,u=Vv(r,o),c=t.operationForChild(o);c&&(s=s.concat(rw(c,l,a,u)))}),i&&(s=s.concat(Yh(i,t,r,n))),s}function iw(t,e){const n=e.query,r=wo(t,n);return{hashFn:()=>(BT(e)||j.EMPTY_NODE).hash(),onComplete:i=>{if(i==="ok")return r?nR(t,n._path,r):tR(t,n._path);{const s=Z1(i,n);return da(t,n,null,s)}}}}function wo(t,e){const n=Qa(e);return t.queryToTagMap.get(n)}function Qa(t){return t._path.toString()+"$"+t._queryIdentifier}function Jh(t,e){return t.tagToQueryMap.get(e)}function Zh(t){const e=t.indexOf("$");return R(e!==-1&&e{if(n&&pr(n))return[Va(n)];{let i=[];return n&&(i=Jv(n)),We(r,(s,o)=>{i=i.concat(o)}),i}})}function Ws(t){return t._queryParams.loadsAllData()&&!t._queryParams.isDefault()?new(XT())(t._repo,t._path):t}function oR(t,e){for(let n=0;n{if(!G(u)&&c&&pr(c))return[Va(c).query];{let h=[];return c&&(h=h.concat(Jv(c).map(_=>_.query))),We(d,(_,v)=>{h=h.concat(v)}),h}});for(let u=0;u{s=s.set(new Z(o),!0)}),ss(t,new oa(r.path,s,n))}else return[]}function Lo(t,e,n){return ss(t,new Kr(Kh(),e,n))}function cR(t,e,n){const r=ae.fromObject(n);return ss(t,new Qi(Kh(),e,r))}function dR(t,e){return ss(t,new Eo(Kh(),e))}function hR(t,e,n){const r=tf(t,n);if(r){const i=nf(r),s=i.path,o=i.queryId,l=it(s,e),a=new Eo(qh(o),l);return rf(t,s,a)}else return[]}function fa(t,e,n,r,i=!1){const s=e._path,o=t.syncPointTree_.get(s);let l=[];if(o&&(e._queryIdentifier==="default"||sw(o,e))){const a=sR(o,e,n,r);rR(o)&&(t.syncPointTree_=t.syncPointTree_.remove(s));const u=a.removed;if(l=a.events,!i){const c=u.findIndex(h=>h._queryParams.loadsAllData())!==-1,d=t.syncPointTree_.findOnPath(s,(h,_)=>gr(_));if(c&&!d){const h=t.syncPointTree_.subtree(s);if(!h.isEmpty()){const _=mR(h);for(let v=0;v<_.length;++v){const w=_[v],S=w.query,g=uw(t,w);t.listenProvider_.startListening(Vs(S),Co(t,S),g.hashFn,g.onComplete)}}}!d&&u.length>0&&!r&&(c?t.listenProvider_.stopListening(Vs(e),null):u.forEach(h=>{const _=t.queryToTagMap.get(Ya(h));t.listenProvider_.stopListening(Vs(h),_)}))}gR(t,u)}return l}function ow(t,e,n,r){const i=tf(t,r);if(i!=null){const s=nf(i),o=s.path,l=s.queryId,a=it(o,e),u=new Kr(qh(l),a,n);return rf(t,o,u)}else return[]}function fR(t,e,n,r){const i=tf(t,r);if(i){const s=nf(i),o=s.path,l=s.queryId,a=it(o,e),u=ae.fromObject(n),c=new Qi(qh(l),a,u);return rf(t,o,c)}else return[]}function Td(t,e,n,r=!1){const i=e._path;let s=null,o=!1;t.syncPointTree_.foreachOnPath(i,(h,_)=>{const v=it(h,i);s=s||lr(_,v),o=o||gr(_)});let l=t.syncPointTree_.get(i);l?(o=o||gr(l),s=s||lr(l,J())):(l=new tw,t.syncPointTree_=t.syncPointTree_.set(i,l));let a;s!=null?a=!0:(a=!1,s=j.EMPTY_NODE,t.syncPointTree_.subtree(i).foreachChild((_,v)=>{const w=lr(v,J());w&&(s=s.updateImmediateChild(_,w))}));const u=sw(l,e);if(!u&&!e._queryParams.loadsAllData()){const h=Ya(e);R(!t.queryToTagMap.has(h),"View does not exist, but we have a tag");const _=_R();t.queryToTagMap.set(h,_),t.tagToQueryMap.set(_,h)}const c=Qa(t.pendingWriteTree_,i);let d=iR(l,e,n,c,s,a);if(!u&&!o&&!r){const h=iw(l,e);d=d.concat(yR(t,e,h))}return d}function qa(t,e,n){const i=t.pendingWriteTree_,s=t.syncPointTree_.findOnPath(e,(o,l)=>{const a=it(o,e),u=lr(l,a);if(u)return u});return qv(i,e,s,n,!0)}function pR(t,e){const n=e._path;let r=null;t.syncPointTree_.foreachOnPath(n,(u,c)=>{const d=it(u,n);r=r||lr(c,d)});let i=t.syncPointTree_.get(n);i?r=r||lr(i,J()):(i=new tw,t.syncPointTree_=t.syncPointTree_.set(n,i));const s=r!=null,o=s?new mr(r,!0,!1):null,l=Qa(t.pendingWriteTree_,e._path),a=nw(i,e,l,s?o.getNode():j.EMPTY_NODE,s);return XT(a)}function ss(t,e){return lw(e,t.syncPointTree_,null,Qa(t.pendingWriteTree_,J()))}function lw(t,e,n,r){if(G(t.path))return aw(t,e,n,r);{const i=e.get(J());n==null&&i!=null&&(n=lr(i,J()));let s=[];const o=V(t.path),l=t.operationForChild(o),a=e.children.get(o);if(a&&l){const u=n?n.getImmediateChild(o):null,c=Yv(r,o);s=s.concat(lw(l,a,u,c))}return i&&(s=s.concat(Zh(i,t,r,n))),s}}function aw(t,e,n,r){const i=e.get(J());n==null&&i!=null&&(n=lr(i,J()));let s=[];return e.children.inorderTraversal((o,l)=>{const a=n?n.getImmediateChild(o):null,u=Yv(r,o),c=t.operationForChild(o);c&&(s=s.concat(aw(c,l,a,u)))}),i&&(s=s.concat(Zh(i,t,r,n))),s}function uw(t,e){const n=e.query,r=Co(t,n);return{hashFn:()=>(YT(e)||j.EMPTY_NODE).hash(),onComplete:i=>{if(i==="ok")return r?hR(t,n._path,r):dR(t,n._path);{const s=uk(i,n);return fa(t,n,null,s)}}}}function Co(t,e){const n=Ya(e);return t.queryToTagMap.get(n)}function Ya(t){return t._path.toString()+"$"+t._queryIdentifier}function tf(t,e){return t.tagToQueryMap.get(e)}function nf(t){const e=t.indexOf("$");return R(e!==-1&&e{if(n&&gr(n))return[Ka(n)];{let i=[];return n&&(i=rw(n)),We(r,(s,o)=>{i=i.concat(o)}),i}})}function Vs(t){return t._queryParams.loadsAllData()&&!t._queryParams.isDefault()?new(lR())(t._repo,t._path):t}function gR(t,e){for(let n=0;n{if(!G(u)&&c&&gr(c))return[Ka(c).query];{let h=[];return c&&(h=h.concat(rw(c).map(_=>_.query))),We(d,(_,v)=>{h=h.concat(v)}),h}});for(let u=0;u{const u=sf(a,e.getImmediateChild(l),n);u!==a&&(s=s.updateImmediateChild(l,u))}),s}}/** + */class sf{constructor(e){this.node_=e}getImmediateChild(e){const n=this.node_.getImmediateChild(e);return new sf(n)}node(){return this.node_}}class of{constructor(e,n){this.syncTree_=e,this.path_=n}getImmediateChild(e){const n=ge(this.path_,e);return new of(this.syncTree_,n)}node(){return qa(this.syncTree_,this.path_)}}const vR=function(t){return t=t||{},t.timestamp=t.timestamp||new Date().getTime(),t},Gm=function(t,e,n){if(!t||typeof t!="object")return t;if(R(".sv"in t,"Unexpected leaf node or priority contents"),typeof t[".sv"]=="string")return wR(t[".sv"],e,n);if(typeof t[".sv"]=="object")return ER(t[".sv"],e);R(!1,"Unexpected server value: "+JSON.stringify(t,null,2))},wR=function(t,e,n){switch(t){case"timestamp":return n.timestamp;default:R(!1,"Unexpected server value: "+t)}},ER=function(t,e,n){t.hasOwnProperty("increment")||R(!1,"Unexpected server value: "+JSON.stringify(t,null,2));const r=t.increment;typeof r!="number"&&R(!1,"Unexpected increment value: "+r);const i=e.node();if(R(i!==null&&typeof i<"u","Expected ChildrenNode.EMPTY_NODE for nulls"),!i.isLeafNode())return r;const o=i.getValue();return typeof o!="number"?r:o+r},cw=function(t,e,n,r){return af(e,new of(n,t),r)},lf=function(t,e,n){return af(t,new sf(e),n)};function af(t,e,n){const r=t.getPriority().val(),i=Gm(r,e.getImmediateChild(".priority"),n);let s;if(t.isLeafNode()){const o=t,l=Gm(o.getValue(),e,n);return l!==o.getValue()||i!==o.getPriority().val()?new je(l,ve(i)):t}else{const o=t;return s=o,i!==o.getPriority().val()&&(s=s.updatePriority(new je(i))),o.forEachChild(ce,(l,a)=>{const u=af(a,e.getImmediateChild(l),n);u!==a&&(s=s.updateImmediateChild(l,u))}),s}}/** * @license * Copyright 2017 Google LLC * @@ -1649,7 +1649,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class of{constructor(e="",n=null,r={children:{},childCount:0}){this.name=e,this.parent=n,this.node=r}}function Ka(t,e){let n=e instanceof Z?e:new Z(e),r=t,i=V(n);for(;i!==null;){const s=Wr(r.node.children,i)||{children:{},childCount:0};r=new of(i,r,s),n=se(n),i=V(n)}return r}function ni(t){return t.node.value}function lf(t,e){t.node.value=e,xd(t)}function ow(t){return t.node.childCount>0}function hR(t){return ni(t)===void 0&&!ow(t)}function qa(t,e){We(t.node.children,(n,r)=>{e(new of(n,t,r))})}function lw(t,e,n,r){n&&!r&&e(t),qa(t,i=>{lw(i,e,!0,r)}),n&&r&&e(t)}function fR(t,e,n){let r=n?t:t.parent;for(;r!==null;){if(e(r))return!0;r=r.parent}return!1}function Oo(t){return new Z(t.parent===null?t.name:Oo(t.parent)+"/"+t.name)}function xd(t){t.parent!==null&&pR(t.parent,t.name,t)}function pR(t,e,n){const r=hR(n),i=Ct(t.node.children,e);r&&i?(delete t.node.children[e],t.node.childCount--,xd(t)):!r&&!i&&(t.node.children[e]=n.node,t.node.childCount++,xd(t))}/** + */class uf{constructor(e="",n=null,r={children:{},childCount:0}){this.name=e,this.parent=n,this.node=r}}function Xa(t,e){let n=e instanceof Z?e:new Z(e),r=t,i=V(n);for(;i!==null;){const s=Vr(r.node.children,i)||{children:{},childCount:0};r=new uf(i,r,s),n=se(n),i=V(n)}return r}function ii(t){return t.node.value}function cf(t,e){t.node.value=e,Rd(t)}function dw(t){return t.node.childCount>0}function CR(t){return ii(t)===void 0&&!dw(t)}function Ja(t,e){We(t.node.children,(n,r)=>{e(new uf(n,t,r))})}function hw(t,e,n,r){n&&!r&&e(t),Ja(t,i=>{hw(i,e,!0,r)}),n&&r&&e(t)}function SR(t,e,n){let r=n?t:t.parent;for(;r!==null;){if(e(r))return!0;r=r.parent}return!1}function Mo(t){return new Z(t.parent===null?t.name:Mo(t.parent)+"/"+t.name)}function Rd(t){t.parent!==null&&xR(t.parent,t.name,t)}function xR(t,e,n){const r=CR(n),i=Ct(t.node.children,e);r&&i?(delete t.node.children[e],t.node.childCount--,Rd(t)):!r&&!i&&(t.node.children[e]=n.node,t.node.childCount++,Rd(t))}/** * @license * Copyright 2017 Google LLC * @@ -1664,7 +1664,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const mR=/[\[\].#$\/\u0000-\u001F\u007F]/,gR=/[\[\].#$\u0000-\u001F\u007F]/,tc=10*1024*1024,Ya=function(t){return typeof t=="string"&&t.length!==0&&!mR.test(t)},aw=function(t){return typeof t=="string"&&t.length!==0&&!gR.test(t)},_R=function(t){return t&&(t=t.replace(/^\/*\.info(\/|$)/,"/")),aw(t)},Eo=function(t){return t===null||typeof t=="string"||typeof t=="number"&&!Ua(t)||t&&typeof t=="object"&&Ct(t,".sv")},hn=function(t,e,n,r){r&&e===void 0||Lo(mt(t,"value"),e,n)},Lo=function(t,e,n){const r=n instanceof Z?new Ak(n,t):n;if(e===void 0)throw new Error(t+"contains undefined "+Tr(r));if(typeof e=="function")throw new Error(t+"contains a function "+Tr(r)+" with contents = "+e.toString());if(Ua(e))throw new Error(t+"contains "+e.toString()+" "+Tr(r));if(typeof e=="string"&&e.length>tc/3&&Ma(e)>tc)throw new Error(t+"contains a string greater than "+tc+" utf8 bytes "+Tr(r)+" ('"+e.substring(0,50)+"...')");if(e&&typeof e=="object"){let i=!1,s=!1;if(We(e,(o,l)=>{if(o===".value")i=!0;else if(o!==".priority"&&o!==".sv"&&(s=!0,!Ya(o)))throw new Error(t+" contains an invalid key ("+o+") "+Tr(r)+`. Keys must be non-empty strings and can't contain ".", "#", "$", "/", "[", or "]"`);Ok(r,o),Lo(t,l,r),Lk(r)}),i&&s)throw new Error(t+' contains ".value" child '+Tr(r)+" in addition to actual children.")}},yR=function(t,e){let n,r;for(n=0;n{const a=new Z(o);if(Lo(i,l,ge(n,a)),jh(a)===".priority"&&!Eo(l))throw new Error(i+"contains an invalid value for '"+a.toString()+"', which must be a valid Firebase priority (a string, finite number, server value, or null).");s.push(a)}),yR(i,s)},af=function(t,e,n){if(!(n&&e===void 0)){if(Ua(e))throw new Error(mt(t,"priority")+"is "+e.toString()+", but must be a valid Firebase priority (a string, finite number, server value, or null).");if(!Eo(e))throw new Error(mt(t,"priority")+"must be a valid Firebase priority (a string, finite number, server value, or null).")}},Mo=function(t,e,n,r){if(!(r&&n===void 0)&&!Ya(n))throw new Error(mt(t,e)+'was an invalid key = "'+n+`". Firebase keys must be non-empty strings and can't contain ".", "#", "$", "/", "[", or "]").`)},Co=function(t,e,n,r){if(!(r&&n===void 0)&&!aw(n))throw new Error(mt(t,e)+'was an invalid path = "'+n+`". Paths must be non-empty strings and can't contain ".", "#", "$", "[", or "]"`)},vR=function(t,e,n,r){n&&(n=n.replace(/^\/*\.info(\/|$)/,"/")),Co(t,e,n,r)},Dt=function(t,e){if(V(e)===".info")throw new Error(t+" failed = Can't modify data under /.info/")},cw=function(t,e){const n=e.path.toString();if(typeof e.repoInfo.host!="string"||e.repoInfo.host.length===0||!Ya(e.repoInfo.namespace)&&e.repoInfo.host.split(":")[0]!=="localhost"||n.length!==0&&!_R(n))throw new Error(mt(t,"url")+`must be a valid firebase URL and the path can't contain ".", "#", "$", "[", or "]".`)};/** + */const kR=/[\[\].#$\/\u0000-\u001F\u007F]/,TR=/[\[\].#$\u0000-\u001F\u007F]/,ic=10*1024*1024,Za=function(t){return typeof t=="string"&&t.length!==0&&!kR.test(t)},fw=function(t){return typeof t=="string"&&t.length!==0&&!TR.test(t)},RR=function(t){return t&&(t=t.replace(/^\/*\.info(\/|$)/,"/")),fw(t)},So=function(t){return t===null||typeof t=="string"||typeof t=="number"&&!$a(t)||t&&typeof t=="object"&&Ct(t,".sv")},hn=function(t,e,n,r){r&&e===void 0||jo(mt(t,"value"),e,n)},jo=function(t,e,n){const r=n instanceof Z?new Wk(n,t):n;if(e===void 0)throw new Error(t+"contains undefined "+Nr(r));if(typeof e=="function")throw new Error(t+"contains a function "+Nr(r)+" with contents = "+e.toString());if($a(e))throw new Error(t+"contains "+e.toString()+" "+Nr(r));if(typeof e=="string"&&e.length>ic/3&&Ua(e)>ic)throw new Error(t+"contains a string greater than "+ic+" utf8 bytes "+Nr(r)+" ('"+e.substring(0,50)+"...')");if(e&&typeof e=="object"){let i=!1,s=!1;if(We(e,(o,l)=>{if(o===".value")i=!0;else if(o!==".priority"&&o!==".sv"&&(s=!0,!Za(o)))throw new Error(t+" contains an invalid key ("+o+") "+Nr(r)+`. Keys must be non-empty strings and can't contain ".", "#", "$", "/", "[", or "]"`);Hk(r,o),jo(t,l,r),Vk(r)}),i&&s)throw new Error(t+' contains ".value" child '+Nr(r)+" in addition to actual children.")}},NR=function(t,e){let n,r;for(n=0;n{const a=new Z(o);if(jo(i,l,ge(n,a)),Bh(a)===".priority"&&!So(l))throw new Error(i+"contains an invalid value for '"+a.toString()+"', which must be a valid Firebase priority (a string, finite number, server value, or null).");s.push(a)}),NR(i,s)},df=function(t,e,n){if(!(n&&e===void 0)){if($a(e))throw new Error(mt(t,"priority")+"is "+e.toString()+", but must be a valid Firebase priority (a string, finite number, server value, or null).");if(!So(e))throw new Error(mt(t,"priority")+"must be a valid Firebase priority (a string, finite number, server value, or null).")}},Fo=function(t,e,n,r){if(!(r&&n===void 0)&&!Za(n))throw new Error(mt(t,e)+'was an invalid key = "'+n+`". Firebase keys must be non-empty strings and can't contain ".", "#", "$", "/", "[", or "]").`)},xo=function(t,e,n,r){if(!(r&&n===void 0)&&!fw(n))throw new Error(mt(t,e)+'was an invalid path = "'+n+`". Paths must be non-empty strings and can't contain ".", "#", "$", "[", or "]"`)},IR=function(t,e,n,r){n&&(n=n.replace(/^\/*\.info(\/|$)/,"/")),xo(t,e,n,r)},Dt=function(t,e){if(V(e)===".info")throw new Error(t+" failed = Can't modify data under /.info/")},mw=function(t,e){const n=e.path.toString();if(typeof e.repoInfo.host!="string"||e.repoInfo.host.length===0||!Za(e.repoInfo.namespace)&&e.repoInfo.host.split(":")[0]!=="localhost"||n.length!==0&&!RR(n))throw new Error(mt(t,"url")+`must be a valid firebase URL and the path can't contain ".", "#", "$", "[", or "]".`)};/** * @license * Copyright 2017 Google LLC * @@ -1679,7 +1679,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class wR{constructor(){this.eventLists_=[],this.recursionDepth_=0}}function Xa(t,e){let n=null;for(let r=0;rFh(r,e))}function St(t,e,n){Xa(t,n),hw(t,r=>bt(r,e)||bt(e,r))}function hw(t,e){t.recursionDepth_++;let n=!0;for(let r=0;rzh(r,e))}function St(t,e,n){eu(t,n),_w(t,r=>bt(r,e)||bt(e,r))}function _w(t,e){t.recursionDepth_++;let n=!0;for(let r=0;r{Wm(t,r,i,s,o)},t.authTokenProvider_,t.appCheckProvider_),setTimeout(()=>Hm(t,!0),0);else{if(typeof n<"u"&&n!==null){if(typeof n!="object")throw new Error("Only objects are supported for option databaseAuthVariableOverride");try{Ae(n)}catch(r){throw new Error("Invalid authOverride provided: "+r)}}t.persistentConnection_=new kn(t.repoInfo_,e,(r,i,s,o)=>{Wm(t,r,i,s,o)},r=>{Hm(t,r)},r=>{kR(t,r)},t.authTokenProvider_,t.appCheckProvider_,n),t.server_=t.persistentConnection_}t.authTokenProvider_.addTokenChangeListener(r=>{t.server_.refreshAuthToken(r)}),t.appCheckProvider_.addTokenChangeListener(r=>{t.server_.refreshAppCheckToken(r.token)}),t.statsReporter_=ak(t.repoInfo_,()=>new uT(t.stats_,t.server_)),t.infoData_=new iT,t.infoSyncTree_=new zm({startListening:(r,i,s,o)=>{let l=[];const a=t.infoData_.getNode(r._path);return a.isEmpty()||(l=Ao(t.infoSyncTree_,r._path,a),setTimeout(()=>{o("ok")},0)),l},stopListening:()=>{}}),uf(t,"connected",!1),t.serverSyncTree_=new zm({startListening:(r,i,s,o)=>(t.server_.listen(r,s,i,(l,a)=>{const u=o(l,a);St(t.eventQueue_,r._path,u)}),[]),stopListening:(r,i)=>{t.server_.unlisten(r,i)}})}function pw(t){const n=t.infoData_.getNode(new Z(".info/serverTimeOffset")).val()||0;return new Date().getTime()+n}function jo(t){return uR({timestamp:pw(t)})}function Wm(t,e,n,r,i){t.dataUpdateCount++;const s=new Z(e);n=t.interceptServerDataCallback_?t.interceptServerDataCallback_(e,n):n;let o=[];if(i)if(r){const a=Xl(n,u=>ve(u));o=rR(t.serverSyncTree_,s,a,i)}else{const a=ve(n);o=tw(t.serverSyncTree_,s,a,i)}else if(r){const a=Xl(n,u=>ve(u));o=eR(t.serverSyncTree_,s,a)}else{const a=ve(n);o=Ao(t.serverSyncTree_,s,a)}let l=s;o.length>0&&(l=Qi(t,s)),St(t.eventQueue_,l,o)}function Hm(t,e){uf(t,"connected",e),e===!1&&NR(t)}function kR(t,e){We(e,(n,r)=>{uf(t,n,r)})}function uf(t,e,n){const r=new Z("/.info/"+e),i=ve(n);t.infoData_.updateSnapshot(r,i);const s=Ao(t.infoSyncTree_,r,i);St(t.eventQueue_,r,s)}function Ja(t){return t.nextWriteId_++}function TR(t,e,n){const r=iR(t.serverSyncTree_,e);return r!=null?Promise.resolve(r):t.server_.get(e).then(i=>{const s=ve(i).withIndex(e._queryParams.getIndex());Sd(t.serverSyncTree_,e,n,!0);let o;if(e._queryParams.loadsAllData())o=Ao(t.serverSyncTree_,e._path,s);else{const l=wo(t.serverSyncTree_,e);o=tw(t.serverSyncTree_,e._path,s,l)}return St(t.eventQueue_,e._path,o),da(t.serverSyncTree_,e,n,null,!0),s},i=>(is(t,"get for query "+Ae(e)+" failed: "+i),Promise.reject(new Error(i))))}function cf(t,e,n,r,i){is(t,"set",{path:e.toString(),value:n,priority:r});const s=jo(t),o=ve(n,r),l=Ga(t.serverSyncTree_,e),a=rf(o,l,s),u=Ja(t),c=Xh(t.serverSyncTree_,e,a,u,!0);Xa(t.eventQueue_,c),t.server_.put(e.toString(),o.val(!0),(h,_)=>{const v=h==="ok";v||Ze("set at "+e+" failed: "+h);const w=Kn(t.serverSyncTree_,u,!v);St(t.eventQueue_,e,w),mr(t,i,h,_)});const d=hf(t,e);Qi(t,d),St(t.eventQueue_,d,[])}function RR(t,e,n,r){is(t,"update",{path:e.toString(),value:n});let i=!0;const s=jo(t),o={};if(We(n,(l,a)=>{i=!1,o[l]=sw(ge(e,l),ve(a),t.serverSyncTree_,s)}),i)ze("update() called with empty data. Don't do anything."),mr(t,r,"ok",void 0);else{const l=Ja(t),a=ZT(t.serverSyncTree_,e,o,l);Xa(t.eventQueue_,a),t.server_.merge(e.toString(),n,(u,c)=>{const d=u==="ok";d||Ze("update at "+e+" failed: "+u);const h=Kn(t.serverSyncTree_,l,!d),_=h.length>0?Qi(t,e):e;St(t.eventQueue_,_,h),mr(t,r,u,c)}),We(n,u=>{const c=hf(t,ge(e,u));Qi(t,c)}),St(t.eventQueue_,e,[])}}function NR(t){is(t,"onDisconnectEvents");const e=jo(t),n=ra();_d(t.onDisconnect_,J(),(i,s)=>{const o=sw(i,s,t.serverSyncTree_,e);ns(n,i,o)});let r=[];_d(n,J(),(i,s)=>{r=r.concat(Ao(t.serverSyncTree_,i,s));const o=hf(t,i);Qi(t,o)}),t.onDisconnect_=ra(),St(t.eventQueue_,J(),r)}function IR(t,e,n){t.server_.onDisconnectCancel(e.toString(),(r,i)=>{r==="ok"&&gd(t.onDisconnect_,e),mr(t,n,r,i)})}function Vm(t,e,n,r){const i=ve(n);t.server_.onDisconnectPut(e.toString(),i.val(!0),(s,o)=>{s==="ok"&&ns(t.onDisconnect_,e,i),mr(t,r,s,o)})}function PR(t,e,n,r,i){const s=ve(n,r);t.server_.onDisconnectPut(e.toString(),s.val(!0),(o,l)=>{o==="ok"&&ns(t.onDisconnect_,e,s),mr(t,i,o,l)})}function bR(t,e,n,r){if(id(n)){ze("onDisconnect().update() called with empty data. Don't do anything."),mr(t,r,"ok",void 0);return}t.server_.onDisconnectMerge(e.toString(),n,(i,s)=>{i==="ok"&&We(n,(o,l)=>{const a=ve(l);ns(t.onDisconnect_,ge(e,o),a)}),mr(t,r,i,s)})}function DR(t,e,n){let r;V(e._path)===".info"?r=Sd(t.infoSyncTree_,e,n):r=Sd(t.serverSyncTree_,e,n),dw(t.eventQueue_,e._path,r)}function kd(t,e,n){let r;V(e._path)===".info"?r=da(t.infoSyncTree_,e,n):r=da(t.serverSyncTree_,e,n),dw(t.eventQueue_,e._path,r)}function mw(t){t.persistentConnection_&&t.persistentConnection_.interrupt(fw)}function AR(t){t.persistentConnection_&&t.persistentConnection_.resume(fw)}function is(t,...e){let n="";t.persistentConnection_&&(n=t.persistentConnection_.id+":"),ze(n,...e)}function mr(t,e,n,r){e&&ts(()=>{if(n==="ok")e(null);else{const i=(n||"error").toUpperCase();let s=i;r&&(s+=": "+r);const o=new Error(s);o.code=i,e(o)}})}function OR(t,e,n,r,i,s){is(t,"transaction on "+e);const o={path:e,update:n,onComplete:r,status:null,order:cv(),applyLocally:s,retryCount:0,unwatcher:i,abortReason:null,currentWriteId:null,currentInputSnapshot:null,currentOutputSnapshotRaw:null,currentOutputSnapshotResolved:null},l=df(t,e,void 0);o.currentInputSnapshot=l;const a=o.update(l.val());if(a===void 0)o.unwatcher(),o.currentOutputSnapshotRaw=null,o.currentOutputSnapshotResolved=null,o.onComplete&&o.onComplete(null,!1,o.currentInputSnapshot);else{Lo("transaction failed: Data returned ",a,o.path),o.status=0;const u=Ka(t.transactionQueueTree_,e),c=ni(u)||[];c.push(o),lf(u,c);let d;typeof a=="object"&&a!==null&&Ct(a,".priority")?(d=Wr(a,".priority"),R(Eo(d),"Invalid priority returned by transaction. Priority must be a valid string, finite number, server value, or null.")):d=(Ga(t.serverSyncTree_,e)||j.EMPTY_NODE).getPriority().val();const h=jo(t),_=ve(a,d),v=rf(_,l,h);o.currentOutputSnapshotRaw=_,o.currentOutputSnapshotResolved=v,o.currentWriteId=Ja(t);const w=Xh(t.serverSyncTree_,e,v,o.currentWriteId,o.applyLocally);St(t.eventQueue_,e,w),Za(t,t.transactionQueueTree_)}}function df(t,e,n){return Ga(t.serverSyncTree_,e,n)||j.EMPTY_NODE}function Za(t,e=t.transactionQueueTree_){if(e||eu(t,e),ni(e)){const n=_w(t,e);R(n.length>0,"Sending zero length transaction queue"),n.every(i=>i.status===0)&&LR(t,Oo(e),n)}else ow(e)&&qa(e,n=>{Za(t,n)})}function LR(t,e,n){const r=n.map(u=>u.currentWriteId),i=df(t,e,r);let s=i;const o=i.hash();for(let u=0;u{is(t,"transaction put response",{path:a.toString(),status:u});let c=[];if(u==="ok"){const d=[];for(let h=0;hn[h].onComplete(null,!0,n[h].currentOutputSnapshotResolved)),n[h].unwatcher();eu(t,Ka(t.transactionQueueTree_,e)),Za(t,t.transactionQueueTree_),St(t.eventQueue_,e,c);for(let h=0;hl.status===0).map(l=>l.currentWriteId);for(let l=0;l=CR)c=!0,d="maxretry",i=i.concat(Kn(t.serverSyncTree_,a.currentWriteId,!0));else{const h=df(t,a.path,o);a.currentInputSnapshot=h;const _=e[l].update(h.val());if(_!==void 0){Lo("transaction failed: Data returned ",_,a.path);let v=ve(_);typeof _=="object"&&_!=null&&Ct(_,".priority")||(v=v.updatePriority(h.getPriority()));const S=a.currentWriteId,g=jo(t),m=rf(v,h,g);a.currentOutputSnapshotRaw=v,a.currentOutputSnapshotResolved=m,a.currentWriteId=Ja(t),o.splice(o.indexOf(S),1),i=i.concat(Xh(t.serverSyncTree_,a.path,m,a.currentWriteId,a.applyLocally)),i=i.concat(Kn(t.serverSyncTree_,S,!0))}else c=!0,d="nodata",i=i.concat(Kn(t.serverSyncTree_,a.currentWriteId,!0))}St(t.eventQueue_,n,i),i=[],c&&(e[l].status=2,function(h){setTimeout(h,Math.floor(0))}(e[l].unwatcher),e[l].onComplete&&(d==="nodata"?r.push(()=>e[l].onComplete(null,!1,e[l].currentInputSnapshot)):r.push(()=>e[l].onComplete(new Error(d),!1,null))))}eu(t,t.transactionQueueTree_);for(let l=0;lr.order-i.order),n}function yw(t,e,n){const r=ni(e);if(r)for(let i=0;i{yw(t,i,n)})}function eu(t,e){const n=ni(e);if(n){let r=0;for(let i=0;i0?n:void 0)}qa(e,r=>{eu(t,r)})}function hf(t,e){const n=Oo(gw(t,e)),r=Ka(t.transactionQueueTree_,e);return fR(r,i=>{nc(t,i)}),nc(t,r),lw(r,i=>{nc(t,i)}),n}function nc(t,e){const n=ni(e);if(n){const r=[];let i=[],s=-1;for(let o=0;o{Qm(t,r,i,s,o)},t.authTokenProvider_,t.appCheckProvider_),setTimeout(()=>Km(t,!0),0);else{if(typeof n<"u"&&n!==null){if(typeof n!="object")throw new Error("Only objects are supported for option databaseAuthVariableOverride");try{Ae(n)}catch(r){throw new Error("Invalid authOverride provided: "+r)}}t.persistentConnection_=new Tn(t.repoInfo_,e,(r,i,s,o)=>{Qm(t,r,i,s,o)},r=>{Km(t,r)},r=>{LR(t,r)},t.authTokenProvider_,t.appCheckProvider_,n),t.server_=t.persistentConnection_}t.authTokenProvider_.addTokenChangeListener(r=>{t.server_.refreshAuthToken(r)}),t.appCheckProvider_.addTokenChangeListener(r=>{t.server_.refreshAppCheckToken(r.token)}),t.statsReporter_=yk(t.repoInfo_,()=>new vT(t.stats_,t.server_)),t.infoData_=new pT,t.infoSyncTree_=new Vm({startListening:(r,i,s,o)=>{let l=[];const a=t.infoData_.getNode(r._path);return a.isEmpty()||(l=Lo(t.infoSyncTree_,r._path,a),setTimeout(()=>{o("ok")},0)),l},stopListening:()=>{}}),hf(t,"connected",!1),t.serverSyncTree_=new Vm({startListening:(r,i,s,o)=>(t.server_.listen(r,s,i,(l,a)=>{const u=o(l,a);St(t.eventQueue_,r._path,u)}),[]),stopListening:(r,i)=>{t.server_.unlisten(r,i)}})}function vw(t){const n=t.infoData_.getNode(new Z(".info/serverTimeOffset")).val()||0;return new Date().getTime()+n}function Uo(t){return vR({timestamp:vw(t)})}function Qm(t,e,n,r,i){t.dataUpdateCount++;const s=new Z(e);n=t.interceptServerDataCallback_?t.interceptServerDataCallback_(e,n):n;let o=[];if(i)if(r){const a=Zl(n,u=>ve(u));o=fR(t.serverSyncTree_,s,a,i)}else{const a=ve(n);o=ow(t.serverSyncTree_,s,a,i)}else if(r){const a=Zl(n,u=>ve(u));o=cR(t.serverSyncTree_,s,a)}else{const a=ve(n);o=Lo(t.serverSyncTree_,s,a)}let l=s;o.length>0&&(l=qi(t,s)),St(t.eventQueue_,l,o)}function Km(t,e){hf(t,"connected",e),e===!1&&FR(t)}function LR(t,e){We(e,(n,r)=>{hf(t,n,r)})}function hf(t,e,n){const r=new Z("/.info/"+e),i=ve(n);t.infoData_.updateSnapshot(r,i);const s=Lo(t.infoSyncTree_,r,i);St(t.eventQueue_,r,s)}function tu(t){return t.nextWriteId_++}function MR(t,e,n){const r=pR(t.serverSyncTree_,e);return r!=null?Promise.resolve(r):t.server_.get(e).then(i=>{const s=ve(i).withIndex(e._queryParams.getIndex());Td(t.serverSyncTree_,e,n,!0);let o;if(e._queryParams.loadsAllData())o=Lo(t.serverSyncTree_,e._path,s);else{const l=Co(t.serverSyncTree_,e);o=ow(t.serverSyncTree_,e._path,s,l)}return St(t.eventQueue_,e._path,o),fa(t.serverSyncTree_,e,n,null,!0),s},i=>(os(t,"get for query "+Ae(e)+" failed: "+i),Promise.reject(new Error(i))))}function ff(t,e,n,r,i){os(t,"set",{path:e.toString(),value:n,priority:r});const s=Uo(t),o=ve(n,r),l=qa(t.serverSyncTree_,e),a=lf(o,l,s),u=tu(t),c=ef(t.serverSyncTree_,e,a,u,!0);eu(t.eventQueue_,c),t.server_.put(e.toString(),o.val(!0),(h,_)=>{const v=h==="ok";v||Ze("set at "+e+" failed: "+h);const w=qn(t.serverSyncTree_,u,!v);St(t.eventQueue_,e,w),_r(t,i,h,_)});const d=mf(t,e);qi(t,d),St(t.eventQueue_,d,[])}function jR(t,e,n,r){os(t,"update",{path:e.toString(),value:n});let i=!0;const s=Uo(t),o={};if(We(n,(l,a)=>{i=!1,o[l]=cw(ge(e,l),ve(a),t.serverSyncTree_,s)}),i)ze("update() called with empty data. Don't do anything."),_r(t,r,"ok",void 0);else{const l=tu(t),a=uR(t.serverSyncTree_,e,o,l);eu(t.eventQueue_,a),t.server_.merge(e.toString(),n,(u,c)=>{const d=u==="ok";d||Ze("update at "+e+" failed: "+u);const h=qn(t.serverSyncTree_,l,!d),_=h.length>0?qi(t,e):e;St(t.eventQueue_,_,h),_r(t,r,u,c)}),We(n,u=>{const c=mf(t,ge(e,u));qi(t,c)}),St(t.eventQueue_,e,[])}}function FR(t){os(t,"onDisconnectEvents");const e=Uo(t),n=sa();wd(t.onDisconnect_,J(),(i,s)=>{const o=cw(i,s,t.serverSyncTree_,e);is(n,i,o)});let r=[];wd(n,J(),(i,s)=>{r=r.concat(Lo(t.serverSyncTree_,i,s));const o=mf(t,i);qi(t,o)}),t.onDisconnect_=sa(),St(t.eventQueue_,J(),r)}function UR(t,e,n){t.server_.onDisconnectCancel(e.toString(),(r,i)=>{r==="ok"&&vd(t.onDisconnect_,e),_r(t,n,r,i)})}function qm(t,e,n,r){const i=ve(n);t.server_.onDisconnectPut(e.toString(),i.val(!0),(s,o)=>{s==="ok"&&is(t.onDisconnect_,e,i),_r(t,r,s,o)})}function BR(t,e,n,r,i){const s=ve(n,r);t.server_.onDisconnectPut(e.toString(),s.val(!0),(o,l)=>{o==="ok"&&is(t.onDisconnect_,e,s),_r(t,i,o,l)})}function zR(t,e,n,r){if(ld(n)){ze("onDisconnect().update() called with empty data. Don't do anything."),_r(t,r,"ok",void 0);return}t.server_.onDisconnectMerge(e.toString(),n,(i,s)=>{i==="ok"&&We(n,(o,l)=>{const a=ve(l);is(t.onDisconnect_,ge(e,o),a)}),_r(t,r,i,s)})}function $R(t,e,n){let r;V(e._path)===".info"?r=Td(t.infoSyncTree_,e,n):r=Td(t.serverSyncTree_,e,n),gw(t.eventQueue_,e._path,r)}function Nd(t,e,n){let r;V(e._path)===".info"?r=fa(t.infoSyncTree_,e,n):r=fa(t.serverSyncTree_,e,n),gw(t.eventQueue_,e._path,r)}function ww(t){t.persistentConnection_&&t.persistentConnection_.interrupt(yw)}function WR(t){t.persistentConnection_&&t.persistentConnection_.resume(yw)}function os(t,...e){let n="";t.persistentConnection_&&(n=t.persistentConnection_.id+":"),ze(n,...e)}function _r(t,e,n,r){e&&rs(()=>{if(n==="ok")e(null);else{const i=(n||"error").toUpperCase();let s=i;r&&(s+=": "+r);const o=new Error(s);o.code=i,e(o)}})}function HR(t,e,n,r,i,s){os(t,"transaction on "+e);const o={path:e,update:n,onComplete:r,status:null,order:mv(),applyLocally:s,retryCount:0,unwatcher:i,abortReason:null,currentWriteId:null,currentInputSnapshot:null,currentOutputSnapshotRaw:null,currentOutputSnapshotResolved:null},l=pf(t,e,void 0);o.currentInputSnapshot=l;const a=o.update(l.val());if(a===void 0)o.unwatcher(),o.currentOutputSnapshotRaw=null,o.currentOutputSnapshotResolved=null,o.onComplete&&o.onComplete(null,!1,o.currentInputSnapshot);else{jo("transaction failed: Data returned ",a,o.path),o.status=0;const u=Xa(t.transactionQueueTree_,e),c=ii(u)||[];c.push(o),cf(u,c);let d;typeof a=="object"&&a!==null&&Ct(a,".priority")?(d=Vr(a,".priority"),R(So(d),"Invalid priority returned by transaction. Priority must be a valid string, finite number, server value, or null.")):d=(qa(t.serverSyncTree_,e)||j.EMPTY_NODE).getPriority().val();const h=Uo(t),_=ve(a,d),v=lf(_,l,h);o.currentOutputSnapshotRaw=_,o.currentOutputSnapshotResolved=v,o.currentWriteId=tu(t);const w=ef(t.serverSyncTree_,e,v,o.currentWriteId,o.applyLocally);St(t.eventQueue_,e,w),nu(t,t.transactionQueueTree_)}}function pf(t,e,n){return qa(t.serverSyncTree_,e,n)||j.EMPTY_NODE}function nu(t,e=t.transactionQueueTree_){if(e||ru(t,e),ii(e)){const n=Cw(t,e);R(n.length>0,"Sending zero length transaction queue"),n.every(i=>i.status===0)&&VR(t,Mo(e),n)}else dw(e)&&Ja(e,n=>{nu(t,n)})}function VR(t,e,n){const r=n.map(u=>u.currentWriteId),i=pf(t,e,r);let s=i;const o=i.hash();for(let u=0;u{os(t,"transaction put response",{path:a.toString(),status:u});let c=[];if(u==="ok"){const d=[];for(let h=0;hn[h].onComplete(null,!0,n[h].currentOutputSnapshotResolved)),n[h].unwatcher();ru(t,Xa(t.transactionQueueTree_,e)),nu(t,t.transactionQueueTree_),St(t.eventQueue_,e,c);for(let h=0;hl.status===0).map(l=>l.currentWriteId);for(let l=0;l=DR)c=!0,d="maxretry",i=i.concat(qn(t.serverSyncTree_,a.currentWriteId,!0));else{const h=pf(t,a.path,o);a.currentInputSnapshot=h;const _=e[l].update(h.val());if(_!==void 0){jo("transaction failed: Data returned ",_,a.path);let v=ve(_);typeof _=="object"&&_!=null&&Ct(_,".priority")||(v=v.updatePriority(h.getPriority()));const S=a.currentWriteId,g=Uo(t),m=lf(v,h,g);a.currentOutputSnapshotRaw=v,a.currentOutputSnapshotResolved=m,a.currentWriteId=tu(t),o.splice(o.indexOf(S),1),i=i.concat(ef(t.serverSyncTree_,a.path,m,a.currentWriteId,a.applyLocally)),i=i.concat(qn(t.serverSyncTree_,S,!0))}else c=!0,d="nodata",i=i.concat(qn(t.serverSyncTree_,a.currentWriteId,!0))}St(t.eventQueue_,n,i),i=[],c&&(e[l].status=2,function(h){setTimeout(h,Math.floor(0))}(e[l].unwatcher),e[l].onComplete&&(d==="nodata"?r.push(()=>e[l].onComplete(null,!1,e[l].currentInputSnapshot)):r.push(()=>e[l].onComplete(new Error(d),!1,null))))}ru(t,t.transactionQueueTree_);for(let l=0;lr.order-i.order),n}function Sw(t,e,n){const r=ii(e);if(r)for(let i=0;i{Sw(t,i,n)})}function ru(t,e){const n=ii(e);if(n){let r=0;for(let i=0;i0?n:void 0)}Ja(e,r=>{ru(t,r)})}function mf(t,e){const n=Mo(Ew(t,e)),r=Xa(t.transactionQueueTree_,e);return SR(r,i=>{sc(t,i)}),sc(t,r),hw(r,i=>{sc(t,i)}),n}function sc(t,e){const n=ii(e);if(n){const r=[];let i=[],s=-1;for(let o=0;o0){let i=n[r];try{i=decodeURIComponent(i.replace(/\+/g," "))}catch{}e+="/"+i}return e}function FR(t){const e={};t.charAt(0)==="?"&&(t=t.substring(1));for(const n of t.split("&")){if(n.length===0)continue;const r=n.split("=");r.length===2?e[decodeURIComponent(r[0])]=decodeURIComponent(r[1]):Ze(`Invalid query segment '${n}' in query '${t}'`)}return e}const Td=function(t,e){const n=UR(t),r=n.namespace;n.domain==="firebase.com"&&dn(n.host+" is no longer supported. Please use .firebaseio.com instead"),(!r||r==="undefined")&&n.domain!=="localhost"&&dn("Cannot parse Firebase url. Please use https://.firebaseio.com"),n.secure||K1();const i=n.scheme==="ws"||n.scheme==="wss";return{repoInfo:new xv(n.host,n.secure,r,i,e,"",r!==n.subdomain),path:new Z(n.pathString)}},UR=function(t){let e="",n="",r="",i="",s="",o=!0,l="https",a=443;if(typeof t=="string"){let u=t.indexOf("//");u>=0&&(l=t.substring(0,u-1),t=t.substring(u+2));let c=t.indexOf("/");c===-1&&(c=t.length);let d=t.indexOf("?");d===-1&&(d=t.length),e=t.substring(0,Math.min(c,d)),c=0?(o=l==="https"||l==="wss",a=parseInt(e.substring(u+1),10)):u=e.length;const _=e.slice(0,u);if(_.toLowerCase()==="localhost")n="localhost";else if(_.split(".").length<=2)n=_;else{const v=e.indexOf(".");r=e.substring(0,v).toLowerCase(),n=e.substring(v+1),s=r}"ns"in h&&(s=h.ns)}return{host:e,port:a,domain:n,subdomain:r,secure:o,scheme:l,pathString:i,namespace:s}};/** + */function QR(t){let e="";const n=t.split("/");for(let r=0;r0){let i=n[r];try{i=decodeURIComponent(i.replace(/\+/g," "))}catch{}e+="/"+i}return e}function KR(t){const e={};t.charAt(0)==="?"&&(t=t.substring(1));for(const n of t.split("&")){if(n.length===0)continue;const r=n.split("=");r.length===2?e[decodeURIComponent(r[0])]=decodeURIComponent(r[1]):Ze(`Invalid query segment '${n}' in query '${t}'`)}return e}const Id=function(t,e){const n=qR(t),r=n.namespace;n.domain==="firebase.com"&&dn(n.host+" is no longer supported. Please use .firebaseio.com instead"),(!r||r==="undefined")&&n.domain!=="localhost"&&dn("Cannot parse Firebase url. Please use https://.firebaseio.com"),n.secure||ik();const i=n.scheme==="ws"||n.scheme==="wss";return{repoInfo:new Iv(n.host,n.secure,r,i,e,"",r!==n.subdomain),path:new Z(n.pathString)}},qR=function(t){let e="",n="",r="",i="",s="",o=!0,l="https",a=443;if(typeof t=="string"){let u=t.indexOf("//");u>=0&&(l=t.substring(0,u-1),t=t.substring(u+2));let c=t.indexOf("/");c===-1&&(c=t.length);let d=t.indexOf("?");d===-1&&(d=t.length),e=t.substring(0,Math.min(c,d)),c=0?(o=l==="https"||l==="wss",a=parseInt(e.substring(u+1),10)):u=e.length;const _=e.slice(0,u);if(_.toLowerCase()==="localhost")n="localhost";else if(_.split(".").length<=2)n=_;else{const v=e.indexOf(".");r=e.substring(0,v).toLowerCase(),n=e.substring(v+1),s=r}"ns"in h&&(s=h.ns)}return{host:e,port:a,domain:n,subdomain:r,secure:o,scheme:l,pathString:i,namespace:s}};/** * @license * Copyright 2017 Google LLC * @@ -1724,7 +1724,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const Gm="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",BR=function(){let t=0;const e=[];return function(n){const r=n===t;t=n;let i;const s=new Array(8);for(i=7;i>=0;i--)s[i]=Gm.charAt(n%64),n=Math.floor(n/64);R(n===0,"Cannot push at time == 0");let o=s.join("");if(r){for(i=11;i>=0&&e[i]===63;i--)e[i]=0;e[i]++}else for(i=0;i<12;i++)e[i]=Math.floor(Math.random()*64);for(i=0;i<12;i++)o+=Gm.charAt(e[i]);return R(o.length===20,"nextPushId: Length should be 20."),o}}();/** + */const Ym="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",YR=function(){let t=0;const e=[];return function(n){const r=n===t;t=n;let i;const s=new Array(8);for(i=7;i>=0;i--)s[i]=Ym.charAt(n%64),n=Math.floor(n/64);R(n===0,"Cannot push at time == 0");let o=s.join("");if(r){for(i=11;i>=0&&e[i]===63;i--)e[i]=0;e[i]++}else for(i=0;i<12;i++)e[i]=Math.floor(Math.random()*64);for(i=0;i<12;i++)o+=Ym.charAt(e[i]);return R(o.length===20,"nextPushId: Length should be 20."),o}}();/** * @license * Copyright 2017 Google LLC * @@ -1739,7 +1739,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class vw{constructor(e,n,r,i){this.eventType=e,this.eventRegistration=n,this.snapshot=r,this.prevName=i}getPath(){const e=this.snapshot.ref;return this.eventType==="value"?e._path:e.parent._path}getEventType(){return this.eventType}getEventRunner(){return this.eventRegistration.getEventRunner(this)}toString(){return this.getPath().toString()+":"+this.eventType+":"+Ae(this.snapshot.exportVal())}}class ww{constructor(e,n,r){this.eventRegistration=e,this.error=n,this.path=r}getPath(){return this.path}getEventType(){return"cancel"}getEventRunner(){return this.eventRegistration.getEventRunner(this)}toString(){return this.path.toString()+":cancel"}}/** + */class xw{constructor(e,n,r,i){this.eventType=e,this.eventRegistration=n,this.snapshot=r,this.prevName=i}getPath(){const e=this.snapshot.ref;return this.eventType==="value"?e._path:e.parent._path}getEventType(){return this.eventType}getEventRunner(){return this.eventRegistration.getEventRunner(this)}toString(){return this.getPath().toString()+":"+this.eventType+":"+Ae(this.snapshot.exportVal())}}class kw{constructor(e,n,r){this.eventRegistration=e,this.error=n,this.path=r}getPath(){return this.path}getEventType(){return"cancel"}getEventRunner(){return this.eventRegistration.getEventRunner(this)}toString(){return this.path.toString()+":cancel"}}/** * @license * Copyright 2017 Google LLC * @@ -1754,7 +1754,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class ff{constructor(e,n){this.snapshotCallback=e,this.cancelCallback=n}onValue(e,n){this.snapshotCallback.call(null,e,n)}onCancel(e){return R(this.hasCancelCallback,"Raising a cancel event on a listener with no cancel callback"),this.cancelCallback.call(null,e)}get hasCancelCallback(){return!!this.cancelCallback}matches(e){return this.snapshotCallback===e.snapshotCallback||this.snapshotCallback.userCallback!==void 0&&this.snapshotCallback.userCallback===e.snapshotCallback.userCallback&&this.snapshotCallback.context===e.snapshotCallback.context}}/** + */class gf{constructor(e,n){this.snapshotCallback=e,this.cancelCallback=n}onValue(e,n){this.snapshotCallback.call(null,e,n)}onCancel(e){return R(this.hasCancelCallback,"Raising a cancel event on a listener with no cancel callback"),this.cancelCallback.call(null,e)}get hasCancelCallback(){return!!this.cancelCallback}matches(e){return this.snapshotCallback===e.snapshotCallback||this.snapshotCallback.userCallback!==void 0&&this.snapshotCallback.userCallback===e.snapshotCallback.userCallback&&this.snapshotCallback.context===e.snapshotCallback.context}}/** * @license * Copyright 2021 Google LLC * @@ -1769,7 +1769,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */let zR=class{constructor(e,n){this._repo=e,this._path=n}cancel(){const e=new ut;return IR(this._repo,this._path,e.wrapCallback(()=>{})),e.promise}remove(){Dt("OnDisconnect.remove",this._path);const e=new ut;return Vm(this._repo,this._path,null,e.wrapCallback(()=>{})),e.promise}set(e){Dt("OnDisconnect.set",this._path),hn("OnDisconnect.set",e,this._path,!1);const n=new ut;return Vm(this._repo,this._path,e,n.wrapCallback(()=>{})),n.promise}setWithPriority(e,n){Dt("OnDisconnect.setWithPriority",this._path),hn("OnDisconnect.setWithPriority",e,this._path,!1),af("OnDisconnect.setWithPriority",n,!1);const r=new ut;return PR(this._repo,this._path,e,n,r.wrapCallback(()=>{})),r.promise}update(e){Dt("OnDisconnect.update",this._path),uw("OnDisconnect.update",e,this._path,!1);const n=new ut;return bR(this._repo,this._path,e,n.wrapCallback(()=>{})),n.promise}};/** + */let XR=class{constructor(e,n){this._repo=e,this._path=n}cancel(){const e=new ut;return UR(this._repo,this._path,e.wrapCallback(()=>{})),e.promise}remove(){Dt("OnDisconnect.remove",this._path);const e=new ut;return qm(this._repo,this._path,null,e.wrapCallback(()=>{})),e.promise}set(e){Dt("OnDisconnect.set",this._path),hn("OnDisconnect.set",e,this._path,!1);const n=new ut;return qm(this._repo,this._path,e,n.wrapCallback(()=>{})),n.promise}setWithPriority(e,n){Dt("OnDisconnect.setWithPriority",this._path),hn("OnDisconnect.setWithPriority",e,this._path,!1),df("OnDisconnect.setWithPriority",n,!1);const r=new ut;return BR(this._repo,this._path,e,n,r.wrapCallback(()=>{})),r.promise}update(e){Dt("OnDisconnect.update",this._path),pw("OnDisconnect.update",e,this._path,!1);const n=new ut;return zR(this._repo,this._path,e,n.wrapCallback(()=>{})),n.promise}};/** * @license * Copyright 2020 Google LLC * @@ -1784,7 +1784,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class gt{constructor(e,n,r,i){this._repo=e,this._path=n,this._queryParams=r,this._orderByCalled=i}get key(){return G(this._path)?null:jh(this._path)}get ref(){return new jt(this._repo,this._path)}get _queryIdentifier(){const e=bm(this._queryParams),n=Ah(e);return n==="{}"?"default":n}get _queryObject(){return bm(this._queryParams)}isEqual(e){if(e=Re(e),!(e instanceof gt))return!1;const n=this._repo===e._repo,r=Fh(this._path,e._path),i=this._queryIdentifier===e._queryIdentifier;return n&&r&&i}toJSON(){return this.toString()}toString(){return this._repo.toString()+bk(this._path)}}function tu(t,e){if(t._orderByCalled===!0)throw new Error(e+": You can't combine multiple orderBy calls.")}function vr(t){let e=null,n=null;if(t.hasStart()&&(e=t.getIndexStartValue()),t.hasEnd()&&(n=t.getIndexEndValue()),t.getIndex()===un){const r="Query: When ordering by key, you may only pass one argument to startAt(), endAt(), or equalTo().",i="Query: When ordering by key, the argument passed to startAt(), startAfter(), endAt(), endBefore(), or equalTo() must be a string.";if(t.hasStart()){if(t.getIndexStartName()!==dr)throw new Error(r);if(typeof e!="string")throw new Error(i)}if(t.hasEnd()){if(t.getIndexEndName()!==bn)throw new Error(r);if(typeof n!="string")throw new Error(i)}}else if(t.getIndex()===ce){if(e!=null&&!Eo(e)||n!=null&&!Eo(n))throw new Error("Query: When ordering by priority, the first argument passed to startAt(), startAfter() endAt(), endBefore(), or equalTo() must be a valid priority value (null, a number, or a string).")}else if(R(t.getIndex()instanceof zh||t.getIndex()===$h,"unknown index type."),e!=null&&typeof e=="object"||n!=null&&typeof n=="object")throw new Error("Query: First argument passed to startAt(), startAfter(), endAt(), endBefore(), or equalTo() cannot be an object.")}function nu(t){if(t.hasStart()&&t.hasEnd()&&t.hasLimit()&&!t.hasAnchoredLimit())throw new Error("Query: Can't combine startAt(), startAfter(), endAt(), endBefore(), and limit(). Use limitToFirst() or limitToLast() instead.")}class jt extends gt{constructor(e,n){super(e,n,new za,!1)}get parent(){const e=Av(this._path);return e===null?null:new jt(this._repo,e)}get root(){let e=this;for(;e.parent!==null;)e=e.parent;return e}}let ru=class Rd{constructor(e,n,r){this._node=e,this.ref=n,this._index=r}get priority(){return this._node.getPriority().val()}get key(){return this.ref.key}get size(){return this._node.numChildren()}child(e){const n=new Z(e),r=Kr(this.ref,e);return new Rd(this._node.getChild(n),r,ce)}exists(){return!this._node.isEmpty()}exportVal(){return this._node.val(!0)}forEach(e){return this._node.isLeafNode()?!1:!!this._node.forEachChild(this._index,(r,i)=>e(new Rd(i,Kr(this.ref,r),ce)))}hasChild(e){const n=new Z(e);return!this._node.getChild(n).isEmpty()}hasChildren(){return this._node.isLeafNode()?!1:!this._node.isEmpty()}toJSON(){return this.exportVal()}val(){return this._node.val()}};function Ew(t,e){return t=Re(t),t._checkNotDeleted("ref"),e!==void 0?Kr(t._root,e):t._root}function Qm(t,e){t=Re(t),t._checkNotDeleted("refFromURL");const n=Td(e,t._repo.repoInfo_.nodeAdmin);cw("refFromURL",n);const r=n.repoInfo;return!t._repo.repoInfo_.isCustomHost()&&r.host!==t._repo.repoInfo_.host&&dn("refFromURL: Host name does not match the current database: (found "+r.host+" but expected "+t._repo.repoInfo_.host+")"),Ew(t,n.path.toString())}function Kr(t,e){return t=Re(t),V(t._path)===null?vR("child","path",e,!1):Co("child","path",e,!1),new jt(t._repo,ge(t._path,e))}function $R(t,e){t=Re(t),Dt("push",t._path),hn("push",e,t._path,!0);const n=pw(t._repo),r=BR(n),i=Kr(t,r),s=Kr(t,r);let o;return e!=null?o=pf(s,e).then(()=>s):o=Promise.resolve(s),i.then=o.then.bind(o),i.catch=o.then.bind(o,void 0),i}function WR(t){return Dt("remove",t._path),pf(t,null)}function pf(t,e){t=Re(t),Dt("set",t._path),hn("set",e,t._path,!1);const n=new ut;return cf(t._repo,t._path,e,null,n.wrapCallback(()=>{})),n.promise}function HR(t,e){t=Re(t),Dt("setPriority",t._path),af("setPriority",e,!1);const n=new ut;return cf(t._repo,ge(t._path,".priority"),e,null,n.wrapCallback(()=>{})),n.promise}function VR(t,e,n){if(Dt("setWithPriority",t._path),hn("setWithPriority",e,t._path,!1),af("setWithPriority",n,!1),t.key===".length"||t.key===".keys")throw"setWithPriority failed: "+t.key+" is a read-only object.";const r=new ut;return cf(t._repo,t._path,e,n,r.wrapCallback(()=>{})),r.promise}function GR(t,e){uw("update",e,t._path,!1);const n=new ut;return RR(t._repo,t._path,e,n.wrapCallback(()=>{})),n.promise}function QR(t){t=Re(t);const e=new ff(()=>{}),n=new Fo(e);return TR(t._repo,t,n).then(r=>new ru(r,new jt(t._repo,t._path),t._queryParams.getIndex()))}class Fo{constructor(e){this.callbackContext=e}respondsTo(e){return e==="value"}createEvent(e,n){const r=n._queryParams.getIndex();return new vw("value",this,new ru(e.snapshotNode,new jt(n._repo,n._path),r))}getEventRunner(e){return e.getEventType()==="cancel"?()=>this.callbackContext.onCancel(e.error):()=>this.callbackContext.onValue(e.snapshot,null)}createCancelEvent(e,n){return this.callbackContext.hasCancelCallback?new ww(this,e,n):null}matches(e){return e instanceof Fo?!e.callbackContext||!this.callbackContext?!0:e.callbackContext.matches(this.callbackContext):!1}hasAnyCallback(){return this.callbackContext!==null}}class iu{constructor(e,n){this.eventType=e,this.callbackContext=n}respondsTo(e){let n=e==="children_added"?"child_added":e;return n=n==="children_removed"?"child_removed":n,this.eventType===n}createCancelEvent(e,n){return this.callbackContext.hasCancelCallback?new ww(this,e,n):null}createEvent(e,n){R(e.childName!=null,"Child events should have a childName.");const r=Kr(new jt(n._repo,n._path),e.childName),i=n._queryParams.getIndex();return new vw(e.type,this,new ru(e.snapshotNode,r,i),e.prevName)}getEventRunner(e){return e.getEventType()==="cancel"?()=>this.callbackContext.onCancel(e.error):()=>this.callbackContext.onValue(e.snapshot,e.prevName)}matches(e){return e instanceof iu?this.eventType===e.eventType&&(!this.callbackContext||!e.callbackContext||this.callbackContext.matches(e.callbackContext)):!1}hasAnyCallback(){return!!this.callbackContext}}function Uo(t,e,n,r,i){let s;if(typeof r=="object"&&(s=void 0,i=r),typeof r=="function"&&(s=r),i&&i.onlyOnce){const a=n,u=(c,d)=>{kd(t._repo,t,l),a(c,d)};u.userCallback=n.userCallback,u.context=n.context,n=u}const o=new ff(n,s||void 0),l=e==="value"?new Fo(o):new iu(e,o);return DR(t._repo,t,l),()=>kd(t._repo,t,l)}function Nd(t,e,n,r){return Uo(t,"value",e,n,r)}function Km(t,e,n,r){return Uo(t,"child_added",e,n,r)}function qm(t,e,n,r){return Uo(t,"child_changed",e,n,r)}function Ym(t,e,n,r){return Uo(t,"child_moved",e,n,r)}function Xm(t,e,n,r){return Uo(t,"child_removed",e,n,r)}function Jm(t,e,n){let r=null;const i=n?new ff(n):null;e==="value"?r=new Fo(i):e&&(r=new iu(e,i)),kd(t._repo,t,r)}class Xt{}class Cw extends Xt{constructor(e,n){super(),this._value=e,this._key=n}_apply(e){hn("endAt",this._value,e._path,!0);const n=md(e._queryParams,this._value,this._key);if(nu(n),vr(n),e._queryParams.hasEnd())throw new Error("endAt: Starting point was already set (by another call to endAt, endBefore or equalTo).");return new gt(e._repo,e._path,n,e._orderByCalled)}}function KR(t,e){return Mo("endAt","key",e,!0),new Cw(t,e)}class qR extends Xt{constructor(e,n){super(),this._value=e,this._key=n}_apply(e){hn("endBefore",this._value,e._path,!1);const n=rT(e._queryParams,this._value,this._key);if(nu(n),vr(n),e._queryParams.hasEnd())throw new Error("endBefore: Starting point was already set (by another call to endAt, endBefore or equalTo).");return new gt(e._repo,e._path,n,e._orderByCalled)}}function YR(t,e){return Mo("endBefore","key",e,!0),new qR(t,e)}class Sw extends Xt{constructor(e,n){super(),this._value=e,this._key=n}_apply(e){hn("startAt",this._value,e._path,!0);const n=pd(e._queryParams,this._value,this._key);if(nu(n),vr(n),e._queryParams.hasStart())throw new Error("startAt: Starting point was already set (by another call to startAt, startBefore or equalTo).");return new gt(e._repo,e._path,n,e._orderByCalled)}}function XR(t=null,e){return Mo("startAt","key",e,!0),new Sw(t,e)}class JR extends Xt{constructor(e,n){super(),this._value=e,this._key=n}_apply(e){hn("startAfter",this._value,e._path,!1);const n=nT(e._queryParams,this._value,this._key);if(nu(n),vr(n),e._queryParams.hasStart())throw new Error("startAfter: Starting point was already set (by another call to startAt, startAfter, or equalTo).");return new gt(e._repo,e._path,n,e._orderByCalled)}}function ZR(t,e){return Mo("startAfter","key",e,!0),new JR(t,e)}class eN extends Xt{constructor(e){super(),this._limit=e}_apply(e){if(e._queryParams.hasLimit())throw new Error("limitToFirst: Limit was already set (by another call to limitToFirst or limitToLast).");return new gt(e._repo,e._path,eT(e._queryParams,this._limit),e._orderByCalled)}}function tN(t){if(typeof t!="number"||Math.floor(t)!==t||t<=0)throw new Error("limitToFirst: First argument must be a positive integer.");return new eN(t)}class nN extends Xt{constructor(e){super(),this._limit=e}_apply(e){if(e._queryParams.hasLimit())throw new Error("limitToLast: Limit was already set (by another call to limitToFirst or limitToLast).");return new gt(e._repo,e._path,tT(e._queryParams,this._limit),e._orderByCalled)}}function rN(t){if(typeof t!="number"||Math.floor(t)!==t||t<=0)throw new Error("limitToLast: First argument must be a positive integer.");return new nN(t)}class iN extends Xt{constructor(e){super(),this._path=e}_apply(e){tu(e,"orderByChild");const n=new Z(this._path);if(G(n))throw new Error("orderByChild: cannot pass in empty path. Use orderByValue() instead.");const r=new zh(n),i=$a(e._queryParams,r);return vr(i),new gt(e._repo,e._path,i,!0)}}function sN(t){if(t==="$key")throw new Error('orderByChild: "$key" is invalid. Use orderByKey() instead.');if(t==="$priority")throw new Error('orderByChild: "$priority" is invalid. Use orderByPriority() instead.');if(t==="$value")throw new Error('orderByChild: "$value" is invalid. Use orderByValue() instead.');return Co("orderByChild","path",t,!1),new iN(t)}class oN extends Xt{_apply(e){tu(e,"orderByKey");const n=$a(e._queryParams,un);return vr(n),new gt(e._repo,e._path,n,!0)}}function lN(){return new oN}class aN extends Xt{_apply(e){tu(e,"orderByPriority");const n=$a(e._queryParams,ce);return vr(n),new gt(e._repo,e._path,n,!0)}}function uN(){return new aN}class cN extends Xt{_apply(e){tu(e,"orderByValue");const n=$a(e._queryParams,$h);return vr(n),new gt(e._repo,e._path,n,!0)}}function dN(){return new cN}class hN extends Xt{constructor(e,n){super(),this._value=e,this._key=n}_apply(e){if(hn("equalTo",this._value,e._path,!1),e._queryParams.hasStart())throw new Error("equalTo: Starting point was already set (by another call to startAt/startAfter or equalTo).");if(e._queryParams.hasEnd())throw new Error("equalTo: Ending point was already set (by another call to endAt/endBefore or equalTo).");return new Cw(this._value,this._key)._apply(new Sw(this._value,this._key)._apply(e))}}function fN(t,e){return Mo("equalTo","key",e,!0),new hN(t,e)}function Bt(t,...e){let n=Re(t);for(const r of e)n=r._apply(n);return n}VT(jt);YT(jt);/** + */class gt{constructor(e,n,r,i){this._repo=e,this._path=n,this._queryParams=r,this._orderByCalled=i}get key(){return G(this._path)?null:Bh(this._path)}get ref(){return new jt(this._repo,this._path)}get _queryIdentifier(){const e=Lm(this._queryParams),n=Mh(e);return n==="{}"?"default":n}get _queryObject(){return Lm(this._queryParams)}isEqual(e){if(e=Re(e),!(e instanceof gt))return!1;const n=this._repo===e._repo,r=zh(this._path,e._path),i=this._queryIdentifier===e._queryIdentifier;return n&&r&&i}toJSON(){return this.toString()}toString(){return this._repo.toString()+zk(this._path)}}function iu(t,e){if(t._orderByCalled===!0)throw new Error(e+": You can't combine multiple orderBy calls.")}function Er(t){let e=null,n=null;if(t.hasStart()&&(e=t.getIndexStartValue()),t.hasEnd()&&(n=t.getIndexEndValue()),t.getIndex()===un){const r="Query: When ordering by key, you may only pass one argument to startAt(), endAt(), or equalTo().",i="Query: When ordering by key, the argument passed to startAt(), startAfter(), endAt(), endBefore(), or equalTo() must be a string.";if(t.hasStart()){if(t.getIndexStartName()!==fr)throw new Error(r);if(typeof e!="string")throw new Error(i)}if(t.hasEnd()){if(t.getIndexEndName()!==Dn)throw new Error(r);if(typeof n!="string")throw new Error(i)}}else if(t.getIndex()===ce){if(e!=null&&!So(e)||n!=null&&!So(n))throw new Error("Query: When ordering by priority, the first argument passed to startAt(), startAfter() endAt(), endBefore(), or equalTo() must be a valid priority value (null, a number, or a string).")}else if(R(t.getIndex()instanceof Hh||t.getIndex()===Vh,"unknown index type."),e!=null&&typeof e=="object"||n!=null&&typeof n=="object")throw new Error("Query: First argument passed to startAt(), startAfter(), endAt(), endBefore(), or equalTo() cannot be an object.")}function su(t){if(t.hasStart()&&t.hasEnd()&&t.hasLimit()&&!t.hasAnchoredLimit())throw new Error("Query: Can't combine startAt(), startAfter(), endAt(), endBefore(), and limit(). Use limitToFirst() or limitToLast() instead.")}class jt extends gt{constructor(e,n){super(e,n,new Ha,!1)}get parent(){const e=Fv(this._path);return e===null?null:new jt(this._repo,e)}get root(){let e=this;for(;e.parent!==null;)e=e.parent;return e}}let ou=class Pd{constructor(e,n,r){this._node=e,this.ref=n,this._index=r}get priority(){return this._node.getPriority().val()}get key(){return this.ref.key}get size(){return this._node.numChildren()}child(e){const n=new Z(e),r=Yr(this.ref,e);return new Pd(this._node.getChild(n),r,ce)}exists(){return!this._node.isEmpty()}exportVal(){return this._node.val(!0)}forEach(e){return this._node.isLeafNode()?!1:!!this._node.forEachChild(this._index,(r,i)=>e(new Pd(i,Yr(this.ref,r),ce)))}hasChild(e){const n=new Z(e);return!this._node.getChild(n).isEmpty()}hasChildren(){return this._node.isLeafNode()?!1:!this._node.isEmpty()}toJSON(){return this.exportVal()}val(){return this._node.val()}};function Tw(t,e){return t=Re(t),t._checkNotDeleted("ref"),e!==void 0?Yr(t._root,e):t._root}function Xm(t,e){t=Re(t),t._checkNotDeleted("refFromURL");const n=Id(e,t._repo.repoInfo_.nodeAdmin);mw("refFromURL",n);const r=n.repoInfo;return!t._repo.repoInfo_.isCustomHost()&&r.host!==t._repo.repoInfo_.host&&dn("refFromURL: Host name does not match the current database: (found "+r.host+" but expected "+t._repo.repoInfo_.host+")"),Tw(t,n.path.toString())}function Yr(t,e){return t=Re(t),V(t._path)===null?IR("child","path",e,!1):xo("child","path",e,!1),new jt(t._repo,ge(t._path,e))}function JR(t,e){t=Re(t),Dt("push",t._path),hn("push",e,t._path,!0);const n=vw(t._repo),r=YR(n),i=Yr(t,r),s=Yr(t,r);let o;return e!=null?o=_f(s,e).then(()=>s):o=Promise.resolve(s),i.then=o.then.bind(o),i.catch=o.then.bind(o,void 0),i}function ZR(t){return Dt("remove",t._path),_f(t,null)}function _f(t,e){t=Re(t),Dt("set",t._path),hn("set",e,t._path,!1);const n=new ut;return ff(t._repo,t._path,e,null,n.wrapCallback(()=>{})),n.promise}function eN(t,e){t=Re(t),Dt("setPriority",t._path),df("setPriority",e,!1);const n=new ut;return ff(t._repo,ge(t._path,".priority"),e,null,n.wrapCallback(()=>{})),n.promise}function tN(t,e,n){if(Dt("setWithPriority",t._path),hn("setWithPriority",e,t._path,!1),df("setWithPriority",n,!1),t.key===".length"||t.key===".keys")throw"setWithPriority failed: "+t.key+" is a read-only object.";const r=new ut;return ff(t._repo,t._path,e,n,r.wrapCallback(()=>{})),r.promise}function nN(t,e){pw("update",e,t._path,!1);const n=new ut;return jR(t._repo,t._path,e,n.wrapCallback(()=>{})),n.promise}function rN(t){t=Re(t);const e=new gf(()=>{}),n=new Bo(e);return MR(t._repo,t,n).then(r=>new ou(r,new jt(t._repo,t._path),t._queryParams.getIndex()))}class Bo{constructor(e){this.callbackContext=e}respondsTo(e){return e==="value"}createEvent(e,n){const r=n._queryParams.getIndex();return new xw("value",this,new ou(e.snapshotNode,new jt(n._repo,n._path),r))}getEventRunner(e){return e.getEventType()==="cancel"?()=>this.callbackContext.onCancel(e.error):()=>this.callbackContext.onValue(e.snapshot,null)}createCancelEvent(e,n){return this.callbackContext.hasCancelCallback?new kw(this,e,n):null}matches(e){return e instanceof Bo?!e.callbackContext||!this.callbackContext?!0:e.callbackContext.matches(this.callbackContext):!1}hasAnyCallback(){return this.callbackContext!==null}}class lu{constructor(e,n){this.eventType=e,this.callbackContext=n}respondsTo(e){let n=e==="children_added"?"child_added":e;return n=n==="children_removed"?"child_removed":n,this.eventType===n}createCancelEvent(e,n){return this.callbackContext.hasCancelCallback?new kw(this,e,n):null}createEvent(e,n){R(e.childName!=null,"Child events should have a childName.");const r=Yr(new jt(n._repo,n._path),e.childName),i=n._queryParams.getIndex();return new xw(e.type,this,new ou(e.snapshotNode,r,i),e.prevName)}getEventRunner(e){return e.getEventType()==="cancel"?()=>this.callbackContext.onCancel(e.error):()=>this.callbackContext.onValue(e.snapshot,e.prevName)}matches(e){return e instanceof lu?this.eventType===e.eventType&&(!this.callbackContext||!e.callbackContext||this.callbackContext.matches(e.callbackContext)):!1}hasAnyCallback(){return!!this.callbackContext}}function zo(t,e,n,r,i){let s;if(typeof r=="object"&&(s=void 0,i=r),typeof r=="function"&&(s=r),i&&i.onlyOnce){const a=n,u=(c,d)=>{Nd(t._repo,t,l),a(c,d)};u.userCallback=n.userCallback,u.context=n.context,n=u}const o=new gf(n,s||void 0),l=e==="value"?new Bo(o):new lu(e,o);return $R(t._repo,t,l),()=>Nd(t._repo,t,l)}function bd(t,e,n,r){return zo(t,"value",e,n,r)}function Jm(t,e,n,r){return zo(t,"child_added",e,n,r)}function Zm(t,e,n,r){return zo(t,"child_changed",e,n,r)}function eg(t,e,n,r){return zo(t,"child_moved",e,n,r)}function tg(t,e,n,r){return zo(t,"child_removed",e,n,r)}function ng(t,e,n){let r=null;const i=n?new gf(n):null;e==="value"?r=new Bo(i):e&&(r=new lu(e,i)),Nd(t._repo,t,r)}class Xt{}class Rw extends Xt{constructor(e,n){super(),this._value=e,this._key=n}_apply(e){hn("endAt",this._value,e._path,!0);const n=yd(e._queryParams,this._value,this._key);if(su(n),Er(n),e._queryParams.hasEnd())throw new Error("endAt: Starting point was already set (by another call to endAt, endBefore or equalTo).");return new gt(e._repo,e._path,n,e._orderByCalled)}}function iN(t,e){return Fo("endAt","key",e,!0),new Rw(t,e)}class sN extends Xt{constructor(e,n){super(),this._value=e,this._key=n}_apply(e){hn("endBefore",this._value,e._path,!1);const n=fT(e._queryParams,this._value,this._key);if(su(n),Er(n),e._queryParams.hasEnd())throw new Error("endBefore: Starting point was already set (by another call to endAt, endBefore or equalTo).");return new gt(e._repo,e._path,n,e._orderByCalled)}}function oN(t,e){return Fo("endBefore","key",e,!0),new sN(t,e)}class Nw extends Xt{constructor(e,n){super(),this._value=e,this._key=n}_apply(e){hn("startAt",this._value,e._path,!0);const n=_d(e._queryParams,this._value,this._key);if(su(n),Er(n),e._queryParams.hasStart())throw new Error("startAt: Starting point was already set (by another call to startAt, startBefore or equalTo).");return new gt(e._repo,e._path,n,e._orderByCalled)}}function lN(t=null,e){return Fo("startAt","key",e,!0),new Nw(t,e)}class aN extends Xt{constructor(e,n){super(),this._value=e,this._key=n}_apply(e){hn("startAfter",this._value,e._path,!1);const n=hT(e._queryParams,this._value,this._key);if(su(n),Er(n),e._queryParams.hasStart())throw new Error("startAfter: Starting point was already set (by another call to startAt, startAfter, or equalTo).");return new gt(e._repo,e._path,n,e._orderByCalled)}}function uN(t,e){return Fo("startAfter","key",e,!0),new aN(t,e)}class cN extends Xt{constructor(e){super(),this._limit=e}_apply(e){if(e._queryParams.hasLimit())throw new Error("limitToFirst: Limit was already set (by another call to limitToFirst or limitToLast).");return new gt(e._repo,e._path,cT(e._queryParams,this._limit),e._orderByCalled)}}function dN(t){if(typeof t!="number"||Math.floor(t)!==t||t<=0)throw new Error("limitToFirst: First argument must be a positive integer.");return new cN(t)}class hN extends Xt{constructor(e){super(),this._limit=e}_apply(e){if(e._queryParams.hasLimit())throw new Error("limitToLast: Limit was already set (by another call to limitToFirst or limitToLast).");return new gt(e._repo,e._path,dT(e._queryParams,this._limit),e._orderByCalled)}}function fN(t){if(typeof t!="number"||Math.floor(t)!==t||t<=0)throw new Error("limitToLast: First argument must be a positive integer.");return new hN(t)}class pN extends Xt{constructor(e){super(),this._path=e}_apply(e){iu(e,"orderByChild");const n=new Z(this._path);if(G(n))throw new Error("orderByChild: cannot pass in empty path. Use orderByValue() instead.");const r=new Hh(n),i=Va(e._queryParams,r);return Er(i),new gt(e._repo,e._path,i,!0)}}function mN(t){if(t==="$key")throw new Error('orderByChild: "$key" is invalid. Use orderByKey() instead.');if(t==="$priority")throw new Error('orderByChild: "$priority" is invalid. Use orderByPriority() instead.');if(t==="$value")throw new Error('orderByChild: "$value" is invalid. Use orderByValue() instead.');return xo("orderByChild","path",t,!1),new pN(t)}class gN extends Xt{_apply(e){iu(e,"orderByKey");const n=Va(e._queryParams,un);return Er(n),new gt(e._repo,e._path,n,!0)}}function _N(){return new gN}class yN extends Xt{_apply(e){iu(e,"orderByPriority");const n=Va(e._queryParams,ce);return Er(n),new gt(e._repo,e._path,n,!0)}}function vN(){return new yN}class wN extends Xt{_apply(e){iu(e,"orderByValue");const n=Va(e._queryParams,Vh);return Er(n),new gt(e._repo,e._path,n,!0)}}function EN(){return new wN}class CN extends Xt{constructor(e,n){super(),this._value=e,this._key=n}_apply(e){if(hn("equalTo",this._value,e._path,!1),e._queryParams.hasStart())throw new Error("equalTo: Starting point was already set (by another call to startAt/startAfter or equalTo).");if(e._queryParams.hasEnd())throw new Error("equalTo: Ending point was already set (by another call to endAt/endBefore or equalTo).");return new Rw(this._value,this._key)._apply(new Nw(this._value,this._key)._apply(e))}}function SN(t,e){return Fo("equalTo","key",e,!0),new CN(t,e)}function Bt(t,...e){let n=Re(t);for(const r of e)n=r._apply(n);return n}tR(jt);oR(jt);/** * @license * Copyright 2020 Google LLC * @@ -1799,7 +1799,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const pN="FIREBASE_DATABASE_EMULATOR_HOST",Id={};let mN=!1;function gN(t,e,n,r){t.repoInfo_=new xv(`${e}:${n}`,!1,t.repoInfo_.namespace,t.repoInfo_.webSocketOnly,t.repoInfo_.nodeAdmin,t.repoInfo_.persistenceKey,t.repoInfo_.includeNamespaceInQueryParams,!0),r&&(t.authTokenProvider_=r)}function xw(t,e,n,r,i){let s=r||t.options.databaseURL;s===void 0&&(t.options.projectId||dn("Can't determine Firebase Database URL. Be sure to include a Project ID when calling firebase.initializeApp()."),ze("Using default host for project ",t.options.projectId),s=`${t.options.projectId}-default-rtdb.firebaseio.com`);let o=Td(s,i),l=o.repoInfo,a,u;typeof process<"u"&&process.env&&(u=process.env[pN]),u?(a=!0,s=`http://${u}?ns=${l.namespace}`,o=Td(s,i),l=o.repoInfo):a=!o.repoInfo.secure;const c=i&&a?new Ai(Ai.OWNER):new sk(t.name,t.options,e);cw("Invalid Firebase Database URL",o),G(o.path)||dn("Database URL must point to the root of a Firebase Database (not including a child path).");const d=yN(l,t,c,new ik(t.name,n));return new vN(d,t)}function _N(t,e){const n=Id[e];(!n||n[t.key]!==t)&&dn(`Database ${e}(${t.repoInfo_}) has already been deleted.`),mw(t),delete n[t.key]}function yN(t,e,n,r){let i=Id[e.name];i||(i={},Id[e.name]=i);let s=i[t.toURLString()];return s&&dn("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call."),s=new SR(t,mN,n,r),i[t.toURLString()]=s,s}let vN=class{constructor(e,n){this._repoInternal=e,this.app=n,this.type="database",this._instanceStarted=!1}get _repo(){return this._instanceStarted||(xR(this._repoInternal,this.app.options.appId,this.app.options.databaseAuthVariableOverride),this._instanceStarted=!0),this._repoInternal}get _root(){return this._rootInternal||(this._rootInternal=new jt(this._repo,J())),this._rootInternal}_delete(){return this._rootInternal!==null&&(_N(this._repo,this.app.name),this._repoInternal=null,this._rootInternal=null),Promise.resolve()}_checkNotDeleted(e){this._rootInternal===null&&dn("Cannot call "+e+" on a deleted database.")}};function kw(){Wi.IS_TRANSPORT_INITIALIZED&&Ze("Transport has already been initialized. Please call this function before calling ref or setting up a listener")}function wN(){kw(),Qn.forceDisallow()}function EN(){kw(),It.forceDisallow(),Qn.forceAllow()}function CN(t,e,n,r={}){t=Re(t),t._checkNotDeleted("useEmulator"),t._instanceStarted&&dn("Cannot call useEmulator() after instance has already been initialized.");const i=t._repoInternal;let s;if(i.repoInfo_.nodeAdmin)r.mockUserToken&&dn('mockUserToken is not supported by the Admin SDK. For client access with mock users, please use the "firebase" package instead of "firebase-admin".'),s=new Ai(Ai.OWNER);else if(r.mockUserToken){const o=typeof r.mockUserToken=="string"?r.mockUserToken:Vy(r.mockUserToken,t.app.options.projectId);s=new Ai(o)}gN(i,e,n,s)}function SN(t){t=Re(t),t._checkNotDeleted("goOffline"),mw(t._repo)}function xN(t){t=Re(t),t._checkNotDeleted("goOnline"),AR(t._repo)}function kN(t,e){hv(t,e)}/** + */const xN="FIREBASE_DATABASE_EMULATOR_HOST",Dd={};let kN=!1;function TN(t,e,n,r){t.repoInfo_=new Iv(`${e}:${n}`,!1,t.repoInfo_.namespace,t.repoInfo_.webSocketOnly,t.repoInfo_.nodeAdmin,t.repoInfo_.persistenceKey,t.repoInfo_.includeNamespaceInQueryParams,!0),r&&(t.authTokenProvider_=r)}function Iw(t,e,n,r,i){let s=r||t.options.databaseURL;s===void 0&&(t.options.projectId||dn("Can't determine Firebase Database URL. Be sure to include a Project ID when calling firebase.initializeApp()."),ze("Using default host for project ",t.options.projectId),s=`${t.options.projectId}-default-rtdb.firebaseio.com`);let o=Id(s,i),l=o.repoInfo,a,u;typeof process<"u"&&process.env&&(u=process.env[xN]),u?(a=!0,s=`http://${u}?ns=${l.namespace}`,o=Id(s,i),l=o.repoInfo):a=!o.repoInfo.secure;const c=i&&a?new Li(Li.OWNER):new mk(t.name,t.options,e);mw("Invalid Firebase Database URL",o),G(o.path)||dn("Database URL must point to the root of a Firebase Database (not including a child path).");const d=NN(l,t,c,new pk(t.name,n));return new IN(d,t)}function RN(t,e){const n=Dd[e];(!n||n[t.key]!==t)&&dn(`Database ${e}(${t.repoInfo_}) has already been deleted.`),ww(t),delete n[t.key]}function NN(t,e,n,r){let i=Dd[e.name];i||(i={},Dd[e.name]=i);let s=i[t.toURLString()];return s&&dn("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call."),s=new AR(t,kN,n,r),i[t.toURLString()]=s,s}let IN=class{constructor(e,n){this._repoInternal=e,this.app=n,this.type="database",this._instanceStarted=!1}get _repo(){return this._instanceStarted||(OR(this._repoInternal,this.app.options.appId,this.app.options.databaseAuthVariableOverride),this._instanceStarted=!0),this._repoInternal}get _root(){return this._rootInternal||(this._rootInternal=new jt(this._repo,J())),this._rootInternal}_delete(){return this._rootInternal!==null&&(RN(this._repo,this.app.name),this._repoInternal=null,this._rootInternal=null),Promise.resolve()}_checkNotDeleted(e){this._rootInternal===null&&dn("Cannot call "+e+" on a deleted database.")}};function Pw(){Vi.IS_TRANSPORT_INITIALIZED&&Ze("Transport has already been initialized. Please call this function before calling ref or setting up a listener")}function PN(){Pw(),Kn.forceDisallow()}function bN(){Pw(),It.forceDisallow(),Kn.forceAllow()}function DN(t,e,n,r={}){t=Re(t),t._checkNotDeleted("useEmulator"),t._instanceStarted&&dn("Cannot call useEmulator() after instance has already been initialized.");const i=t._repoInternal;let s;if(i.repoInfo_.nodeAdmin)r.mockUserToken&&dn('mockUserToken is not supported by the Admin SDK. For client access with mock users, please use the "firebase" package instead of "firebase-admin".'),s=new Li(Li.OWNER);else if(r.mockUserToken){const o=typeof r.mockUserToken=="string"?r.mockUserToken:Yy(r.mockUserToken,t.app.options.projectId);s=new Li(o)}TN(i,e,n,s)}function AN(t){t=Re(t),t._checkNotDeleted("goOffline"),ww(t._repo)}function ON(t){t=Re(t),t._checkNotDeleted("goOnline"),WR(t._repo)}function LN(t,e){_v(t,e)}/** * @license * Copyright 2021 Google LLC * @@ -1814,7 +1814,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function TN(t){av(Fa),Vr(new Yt("database",(e,{instanceIdentifier:n})=>{const r=e.getProvider("app").getImmediate(),i=e.getProvider("auth-internal"),s=e.getProvider("app-check-internal");return xw(r,i,s,n)},"PUBLIC").setMultipleInstances(!0)),an(pm,mm,t),an(pm,mm,"esm2017")}/** + */function MN(t){fv(za),Qr(new Yt("database",(e,{instanceIdentifier:n})=>{const r=e.getProvider("app").getImmediate(),i=e.getProvider("auth-internal"),s=e.getProvider("app-check-internal");return Iw(r,i,s,n)},"PUBLIC").setMultipleInstances(!0)),an(ym,vm,t),an(ym,vm,"esm2017")}/** * @license * Copyright 2020 Google LLC * @@ -1829,7 +1829,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const RN={".sv":"timestamp"};function NN(){return RN}function IN(t){return{".sv":{increment:t}}}/** + */const jN={".sv":"timestamp"};function FN(){return jN}function UN(t){return{".sv":{increment:t}}}/** * @license * Copyright 2020 Google LLC * @@ -1844,7 +1844,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */let PN=class{constructor(e,n){this.committed=e,this.snapshot=n}toJSON(){return{committed:this.committed,snapshot:this.snapshot.toJSON()}}};function bN(t,e,n){var r;if(t=Re(t),Dt("Reference.transaction",t._path),t.key===".length"||t.key===".keys")throw"Reference.transaction failed: "+t.key+" is a read-only object.";const i=(r=n==null?void 0:n.applyLocally)!==null&&r!==void 0?r:!0,s=new ut,o=(a,u,c)=>{let d=null;a?s.reject(a):(d=new ru(c,new jt(t._repo,t._path),ce),s.resolve(new PN(u,d)))},l=Nd(t,()=>{});return OR(t._repo,t._path,e,o,l,i),s.promise}kn.prototype.simpleListen=function(t,e){this.sendRequest("q",{p:t},e)};kn.prototype.echo=function(t,e){this.sendRequest("echo",{d:t},e)};TN();const DN="@firebase/database-compat",AN="1.0.1";/** + */let BN=class{constructor(e,n){this.committed=e,this.snapshot=n}toJSON(){return{committed:this.committed,snapshot:this.snapshot.toJSON()}}};function zN(t,e,n){var r;if(t=Re(t),Dt("Reference.transaction",t._path),t.key===".length"||t.key===".keys")throw"Reference.transaction failed: "+t.key+" is a read-only object.";const i=(r=n==null?void 0:n.applyLocally)!==null&&r!==void 0?r:!0,s=new ut,o=(a,u,c)=>{let d=null;a?s.reject(a):(d=new ou(c,new jt(t._repo,t._path),ce),s.resolve(new BN(u,d)))},l=bd(t,()=>{});return HR(t._repo,t._path,e,o,l,i),s.promise}Tn.prototype.simpleListen=function(t,e){this.sendRequest("q",{p:t},e)};Tn.prototype.echo=function(t,e){this.sendRequest("echo",{d:t},e)};MN();const $N="@firebase/database-compat",WN="1.0.1";/** * @license * Copyright 2021 Google LLC * @@ -1859,7 +1859,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const ON=new ja("@firebase/database-compat"),Tw=function(t){const e="FIREBASE WARNING: "+t;ON.warn(e)};/** + */const HN=new Ba("@firebase/database-compat"),bw=function(t){const e="FIREBASE WARNING: "+t;HN.warn(e)};/** * @license * Copyright 2021 Google LLC * @@ -1874,7 +1874,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const LN=function(t,e,n,r){if(!(r&&n===void 0)&&typeof n!="boolean")throw new Error(mt(t,e)+"must be a boolean.")},MN=function(t,e,n){if(!(n&&e===void 0))switch(e){case"value":case"child_added":case"child_removed":case"child_changed":case"child_moved":break;default:throw new Error(mt(t,"eventType")+'must be a valid event type = "value", "child_added", "child_removed", "child_changed", or "child_moved".')}};/** + */const VN=function(t,e,n,r){if(!(r&&n===void 0)&&typeof n!="boolean")throw new Error(mt(t,e)+"must be a boolean.")},GN=function(t,e,n){if(!(n&&e===void 0))switch(e){case"value":case"child_added":case"child_removed":case"child_changed":case"child_moved":break;default:throw new Error(mt(t,"eventType")+'must be a valid event type = "value", "child_added", "child_removed", "child_changed", or "child_moved".')}};/** * @license * Copyright 2017 Google LLC * @@ -1889,7 +1889,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class jN{constructor(e){this._delegate=e}cancel(e){U("OnDisconnect.cancel",0,1,arguments.length),Ue("OnDisconnect.cancel","onComplete",e,!0);const n=this._delegate.cancel();return e&&n.then(()=>e(null),r=>e(r)),n}remove(e){U("OnDisconnect.remove",0,1,arguments.length),Ue("OnDisconnect.remove","onComplete",e,!0);const n=this._delegate.remove();return e&&n.then(()=>e(null),r=>e(r)),n}set(e,n){U("OnDisconnect.set",1,2,arguments.length),Ue("OnDisconnect.set","onComplete",n,!0);const r=this._delegate.set(e);return n&&r.then(()=>n(null),i=>n(i)),r}setWithPriority(e,n,r){U("OnDisconnect.setWithPriority",2,3,arguments.length),Ue("OnDisconnect.setWithPriority","onComplete",r,!0);const i=this._delegate.setWithPriority(e,n);return r&&i.then(()=>r(null),s=>r(s)),i}update(e,n){if(U("OnDisconnect.update",1,2,arguments.length),Array.isArray(e)){const i={};for(let s=0;sn(null),i=>n(i)),r}}/** + */class QN{constructor(e){this._delegate=e}cancel(e){U("OnDisconnect.cancel",0,1,arguments.length),Ue("OnDisconnect.cancel","onComplete",e,!0);const n=this._delegate.cancel();return e&&n.then(()=>e(null),r=>e(r)),n}remove(e){U("OnDisconnect.remove",0,1,arguments.length),Ue("OnDisconnect.remove","onComplete",e,!0);const n=this._delegate.remove();return e&&n.then(()=>e(null),r=>e(r)),n}set(e,n){U("OnDisconnect.set",1,2,arguments.length),Ue("OnDisconnect.set","onComplete",n,!0);const r=this._delegate.set(e);return n&&r.then(()=>n(null),i=>n(i)),r}setWithPriority(e,n,r){U("OnDisconnect.setWithPriority",2,3,arguments.length),Ue("OnDisconnect.setWithPriority","onComplete",r,!0);const i=this._delegate.setWithPriority(e,n);return r&&i.then(()=>r(null),s=>r(s)),i}update(e,n){if(U("OnDisconnect.update",1,2,arguments.length),Array.isArray(e)){const i={};for(let s=0;sn(null),i=>n(i)),r}}/** * @license * Copyright 2017 Google LLC * @@ -1904,7 +1904,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class FN{constructor(e,n){this.committed=e,this.snapshot=n}toJSON(){return U("TransactionResult.toJSON",0,1,arguments.length),{committed:this.committed,snapshot:this.snapshot.toJSON()}}}/** + */class KN{constructor(e,n){this.committed=e,this.snapshot=n}toJSON(){return U("TransactionResult.toJSON",0,1,arguments.length),{committed:this.committed,snapshot:this.snapshot.toJSON()}}}/** * @license * Copyright 2017 Google LLC * @@ -1919,7 +1919,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class or{constructor(e,n){this._database=e,this._delegate=n}val(){return U("DataSnapshot.val",0,0,arguments.length),this._delegate.val()}exportVal(){return U("DataSnapshot.exportVal",0,0,arguments.length),this._delegate.exportVal()}toJSON(){return U("DataSnapshot.toJSON",0,1,arguments.length),this._delegate.toJSON()}exists(){return U("DataSnapshot.exists",0,0,arguments.length),this._delegate.exists()}child(e){return U("DataSnapshot.child",0,1,arguments.length),e=String(e),Co("DataSnapshot.child","path",e,!1),new or(this._database,this._delegate.child(e))}hasChild(e){return U("DataSnapshot.hasChild",1,1,arguments.length),Co("DataSnapshot.hasChild","path",e,!1),this._delegate.hasChild(e)}getPriority(){return U("DataSnapshot.getPriority",0,0,arguments.length),this._delegate.priority}forEach(e){return U("DataSnapshot.forEach",1,1,arguments.length),Ue("DataSnapshot.forEach","action",e,!1),this._delegate.forEach(n=>e(new or(this._database,n)))}hasChildren(){return U("DataSnapshot.hasChildren",0,0,arguments.length),this._delegate.hasChildren()}get key(){return this._delegate.key}numChildren(){return U("DataSnapshot.numChildren",0,0,arguments.length),this._delegate.size}getRef(){return U("DataSnapshot.ref",0,0,arguments.length),new Dr(this._database,this._delegate.ref)}get ref(){return this.getRef()}}class Ve{constructor(e,n){this.database=e,this._delegate=n}on(e,n,r,i){var s;U("Query.on",2,4,arguments.length),Ue("Query.on","callback",n,!1);const o=Ve.getCancelAndContextArgs_("Query.on",r,i),l=(u,c)=>{n.call(o.context,new or(this.database,u),c)};l.userCallback=n,l.context=o.context;const a=(s=o.cancel)===null||s===void 0?void 0:s.bind(o.context);switch(e){case"value":return Nd(this._delegate,l,a),n;case"child_added":return Km(this._delegate,l,a),n;case"child_removed":return Xm(this._delegate,l,a),n;case"child_changed":return qm(this._delegate,l,a),n;case"child_moved":return Ym(this._delegate,l,a),n;default:throw new Error(mt("Query.on","eventType")+'must be a valid event type = "value", "child_added", "child_removed", "child_changed", or "child_moved".')}}off(e,n,r){if(U("Query.off",0,3,arguments.length),MN("Query.off",e,!0),Ue("Query.off","callback",n,!0),im("Query.off","context",r,!0),n){const i=()=>{};i.userCallback=n,i.context=r,Jm(this._delegate,e,i)}else Jm(this._delegate,e)}get(){return QR(this._delegate).then(e=>new or(this.database,e))}once(e,n,r,i){U("Query.once",1,4,arguments.length),Ue("Query.once","callback",n,!0);const s=Ve.getCancelAndContextArgs_("Query.once",r,i),o=new ut,l=(u,c)=>{const d=new or(this.database,u);n&&n.call(s.context,d,c),o.resolve(d)};l.userCallback=n,l.context=s.context;const a=u=>{s.cancel&&s.cancel.call(s.context,u),o.reject(u)};switch(e){case"value":Nd(this._delegate,l,a,{onlyOnce:!0});break;case"child_added":Km(this._delegate,l,a,{onlyOnce:!0});break;case"child_removed":Xm(this._delegate,l,a,{onlyOnce:!0});break;case"child_changed":qm(this._delegate,l,a,{onlyOnce:!0});break;case"child_moved":Ym(this._delegate,l,a,{onlyOnce:!0});break;default:throw new Error(mt("Query.once","eventType")+'must be a valid event type = "value", "child_added", "child_removed", "child_changed", or "child_moved".')}return o.promise}limitToFirst(e){return U("Query.limitToFirst",1,1,arguments.length),new Ve(this.database,Bt(this._delegate,tN(e)))}limitToLast(e){return U("Query.limitToLast",1,1,arguments.length),new Ve(this.database,Bt(this._delegate,rN(e)))}orderByChild(e){return U("Query.orderByChild",1,1,arguments.length),new Ve(this.database,Bt(this._delegate,sN(e)))}orderByKey(){return U("Query.orderByKey",0,0,arguments.length),new Ve(this.database,Bt(this._delegate,lN()))}orderByPriority(){return U("Query.orderByPriority",0,0,arguments.length),new Ve(this.database,Bt(this._delegate,uN()))}orderByValue(){return U("Query.orderByValue",0,0,arguments.length),new Ve(this.database,Bt(this._delegate,dN()))}startAt(e=null,n){return U("Query.startAt",0,2,arguments.length),new Ve(this.database,Bt(this._delegate,XR(e,n)))}startAfter(e=null,n){return U("Query.startAfter",0,2,arguments.length),new Ve(this.database,Bt(this._delegate,ZR(e,n)))}endAt(e=null,n){return U("Query.endAt",0,2,arguments.length),new Ve(this.database,Bt(this._delegate,KR(e,n)))}endBefore(e=null,n){return U("Query.endBefore",0,2,arguments.length),new Ve(this.database,Bt(this._delegate,YR(e,n)))}equalTo(e,n){return U("Query.equalTo",1,2,arguments.length),new Ve(this.database,Bt(this._delegate,fN(e,n)))}toString(){return U("Query.toString",0,0,arguments.length),this._delegate.toString()}toJSON(){return U("Query.toJSON",0,1,arguments.length),this._delegate.toJSON()}isEqual(e){if(U("Query.isEqual",1,1,arguments.length),!(e instanceof Ve)){const n="Query.isEqual failed: First argument must be an instance of firebase.database.Query.";throw new Error(n)}return this._delegate.isEqual(e._delegate)}static getCancelAndContextArgs_(e,n,r){const i={cancel:void 0,context:void 0};if(n&&r)i.cancel=n,Ue(e,"cancel",i.cancel,!0),i.context=r,im(e,"context",i.context,!0);else if(n)if(typeof n=="object"&&n!==null)i.context=n;else if(typeof n=="function")i.cancel=n;else throw new Error(mt(e,"cancelOrContext")+" must either be a cancel callback or a context object.");return i}get ref(){return new Dr(this.database,new jt(this._delegate._repo,this._delegate._path))}}let Dr=class ci extends Ve{constructor(e,n){super(e,new gt(n._repo,n._path,new za,!1)),this.database=e,this._delegate=n}getKey(){return U("Reference.key",0,0,arguments.length),this._delegate.key}child(e){return U("Reference.child",1,1,arguments.length),typeof e=="number"&&(e=String(e)),new ci(this.database,Kr(this._delegate,e))}getParent(){U("Reference.parent",0,0,arguments.length);const e=this._delegate.parent;return e?new ci(this.database,e):null}getRoot(){return U("Reference.root",0,0,arguments.length),new ci(this.database,this._delegate.root)}set(e,n){U("Reference.set",1,2,arguments.length),Ue("Reference.set","onComplete",n,!0);const r=pf(this._delegate,e);return n&&r.then(()=>n(null),i=>n(i)),r}update(e,n){if(U("Reference.update",1,2,arguments.length),Array.isArray(e)){const i={};for(let s=0;sn(null),i=>n(i)),r}setWithPriority(e,n,r){U("Reference.setWithPriority",2,3,arguments.length),Ue("Reference.setWithPriority","onComplete",r,!0);const i=VR(this._delegate,e,n);return r&&i.then(()=>r(null),s=>r(s)),i}remove(e){U("Reference.remove",0,1,arguments.length),Ue("Reference.remove","onComplete",e,!0);const n=WR(this._delegate);return e&&n.then(()=>e(null),r=>e(r)),n}transaction(e,n,r){U("Reference.transaction",1,3,arguments.length),Ue("Reference.transaction","transactionUpdate",e,!1),Ue("Reference.transaction","onComplete",n,!0),LN("Reference.transaction","applyLocally",r,!0);const i=bN(this._delegate,e,{applyLocally:r}).then(s=>new FN(s.committed,new or(this.database,s.snapshot)));return n&&i.then(s=>n(null,s.committed,s.snapshot),s=>n(s,!1,null)),i}setPriority(e,n){U("Reference.setPriority",1,2,arguments.length),Ue("Reference.setPriority","onComplete",n,!0);const r=HR(this._delegate,e);return n&&r.then(()=>n(null),i=>n(i)),r}push(e,n){U("Reference.push",0,2,arguments.length),Ue("Reference.push","onComplete",n,!0);const r=$R(this._delegate,e),i=r.then(o=>new ci(this.database,o));n&&i.then(()=>n(null),o=>n(o));const s=new ci(this.database,r);return s.then=i.then.bind(i),s.catch=i.catch.bind(i,void 0),s}onDisconnect(){return Dt("Reference.onDisconnect",this._delegate._path),new jN(new zR(this._delegate._repo,this._delegate._path))}get key(){return this.getKey()}get parent(){return this.getParent()}get root(){return this.getRoot()}};/** + */class ar{constructor(e,n){this._database=e,this._delegate=n}val(){return U("DataSnapshot.val",0,0,arguments.length),this._delegate.val()}exportVal(){return U("DataSnapshot.exportVal",0,0,arguments.length),this._delegate.exportVal()}toJSON(){return U("DataSnapshot.toJSON",0,1,arguments.length),this._delegate.toJSON()}exists(){return U("DataSnapshot.exists",0,0,arguments.length),this._delegate.exists()}child(e){return U("DataSnapshot.child",0,1,arguments.length),e=String(e),xo("DataSnapshot.child","path",e,!1),new ar(this._database,this._delegate.child(e))}hasChild(e){return U("DataSnapshot.hasChild",1,1,arguments.length),xo("DataSnapshot.hasChild","path",e,!1),this._delegate.hasChild(e)}getPriority(){return U("DataSnapshot.getPriority",0,0,arguments.length),this._delegate.priority}forEach(e){return U("DataSnapshot.forEach",1,1,arguments.length),Ue("DataSnapshot.forEach","action",e,!1),this._delegate.forEach(n=>e(new ar(this._database,n)))}hasChildren(){return U("DataSnapshot.hasChildren",0,0,arguments.length),this._delegate.hasChildren()}get key(){return this._delegate.key}numChildren(){return U("DataSnapshot.numChildren",0,0,arguments.length),this._delegate.size}getRef(){return U("DataSnapshot.ref",0,0,arguments.length),new Or(this._database,this._delegate.ref)}get ref(){return this.getRef()}}class Ve{constructor(e,n){this.database=e,this._delegate=n}on(e,n,r,i){var s;U("Query.on",2,4,arguments.length),Ue("Query.on","callback",n,!1);const o=Ve.getCancelAndContextArgs_("Query.on",r,i),l=(u,c)=>{n.call(o.context,new ar(this.database,u),c)};l.userCallback=n,l.context=o.context;const a=(s=o.cancel)===null||s===void 0?void 0:s.bind(o.context);switch(e){case"value":return bd(this._delegate,l,a),n;case"child_added":return Jm(this._delegate,l,a),n;case"child_removed":return tg(this._delegate,l,a),n;case"child_changed":return Zm(this._delegate,l,a),n;case"child_moved":return eg(this._delegate,l,a),n;default:throw new Error(mt("Query.on","eventType")+'must be a valid event type = "value", "child_added", "child_removed", "child_changed", or "child_moved".')}}off(e,n,r){if(U("Query.off",0,3,arguments.length),GN("Query.off",e,!0),Ue("Query.off","callback",n,!0),am("Query.off","context",r,!0),n){const i=()=>{};i.userCallback=n,i.context=r,ng(this._delegate,e,i)}else ng(this._delegate,e)}get(){return rN(this._delegate).then(e=>new ar(this.database,e))}once(e,n,r,i){U("Query.once",1,4,arguments.length),Ue("Query.once","callback",n,!0);const s=Ve.getCancelAndContextArgs_("Query.once",r,i),o=new ut,l=(u,c)=>{const d=new ar(this.database,u);n&&n.call(s.context,d,c),o.resolve(d)};l.userCallback=n,l.context=s.context;const a=u=>{s.cancel&&s.cancel.call(s.context,u),o.reject(u)};switch(e){case"value":bd(this._delegate,l,a,{onlyOnce:!0});break;case"child_added":Jm(this._delegate,l,a,{onlyOnce:!0});break;case"child_removed":tg(this._delegate,l,a,{onlyOnce:!0});break;case"child_changed":Zm(this._delegate,l,a,{onlyOnce:!0});break;case"child_moved":eg(this._delegate,l,a,{onlyOnce:!0});break;default:throw new Error(mt("Query.once","eventType")+'must be a valid event type = "value", "child_added", "child_removed", "child_changed", or "child_moved".')}return o.promise}limitToFirst(e){return U("Query.limitToFirst",1,1,arguments.length),new Ve(this.database,Bt(this._delegate,dN(e)))}limitToLast(e){return U("Query.limitToLast",1,1,arguments.length),new Ve(this.database,Bt(this._delegate,fN(e)))}orderByChild(e){return U("Query.orderByChild",1,1,arguments.length),new Ve(this.database,Bt(this._delegate,mN(e)))}orderByKey(){return U("Query.orderByKey",0,0,arguments.length),new Ve(this.database,Bt(this._delegate,_N()))}orderByPriority(){return U("Query.orderByPriority",0,0,arguments.length),new Ve(this.database,Bt(this._delegate,vN()))}orderByValue(){return U("Query.orderByValue",0,0,arguments.length),new Ve(this.database,Bt(this._delegate,EN()))}startAt(e=null,n){return U("Query.startAt",0,2,arguments.length),new Ve(this.database,Bt(this._delegate,lN(e,n)))}startAfter(e=null,n){return U("Query.startAfter",0,2,arguments.length),new Ve(this.database,Bt(this._delegate,uN(e,n)))}endAt(e=null,n){return U("Query.endAt",0,2,arguments.length),new Ve(this.database,Bt(this._delegate,iN(e,n)))}endBefore(e=null,n){return U("Query.endBefore",0,2,arguments.length),new Ve(this.database,Bt(this._delegate,oN(e,n)))}equalTo(e,n){return U("Query.equalTo",1,2,arguments.length),new Ve(this.database,Bt(this._delegate,SN(e,n)))}toString(){return U("Query.toString",0,0,arguments.length),this._delegate.toString()}toJSON(){return U("Query.toJSON",0,1,arguments.length),this._delegate.toJSON()}isEqual(e){if(U("Query.isEqual",1,1,arguments.length),!(e instanceof Ve)){const n="Query.isEqual failed: First argument must be an instance of firebase.database.Query.";throw new Error(n)}return this._delegate.isEqual(e._delegate)}static getCancelAndContextArgs_(e,n,r){const i={cancel:void 0,context:void 0};if(n&&r)i.cancel=n,Ue(e,"cancel",i.cancel,!0),i.context=r,am(e,"context",i.context,!0);else if(n)if(typeof n=="object"&&n!==null)i.context=n;else if(typeof n=="function")i.cancel=n;else throw new Error(mt(e,"cancelOrContext")+" must either be a cancel callback or a context object.");return i}get ref(){return new Or(this.database,new jt(this._delegate._repo,this._delegate._path))}}let Or=class hi extends Ve{constructor(e,n){super(e,new gt(n._repo,n._path,new Ha,!1)),this.database=e,this._delegate=n}getKey(){return U("Reference.key",0,0,arguments.length),this._delegate.key}child(e){return U("Reference.child",1,1,arguments.length),typeof e=="number"&&(e=String(e)),new hi(this.database,Yr(this._delegate,e))}getParent(){U("Reference.parent",0,0,arguments.length);const e=this._delegate.parent;return e?new hi(this.database,e):null}getRoot(){return U("Reference.root",0,0,arguments.length),new hi(this.database,this._delegate.root)}set(e,n){U("Reference.set",1,2,arguments.length),Ue("Reference.set","onComplete",n,!0);const r=_f(this._delegate,e);return n&&r.then(()=>n(null),i=>n(i)),r}update(e,n){if(U("Reference.update",1,2,arguments.length),Array.isArray(e)){const i={};for(let s=0;sn(null),i=>n(i)),r}setWithPriority(e,n,r){U("Reference.setWithPriority",2,3,arguments.length),Ue("Reference.setWithPriority","onComplete",r,!0);const i=tN(this._delegate,e,n);return r&&i.then(()=>r(null),s=>r(s)),i}remove(e){U("Reference.remove",0,1,arguments.length),Ue("Reference.remove","onComplete",e,!0);const n=ZR(this._delegate);return e&&n.then(()=>e(null),r=>e(r)),n}transaction(e,n,r){U("Reference.transaction",1,3,arguments.length),Ue("Reference.transaction","transactionUpdate",e,!1),Ue("Reference.transaction","onComplete",n,!0),VN("Reference.transaction","applyLocally",r,!0);const i=zN(this._delegate,e,{applyLocally:r}).then(s=>new KN(s.committed,new ar(this.database,s.snapshot)));return n&&i.then(s=>n(null,s.committed,s.snapshot),s=>n(s,!1,null)),i}setPriority(e,n){U("Reference.setPriority",1,2,arguments.length),Ue("Reference.setPriority","onComplete",n,!0);const r=eN(this._delegate,e);return n&&r.then(()=>n(null),i=>n(i)),r}push(e,n){U("Reference.push",0,2,arguments.length),Ue("Reference.push","onComplete",n,!0);const r=JR(this._delegate,e),i=r.then(o=>new hi(this.database,o));n&&i.then(()=>n(null),o=>n(o));const s=new hi(this.database,r);return s.then=i.then.bind(i),s.catch=i.catch.bind(i,void 0),s}onDisconnect(){return Dt("Reference.onDisconnect",this._delegate._path),new QN(new XR(this._delegate._repo,this._delegate._path))}get key(){return this.getKey()}get parent(){return this.getParent()}get root(){return this.getRoot()}};/** * @license * Copyright 2017 Google LLC * @@ -1934,7 +1934,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class So{constructor(e,n){this._delegate=e,this.app=n,this.INTERNAL={delete:()=>this._delegate._delete(),forceWebSockets:wN,forceLongPolling:EN}}useEmulator(e,n,r={}){CN(this._delegate,e,n,r)}ref(e){if(U("database.ref",0,1,arguments.length),e instanceof Dr){const n=Qm(this._delegate,e.toString());return new Dr(this,n)}else{const n=Ew(this._delegate,e);return new Dr(this,n)}}refFromURL(e){U("database.refFromURL",1,1,arguments.length);const r=Qm(this._delegate,e);return new Dr(this,r)}goOffline(){return U("database.goOffline",0,0,arguments.length),SN(this._delegate)}goOnline(){return U("database.goOnline",0,0,arguments.length),xN(this._delegate)}}So.ServerValue={TIMESTAMP:NN(),increment:t=>IN(t)};function UN({app:t,url:e,version:n,customAuthImpl:r,customAppCheckImpl:i,namespace:s,nodeAdmin:o=!1}){av(n);const l=new qy("database-standalone"),a=new od("auth-internal",l);a.setComponent(new Yt("auth-internal",()=>r,"PRIVATE"));let u;return i&&(u=new od("app-check-internal",l),u.setComponent(new Yt("app-check-internal",()=>i,"PRIVATE"))),{instance:new So(xw(t,a,u,e,o),t),namespace:s}}var BN=Object.freeze({__proto__:null,initStandalone:UN});/** + */class ko{constructor(e,n){this._delegate=e,this.app=n,this.INTERNAL={delete:()=>this._delegate._delete(),forceWebSockets:PN,forceLongPolling:bN}}useEmulator(e,n,r={}){DN(this._delegate,e,n,r)}ref(e){if(U("database.ref",0,1,arguments.length),e instanceof Or){const n=Xm(this._delegate,e.toString());return new Or(this,n)}else{const n=Tw(this._delegate,e);return new Or(this,n)}}refFromURL(e){U("database.refFromURL",1,1,arguments.length);const r=Xm(this._delegate,e);return new Or(this,r)}goOffline(){return U("database.goOffline",0,0,arguments.length),AN(this._delegate)}goOnline(){return U("database.goOnline",0,0,arguments.length),ON(this._delegate)}}ko.ServerValue={TIMESTAMP:FN(),increment:t=>UN(t)};function qN({app:t,url:e,version:n,customAuthImpl:r,customAppCheckImpl:i,namespace:s,nodeAdmin:o=!1}){fv(n);const l=new ev("database-standalone"),a=new ud("auth-internal",l);a.setComponent(new Yt("auth-internal",()=>r,"PRIVATE"));let u;return i&&(u=new ud("app-check-internal",l),u.setComponent(new Yt("app-check-internal",()=>i,"PRIVATE"))),{instance:new ko(Iw(t,a,u,e,o),t),namespace:s}}var YN=Object.freeze({__proto__:null,initStandalone:qN});/** * @license * Copyright 2021 Google LLC * @@ -1949,7 +1949,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const zN=So.ServerValue;function $N(t){t.INTERNAL.registerComponent(new Yt("database-compat",(e,{instanceIdentifier:n})=>{const r=e.getProvider("app-compat").getImmediate(),i=e.getProvider("database").getImmediate({identifier:n});return new So(i,r)},"PUBLIC").setServiceProps({Reference:Dr,Query:Ve,Database:So,DataSnapshot:or,enableLogging:kN,INTERNAL:BN,ServerValue:zN}).setMultipleInstances(!0)),t.registerVersion(DN,AN)}$N(es);/** + */const XN=ko.ServerValue;function JN(t){t.INTERNAL.registerComponent(new Yt("database-compat",(e,{instanceIdentifier:n})=>{const r=e.getProvider("app-compat").getImmediate(),i=e.getProvider("database").getImmediate({identifier:n});return new ko(i,r)},"PUBLIC").setServiceProps({Reference:Or,Query:Ve,Database:ko,DataSnapshot:ar,enableLogging:LN,INTERNAL:YN,ServerValue:XN}).setMultipleInstances(!0)),t.registerVersion($N,WN)}JN(ns);/** * @license * Copyright 2017 Google LLC * @@ -1964,7 +1964,7 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const Rw="firebasestorage.googleapis.com",Nw="storageBucket",WN=2*60*1e3,HN=10*60*1e3,VN=1e3;/** + */const Dw="firebasestorage.googleapis.com",Aw="storageBucket",ZN=2*60*1e3,eI=10*60*1e3,tI=1e3;/** * @license * Copyright 2017 Google LLC * @@ -1979,8 +1979,8 @@ FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class Ce extends Zr{constructor(e,n,r=0){super(rc(e),`Firebase Storage: ${n} (${rc(e)})`),this.status_=r,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,Ce.prototype)}get status(){return this.status_}set status(e){this.status_=e}_codeEquals(e){return rc(e)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message=`${this._baseMessage} -${this.customData.serverResponse}`:this.message=this._baseMessage}}var fe;(function(t){t.UNKNOWN="unknown",t.OBJECT_NOT_FOUND="object-not-found",t.BUCKET_NOT_FOUND="bucket-not-found",t.PROJECT_NOT_FOUND="project-not-found",t.QUOTA_EXCEEDED="quota-exceeded",t.UNAUTHENTICATED="unauthenticated",t.UNAUTHORIZED="unauthorized",t.UNAUTHORIZED_APP="unauthorized-app",t.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",t.INVALID_CHECKSUM="invalid-checksum",t.CANCELED="canceled",t.INVALID_EVENT_NAME="invalid-event-name",t.INVALID_URL="invalid-url",t.INVALID_DEFAULT_BUCKET="invalid-default-bucket",t.NO_DEFAULT_BUCKET="no-default-bucket",t.CANNOT_SLICE_BLOB="cannot-slice-blob",t.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",t.NO_DOWNLOAD_URL="no-download-url",t.INVALID_ARGUMENT="invalid-argument",t.INVALID_ARGUMENT_COUNT="invalid-argument-count",t.APP_DELETED="app-deleted",t.INVALID_ROOT_OPERATION="invalid-root-operation",t.INVALID_FORMAT="invalid-format",t.INTERNAL_ERROR="internal-error",t.UNSUPPORTED_ENVIRONMENT="unsupported-environment"})(fe||(fe={}));function rc(t){return"storage/"+t}function mf(){const t="An unknown error occurred, please check the error payload for server response.";return new Ce(fe.UNKNOWN,t)}function GN(t){return new Ce(fe.OBJECT_NOT_FOUND,"Object '"+t+"' does not exist.")}function QN(t){return new Ce(fe.QUOTA_EXCEEDED,"Quota for bucket '"+t+"' exceeded, please view quota on https://firebase.google.com/pricing/.")}function KN(){const t="User is not authenticated, please authenticate using Firebase Authentication and try again.";return new Ce(fe.UNAUTHENTICATED,t)}function qN(){return new Ce(fe.UNAUTHORIZED_APP,"This app does not have permission to access Firebase Storage on this project.")}function YN(t){return new Ce(fe.UNAUTHORIZED,"User does not have permission to access '"+t+"'.")}function Iw(){return new Ce(fe.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function Pw(){return new Ce(fe.CANCELED,"User canceled the upload/download.")}function XN(t){return new Ce(fe.INVALID_URL,"Invalid URL '"+t+"'.")}function JN(t){return new Ce(fe.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+t+"'.")}function ZN(){return new Ce(fe.NO_DEFAULT_BUCKET,"No default bucket found. Did you set the '"+Nw+"' property when initializing the app?")}function bw(){return new Ce(fe.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function eI(){return new Ce(fe.SERVER_FILE_WRONG_SIZE,"Server recorded incorrect upload file size, please retry the upload.")}function tI(){return new Ce(fe.NO_DOWNLOAD_URL,"The given file does not have any download URLs.")}function nI(t){return new Ce(fe.UNSUPPORTED_ENVIRONMENT,`${t} is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.`)}function Oi(t){return new Ce(fe.INVALID_ARGUMENT,t)}function Dw(){return new Ce(fe.APP_DELETED,"The Firebase app was deleted.")}function Aw(t){return new Ce(fe.INVALID_ROOT_OPERATION,"The operation '"+t+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function Hs(t,e){return new Ce(fe.INVALID_FORMAT,"String does not match format '"+t+"': "+e)}function ks(t){throw new Ce(fe.INTERNAL_ERROR,"Internal error: "+t)}/** + */class Ce extends ti{constructor(e,n,r=0){super(oc(e),`Firebase Storage: ${n} (${oc(e)})`),this.status_=r,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,Ce.prototype)}get status(){return this.status_}set status(e){this.status_=e}_codeEquals(e){return oc(e)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message=`${this._baseMessage} +${this.customData.serverResponse}`:this.message=this._baseMessage}}var fe;(function(t){t.UNKNOWN="unknown",t.OBJECT_NOT_FOUND="object-not-found",t.BUCKET_NOT_FOUND="bucket-not-found",t.PROJECT_NOT_FOUND="project-not-found",t.QUOTA_EXCEEDED="quota-exceeded",t.UNAUTHENTICATED="unauthenticated",t.UNAUTHORIZED="unauthorized",t.UNAUTHORIZED_APP="unauthorized-app",t.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",t.INVALID_CHECKSUM="invalid-checksum",t.CANCELED="canceled",t.INVALID_EVENT_NAME="invalid-event-name",t.INVALID_URL="invalid-url",t.INVALID_DEFAULT_BUCKET="invalid-default-bucket",t.NO_DEFAULT_BUCKET="no-default-bucket",t.CANNOT_SLICE_BLOB="cannot-slice-blob",t.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",t.NO_DOWNLOAD_URL="no-download-url",t.INVALID_ARGUMENT="invalid-argument",t.INVALID_ARGUMENT_COUNT="invalid-argument-count",t.APP_DELETED="app-deleted",t.INVALID_ROOT_OPERATION="invalid-root-operation",t.INVALID_FORMAT="invalid-format",t.INTERNAL_ERROR="internal-error",t.UNSUPPORTED_ENVIRONMENT="unsupported-environment"})(fe||(fe={}));function oc(t){return"storage/"+t}function yf(){const t="An unknown error occurred, please check the error payload for server response.";return new Ce(fe.UNKNOWN,t)}function nI(t){return new Ce(fe.OBJECT_NOT_FOUND,"Object '"+t+"' does not exist.")}function rI(t){return new Ce(fe.QUOTA_EXCEEDED,"Quota for bucket '"+t+"' exceeded, please view quota on https://firebase.google.com/pricing/.")}function iI(){const t="User is not authenticated, please authenticate using Firebase Authentication and try again.";return new Ce(fe.UNAUTHENTICATED,t)}function sI(){return new Ce(fe.UNAUTHORIZED_APP,"This app does not have permission to access Firebase Storage on this project.")}function oI(t){return new Ce(fe.UNAUTHORIZED,"User does not have permission to access '"+t+"'.")}function Ow(){return new Ce(fe.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function Lw(){return new Ce(fe.CANCELED,"User canceled the upload/download.")}function lI(t){return new Ce(fe.INVALID_URL,"Invalid URL '"+t+"'.")}function aI(t){return new Ce(fe.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+t+"'.")}function uI(){return new Ce(fe.NO_DEFAULT_BUCKET,"No default bucket found. Did you set the '"+Aw+"' property when initializing the app?")}function Mw(){return new Ce(fe.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function cI(){return new Ce(fe.SERVER_FILE_WRONG_SIZE,"Server recorded incorrect upload file size, please retry the upload.")}function dI(){return new Ce(fe.NO_DOWNLOAD_URL,"The given file does not have any download URLs.")}function hI(t){return new Ce(fe.UNSUPPORTED_ENVIRONMENT,`${t} is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.`)}function Mi(t){return new Ce(fe.INVALID_ARGUMENT,t)}function jw(){return new Ce(fe.APP_DELETED,"The Firebase app was deleted.")}function Fw(t){return new Ce(fe.INVALID_ROOT_OPERATION,"The operation '"+t+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function Gs(t,e){return new Ce(fe.INVALID_FORMAT,"String does not match format '"+t+"': "+e)}function Rs(t){throw new Ce(fe.INTERNAL_ERROR,"Internal error: "+t)}/** * @license * Copyright 2017 Google LLC * @@ -1995,7 +1995,7 @@ ${this.customData.serverResponse}`:this.message=this._baseMessage}}var fe;(funct * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class Je{constructor(e,n){this.bucket=e,this.path_=n}get path(){return this.path_}get isRoot(){return this.path.length===0}fullServerUrl(){const e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(e,n){let r;try{r=Je.makeFromUrl(e,n)}catch{return new Je(e,"")}if(r.path==="")return r;throw JN(e)}static makeFromUrl(e,n){let r=null;const i="([A-Za-z0-9.\\-_]+)";function s(p){p.path.charAt(p.path.length-1)==="/"&&(p.path_=p.path_.slice(0,-1))}const o="(/(.*))?$",l=new RegExp("^gs://"+i+o,"i"),a={bucket:1,path:3};function u(p){p.path_=decodeURIComponent(p.path)}const c="v[A-Za-z0-9_]+",d=n.replace(/[.]/g,"\\."),h="(/([^?#]*).*)?$",_=new RegExp(`^https?://${d}/${c}/b/${i}/o${h}`,"i"),v={bucket:1,path:3},w=n===Rw?"(?:storage.googleapis.com|storage.cloud.google.com)":n,S="([^?#]*)",g=new RegExp(`^https?://${w}/${i}/${S}`,"i"),y=[{regex:l,indices:a,postModify:s},{regex:_,indices:v,postModify:u},{regex:g,indices:{bucket:1,path:2},postModify:u}];for(let p=0;p{i=null,t(_,a())},S)}function h(){s&&clearTimeout(s)}function _(S,...g){if(u){h();return}if(S){h(),c.call(null,S,...g);return}if(a()||o){h(),c.call(null,S,...g);return}r<64&&(r*=2);let y;l===1?(l=2,y=0):y=(r+Math.random())*1e3,d(y)}let v=!1;function w(S){v||(v=!0,h(),!u&&(i!==null?(S||(l=2),clearTimeout(i),d(0)):S||(l=1)))}return d(0),s=setTimeout(()=>{o=!0,w(!0)},n),w}function sI(t){t(!1)}/** + */function pI(t,e,n){let r=1,i=null,s=null,o=!1,l=0;function a(){return l===2}let u=!1;function c(...S){u||(u=!0,e.apply(null,S))}function d(S){i=setTimeout(()=>{i=null,t(_,a())},S)}function h(){s&&clearTimeout(s)}function _(S,...g){if(u){h();return}if(S){h(),c.call(null,S,...g);return}if(a()||o){h(),c.call(null,S,...g);return}r<64&&(r*=2);let y;l===1?(l=2,y=0):y=(r+Math.random())*1e3,d(y)}let v=!1;function w(S){v||(v=!0,h(),!u&&(i!==null?(S||(l=2),clearTimeout(i),d(0)):S||(l=1)))}return d(0),s=setTimeout(()=>{o=!0,w(!0)},n),w}function mI(t){t(!1)}/** * @license * Copyright 2017 Google LLC * @@ -2025,7 +2025,7 @@ ${this.customData.serverResponse}`:this.message=this._baseMessage}}var fe;(funct * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function oI(t){return t!==void 0}function lI(t){return typeof t=="function"}function aI(t){return typeof t=="object"&&!Array.isArray(t)}function su(t){return typeof t=="string"||t instanceof String}function Zm(t){return gf()&&t instanceof Blob}function gf(){return typeof Blob<"u"&&!fx()}function Pd(t,e,n,r){if(rn)throw Oi(`Invalid value for '${t}'. Expected ${n} or less.`)}/** + */function gI(t){return t!==void 0}function _I(t){return typeof t=="function"}function yI(t){return typeof t=="object"&&!Array.isArray(t)}function au(t){return typeof t=="string"||t instanceof String}function rg(t){return vf()&&t instanceof Blob}function vf(){return typeof Blob<"u"&&!Sx()}function Ad(t,e,n,r){if(rn)throw Mi(`Invalid value for '${t}'. Expected ${n} or less.`)}/** * @license * Copyright 2017 Google LLC * @@ -2040,7 +2040,7 @@ ${this.customData.serverResponse}`:this.message=this._baseMessage}}var fe;(funct * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function wr(t,e,n){let r=e;return n==null&&(r=`https://${e}`),`${n}://${r}/v0${t}`}function Ow(t){const e=encodeURIComponent;let n="?";for(const r in t)if(t.hasOwnProperty(r)){const i=e(r)+"="+e(t[r]);n=n+i+"&"}return n=n.slice(0,-1),n}/** + */function Cr(t,e,n){let r=e;return n==null&&(r=`https://${e}`),`${n}://${r}/v0${t}`}function Uw(t){const e=encodeURIComponent;let n="?";for(const r in t)if(t.hasOwnProperty(r)){const i=e(r)+"="+e(t[r]);n=n+i+"&"}return n=n.slice(0,-1),n}/** * @license * Copyright 2017 Google LLC * @@ -2055,7 +2055,7 @@ ${this.customData.serverResponse}`:this.message=this._baseMessage}}var fe;(funct * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var Mr;(function(t){t[t.NO_ERROR=0]="NO_ERROR",t[t.NETWORK_ERROR=1]="NETWORK_ERROR",t[t.ABORT=2]="ABORT"})(Mr||(Mr={}));/** + */var Fr;(function(t){t[t.NO_ERROR=0]="NO_ERROR",t[t.NETWORK_ERROR=1]="NETWORK_ERROR",t[t.ABORT=2]="ABORT"})(Fr||(Fr={}));/** * @license * Copyright 2022 Google LLC * @@ -2070,7 +2070,7 @@ ${this.customData.serverResponse}`:this.message=this._baseMessage}}var fe;(funct * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function Lw(t,e){const n=t>=500&&t<600,i=[408,429].indexOf(t)!==-1,s=e.indexOf(t)!==-1;return n||i||s}/** + */function Bw(t,e){const n=t>=500&&t<600,i=[408,429].indexOf(t)!==-1,s=e.indexOf(t)!==-1;return n||i||s}/** * @license * Copyright 2017 Google LLC * @@ -2085,7 +2085,7 @@ ${this.customData.serverResponse}`:this.message=this._baseMessage}}var fe;(funct * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class uI{constructor(e,n,r,i,s,o,l,a,u,c,d,h=!0){this.url_=e,this.method_=n,this.headers_=r,this.body_=i,this.successCodes_=s,this.additionalRetryCodes_=o,this.callback_=l,this.errorCallback_=a,this.timeout_=u,this.progressCallback_=c,this.connectionFactory_=d,this.retry=h,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((_,v)=>{this.resolve_=_,this.reject_=v,this.start_()})}start_(){const e=(r,i)=>{if(i){r(!1,new ul(!1,null,!0));return}const s=this.connectionFactory_();this.pendingConnection_=s;const o=l=>{const a=l.loaded,u=l.lengthComputable?l.total:-1;this.progressCallback_!==null&&this.progressCallback_(a,u)};this.progressCallback_!==null&&s.addUploadProgressListener(o),s.send(this.url_,this.method_,this.body_,this.headers_).then(()=>{this.progressCallback_!==null&&s.removeUploadProgressListener(o),this.pendingConnection_=null;const l=s.getErrorCode()===Mr.NO_ERROR,a=s.getStatus();if(!l||Lw(a,this.additionalRetryCodes_)&&this.retry){const c=s.getErrorCode()===Mr.ABORT;r(!1,new ul(!1,null,c));return}const u=this.successCodes_.indexOf(a)!==-1;r(!0,new ul(u,s))})},n=(r,i)=>{const s=this.resolve_,o=this.reject_,l=i.connection;if(i.wasSuccessCode)try{const a=this.callback_(l,l.getResponse());oI(a)?s(a):s()}catch(a){o(a)}else if(l!==null){const a=mf();a.serverResponse=l.getErrorText(),this.errorCallback_?o(this.errorCallback_(l,a)):o(a)}else if(i.canceled){const a=this.appDelete_?Dw():Pw();o(a)}else{const a=Iw();o(a)}};this.canceled_?n(!1,new ul(!1,null,!0)):this.backoffId_=iI(e,n,this.timeout_)}getPromise(){return this.promise_}cancel(e){this.canceled_=!0,this.appDelete_=e||!1,this.backoffId_!==null&&sI(this.backoffId_),this.pendingConnection_!==null&&this.pendingConnection_.abort()}}class ul{constructor(e,n,r){this.wasSuccessCode=e,this.connection=n,this.canceled=!!r}}function cI(t,e){e!==null&&e.length>0&&(t.Authorization="Firebase "+e)}function dI(t,e){t["X-Firebase-Storage-Version"]="webjs/"+(e??"AppManager")}function hI(t,e){e&&(t["X-Firebase-GMPID"]=e)}function fI(t,e){e!==null&&(t["X-Firebase-AppCheck"]=e)}function pI(t,e,n,r,i,s,o=!0){const l=Ow(t.urlParams),a=t.url+l,u=Object.assign({},t.headers);return hI(u,e),cI(u,n),dI(u,s),fI(u,r),new uI(a,t.method,u,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,i,o)}/** + */class vI{constructor(e,n,r,i,s,o,l,a,u,c,d,h=!0){this.url_=e,this.method_=n,this.headers_=r,this.body_=i,this.successCodes_=s,this.additionalRetryCodes_=o,this.callback_=l,this.errorCallback_=a,this.timeout_=u,this.progressCallback_=c,this.connectionFactory_=d,this.retry=h,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((_,v)=>{this.resolve_=_,this.reject_=v,this.start_()})}start_(){const e=(r,i)=>{if(i){r(!1,new dl(!1,null,!0));return}const s=this.connectionFactory_();this.pendingConnection_=s;const o=l=>{const a=l.loaded,u=l.lengthComputable?l.total:-1;this.progressCallback_!==null&&this.progressCallback_(a,u)};this.progressCallback_!==null&&s.addUploadProgressListener(o),s.send(this.url_,this.method_,this.body_,this.headers_).then(()=>{this.progressCallback_!==null&&s.removeUploadProgressListener(o),this.pendingConnection_=null;const l=s.getErrorCode()===Fr.NO_ERROR,a=s.getStatus();if(!l||Bw(a,this.additionalRetryCodes_)&&this.retry){const c=s.getErrorCode()===Fr.ABORT;r(!1,new dl(!1,null,c));return}const u=this.successCodes_.indexOf(a)!==-1;r(!0,new dl(u,s))})},n=(r,i)=>{const s=this.resolve_,o=this.reject_,l=i.connection;if(i.wasSuccessCode)try{const a=this.callback_(l,l.getResponse());gI(a)?s(a):s()}catch(a){o(a)}else if(l!==null){const a=yf();a.serverResponse=l.getErrorText(),this.errorCallback_?o(this.errorCallback_(l,a)):o(a)}else if(i.canceled){const a=this.appDelete_?jw():Lw();o(a)}else{const a=Ow();o(a)}};this.canceled_?n(!1,new dl(!1,null,!0)):this.backoffId_=pI(e,n,this.timeout_)}getPromise(){return this.promise_}cancel(e){this.canceled_=!0,this.appDelete_=e||!1,this.backoffId_!==null&&mI(this.backoffId_),this.pendingConnection_!==null&&this.pendingConnection_.abort()}}class dl{constructor(e,n,r){this.wasSuccessCode=e,this.connection=n,this.canceled=!!r}}function wI(t,e){e!==null&&e.length>0&&(t.Authorization="Firebase "+e)}function EI(t,e){t["X-Firebase-Storage-Version"]="webjs/"+(e??"AppManager")}function CI(t,e){e&&(t["X-Firebase-GMPID"]=e)}function SI(t,e){e!==null&&(t["X-Firebase-AppCheck"]=e)}function xI(t,e,n,r,i,s,o=!0){const l=Uw(t.urlParams),a=t.url+l,u=Object.assign({},t.headers);return CI(u,e),wI(u,n),EI(u,s),SI(u,r),new vI(a,t.method,u,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,i,o)}/** * @license * Copyright 2017 Google LLC * @@ -2100,7 +2100,7 @@ ${this.customData.serverResponse}`:this.message=this._baseMessage}}var fe;(funct * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function mI(){return typeof BlobBuilder<"u"?BlobBuilder:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:void 0}function gI(...t){const e=mI();if(e!==void 0){const n=new e;for(let r=0;r"u")throw nI("base-64");return atob(t)}/** + */function NI(t){if(typeof atob>"u")throw hI("base-64");return atob(t)}/** * @license * Copyright 2017 Google LLC * @@ -2130,7 +2130,7 @@ ${this.customData.serverResponse}`:this.message=this._baseMessage}}var fe;(funct * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const At={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"};class ic{constructor(e,n){this.data=e,this.contentType=n||null}}function Mw(t,e){switch(t){case At.RAW:return new ic(jw(e));case At.BASE64:case At.BASE64URL:return new ic(Fw(t,e));case At.DATA_URL:return new ic(wI(e),EI(e))}throw mf()}function jw(t){const e=[];for(let n=0;n>6,128|r&63);else if((r&64512)===55296)if(!(n>18,128|r>>12&63,128|r>>6&63,128|r&63)}else(r&64512)===56320?e.push(239,191,189):e.push(224|r>>12,128|r>>6&63,128|r&63)}return new Uint8Array(e)}function vI(t){let e;try{e=decodeURIComponent(t)}catch{throw Hs(At.DATA_URL,"Malformed data URL.")}return jw(e)}function Fw(t,e){switch(t){case At.BASE64:{const i=e.indexOf("-")!==-1,s=e.indexOf("_")!==-1;if(i||s)throw Hs(t,"Invalid character '"+(i?"-":"_")+"' found: is it base64url encoded?");break}case At.BASE64URL:{const i=e.indexOf("+")!==-1,s=e.indexOf("/")!==-1;if(i||s)throw Hs(t,"Invalid character '"+(i?"+":"/")+"' found: is it base64 encoded?");e=e.replace(/-/g,"+").replace(/_/g,"/");break}}let n;try{n=yI(e)}catch(i){throw i.message.includes("polyfill")?i:Hs(t,"Invalid character found")}const r=new Uint8Array(n.length);for(let i=0;i][;base64],");const r=n[1]||null;r!=null&&(this.base64=CI(r,";base64"),this.contentType=this.base64?r.substring(0,r.length-7):r),this.rest=e.substring(e.indexOf(",")+1)}}function wI(t){const e=new Uw(t);return e.base64?Fw(At.BASE64,e.rest):vI(e.rest)}function EI(t){return new Uw(t).contentType}function CI(t,e){return t.length>=e.length?t.substring(t.length-e.length)===e:!1}/** + */const At={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"};class lc{constructor(e,n){this.data=e,this.contentType=n||null}}function zw(t,e){switch(t){case At.RAW:return new lc($w(e));case At.BASE64:case At.BASE64URL:return new lc(Ww(t,e));case At.DATA_URL:return new lc(PI(e),bI(e))}throw yf()}function $w(t){const e=[];for(let n=0;n>6,128|r&63);else if((r&64512)===55296)if(!(n>18,128|r>>12&63,128|r>>6&63,128|r&63)}else(r&64512)===56320?e.push(239,191,189):e.push(224|r>>12,128|r>>6&63,128|r&63)}return new Uint8Array(e)}function II(t){let e;try{e=decodeURIComponent(t)}catch{throw Gs(At.DATA_URL,"Malformed data URL.")}return $w(e)}function Ww(t,e){switch(t){case At.BASE64:{const i=e.indexOf("-")!==-1,s=e.indexOf("_")!==-1;if(i||s)throw Gs(t,"Invalid character '"+(i?"-":"_")+"' found: is it base64url encoded?");break}case At.BASE64URL:{const i=e.indexOf("+")!==-1,s=e.indexOf("/")!==-1;if(i||s)throw Gs(t,"Invalid character '"+(i?"+":"/")+"' found: is it base64 encoded?");e=e.replace(/-/g,"+").replace(/_/g,"/");break}}let n;try{n=NI(e)}catch(i){throw i.message.includes("polyfill")?i:Gs(t,"Invalid character found")}const r=new Uint8Array(n.length);for(let i=0;i][;base64],");const r=n[1]||null;r!=null&&(this.base64=DI(r,";base64"),this.contentType=this.base64?r.substring(0,r.length-7):r),this.rest=e.substring(e.indexOf(",")+1)}}function PI(t){const e=new Hw(t);return e.base64?Ww(At.BASE64,e.rest):II(e.rest)}function bI(t){return new Hw(t).contentType}function DI(t,e){return t.length>=e.length?t.substring(t.length-e.length)===e:!1}/** * @license * Copyright 2017 Google LLC * @@ -2145,7 +2145,7 @@ ${this.customData.serverResponse}`:this.message=this._baseMessage}}var fe;(funct * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class yn{constructor(e,n){let r=0,i="";Zm(e)?(this.data_=e,r=e.size,i=e.type):e instanceof ArrayBuffer?(n?this.data_=new Uint8Array(e):(this.data_=new Uint8Array(e.byteLength),this.data_.set(new Uint8Array(e))),r=this.data_.length):e instanceof Uint8Array&&(n?this.data_=e:(this.data_=new Uint8Array(e.length),this.data_.set(e)),r=e.length),this.size_=r,this.type_=i}size(){return this.size_}type(){return this.type_}slice(e,n){if(Zm(this.data_)){const r=this.data_,i=_I(r,e,n);return i===null?null:new yn(i)}else{const r=new Uint8Array(this.data_.buffer,e,n-e);return new yn(r,!0)}}static getBlob(...e){if(gf()){const n=e.map(r=>r instanceof yn?r.data_:r);return new yn(gI.apply(null,n))}else{const n=e.map(o=>su(o)?Mw(At.RAW,o).data:o.data_);let r=0;n.forEach(o=>{r+=o.byteLength});const i=new Uint8Array(r);let s=0;return n.forEach(o=>{for(let l=0;lr instanceof yn?r.data_:r);return new yn(TI.apply(null,n))}else{const n=e.map(o=>au(o)?zw(At.RAW,o).data:o.data_);let r=0;n.forEach(o=>{r+=o.byteLength});const i=new Uint8Array(r);let s=0;return n.forEach(o=>{for(let l=0;lr.length>0).join("/");return t.length===0?n:t+"/"+n}function Bw(t){const e=t.lastIndexOf("/",t.length-2);return e===-1?t:t.slice(e+1)}/** + */function AI(t){if(t.length===0)return null;const e=t.lastIndexOf("/");return e===-1?"":t.slice(0,e)}function OI(t,e){const n=e.split("/").filter(r=>r.length>0).join("/");return t.length===0?n:t+"/"+n}function Vw(t){const e=t.lastIndexOf("/",t.length-2);return e===-1?t:t.slice(e+1)}/** * @license * Copyright 2017 Google LLC * @@ -2190,7 +2190,7 @@ ${this.customData.serverResponse}`:this.message=this._baseMessage}}var fe;(funct * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function kI(t,e){return e}class tt{constructor(e,n,r,i){this.server=e,this.local=n||e,this.writable=!!r,this.xform=i||kI}}let cl=null;function TI(t){return!su(t)||t.length<2?t:Bw(t)}function ou(){if(cl)return cl;const t=[];t.push(new tt("bucket")),t.push(new tt("generation")),t.push(new tt("metageneration")),t.push(new tt("name","fullPath",!0));function e(s,o){return TI(o)}const n=new tt("name");n.xform=e,t.push(n);function r(s,o){return o!==void 0?Number(o):o}const i=new tt("size");return i.xform=r,t.push(i),t.push(new tt("timeCreated")),t.push(new tt("updated")),t.push(new tt("md5Hash",null,!0)),t.push(new tt("cacheControl",null,!0)),t.push(new tt("contentDisposition",null,!0)),t.push(new tt("contentEncoding",null,!0)),t.push(new tt("contentLanguage",null,!0)),t.push(new tt("contentType",null,!0)),t.push(new tt("metadata","customMetadata",!0)),cl=t,cl}function RI(t,e){function n(){const r=t.bucket,i=t.fullPath,s=new Je(r,i);return e._makeStorageReference(s)}Object.defineProperty(t,"ref",{get:n})}function NI(t,e,n){const r={};r.type="file";const i=n.length;for(let s=0;s{const c=t.bucket,d=t.fullPath,h="/b/"+o(c)+"/o/"+o(d),_=wr(h,n,r),v=Ow({alt:"media",token:u});return _+v})[0]}function yf(t,e){const n={},r=e.length;for(let i=0;i{const c=t.bucket,d=t.fullPath,h="/b/"+o(c)+"/o/"+o(d),_=Cr(h,n,r),v=Uw({alt:"media",token:u});return _+v})[0]}function Ef(t,e){const n={},r=e.length;for(let i=0;i0&&(s.delimiter=n),r&&(s.pageToken=r),i&&(s.maxResults=i);const o=e.bucketOnlyServerUrl(),l=wr(o,t.host,t._protocol),a="GET",u=t.maxOperationRetryTime,c=new On(l,a,DI(t,e.bucket),u);return c.urlParams=s,c.errorHandler=ss(e),c}function LI(t,e,n){const r=e.fullServerUrl(),i=wr(r,t.host,t._protocol),s="GET",o=t.maxOperationRetryTime,l=new On(i,s,AI(t,n),o);return l.errorHandler=au(e),l}function MI(t,e,n,r){const i=e.fullServerUrl(),s=wr(i,t.host,t._protocol),o="PATCH",l=yf(n,r),a={"Content-Type":"application/json; charset=utf-8"},u=t.maxOperationRetryTime,c=new On(s,o,lu(t,r),u);return c.headers=a,c.body=l,c.errorHandler=au(e),c}function jI(t,e){const n=e.fullServerUrl(),r=wr(n,t.host,t._protocol),i="DELETE",s=t.maxOperationRetryTime;function o(a,u){}const l=new On(r,i,o,s);return l.successCodes=[200,204],l.errorHandler=au(e),l}function FI(t,e){return t&&t.contentType||e&&e.type()||"application/octet-stream"}function Ww(t,e,n){const r=Object.assign({},n);return r.fullPath=t.path,r.size=e.size(),r.contentType||(r.contentType=FI(null,e)),r}function UI(t,e,n,r,i){const s=e.bucketOnlyServerUrl(),o={"X-Goog-Upload-Protocol":"multipart"};function l(){let y="";for(let p=0;p<2;p++)y=y+Math.random().toString().slice(2);return y}const a=l();o["Content-Type"]="multipart/related; boundary="+a;const u=Ww(e,r,i),c=yf(u,n),d="--"+a+`\r + */function cn(t){if(!t)throw yf()}function cu(t,e){function n(r,i){const s=Gw(t,i,e);return cn(s!==null),s}return n}function $I(t,e){function n(r,i){const s=zI(t,e,i);return cn(s!==null),s}return n}function WI(t,e){function n(r,i){const s=Gw(t,i,e);return cn(s!==null),UI(s,i,t.host,t._protocol)}return n}function ls(t){function e(n,r){let i;return n.getStatus()===401?n.getErrorText().includes("Firebase App Check token is invalid")?i=sI():i=iI():n.getStatus()===402?i=rI(t.bucket):n.getStatus()===403?i=oI(t.path):i=r,i.status=n.getStatus(),i.serverResponse=r.serverResponse,i}return e}function du(t){const e=ls(t);function n(r,i){let s=e(r,i);return r.getStatus()===404&&(s=nI(t.path)),s.serverResponse=i.serverResponse,s}return n}function Qw(t,e,n){const r=e.fullServerUrl(),i=Cr(r,t.host,t._protocol),s="GET",o=t.maxOperationRetryTime,l=new Ln(i,s,cu(t,n),o);return l.errorHandler=du(e),l}function HI(t,e,n,r,i){const s={};e.isRoot?s.prefix="":s.prefix=e.path+"/",n&&n.length>0&&(s.delimiter=n),r&&(s.pageToken=r),i&&(s.maxResults=i);const o=e.bucketOnlyServerUrl(),l=Cr(o,t.host,t._protocol),a="GET",u=t.maxOperationRetryTime,c=new Ln(l,a,$I(t,e.bucket),u);return c.urlParams=s,c.errorHandler=ls(e),c}function VI(t,e,n){const r=e.fullServerUrl(),i=Cr(r,t.host,t._protocol),s="GET",o=t.maxOperationRetryTime,l=new Ln(i,s,WI(t,n),o);return l.errorHandler=du(e),l}function GI(t,e,n,r){const i=e.fullServerUrl(),s=Cr(i,t.host,t._protocol),o="PATCH",l=Ef(n,r),a={"Content-Type":"application/json; charset=utf-8"},u=t.maxOperationRetryTime,c=new Ln(s,o,cu(t,r),u);return c.headers=a,c.body=l,c.errorHandler=du(e),c}function QI(t,e){const n=e.fullServerUrl(),r=Cr(n,t.host,t._protocol),i="DELETE",s=t.maxOperationRetryTime;function o(a,u){}const l=new Ln(r,i,o,s);return l.successCodes=[200,204],l.errorHandler=du(e),l}function KI(t,e){return t&&t.contentType||e&&e.type()||"application/octet-stream"}function Kw(t,e,n){const r=Object.assign({},n);return r.fullPath=t.path,r.size=e.size(),r.contentType||(r.contentType=KI(null,e)),r}function qI(t,e,n,r,i){const s=e.bucketOnlyServerUrl(),o={"X-Goog-Upload-Protocol":"multipart"};function l(){let y="";for(let p=0;p<2;p++)y=y+Math.random().toString().slice(2);return y}const a=l();o["Content-Type"]="multipart/related; boundary="+a;const u=Kw(e,r,i),c=Ef(u,n),d="--"+a+`\r Content-Type: application/json; charset=utf-8\r \r `+c+`\r @@ -2228,7 +2228,7 @@ Content-Type: application/json; charset=utf-8\r Content-Type: `+u.contentType+`\r \r `,h=`\r ---`+a+"--",_=yn.getBlob(d,r,h);if(_===null)throw bw();const v={name:u.fullPath},w=wr(s,t.host,t._protocol),S="POST",g=t.maxUploadRetryTime,m=new On(w,S,lu(t,n),g);return m.urlParams=v,m.headers=o,m.body=_.uploadData(),m.errorHandler=ss(e),m}class ha{constructor(e,n,r,i){this.current=e,this.total=n,this.finalized=!!r,this.metadata=i||null}}function vf(t,e){let n=null;try{n=t.getResponseHeader("X-Goog-Upload-Status")}catch{cn(!1)}return cn(!!n&&(e||["active"]).indexOf(n)!==-1),n}function BI(t,e,n,r,i){const s=e.bucketOnlyServerUrl(),o=Ww(e,r,i),l={name:o.fullPath},a=wr(s,t.host,t._protocol),u="POST",c={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":`${r.size()}`,"X-Goog-Upload-Header-Content-Type":o.contentType,"Content-Type":"application/json; charset=utf-8"},d=yf(o,n),h=t.maxUploadRetryTime;function _(w){vf(w);let S;try{S=w.getResponseHeader("X-Goog-Upload-URL")}catch{cn(!1)}return cn(su(S)),S}const v=new On(a,u,_,h);return v.urlParams=l,v.headers=c,v.body=d,v.errorHandler=ss(e),v}function zI(t,e,n,r){const i={"X-Goog-Upload-Command":"query"};function s(u){const c=vf(u,["active","final"]);let d=null;try{d=u.getResponseHeader("X-Goog-Upload-Size-Received")}catch{cn(!1)}d||cn(!1);const h=Number(d);return cn(!isNaN(h)),new ha(h,r.size(),c==="final")}const o="POST",l=t.maxUploadRetryTime,a=new On(n,o,s,l);return a.headers=i,a.errorHandler=ss(e),a}const ng=256*1024;function $I(t,e,n,r,i,s,o,l){const a=new ha(0,0);if(o?(a.current=o.current,a.total=o.total):(a.current=0,a.total=r.size()),r.size()!==a.total)throw eI();const u=a.total-a.current;let c=u;i>0&&(c=Math.min(c,i));const d=a.current,h=d+c;let _="";c===0?_="finalize":u===c?_="upload, finalize":_="upload";const v={"X-Goog-Upload-Command":_,"X-Goog-Upload-Offset":`${a.current}`},w=r.slice(d,h);if(w===null)throw bw();function S(p,x){const I=vf(p,["active","final"]),N=a.current+c,D=r.size();let Q;return I==="final"?Q=lu(e,s)(p,x):Q=null,new ha(N,D,I==="final",Q)}const g="POST",m=e.maxUploadRetryTime,y=new On(n,g,S,m);return y.headers=v,y.body=w.uploadData(),y.progressCallback=l||null,y.errorHandler=ss(t),y}/** +--`+a+"--",_=yn.getBlob(d,r,h);if(_===null)throw Mw();const v={name:u.fullPath},w=Cr(s,t.host,t._protocol),S="POST",g=t.maxUploadRetryTime,m=new Ln(w,S,cu(t,n),g);return m.urlParams=v,m.headers=o,m.body=_.uploadData(),m.errorHandler=ls(e),m}class pa{constructor(e,n,r,i){this.current=e,this.total=n,this.finalized=!!r,this.metadata=i||null}}function Cf(t,e){let n=null;try{n=t.getResponseHeader("X-Goog-Upload-Status")}catch{cn(!1)}return cn(!!n&&(e||["active"]).indexOf(n)!==-1),n}function YI(t,e,n,r,i){const s=e.bucketOnlyServerUrl(),o=Kw(e,r,i),l={name:o.fullPath},a=Cr(s,t.host,t._protocol),u="POST",c={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":`${r.size()}`,"X-Goog-Upload-Header-Content-Type":o.contentType,"Content-Type":"application/json; charset=utf-8"},d=Ef(o,n),h=t.maxUploadRetryTime;function _(w){Cf(w);let S;try{S=w.getResponseHeader("X-Goog-Upload-URL")}catch{cn(!1)}return cn(au(S)),S}const v=new Ln(a,u,_,h);return v.urlParams=l,v.headers=c,v.body=d,v.errorHandler=ls(e),v}function XI(t,e,n,r){const i={"X-Goog-Upload-Command":"query"};function s(u){const c=Cf(u,["active","final"]);let d=null;try{d=u.getResponseHeader("X-Goog-Upload-Size-Received")}catch{cn(!1)}d||cn(!1);const h=Number(d);return cn(!isNaN(h)),new pa(h,r.size(),c==="final")}const o="POST",l=t.maxUploadRetryTime,a=new Ln(n,o,s,l);return a.headers=i,a.errorHandler=ls(e),a}const og=256*1024;function JI(t,e,n,r,i,s,o,l){const a=new pa(0,0);if(o?(a.current=o.current,a.total=o.total):(a.current=0,a.total=r.size()),r.size()!==a.total)throw cI();const u=a.total-a.current;let c=u;i>0&&(c=Math.min(c,i));const d=a.current,h=d+c;let _="";c===0?_="finalize":u===c?_="upload, finalize":_="upload";const v={"X-Goog-Upload-Command":_,"X-Goog-Upload-Offset":`${a.current}`},w=r.slice(d,h);if(w===null)throw Mw();function S(p,x){const I=Cf(p,["active","final"]),N=a.current+c,D=r.size();let Q;return I==="final"?Q=cu(e,s)(p,x):Q=null,new pa(N,D,I==="final",Q)}const g="POST",m=e.maxUploadRetryTime,y=new Ln(n,g,S,m);return y.headers=v,y.body=w.uploadData(),y.progressCallback=l||null,y.errorHandler=ls(t),y}/** * @license * Copyright 2017 Google LLC * @@ -2243,7 +2243,7 @@ Content-Type: `+u.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const WI={STATE_CHANGED:"state_changed"},rt={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};function sc(t){switch(t){case"running":case"pausing":case"canceling":return rt.RUNNING;case"paused":return rt.PAUSED;case"success":return rt.SUCCESS;case"canceled":return rt.CANCELED;case"error":return rt.ERROR;default:return rt.ERROR}}/** + */const ZI={STATE_CHANGED:"state_changed"},rt={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};function ac(t){switch(t){case"running":case"pausing":case"canceling":return rt.RUNNING;case"paused":return rt.PAUSED;case"success":return rt.SUCCESS;case"canceled":return rt.CANCELED;case"error":return rt.ERROR;default:return rt.ERROR}}/** * @license * Copyright 2017 Google LLC * @@ -2258,7 +2258,7 @@ Content-Type: `+u.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class HI{constructor(e,n,r){if(lI(e)||n!=null||r!=null)this.next=e,this.error=n??void 0,this.complete=r??void 0;else{const s=e;this.next=s.next,this.error=s.error,this.complete=s.complete}}}/** + */class eP{constructor(e,n,r){if(_I(e)||n!=null||r!=null)this.next=e,this.error=n??void 0,this.complete=r??void 0;else{const s=e;this.next=s.next,this.error=s.error,this.complete=s.complete}}}/** * @license * Copyright 2017 Google LLC * @@ -2273,7 +2273,7 @@ Content-Type: `+u.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function ai(t){return(...e)=>{Promise.resolve().then(()=>t(...e))}}class VI{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=Mr.NO_ERROR,this.sendPromise_=new Promise(e=>{this.xhr_.addEventListener("abort",()=>{this.errorCode_=Mr.ABORT,e()}),this.xhr_.addEventListener("error",()=>{this.errorCode_=Mr.NETWORK_ERROR,e()}),this.xhr_.addEventListener("load",()=>{e()})})}send(e,n,r,i){if(this.sent_)throw ks("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(n,e,!0),i!==void 0)for(const s in i)i.hasOwnProperty(s)&&this.xhr_.setRequestHeader(s,i[s].toString());return r!==void 0?this.xhr_.send(r):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw ks("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw ks("cannot .getStatus() before sending");try{return this.xhr_.status}catch{return-1}}getResponse(){if(!this.sent_)throw ks("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw ks("cannot .getErrorText() before sending");return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader(e){return this.xhr_.getResponseHeader(e)}addUploadProgressListener(e){this.xhr_.upload!=null&&this.xhr_.upload.addEventListener("progress",e)}removeUploadProgressListener(e){this.xhr_.upload!=null&&this.xhr_.upload.removeEventListener("progress",e)}}class GI extends VI{initXhr(){this.xhr_.responseType="text"}}function sn(){return new GI}/** + */function ci(t){return(...e)=>{Promise.resolve().then(()=>t(...e))}}class tP{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=Fr.NO_ERROR,this.sendPromise_=new Promise(e=>{this.xhr_.addEventListener("abort",()=>{this.errorCode_=Fr.ABORT,e()}),this.xhr_.addEventListener("error",()=>{this.errorCode_=Fr.NETWORK_ERROR,e()}),this.xhr_.addEventListener("load",()=>{e()})})}send(e,n,r,i){if(this.sent_)throw Rs("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(n,e,!0),i!==void 0)for(const s in i)i.hasOwnProperty(s)&&this.xhr_.setRequestHeader(s,i[s].toString());return r!==void 0?this.xhr_.send(r):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw Rs("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw Rs("cannot .getStatus() before sending");try{return this.xhr_.status}catch{return-1}}getResponse(){if(!this.sent_)throw Rs("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw Rs("cannot .getErrorText() before sending");return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader(e){return this.xhr_.getResponseHeader(e)}addUploadProgressListener(e){this.xhr_.upload!=null&&this.xhr_.upload.addEventListener("progress",e)}removeUploadProgressListener(e){this.xhr_.upload!=null&&this.xhr_.upload.removeEventListener("progress",e)}}class nP extends tP{initXhr(){this.xhr_.responseType="text"}}function sn(){return new nP}/** * @license * Copyright 2017 Google LLC * @@ -2288,7 +2288,7 @@ Content-Type: `+u.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class Hw{constructor(e,n,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=n,this._metadata=r,this._mappings=ou(),this._resumable=this._shouldDoResumable(this._blob),this._state="running",this._errorHandler=i=>{if(this._request=void 0,this._chunkMultiplier=1,i._codeEquals(fe.CANCELED))this._needToFetchStatus=!0,this.completeTransitions_();else{const s=this.isExponentialBackoffExpired();if(Lw(i.status,[]))if(s)i=Iw();else{this.sleepTime=Math.max(this.sleepTime*2,VN),this._needToFetchStatus=!0,this.completeTransitions_();return}this._error=i,this._transition("error")}},this._metadataErrorHandler=i=>{this._request=void 0,i._codeEquals(fe.CANCELED)?this.completeTransitions_():(this._error=i,this._transition("error"))},this.sleepTime=0,this.maxSleepTime=this._ref.storage.maxUploadRetryTime,this._promise=new Promise((i,s)=>{this._resolve=i,this._reject=s,this._start()}),this._promise.then(null,()=>{})}isExponentialBackoffExpired(){return this.sleepTime>this.maxSleepTime}_makeProgressCallback(){const e=this._transferred;return n=>this._updateProgress(e+n)}_shouldDoResumable(e){return e.size()>256*1024}_start(){this._state==="running"&&this._request===void 0&&(this._resumable?this._uploadUrl===void 0?this._createResumable():this._needToFetchStatus?this._fetchStatus():this._needToFetchMetadata?this._fetchMetadata():this.pendingTimeout=setTimeout(()=>{this.pendingTimeout=void 0,this._continueUpload()},this.sleepTime):this._oneShotUpload())}_resolveToken(e){Promise.all([this._ref.storage._getAuthToken(),this._ref.storage._getAppCheckToken()]).then(([n,r])=>{switch(this._state){case"running":e(n,r);break;case"canceling":this._transition("canceled");break;case"pausing":this._transition("paused");break}})}_createResumable(){this._resolveToken((e,n)=>{const r=BI(this._ref.storage,this._ref._location,this._mappings,this._blob,this._metadata),i=this._ref.storage._makeRequest(r,sn,e,n);this._request=i,i.getPromise().then(s=>{this._request=void 0,this._uploadUrl=s,this._needToFetchStatus=!1,this.completeTransitions_()},this._errorHandler)})}_fetchStatus(){const e=this._uploadUrl;this._resolveToken((n,r)=>{const i=zI(this._ref.storage,this._ref._location,e,this._blob),s=this._ref.storage._makeRequest(i,sn,n,r);this._request=s,s.getPromise().then(o=>{o=o,this._request=void 0,this._updateProgress(o.current),this._needToFetchStatus=!1,o.finalized&&(this._needToFetchMetadata=!0),this.completeTransitions_()},this._errorHandler)})}_continueUpload(){const e=ng*this._chunkMultiplier,n=new ha(this._transferred,this._blob.size()),r=this._uploadUrl;this._resolveToken((i,s)=>{let o;try{o=$I(this._ref._location,this._ref.storage,r,this._blob,e,this._mappings,n,this._makeProgressCallback())}catch(a){this._error=a,this._transition("error");return}const l=this._ref.storage._makeRequest(o,sn,i,s,!1);this._request=l,l.getPromise().then(a=>{this._increaseMultiplier(),this._request=void 0,this._updateProgress(a.current),a.finalized?(this._metadata=a.metadata,this._transition("success")):this.completeTransitions_()},this._errorHandler)})}_increaseMultiplier(){ng*this._chunkMultiplier*2<32*1024*1024&&(this._chunkMultiplier*=2)}_fetchMetadata(){this._resolveToken((e,n)=>{const r=$w(this._ref.storage,this._ref._location,this._mappings),i=this._ref.storage._makeRequest(r,sn,e,n);this._request=i,i.getPromise().then(s=>{this._request=void 0,this._metadata=s,this._transition("success")},this._metadataErrorHandler)})}_oneShotUpload(){this._resolveToken((e,n)=>{const r=UI(this._ref.storage,this._ref._location,this._mappings,this._blob,this._metadata),i=this._ref.storage._makeRequest(r,sn,e,n);this._request=i,i.getPromise().then(s=>{this._request=void 0,this._metadata=s,this._updateProgress(this._blob.size()),this._transition("success")},this._errorHandler)})}_updateProgress(e){const n=this._transferred;this._transferred=e,this._transferred!==n&&this._notifyObservers()}_transition(e){if(this._state!==e)switch(e){case"canceling":case"pausing":this._state=e,this._request!==void 0?this._request.cancel():this.pendingTimeout&&(clearTimeout(this.pendingTimeout),this.pendingTimeout=void 0,this.completeTransitions_());break;case"running":const n=this._state==="paused";this._state=e,n&&(this._notifyObservers(),this._start());break;case"paused":this._state=e,this._notifyObservers();break;case"canceled":this._error=Pw(),this._state=e,this._notifyObservers();break;case"error":this._state=e,this._notifyObservers();break;case"success":this._state=e,this._notifyObservers();break}}completeTransitions_(){switch(this._state){case"pausing":this._transition("paused");break;case"canceling":this._transition("canceled");break;case"running":this._start();break}}get snapshot(){const e=sc(this._state);return{bytesTransferred:this._transferred,totalBytes:this._blob.size(),state:e,metadata:this._metadata,task:this,ref:this._ref}}on(e,n,r,i){const s=new HI(n||void 0,r||void 0,i||void 0);return this._addObserver(s),()=>{this._removeObserver(s)}}then(e,n){return this._promise.then(e,n)}catch(e){return this.then(null,e)}_addObserver(e){this._observers.push(e),this._notifyObserver(e)}_removeObserver(e){const n=this._observers.indexOf(e);n!==-1&&this._observers.splice(n,1)}_notifyObservers(){this._finishPromise(),this._observers.slice().forEach(n=>{this._notifyObserver(n)})}_finishPromise(){if(this._resolve!==void 0){let e=!0;switch(sc(this._state)){case rt.SUCCESS:ai(this._resolve.bind(null,this.snapshot))();break;case rt.CANCELED:case rt.ERROR:const n=this._reject;ai(n.bind(null,this._error))();break;default:e=!1;break}e&&(this._resolve=void 0,this._reject=void 0)}}_notifyObserver(e){switch(sc(this._state)){case rt.RUNNING:case rt.PAUSED:e.next&&ai(e.next.bind(e,this.snapshot))();break;case rt.SUCCESS:e.complete&&ai(e.complete.bind(e))();break;case rt.CANCELED:case rt.ERROR:e.error&&ai(e.error.bind(e,this._error))();break;default:e.error&&ai(e.error.bind(e,this._error))()}}resume(){const e=this._state==="paused"||this._state==="pausing";return e&&this._transition("running"),e}pause(){const e=this._state==="running";return e&&this._transition("pausing"),e}cancel(){const e=this._state==="running"||this._state==="pausing";return e&&this._transition("canceling"),e}}/** + */class qw{constructor(e,n,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=n,this._metadata=r,this._mappings=uu(),this._resumable=this._shouldDoResumable(this._blob),this._state="running",this._errorHandler=i=>{if(this._request=void 0,this._chunkMultiplier=1,i._codeEquals(fe.CANCELED))this._needToFetchStatus=!0,this.completeTransitions_();else{const s=this.isExponentialBackoffExpired();if(Bw(i.status,[]))if(s)i=Ow();else{this.sleepTime=Math.max(this.sleepTime*2,tI),this._needToFetchStatus=!0,this.completeTransitions_();return}this._error=i,this._transition("error")}},this._metadataErrorHandler=i=>{this._request=void 0,i._codeEquals(fe.CANCELED)?this.completeTransitions_():(this._error=i,this._transition("error"))},this.sleepTime=0,this.maxSleepTime=this._ref.storage.maxUploadRetryTime,this._promise=new Promise((i,s)=>{this._resolve=i,this._reject=s,this._start()}),this._promise.then(null,()=>{})}isExponentialBackoffExpired(){return this.sleepTime>this.maxSleepTime}_makeProgressCallback(){const e=this._transferred;return n=>this._updateProgress(e+n)}_shouldDoResumable(e){return e.size()>256*1024}_start(){this._state==="running"&&this._request===void 0&&(this._resumable?this._uploadUrl===void 0?this._createResumable():this._needToFetchStatus?this._fetchStatus():this._needToFetchMetadata?this._fetchMetadata():this.pendingTimeout=setTimeout(()=>{this.pendingTimeout=void 0,this._continueUpload()},this.sleepTime):this._oneShotUpload())}_resolveToken(e){Promise.all([this._ref.storage._getAuthToken(),this._ref.storage._getAppCheckToken()]).then(([n,r])=>{switch(this._state){case"running":e(n,r);break;case"canceling":this._transition("canceled");break;case"pausing":this._transition("paused");break}})}_createResumable(){this._resolveToken((e,n)=>{const r=YI(this._ref.storage,this._ref._location,this._mappings,this._blob,this._metadata),i=this._ref.storage._makeRequest(r,sn,e,n);this._request=i,i.getPromise().then(s=>{this._request=void 0,this._uploadUrl=s,this._needToFetchStatus=!1,this.completeTransitions_()},this._errorHandler)})}_fetchStatus(){const e=this._uploadUrl;this._resolveToken((n,r)=>{const i=XI(this._ref.storage,this._ref._location,e,this._blob),s=this._ref.storage._makeRequest(i,sn,n,r);this._request=s,s.getPromise().then(o=>{o=o,this._request=void 0,this._updateProgress(o.current),this._needToFetchStatus=!1,o.finalized&&(this._needToFetchMetadata=!0),this.completeTransitions_()},this._errorHandler)})}_continueUpload(){const e=og*this._chunkMultiplier,n=new pa(this._transferred,this._blob.size()),r=this._uploadUrl;this._resolveToken((i,s)=>{let o;try{o=JI(this._ref._location,this._ref.storage,r,this._blob,e,this._mappings,n,this._makeProgressCallback())}catch(a){this._error=a,this._transition("error");return}const l=this._ref.storage._makeRequest(o,sn,i,s,!1);this._request=l,l.getPromise().then(a=>{this._increaseMultiplier(),this._request=void 0,this._updateProgress(a.current),a.finalized?(this._metadata=a.metadata,this._transition("success")):this.completeTransitions_()},this._errorHandler)})}_increaseMultiplier(){og*this._chunkMultiplier*2<32*1024*1024&&(this._chunkMultiplier*=2)}_fetchMetadata(){this._resolveToken((e,n)=>{const r=Qw(this._ref.storage,this._ref._location,this._mappings),i=this._ref.storage._makeRequest(r,sn,e,n);this._request=i,i.getPromise().then(s=>{this._request=void 0,this._metadata=s,this._transition("success")},this._metadataErrorHandler)})}_oneShotUpload(){this._resolveToken((e,n)=>{const r=qI(this._ref.storage,this._ref._location,this._mappings,this._blob,this._metadata),i=this._ref.storage._makeRequest(r,sn,e,n);this._request=i,i.getPromise().then(s=>{this._request=void 0,this._metadata=s,this._updateProgress(this._blob.size()),this._transition("success")},this._errorHandler)})}_updateProgress(e){const n=this._transferred;this._transferred=e,this._transferred!==n&&this._notifyObservers()}_transition(e){if(this._state!==e)switch(e){case"canceling":case"pausing":this._state=e,this._request!==void 0?this._request.cancel():this.pendingTimeout&&(clearTimeout(this.pendingTimeout),this.pendingTimeout=void 0,this.completeTransitions_());break;case"running":const n=this._state==="paused";this._state=e,n&&(this._notifyObservers(),this._start());break;case"paused":this._state=e,this._notifyObservers();break;case"canceled":this._error=Lw(),this._state=e,this._notifyObservers();break;case"error":this._state=e,this._notifyObservers();break;case"success":this._state=e,this._notifyObservers();break}}completeTransitions_(){switch(this._state){case"pausing":this._transition("paused");break;case"canceling":this._transition("canceled");break;case"running":this._start();break}}get snapshot(){const e=ac(this._state);return{bytesTransferred:this._transferred,totalBytes:this._blob.size(),state:e,metadata:this._metadata,task:this,ref:this._ref}}on(e,n,r,i){const s=new eP(n||void 0,r||void 0,i||void 0);return this._addObserver(s),()=>{this._removeObserver(s)}}then(e,n){return this._promise.then(e,n)}catch(e){return this.then(null,e)}_addObserver(e){this._observers.push(e),this._notifyObserver(e)}_removeObserver(e){const n=this._observers.indexOf(e);n!==-1&&this._observers.splice(n,1)}_notifyObservers(){this._finishPromise(),this._observers.slice().forEach(n=>{this._notifyObserver(n)})}_finishPromise(){if(this._resolve!==void 0){let e=!0;switch(ac(this._state)){case rt.SUCCESS:ci(this._resolve.bind(null,this.snapshot))();break;case rt.CANCELED:case rt.ERROR:const n=this._reject;ci(n.bind(null,this._error))();break;default:e=!1;break}e&&(this._resolve=void 0,this._reject=void 0)}}_notifyObserver(e){switch(ac(this._state)){case rt.RUNNING:case rt.PAUSED:e.next&&ci(e.next.bind(e,this.snapshot))();break;case rt.SUCCESS:e.complete&&ci(e.complete.bind(e))();break;case rt.CANCELED:case rt.ERROR:e.error&&ci(e.error.bind(e,this._error))();break;default:e.error&&ci(e.error.bind(e,this._error))()}}resume(){const e=this._state==="paused"||this._state==="pausing";return e&&this._transition("running"),e}pause(){const e=this._state==="running";return e&&this._transition("pausing"),e}cancel(){const e=this._state==="running"||this._state==="pausing";return e&&this._transition("canceling"),e}}/** * @license * Copyright 2019 Google LLC * @@ -2303,7 +2303,7 @@ Content-Type: `+u.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class qr{constructor(e,n){this._service=e,n instanceof Je?this._location=n:this._location=Je.makeFromUrl(n,e.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(e,n){return new qr(e,n)}get root(){const e=new Je(this._location.bucket,"");return this._newRef(this._service,e)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return Bw(this._location.path)}get storage(){return this._service}get parent(){const e=SI(this._location.path);if(e===null)return null;const n=new Je(this._location.bucket,e);return new qr(this._service,n)}_throwIfRoot(e){if(this._location.path==="")throw Aw(e)}}function QI(t,e,n){return t._throwIfRoot("uploadBytesResumable"),new Hw(t,new yn(e),n)}function KI(t){const e={prefixes:[],items:[]};return Vw(t,e).then(()=>e)}async function Vw(t,e,n){const i=await Gw(t,{pageToken:n});e.prefixes.push(...i.prefixes),e.items.push(...i.items),i.nextPageToken!=null&&await Vw(t,e,i.nextPageToken)}function Gw(t,e){e!=null&&typeof e.maxResults=="number"&&Pd("options.maxResults",1,1e3,e.maxResults);const n=e||{},r=OI(t.storage,t._location,"/",n.pageToken,n.maxResults);return t.storage.makeRequestWithTokens(r,sn)}function qI(t){t._throwIfRoot("getMetadata");const e=$w(t.storage,t._location,ou());return t.storage.makeRequestWithTokens(e,sn)}function YI(t,e){t._throwIfRoot("updateMetadata");const n=MI(t.storage,t._location,e,ou());return t.storage.makeRequestWithTokens(n,sn)}function XI(t){t._throwIfRoot("getDownloadURL");const e=LI(t.storage,t._location,ou());return t.storage.makeRequestWithTokens(e,sn).then(n=>{if(n===null)throw tI();return n})}function JI(t){t._throwIfRoot("deleteObject");const e=jI(t.storage,t._location);return t.storage.makeRequestWithTokens(e,sn)}function Qw(t,e){const n=xI(t._location.path,e),r=new Je(t._location.bucket,n);return new qr(t.storage,r)}/** + */class Xr{constructor(e,n){this._service=e,n instanceof Je?this._location=n:this._location=Je.makeFromUrl(n,e.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(e,n){return new Xr(e,n)}get root(){const e=new Je(this._location.bucket,"");return this._newRef(this._service,e)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return Vw(this._location.path)}get storage(){return this._service}get parent(){const e=AI(this._location.path);if(e===null)return null;const n=new Je(this._location.bucket,e);return new Xr(this._service,n)}_throwIfRoot(e){if(this._location.path==="")throw Fw(e)}}function rP(t,e,n){return t._throwIfRoot("uploadBytesResumable"),new qw(t,new yn(e),n)}function iP(t){const e={prefixes:[],items:[]};return Yw(t,e).then(()=>e)}async function Yw(t,e,n){const i=await Xw(t,{pageToken:n});e.prefixes.push(...i.prefixes),e.items.push(...i.items),i.nextPageToken!=null&&await Yw(t,e,i.nextPageToken)}function Xw(t,e){e!=null&&typeof e.maxResults=="number"&&Ad("options.maxResults",1,1e3,e.maxResults);const n=e||{},r=HI(t.storage,t._location,"/",n.pageToken,n.maxResults);return t.storage.makeRequestWithTokens(r,sn)}function sP(t){t._throwIfRoot("getMetadata");const e=Qw(t.storage,t._location,uu());return t.storage.makeRequestWithTokens(e,sn)}function oP(t,e){t._throwIfRoot("updateMetadata");const n=GI(t.storage,t._location,e,uu());return t.storage.makeRequestWithTokens(n,sn)}function lP(t){t._throwIfRoot("getDownloadURL");const e=VI(t.storage,t._location,uu());return t.storage.makeRequestWithTokens(e,sn).then(n=>{if(n===null)throw dI();return n})}function aP(t){t._throwIfRoot("deleteObject");const e=QI(t.storage,t._location);return t.storage.makeRequestWithTokens(e,sn)}function Jw(t,e){const n=OI(t._location.path,e),r=new Je(t._location.bucket,n);return new Xr(t.storage,r)}/** * @license * Copyright 2017 Google LLC * @@ -2318,7 +2318,7 @@ Content-Type: `+u.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function ZI(t){return/^[A-Za-z]+:\/\//.test(t)}function eP(t,e){return new qr(t,e)}function Kw(t,e){if(t instanceof wf){const n=t;if(n._bucket==null)throw ZN();const r=new qr(n,n._bucket);return e!=null?Kw(r,e):r}else return e!==void 0?Qw(t,e):t}function tP(t,e){if(e&&ZI(e)){if(t instanceof wf)return eP(t,e);throw Oi("To use ref(service, url), the first argument must be a Storage instance.")}else return Kw(t,e)}function rg(t,e){const n=e==null?void 0:e[Nw];return n==null?null:Je.makeFromBucketSpec(n,t)}function nP(t,e,n,r={}){t.host=`${e}:${n}`,t._protocol="http";const{mockUserToken:i}=r;i&&(t._overrideAuthToken=typeof i=="string"?i:Vy(i,t.app.options.projectId))}class wf{constructor(e,n,r,i,s){this.app=e,this._authProvider=n,this._appCheckProvider=r,this._url=i,this._firebaseVersion=s,this._bucket=null,this._host=Rw,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=WN,this._maxUploadRetryTime=HN,this._requests=new Set,i!=null?this._bucket=Je.makeFromBucketSpec(i,this._host):this._bucket=rg(this._host,this.app.options)}get host(){return this._host}set host(e){this._host=e,this._url!=null?this._bucket=Je.makeFromBucketSpec(this._url,e):this._bucket=rg(e,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(e){Pd("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(e){Pd("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 n=await e.getToken();if(n!==null)return n.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 qr(this,e)}_makeRequest(e,n,r,i,s=!0){if(this._deleted)return new rI(Dw());{const o=pI(e,this._appId,r,i,n,this._firebaseVersion,s);return this._requests.add(o),o.getPromise().then(()=>this._requests.delete(o),()=>this._requests.delete(o)),o}}async makeRequestWithTokens(e,n){const[r,i]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(e,n,r,i).getPromise()}}const ig="@firebase/storage",sg="0.11.2";/** + */function uP(t){return/^[A-Za-z]+:\/\//.test(t)}function cP(t,e){return new Xr(t,e)}function Zw(t,e){if(t instanceof Sf){const n=t;if(n._bucket==null)throw uI();const r=new Xr(n,n._bucket);return e!=null?Zw(r,e):r}else return e!==void 0?Jw(t,e):t}function dP(t,e){if(e&&uP(e)){if(t instanceof Sf)return cP(t,e);throw Mi("To use ref(service, url), the first argument must be a Storage instance.")}else return Zw(t,e)}function lg(t,e){const n=e==null?void 0:e[Aw];return n==null?null:Je.makeFromBucketSpec(n,t)}function hP(t,e,n,r={}){t.host=`${e}:${n}`,t._protocol="http";const{mockUserToken:i}=r;i&&(t._overrideAuthToken=typeof i=="string"?i:Yy(i,t.app.options.projectId))}class Sf{constructor(e,n,r,i,s){this.app=e,this._authProvider=n,this._appCheckProvider=r,this._url=i,this._firebaseVersion=s,this._bucket=null,this._host=Dw,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=ZN,this._maxUploadRetryTime=eI,this._requests=new Set,i!=null?this._bucket=Je.makeFromBucketSpec(i,this._host):this._bucket=lg(this._host,this.app.options)}get host(){return this._host}set host(e){this._host=e,this._url!=null?this._bucket=Je.makeFromBucketSpec(this._url,e):this._bucket=lg(e,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(e){Ad("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(e){Ad("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 n=await e.getToken();if(n!==null)return n.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 Xr(this,e)}_makeRequest(e,n,r,i,s=!0){if(this._deleted)return new fI(jw());{const o=xI(e,this._appId,r,i,n,this._firebaseVersion,s);return this._requests.add(o),o.getPromise().then(()=>this._requests.delete(o),()=>this._requests.delete(o)),o}}async makeRequestWithTokens(e,n){const[r,i]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(e,n,r,i).getPromise()}}const ag="@firebase/storage",ug="0.11.2";/** * @license * Copyright 2020 Google LLC * @@ -2333,7 +2333,7 @@ Content-Type: `+u.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const rP="storage";function iP(t,e,n){return t=Re(t),QI(t,e,n)}function sP(t){return t=Re(t),qI(t)}function oP(t,e){return t=Re(t),YI(t,e)}function lP(t,e){return t=Re(t),Gw(t,e)}function aP(t){return t=Re(t),KI(t)}function uP(t){return t=Re(t),XI(t)}function cP(t){return t=Re(t),JI(t)}function og(t,e){return t=Re(t),tP(t,e)}function dP(t,e){return Qw(t,e)}function hP(t,e,n,r={}){nP(t,e,n,r)}function fP(t,{instanceIdentifier:e}){const n=t.getProvider("app").getImmediate(),r=t.getProvider("auth-internal"),i=t.getProvider("app-check-internal");return new wf(n,r,i,e,Fa)}function pP(){Vr(new Yt(rP,fP,"PUBLIC").setMultipleInstances(!0)),an(ig,sg,""),an(ig,sg,"esm2017")}pP();/** + */const fP="storage";function pP(t,e,n){return t=Re(t),rP(t,e,n)}function mP(t){return t=Re(t),sP(t)}function gP(t,e){return t=Re(t),oP(t,e)}function _P(t,e){return t=Re(t),Xw(t,e)}function yP(t){return t=Re(t),iP(t)}function vP(t){return t=Re(t),lP(t)}function wP(t){return t=Re(t),aP(t)}function cg(t,e){return t=Re(t),dP(t,e)}function EP(t,e){return Jw(t,e)}function CP(t,e,n,r={}){hP(t,e,n,r)}function SP(t,{instanceIdentifier:e}){const n=t.getProvider("app").getImmediate(),r=t.getProvider("auth-internal"),i=t.getProvider("app-check-internal");return new Sf(n,r,i,e,za)}function xP(){Qr(new Yt(fP,SP,"PUBLIC").setMultipleInstances(!0)),an(ag,ug,""),an(ag,ug,"esm2017")}xP();/** * @license * Copyright 2020 Google LLC * @@ -2348,7 +2348,7 @@ Content-Type: `+u.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class dl{constructor(e,n,r){this._delegate=e,this.task=n,this.ref=r}get bytesTransferred(){return this._delegate.bytesTransferred}get metadata(){return this._delegate.metadata}get state(){return this._delegate.state}get totalBytes(){return this._delegate.totalBytes}}/** + */class fl{constructor(e,n,r){this._delegate=e,this.task=n,this.ref=r}get bytesTransferred(){return this._delegate.bytesTransferred}get metadata(){return this._delegate.metadata}get state(){return this._delegate.state}get totalBytes(){return this._delegate.totalBytes}}/** * @license * Copyright 2020 Google LLC * @@ -2363,7 +2363,7 @@ Content-Type: `+u.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class lg{constructor(e,n){this._delegate=e,this._ref=n,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)}get snapshot(){return new dl(this._delegate.snapshot,this,this._ref)}then(e,n){return this._delegate.then(r=>{if(e)return e(new dl(r,this,this._ref))},n)}on(e,n,r,i){let s;return n&&(typeof n=="function"?s=o=>n(new dl(o,this,this._ref)):s={next:n.next?o=>n.next(new dl(o,this,this._ref)):void 0,complete:n.complete||void 0,error:n.error||void 0}),this._delegate.on(e,s,r||void 0,i||void 0)}}class ag{constructor(e,n){this._delegate=e,this._service=n}get prefixes(){return this._delegate.prefixes.map(e=>new Tn(e,this._service))}get items(){return this._delegate.items.map(e=>new Tn(e,this._service))}get nextPageToken(){return this._delegate.nextPageToken||null}}/** + */class dg{constructor(e,n){this._delegate=e,this._ref=n,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)}get snapshot(){return new fl(this._delegate.snapshot,this,this._ref)}then(e,n){return this._delegate.then(r=>{if(e)return e(new fl(r,this,this._ref))},n)}on(e,n,r,i){let s;return n&&(typeof n=="function"?s=o=>n(new fl(o,this,this._ref)):s={next:n.next?o=>n.next(new fl(o,this,this._ref)):void 0,complete:n.complete||void 0,error:n.error||void 0}),this._delegate.on(e,s,r||void 0,i||void 0)}}class hg{constructor(e,n){this._delegate=e,this._service=n}get prefixes(){return this._delegate.prefixes.map(e=>new Rn(e,this._service))}get items(){return this._delegate.items.map(e=>new Rn(e,this._service))}get nextPageToken(){return this._delegate.nextPageToken||null}}/** * @license * Copyright 2020 Google LLC * @@ -2378,7 +2378,7 @@ Content-Type: `+u.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class Tn{constructor(e,n){this._delegate=e,this.storage=n}get name(){return this._delegate.name}get bucket(){return this._delegate.bucket}get fullPath(){return this._delegate.fullPath}toString(){return this._delegate.toString()}child(e){const n=dP(this._delegate,e);return new Tn(n,this.storage)}get root(){return new Tn(this._delegate.root,this.storage)}get parent(){const e=this._delegate.parent;return e==null?null:new Tn(e,this.storage)}put(e,n){return this._throwIfRoot("put"),new lg(iP(this._delegate,e,n),this)}putString(e,n=At.RAW,r){this._throwIfRoot("putString");const i=Mw(n,e),s=Object.assign({},r);return s.contentType==null&&i.contentType!=null&&(s.contentType=i.contentType),new lg(new Hw(this._delegate,new yn(i.data,!0),s),this)}listAll(){return aP(this._delegate).then(e=>new ag(e,this.storage))}list(e){return lP(this._delegate,e||void 0).then(n=>new ag(n,this.storage))}getMetadata(){return sP(this._delegate)}updateMetadata(e){return oP(this._delegate,e)}getDownloadURL(){return uP(this._delegate)}delete(){return this._throwIfRoot("delete"),cP(this._delegate)}_throwIfRoot(e){if(this._delegate._location.path==="")throw Aw(e)}}/** + */class Rn{constructor(e,n){this._delegate=e,this.storage=n}get name(){return this._delegate.name}get bucket(){return this._delegate.bucket}get fullPath(){return this._delegate.fullPath}toString(){return this._delegate.toString()}child(e){const n=EP(this._delegate,e);return new Rn(n,this.storage)}get root(){return new Rn(this._delegate.root,this.storage)}get parent(){const e=this._delegate.parent;return e==null?null:new Rn(e,this.storage)}put(e,n){return this._throwIfRoot("put"),new dg(pP(this._delegate,e,n),this)}putString(e,n=At.RAW,r){this._throwIfRoot("putString");const i=zw(n,e),s=Object.assign({},r);return s.contentType==null&&i.contentType!=null&&(s.contentType=i.contentType),new dg(new qw(this._delegate,new yn(i.data,!0),s),this)}listAll(){return yP(this._delegate).then(e=>new hg(e,this.storage))}list(e){return _P(this._delegate,e||void 0).then(n=>new hg(n,this.storage))}getMetadata(){return mP(this._delegate)}updateMetadata(e){return gP(this._delegate,e)}getDownloadURL(){return vP(this._delegate)}delete(){return this._throwIfRoot("delete"),wP(this._delegate)}_throwIfRoot(e){if(this._delegate._location.path==="")throw Fw(e)}}/** * @license * Copyright 2020 Google LLC * @@ -2393,7 +2393,7 @@ Content-Type: `+u.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class qw{constructor(e,n){this.app=e,this._delegate=n}get maxOperationRetryTime(){return this._delegate.maxOperationRetryTime}get maxUploadRetryTime(){return this._delegate.maxUploadRetryTime}ref(e){if(ug(e))throw Oi("ref() expected a child path but got a URL, use refFromURL instead.");return new Tn(og(this._delegate,e),this)}refFromURL(e){if(!ug(e))throw Oi("refFromURL() expected a full URL but got a child path, use ref() instead.");try{Je.makeFromUrl(e,this._delegate.host)}catch{throw Oi("refFromUrl() expected a valid full URL but got an invalid one.")}return new Tn(og(this._delegate,e),this)}setMaxUploadRetryTime(e){this._delegate.maxUploadRetryTime=e}setMaxOperationRetryTime(e){this._delegate.maxOperationRetryTime=e}useEmulator(e,n,r={}){hP(this._delegate,e,n,r)}}function ug(t){return/^[A-Za-z]+:\/\//.test(t)}const mP="@firebase/storage-compat",gP="0.3.2";/** + */class e0{constructor(e,n){this.app=e,this._delegate=n}get maxOperationRetryTime(){return this._delegate.maxOperationRetryTime}get maxUploadRetryTime(){return this._delegate.maxUploadRetryTime}ref(e){if(fg(e))throw Mi("ref() expected a child path but got a URL, use refFromURL instead.");return new Rn(cg(this._delegate,e),this)}refFromURL(e){if(!fg(e))throw Mi("refFromURL() expected a full URL but got a child path, use ref() instead.");try{Je.makeFromUrl(e,this._delegate.host)}catch{throw Mi("refFromUrl() expected a valid full URL but got an invalid one.")}return new Rn(cg(this._delegate,e),this)}setMaxUploadRetryTime(e){this._delegate.maxUploadRetryTime=e}setMaxOperationRetryTime(e){this._delegate.maxOperationRetryTime=e}useEmulator(e,n,r={}){CP(this._delegate,e,n,r)}}function fg(t){return/^[A-Za-z]+:\/\//.test(t)}const kP="@firebase/storage-compat",TP="0.3.2";/** * @license * Copyright 2020 Google LLC * @@ -2408,8 +2408,8 @@ Content-Type: `+u.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const _P="storage-compat";function yP(t,{instanceIdentifier:e}){const n=t.getProvider("app-compat").getImmediate(),r=t.getProvider("storage").getImmediate({identifier:e});return new qw(n,r)}function vP(t){const e={TaskState:rt,TaskEvent:WI,StringFormat:At,Storage:qw,Reference:Tn};t.INTERNAL.registerComponent(new Yt(_P,yP,"PUBLIC").setServiceProps(e).setMultipleInstances(!0)),t.registerVersion(mP,gP)}vP(es);const wP={apiKey:"AIzaSyCt0Iylx8zjoxHOylthne8lakGPi1fPyrw",authDomain:"gdsc-smit-85496.firebaseapp.com",projectId:"gdsc-smit-85496",databaseURL:"https://gdsc-smit-85496-default-rtdb.firebaseio.com",storageBucket:"gdsc-smit-85496.appspot.com",messagingSenderId:"377425417072",appId:"1:377425417072:web:83fd757e3137ae9021b5b5",measurementId:"G-FNR5P1K3WM"};es.initializeApp(wP);const EP=es.database(),CP=es.storage();function SP(){const[t,e]=P.useState(""),[n,r]=P.useState(""),[i,s]=P.useState(""),o=l=>{l.preventDefault(),console.log(t,n,i),EP.ref("Responses").push({name:t,email:n,message:i}).catch(a=>console.error("error submitting data :",a)),alert("Sent Successfully!")};return f.jsxs(f.Fragment,{children:[f.jsx(Oa,{}),f.jsx("div",{className:"col-md-4 my-4 mx-auto contact_logo",children:f.jsx("img",{src:"./img/gdsc_form.svg",className:"img-fluid",alt:"..."})}),f.jsxs("form",{className:"my-5 w-50 mx-auto",onSubmit:o,children:[f.jsxs("div",{className:"form-outline mb-4",children:[f.jsx("label",{className:"form-label",htmlFor:"form4Example1",children:"Name"}),f.jsx("input",{type:"text",id:"form4Example1",className:"form-control",value:t,onChange:l=>{e(l.target.value)}})]}),f.jsxs("div",{className:"form-outline mb-4 ",children:[f.jsx("label",{className:"form-label",htmlFor:"form4Example2",children:"Email address"}),f.jsx("input",{type:"email",id:"form4Example2",className:"form-control",value:n,onChange:l=>{r(l.target.value)}})]}),f.jsxs("div",{className:"form-outline mb-4",children:[f.jsx("label",{className:"form-label",htmlFor:"form4Example3",children:"Message"}),f.jsx("textarea",{className:"form-control",id:"form4Example3",rows:"4",value:i,onChange:l=>{s(l.target.value)}})]}),f.jsx("div",{className:"d-flex justify-content-center",children:f.jsx("button",{type:"submit",className:"btn btn-primary mb-4",children:"Send"})})]}),f.jsx(Ia,{})]})}const xP=async()=>{try{const t=[],n=await CP.ref().listAll();for(const r of n.items){const i=await r.getDownloadURL();t.push({name:r.name,url:i})}return t}catch(t){throw console.error("Error fetching files from storage:",t),t}};async function kP(){try{const t=await xP();return console.log(t),t}catch(t){console.error("Error fetching files:",t)}}let TP=kP();TP.then(t=>{Yw=[{img:`${t[2].url}`,name:"Pooranjoy Bhattacharya",domain:"Web Development",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[0].url}`,name:"Cloud Computing",domain:"Abhijnyan Das",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[25].url}`,name:"Madhurjya Dasgupta",domain:"Cybersecurity",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[26].url}`,name:"Rishav Krishnan",domain:"App Development",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[23].url}`,name:"Shivam Sourav",domain:"AI/ML",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[28].url}`,name:"Kuldeep Bora",domain:"UI/UX Design",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[5].url}`,name:"Dhruv Bhutura",domain:"Public Relations",twitter:"https://john",insta:"https://john",linkedin:"https://john"}],bd=[{img:`${t[20].url}`,name:"Toshith Yadav",domain:"Web Development",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[13].url}`,name:"Seedorf Rai",domain:"Web Development",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[24].url}`,name:"Girish Sharma",domain:"Web Development",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[32].url}`,name:"Madhurya Hait",domain:"Web Development",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[9].url}`,name:"Sneha Supriya",domain:"AI/ML",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[4].url}`,name:"Om Gupta",domain:"AI/ML",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[1].url}`,name:"Mayur K T",domain:"AI/ML",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[19].url}`,name:"Pratham Srivastava",domain:"AI/ML",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[6].url}`,name:"Neha Sultan",domain:"AI/ML",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[33].url}`,name:"Indraneel Das",domain:"Cybersecurity",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[29].url}`,name:"Shayan Vatsa",domain:"Cybersecurity",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[17].url}`,name:"Gunjan Chakrabartty",domain:"Cybersecurity",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[12].url}`,name:"Ishaan S. Oshima",domain:"Cybersecurity",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[27].url}`,name:"Manaswi Jha",domain:"UI/UX Design",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[31].url}`,name:"Priyanjana Paul",domain:"UI/UX Design",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[3].url}`,name:"Sneha Seal",domain:"Cloud Computing",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[15].url}`,name:"Deepak Manda",domain:"Cloud Computing",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[7].url}`,name:"Prantor J. Bharadwaj",domain:"Cloud Computing",twitter:"https://john",insta:"https://john",linkedin:"https://john"}],Xw=`${t[34].url}`});let Yw=[],bd=[],Xw="";const cg=()=>{const t=["blue","red","yellow","green"],e=Math.floor(Math.random()*t.length);return t[e]},RP=({data:t})=>{const e=cg(),n=cg();return f.jsx("div",{className:"col-xl-3 col-sm-4 my-3",children:f.jsxs("div",{className:`bg-white rounded shadow-sm py-5 px-4 border border-4 border-${e}`,children:[f.jsx("img",{src:t.img,alt:"",width:"100",className:"img-fluid rounded-circle mb-3 img-thumbnail shadow-sm"}),f.jsx("h5",{className:"mb-0 fs-4 fw-bold color-dark",children:t.name}),f.jsx("span",{className:"small fw-light text-uppercase text-muted",children:t.domain}),f.jsxs("ul",{className:`social mb-0 list-inline mt-2 mx-auto rounded rounded-5 p-1 bg-${n}`,style:{width:"fit-content"},children:[f.jsx("li",{className:"list-inline-item mx-2 ",children:f.jsx("a",{href:t.twitter,className:"social-link",children:f.jsx("i",{className:"fa fa-twitter",style:{color:"#fff"}})})}),f.jsx("li",{className:"list-inline-item mx-2",children:f.jsx("a",{href:t.insta,className:"social-link",children:f.jsx("i",{className:"fa fa-instagram",style:{color:"#fff"}})})}),f.jsx("li",{className:"list-inline-item mx-2",children:f.jsx("a",{href:t.linkedin,className:"social-link",children:f.jsx("i",{className:"fa fa-linkedin",style:{color:"#fff"}})})})]})]})})},dg=({teamData:t})=>f.jsx("div",{className:"row text-center justify-content-center my-5",children:t.map((e,n)=>f.jsx(RP,{data:e},n))});function NP(){const t=[...new Set(bd.map(s=>s.domain))],[e,n]=P.useState(t[0]),r=s=>{n(s)};function i(s,o){return s.filter(a=>a.domain===o)}return f.jsxs(f.Fragment,{children:[f.jsx(Oa,{}),f.jsx("div",{id:"endcontain",className:"container-fluid text-center my-3",children:f.jsx("strong",{children:f.jsxs("font",{className:"fw-bold fs-1 text-uppercase",children:[f.jsx("font",{color:"#4285F4",children:"GDSC "}),f.jsx("font",{color:"#EA4335",children:"SMIT "}),f.jsx("font",{color:"#F4B400",children:"Team "}),f.jsx("font",{color:"#34A853",children:"2023 "})]})})}),f.jsx("div",{className:"my-5 w-75 mx-auto",children:f.jsxs("div",{className:"d-flex flex-column justify-center",children:[f.jsx("h1",{className:"text-center display-5 font-bold",children:"Our Team"}),f.jsx("p",{className:"text-2xl text-center max-w-lg md:max-w-2xl",children:"Meet the Driving Force Behind Innovation"}),f.jsx("p",{className:"text-2xl text-center max-w-lg md:max-w-2xl",children:"Learning and innovation are at the core of everything we do. With our extraordinary team, we are dedicated to solving everyday challenges and pushing the boundaries of technology. Together, we are making it happen!"})]})}),f.jsxs("div",{className:"container ",children:[f.jsxs("div",{className:"row text-center justify-content-center my-5",children:[f.jsx("strong",{children:f.jsx("font",{className:"fs-1 text-center display-5",children:f.jsx("font",{color:"#000",children:"Lead"})})}),f.jsx("div",{className:"col-xl-3 col-sm-4 my-3",children:f.jsxs("div",{className:"bg-white rounded shadow-sm py-5 px-4 border border-4 border-blue",children:[f.jsx("img",{src:Xw,alt:"",width:"100",className:"img-fluid rounded-circle mb-3 img-thumbnail shadow-sm"}),f.jsx("h5",{className:"mb-0 fs-4 fw-bold color-dark",children:"Aryan Lohia"}),f.jsx("span",{className:"small fw-light text-uppercase text-muted",children:"Lead"}),f.jsxs("ul",{className:"social mb-0 list-inline mt-2 mx-auto rounded rounded-5 p-1 bg-blue",style:{width:"fit-content"},children:[f.jsx("li",{className:"list-inline-item mx-2 ",children:f.jsx("a",{href:"#",className:"social-link",children:f.jsx("i",{className:"fa fa-twitter",style:{color:"#fff"}})})}),f.jsx("li",{className:"list-inline-item mx-2",children:f.jsx("a",{href:"#",className:"social-link",children:f.jsx("i",{className:"fa fa-instagram",style:{color:"#fff"}})})}),f.jsx("li",{className:"list-inline-item mx-2",children:f.jsx("a",{href:"#",className:"social-link",children:f.jsx("i",{className:"fa fa-linkedin",style:{color:"#fff"}})})})]})]})})]}),f.jsx("div",{className:"container-fluid text-center my-3",children:f.jsx("strong",{children:f.jsx("font",{className:"fs-1 text-center display-5",children:f.jsx("font",{color:"#000",children:"Domain Leads"})})})}),f.jsx("div",{className:"container my-5",children:f.jsx(dg,{teamData:Yw})}),f.jsx("div",{className:"container-fluid text-center my-3",children:f.jsx("strong",{children:f.jsx("font",{className:"fs-1 text-center display-5",children:f.jsx("font",{color:"#000",children:"Core Team Members"})})})}),f.jsxs("div",{className:"container my-5",children:[f.jsx("ul",{className:"nav nav-pills d-flex justify-content-center border border-dark p-3",id:"domainTabs",children:t.map(s=>f.jsx("li",{className:"nav-item mx-3",children:f.jsx("a",{className:`nav-link ${s===e?"active":""}`,onClick:()=>r(s),style:{fontWeight:"bold",color:"black"},children:s})},s))}),f.jsx("style",{children:` + */const RP="storage-compat";function NP(t,{instanceIdentifier:e}){const n=t.getProvider("app-compat").getImmediate(),r=t.getProvider("storage").getImmediate({identifier:e});return new e0(n,r)}function IP(t){const e={TaskState:rt,TaskEvent:ZI,StringFormat:At,Storage:e0,Reference:Rn};t.INTERNAL.registerComponent(new Yt(RP,NP,"PUBLIC").setServiceProps(e).setMultipleInstances(!0)),t.registerVersion(kP,TP)}IP(ns);const PP={apiKey:"AIzaSyCt0Iylx8zjoxHOylthne8lakGPi1fPyrw",authDomain:"gdsc-smit-85496.firebaseapp.com",projectId:"gdsc-smit-85496",databaseURL:"https://gdsc-smit-85496-default-rtdb.firebaseio.com",storageBucket:"gdsc-smit-85496.appspot.com",messagingSenderId:"377425417072",appId:"1:377425417072:web:83fd757e3137ae9021b5b5",measurementId:"G-FNR5P1K3WM"};ns.initializeApp(PP);const bP=ns.database(),DP=ns.storage();function AP(){const[t,e]=P.useState(""),[n,r]=P.useState(""),[i,s]=P.useState(""),o=l=>{l.preventDefault(),console.log(t,n,i),bP.ref("Responses").push({name:t,email:n,message:i}).catch(a=>console.error("error submitting data :",a)),alert("Sent Successfully!")};return useEffect(()=>{setTimeout(()=>{setLoading(!1)},1e3)},[]),f.jsx(f.Fragment,{children:loader?f.jsx(ja,{}):f.jsxs(f.Fragment,{children:[f.jsx(Ma,{}),f.jsxs("div",{style:{width:"100%",display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"},children:[f.jsx("div",{className:"col-md-4 mb-5 mt-4 contact_logo",children:f.jsx("img",{src:"./img/gdsc_form.svg",className:"img-fluid",alt:"..."})}),f.jsxs("div",{className:"row card shadow d-flex align-items-center flex-row p-5 mb-3",style:{width:"80%",height:"auto"},children:[f.jsx("div",{className:"col-md-6 p-5",children:f.jsx("img",{className:"img-fluid",src:"https://img.freepik.com/free-vector/flat-design-illustration-customer-support_23-2148887720.jpg?w=740&t=st=1697360648~exp=1697361248~hmac=c1048c6b6eabd19c22ce4b952e7408ee9bed89a1ee6505893c371e26c3849053",alt:""})}),f.jsxs("div",{className:"col-md-6 col-sm-12 card p-4",children:[f.jsx("p",{className:"align-self-center h3 fw-bold text-primary mb-4",children:"Contact Us"}),f.jsxs("form",{onSubmit:o,children:[f.jsxs("div",{className:"form-outline input-group mb-4 ",children:[f.jsx("span",{class:"input-group-text",id:"basic-addon1",children:f.jsx("i",{class:"fa-solid fa-user text-primary"})}),f.jsx("input",{type:"text",id:"form4Example1",className:"form-control",placeholder:"Name",value:t,onChange:l=>{e(l.target.value)}})]}),f.jsxs("div",{className:"form-outline input-group mb-4 ",children:[f.jsx("span",{class:"input-group-text",id:"basic-addon1",children:f.jsx("i",{class:"fa-solid fa-envelope text-primary"})}),f.jsx("input",{type:"email",id:"form4Example2",className:"form-control",placeholder:"Email",value:n,onChange:l=>{r(l.target.value)}})]}),f.jsx("div",{className:"form-outline mb-4",children:f.jsx("textarea",{className:"form-control",id:"form4Example3",rows:"4",value:i,placeholder:"Type your message here...",onChange:l=>{s(l.target.value)}})}),f.jsx("div",{className:"d-flex justify-content-center",children:f.jsx("button",{type:"submit",className:"btn btn-primary w-100 mb-4",children:"Send"})})]})]})]}),f.jsx(ba,{})]})]})})}const OP=async()=>{try{const t=[],n=await DP.ref().listAll();for(const r of n.items){const i=await r.getDownloadURL();t.push({name:r.name,url:i})}return t}catch(t){throw console.error("Error fetching files from storage:",t),t}};async function LP(){try{return await OP()}catch(t){console.error("Error fetching files:",t)}}let MP=LP();MP.then(t=>{t0=[{img:`${t[2].url}`,name:"Pooranjoy Bhattacharya",domain:"Web Development",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[0].url}`,name:"Cloud Computing",domain:"Abhijnyan Das",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[25].url}`,name:"Madhurjya Dasgupta",domain:"Cybersecurity",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[26].url}`,name:"Rishav Krishnan",domain:"App Development",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[23].url}`,name:"Shivam Sourav",domain:"AI/ML",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[28].url}`,name:"Kuldeep Bora",domain:"UI/UX Design",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[5].url}`,name:"Dhruv Bhutura",domain:"Public Relations",twitter:"https://john",insta:"https://john",linkedin:"https://john"}],Od=[{img:`${t[20].url}`,name:"Toshith Yadav",domain:"Web Development",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[13].url}`,name:"Seedorf Rai",domain:"Web Development",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[24].url}`,name:"Girish Sharma",domain:"Web Development",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[32].url}`,name:"Madhurya Hait",domain:"Web Development",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[9].url}`,name:"Sneha Supriya",domain:"AI/ML",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[4].url}`,name:"Om Gupta",domain:"AI/ML",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[1].url}`,name:"Mayur K T",domain:"AI/ML",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[19].url}`,name:"Pratham Srivastava",domain:"AI/ML",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[6].url}`,name:"Neha Sultan",domain:"AI/ML",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[33].url}`,name:"Indraneel Das",domain:"Cybersecurity",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[29].url}`,name:"Shayan Vatsa",domain:"Cybersecurity",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[17].url}`,name:"Gunjan Chakrabartty",domain:"Cybersecurity",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[12].url}`,name:"Ishaan S. Oshima",domain:"Cybersecurity",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[27].url}`,name:"Manaswi Jha",domain:"UI/UX Design",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[31].url}`,name:"Priyanjana Paul",domain:"UI/UX Design",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[3].url}`,name:"Sneha Seal",domain:"Cloud Computing",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[15].url}`,name:"Deepak Manda",domain:"Cloud Computing",twitter:"https://john",insta:"https://john",linkedin:"https://john"},{img:`${t[7].url}`,name:"Prantor J. Bharadwaj",domain:"Cloud Computing",twitter:"https://john",insta:"https://john",linkedin:"https://john"}],n0=`${t[34].url}`});let t0=[],Od=[],n0="";const pg=()=>{const t=["blue","red","yellow","green"],e=Math.floor(Math.random()*t.length);return t[e]},jP=({data:t})=>{const e=pg(),n=pg();return f.jsx("div",{className:"col-xl-3 col-sm-4 my-3",children:f.jsxs("div",{className:`bg-white rounded shadow-sm py-5 px-4 border border-4 border-${e}`,children:[f.jsx("img",{src:t.img,alt:"",width:"100",className:"img-fluid rounded-circle mb-3 img-thumbnail shadow-sm"}),f.jsx("h5",{className:"mb-0 fs-4 fw-bold color-dark",children:t.name}),f.jsx("span",{className:"small fw-light text-uppercase text-muted",children:t.domain}),f.jsxs("ul",{className:`social mb-0 list-inline mt-2 mx-auto rounded rounded-5 p-1 bg-${n}`,style:{width:"fit-content"},children:[f.jsx("li",{className:"list-inline-item mx-2 ",children:f.jsx("a",{href:t.twitter,className:"social-link",children:f.jsx("i",{className:"fa fa-twitter",style:{color:"#fff"}})})}),f.jsx("li",{className:"list-inline-item mx-2",children:f.jsx("a",{href:t.insta,className:"social-link",children:f.jsx("i",{className:"fa fa-instagram",style:{color:"#fff"}})})}),f.jsx("li",{className:"list-inline-item mx-2",children:f.jsx("a",{href:t.linkedin,className:"social-link",children:f.jsx("i",{className:"fa fa-linkedin",style:{color:"#fff"}})})})]})]})})},mg=({teamData:t})=>f.jsx("div",{className:"row text-center justify-content-center my-5",children:t.map((e,n)=>f.jsx(jP,{data:e},n))});function FP(){const t=[...new Set(Od.map(l=>l.domain))],[e,n]=P.useState(t[0]),[r,i]=P.useState(!0),s=l=>{n(l)};function o(l,a){return l.filter(c=>c.domain===a)}return P.useEffect(()=>{setTimeout(()=>{i(!1)},5e3)},[]),f.jsx(f.Fragment,{children:r?f.jsx(ja,{}):f.jsxs(f.Fragment,{children:[f.jsx(Ma,{}),f.jsx("div",{id:"endcontain",className:"container-fluid text-center my-3",children:f.jsx("strong",{children:f.jsxs("font",{className:"fw-bold fs-1 text-uppercase",children:[f.jsx("font",{color:"#4285F4",children:"GDSC "}),f.jsx("font",{color:"#EA4335",children:"SMIT "}),f.jsx("font",{color:"#F4B400",children:"Team "}),f.jsx("font",{color:"#34A853",children:"2023 "})]})})}),f.jsx("div",{className:"my-5 w-75 mx-auto",children:f.jsxs("div",{className:"d-flex flex-column justify-center",children:[f.jsx("h1",{className:"text-center display-5 font-bold",children:"Our Team"}),f.jsx("p",{className:"text-2xl text-center max-w-lg md:max-w-2xl",children:"Meet the Driving Force Behind Innovation"}),f.jsx("p",{className:"text-2xl text-center max-w-lg md:max-w-2xl",children:"Learning and innovation are at the core of everything we do. With our extraordinary team, we are dedicated to solving everyday challenges and pushing the boundaries of technology. Together, we are making it happen!"})]})}),f.jsxs("div",{className:"container ",children:[f.jsxs("div",{className:"row text-center justify-content-center my-5",children:[f.jsx("strong",{children:f.jsx("font",{className:"fs-1 text-center display-5",children:f.jsx("font",{color:"#000",children:"Lead"})})}),f.jsx("div",{className:"col-xl-3 col-sm-4 my-3",children:f.jsxs("div",{className:"bg-white rounded shadow-sm py-5 px-4 border border-4 border-blue",children:[f.jsx("img",{src:n0,alt:"",width:"100",className:"img-fluid rounded-circle mb-3 img-thumbnail shadow-sm"}),f.jsx("h5",{className:"mb-0 fs-4 fw-bold color-dark",children:"Aryan Lohia"}),f.jsx("span",{className:"small fw-light text-uppercase text-muted",children:"Lead"}),f.jsxs("ul",{className:"social mb-0 list-inline mt-2 mx-auto rounded rounded-5 p-1 bg-blue",style:{width:"fit-content"},children:[f.jsx("li",{className:"list-inline-item mx-2 ",children:f.jsx("a",{href:"#",className:"social-link",children:f.jsx("i",{className:"fa fa-twitter",style:{color:"#fff"}})})}),f.jsx("li",{className:"list-inline-item mx-2",children:f.jsx("a",{href:"#",className:"social-link",children:f.jsx("i",{className:"fa fa-instagram",style:{color:"#fff"}})})}),f.jsx("li",{className:"list-inline-item mx-2",children:f.jsx("a",{href:"#",className:"social-link",children:f.jsx("i",{className:"fa fa-linkedin",style:{color:"#fff"}})})})]})]})})]}),f.jsx("div",{className:"container-fluid text-center my-3",children:f.jsx("strong",{children:f.jsx("font",{className:"fs-1 text-center display-5",children:f.jsx("font",{color:"#000",children:"Domain Leads"})})})}),f.jsx("div",{className:"container my-5",children:f.jsx(mg,{teamData:t0})}),f.jsx("div",{className:"container-fluid text-center my-3",children:f.jsx("strong",{children:f.jsx("font",{className:"fs-1 text-center display-5",children:f.jsx("font",{color:"#000",children:"Core Team Members"})})})}),f.jsxs("div",{className:"container my-5",children:[f.jsx("ul",{className:"nav nav-pills d-flex justify-content-center border border-dark p-3",id:"domainTabs",children:t.map(l=>f.jsx("li",{className:"nav-item mx-3",children:f.jsx("a",{className:`nav-link ${l===e?"active":""}`,onClick:()=>s(l),style:{fontWeight:"bold",color:"black"},children:l})},l))}),f.jsx("style",{children:` .nav-link:hover { cursor: pointer; } - `}),f.jsx("div",{className:"tab-content",id:"domainTabsContent",children:t.map(s=>f.jsx("div",{className:`tab-pane fade ${s===e?"show active":""}`,children:f.jsx(dg,{teamData:i(bd,s)})},s))})]})]}),f.jsx(Ia,{})]})}function IP(){return f.jsxs(f.Fragment,{children:[f.jsx(Oa,{}),f.jsxs("div",{class:"text-center my-4 display-5",children:[f.jsx("img",{src:"./img/dsc.ico",alt:"",width:60})," Our Blogs ",f.jsx("img",{src:"./img/dsc.ico",alt:"",width:60})]}),f.jsxs("div",{class:"container blogPage row mx-auto",children:[f.jsx("section",{class:"mx-auto my-5 col-sm-6",style:{maxWidth:"25rem"},children:f.jsxs("div",{class:"card testimonial-card mt-2 mb-3",children:[f.jsx("div",{class:"card-up aqua-gradient"}),f.jsx("div",{class:"avatar mx-auto white",children:f.jsx("img",{src:"https://mdbootstrap.com/img/Photos/Avatars/img%20%2831%29.jpg",class:"rounded-circle img-fluid",alt:"woman avatar"})}),f.jsxs("div",{class:"card-body text-center",children:[f.jsx("h4",{class:"card-title font-weight-bold",children:"Martha Smith"}),f.jsx("hr",{}),f.jsxs("p",{children:[f.jsx("i",{class:"fas fa-quote-left"})," Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eos, adipisci"]})]})]})}),f.jsx("section",{class:"mx-auto my-5 col-sm-6",style:{maxWidth:"25rem"},children:f.jsxs("div",{class:"card testimonial-card mt-2 mb-3",children:[f.jsx("div",{class:"card-up aqua-gradient"}),f.jsx("div",{class:"avatar mx-auto white",children:f.jsx("img",{src:"https://mdbootstrap.com/img/Photos/Avatars/img%20%2831%29.jpg",class:"rounded-circle img-fluid",alt:"woman avatar"})}),f.jsxs("div",{class:"card-body text-center",children:[f.jsx("h4",{class:"card-title font-weight-bold",children:"Martha Smith"}),f.jsx("hr",{}),f.jsxs("p",{children:[f.jsx("i",{class:"fas fa-quote-left"})," Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eos, adipisci"]})]})]})}),f.jsx("section",{class:"mx-auto my-5 col-sm-6",style:{maxWidth:"25rem"},children:f.jsxs("div",{class:"card testimonial-card mt-2 mb-3",children:[f.jsx("div",{class:"card-up aqua-gradient"}),f.jsx("div",{class:"avatar mx-auto white",children:f.jsx("img",{src:"https://mdbootstrap.com/img/Photos/Avatars/img%20%2831%29.jpg",class:"rounded-circle img-fluid",alt:"woman avatar"})}),f.jsxs("div",{class:"card-body text-center",children:[f.jsx("h4",{class:"card-title font-weight-bold",children:"Martha Smith"}),f.jsx("hr",{}),f.jsxs("p",{children:[f.jsx("i",{class:"fas fa-quote-left"})," Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eos, adipisci"]})]})]})}),f.jsx("section",{class:"mx-auto my-5 col-sm-6",style:{maxWidth:"25rem"},children:f.jsxs("div",{class:"card testimonial-card mt-2 mb-3",children:[f.jsx("div",{class:"card-up aqua-gradient"}),f.jsx("div",{class:"avatar mx-auto white",children:f.jsx("img",{src:"https://mdbootstrap.com/img/Photos/Avatars/img%20%2831%29.jpg",class:"rounded-circle img-fluid",alt:"woman avatar"})}),f.jsxs("div",{class:"card-body text-center",children:[f.jsx("h4",{class:"card-title font-weight-bold",children:"Martha Smith"}),f.jsx("hr",{}),f.jsxs("p",{children:[f.jsx("i",{class:"fas fa-quote-left"})," Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eos, adipisci"]})]})]})}),f.jsx("section",{class:"mx-auto my-5 col-sm-6",style:{maxWidth:"25rem"},children:f.jsxs("div",{class:"card testimonial-card mt-2 mb-3",children:[f.jsx("div",{class:"card-up aqua-gradient"}),f.jsx("div",{class:"avatar mx-auto white",children:f.jsx("img",{src:"https://mdbootstrap.com/img/Photos/Avatars/img%20%2831%29.jpg",class:"rounded-circle img-fluid",alt:"woman avatar"})}),f.jsxs("div",{class:"card-body text-center",children:[f.jsx("h4",{class:"card-title font-weight-bold",children:"Martha Smith"}),f.jsx("hr",{}),f.jsxs("p",{children:[f.jsx("i",{class:"fas fa-quote-left"})," Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eos, adipisci"]})]})]})}),f.jsx("section",{class:"mx-auto my-5 col-sm-6",style:{maxWidth:"25rem"},children:f.jsxs("div",{class:"card testimonial-card mt-2 mb-3",children:[f.jsx("div",{class:"card-up aqua-gradient"}),f.jsx("div",{class:"avatar mx-auto white",children:f.jsx("img",{src:"https://mdbootstrap.com/img/Photos/Avatars/img%20%2831%29.jpg",class:"rounded-circle img-fluid",alt:"woman avatar"})}),f.jsxs("div",{class:"card-body text-center",children:[f.jsx("h4",{class:"card-title font-weight-bold",children:"Martha Smith"}),f.jsx("hr",{}),f.jsxs("p",{children:[f.jsx("i",{class:"fas fa-quote-left"})," Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eos, adipisci"]})]})]})}),f.jsx("section",{class:"mx-auto my-5 col-sm-6",style:{maxWidth:"25rem"},children:f.jsxs("div",{class:"card testimonial-card mt-2 mb-3",children:[f.jsx("div",{class:"card-up aqua-gradient"}),f.jsx("div",{class:"avatar mx-auto white",children:f.jsx("img",{src:"https://mdbootstrap.com/img/Photos/Avatars/img%20%2831%29.jpg",class:"rounded-circle img-fluid",alt:"woman avatar"})}),f.jsxs("div",{class:"card-body text-center",children:[f.jsx("h4",{class:"card-title font-weight-bold",children:"Martha Smith"}),f.jsx("hr",{}),f.jsxs("p",{children:[f.jsx("i",{class:"fas fa-quote-left"})," Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eos, adipisci"]})]})]})}),f.jsx("section",{class:"mx-auto my-5 col-sm-6",style:{maxWidth:"25rem"},children:f.jsxs("div",{class:"card testimonial-card mt-2 mb-3",children:[f.jsx("div",{class:"card-up aqua-gradient"}),f.jsx("div",{class:"avatar mx-auto white",children:f.jsx("img",{src:"https://mdbootstrap.com/img/Photos/Avatars/img%20%2831%29.jpg",class:"rounded-circle img-fluid",alt:"woman avatar"})}),f.jsxs("div",{class:"card-body text-center",children:[f.jsx("h4",{class:"card-title font-weight-bold",children:"Martha Smith"}),f.jsx("hr",{}),f.jsxs("p",{children:[f.jsx("i",{class:"fas fa-quote-left"})," Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eos, adipisci"]})]})]})})]}),f.jsx(Ia,{})]})}const PP=YS([{path:"/",element:f.jsx(nx,{})},{path:"/app",element:f.jsx(rx,{})},{path:"/team",element:f.jsx(NP,{})},{path:"/contact",element:f.jsx(SP,{})},{path:"/blogs",element:f.jsx(IP,{})}]);oc.createRoot(document.getElementById("root")).render(f.jsx(Eg.StrictMode,{children:f.jsx($S,{router:PP})})); + `}),f.jsx("div",{className:"tab-content",id:"domainTabsContent",children:t.map(l=>f.jsx("div",{className:`tab-pane fade ${l===e?"show active":""}`,children:f.jsx(mg,{teamData:o(Od,l)})},l))})]})]}),f.jsx(ba,{})]})})}function UP(){return f.jsxs(f.Fragment,{children:[f.jsx(Ma,{}),f.jsxs("div",{class:"text-center my-4 display-5",children:[f.jsx("img",{src:"./img/dsc.ico",alt:"",width:60})," Our Blogs ",f.jsx("img",{src:"./img/dsc.ico",alt:"",width:60})]}),f.jsxs("div",{class:"container blogPage row mx-auto",children:[f.jsx("section",{class:"mx-auto my-5 col-sm-6",style:{maxWidth:"25rem"},children:f.jsxs("div",{class:"card testimonial-card mt-2 mb-3",children:[f.jsx("div",{class:"card-up aqua-gradient"}),f.jsx("div",{class:"avatar mx-auto white",children:f.jsx("img",{src:"https://mdbootstrap.com/img/Photos/Avatars/img%20%2831%29.jpg",class:"rounded-circle img-fluid",alt:"woman avatar"})}),f.jsxs("div",{class:"card-body text-center",children:[f.jsx("h4",{class:"card-title font-weight-bold",children:"Martha Smith"}),f.jsx("hr",{}),f.jsxs("p",{children:[f.jsx("i",{class:"fas fa-quote-left"})," Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eos, adipisci"]})]})]})}),f.jsx("section",{class:"mx-auto my-5 col-sm-6",style:{maxWidth:"25rem"},children:f.jsxs("div",{class:"card testimonial-card mt-2 mb-3",children:[f.jsx("div",{class:"card-up aqua-gradient"}),f.jsx("div",{class:"avatar mx-auto white",children:f.jsx("img",{src:"https://mdbootstrap.com/img/Photos/Avatars/img%20%2831%29.jpg",class:"rounded-circle img-fluid",alt:"woman avatar"})}),f.jsxs("div",{class:"card-body text-center",children:[f.jsx("h4",{class:"card-title font-weight-bold",children:"Martha Smith"}),f.jsx("hr",{}),f.jsxs("p",{children:[f.jsx("i",{class:"fas fa-quote-left"})," Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eos, adipisci"]})]})]})}),f.jsx("section",{class:"mx-auto my-5 col-sm-6",style:{maxWidth:"25rem"},children:f.jsxs("div",{class:"card testimonial-card mt-2 mb-3",children:[f.jsx("div",{class:"card-up aqua-gradient"}),f.jsx("div",{class:"avatar mx-auto white",children:f.jsx("img",{src:"https://mdbootstrap.com/img/Photos/Avatars/img%20%2831%29.jpg",class:"rounded-circle img-fluid",alt:"woman avatar"})}),f.jsxs("div",{class:"card-body text-center",children:[f.jsx("h4",{class:"card-title font-weight-bold",children:"Martha Smith"}),f.jsx("hr",{}),f.jsxs("p",{children:[f.jsx("i",{class:"fas fa-quote-left"})," Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eos, adipisci"]})]})]})}),f.jsx("section",{class:"mx-auto my-5 col-sm-6",style:{maxWidth:"25rem"},children:f.jsxs("div",{class:"card testimonial-card mt-2 mb-3",children:[f.jsx("div",{class:"card-up aqua-gradient"}),f.jsx("div",{class:"avatar mx-auto white",children:f.jsx("img",{src:"https://mdbootstrap.com/img/Photos/Avatars/img%20%2831%29.jpg",class:"rounded-circle img-fluid",alt:"woman avatar"})}),f.jsxs("div",{class:"card-body text-center",children:[f.jsx("h4",{class:"card-title font-weight-bold",children:"Martha Smith"}),f.jsx("hr",{}),f.jsxs("p",{children:[f.jsx("i",{class:"fas fa-quote-left"})," Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eos, adipisci"]})]})]})}),f.jsx("section",{class:"mx-auto my-5 col-sm-6",style:{maxWidth:"25rem"},children:f.jsxs("div",{class:"card testimonial-card mt-2 mb-3",children:[f.jsx("div",{class:"card-up aqua-gradient"}),f.jsx("div",{class:"avatar mx-auto white",children:f.jsx("img",{src:"https://mdbootstrap.com/img/Photos/Avatars/img%20%2831%29.jpg",class:"rounded-circle img-fluid",alt:"woman avatar"})}),f.jsxs("div",{class:"card-body text-center",children:[f.jsx("h4",{class:"card-title font-weight-bold",children:"Martha Smith"}),f.jsx("hr",{}),f.jsxs("p",{children:[f.jsx("i",{class:"fas fa-quote-left"})," Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eos, adipisci"]})]})]})}),f.jsx("section",{class:"mx-auto my-5 col-sm-6",style:{maxWidth:"25rem"},children:f.jsxs("div",{class:"card testimonial-card mt-2 mb-3",children:[f.jsx("div",{class:"card-up aqua-gradient"}),f.jsx("div",{class:"avatar mx-auto white",children:f.jsx("img",{src:"https://mdbootstrap.com/img/Photos/Avatars/img%20%2831%29.jpg",class:"rounded-circle img-fluid",alt:"woman avatar"})}),f.jsxs("div",{class:"card-body text-center",children:[f.jsx("h4",{class:"card-title font-weight-bold",children:"Martha Smith"}),f.jsx("hr",{}),f.jsxs("p",{children:[f.jsx("i",{class:"fas fa-quote-left"})," Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eos, adipisci"]})]})]})}),f.jsx("section",{class:"mx-auto my-5 col-sm-6",style:{maxWidth:"25rem"},children:f.jsxs("div",{class:"card testimonial-card mt-2 mb-3",children:[f.jsx("div",{class:"card-up aqua-gradient"}),f.jsx("div",{class:"avatar mx-auto white",children:f.jsx("img",{src:"https://mdbootstrap.com/img/Photos/Avatars/img%20%2831%29.jpg",class:"rounded-circle img-fluid",alt:"woman avatar"})}),f.jsxs("div",{class:"card-body text-center",children:[f.jsx("h4",{class:"card-title font-weight-bold",children:"Martha Smith"}),f.jsx("hr",{}),f.jsxs("p",{children:[f.jsx("i",{class:"fas fa-quote-left"})," Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eos, adipisci"]})]})]})}),f.jsx("section",{class:"mx-auto my-5 col-sm-6",style:{maxWidth:"25rem"},children:f.jsxs("div",{class:"card testimonial-card mt-2 mb-3",children:[f.jsx("div",{class:"card-up aqua-gradient"}),f.jsx("div",{class:"avatar mx-auto white",children:f.jsx("img",{src:"https://mdbootstrap.com/img/Photos/Avatars/img%20%2831%29.jpg",class:"rounded-circle img-fluid",alt:"woman avatar"})}),f.jsxs("div",{class:"card-body text-center",children:[f.jsx("h4",{class:"card-title font-weight-bold",children:"Martha Smith"}),f.jsx("hr",{}),f.jsxs("p",{children:[f.jsx("i",{class:"fas fa-quote-left"})," Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eos, adipisci"]})]})]})})]}),f.jsx(ba,{})]})}const BP=ox([{path:"/",element:f.jsx(hx,{})},{path:"/app",element:f.jsx(fx,{})},{path:"/team",element:f.jsx(FP,{})},{path:"/contact",element:f.jsx(AP,{})},{path:"/blogs",element:f.jsx(UP,{})}]);uc.createRoot(document.getElementById("root")).render(f.jsx(Cn.StrictMode,{children:f.jsx(JS,{router:BP})})); diff --git a/index.html b/index.html index a3d2b5c..30fcb41 100644 --- a/index.html +++ b/index.html @@ -13,8 +13,8 @@ - - + +
diff --git a/loader-unscreen.gif b/loader-unscreen.gif new file mode 100644 index 0000000..f567f9b Binary files /dev/null and b/loader-unscreen.gif differ