diff --git a/asset-manifest.json b/asset-manifest.json
index 45ee922..efe1ea8 100644
--- a/asset-manifest.json
+++ b/asset-manifest.json
@@ -1,17 +1,17 @@
{
"files": {
"main.css": "/MyMind-Portal/static/css/main.c55bdca2.css",
- "main.js": "/MyMind-Portal/static/js/main.39ff1b4e.js",
+ "main.js": "/MyMind-Portal/static/js/main.278e63f1.js",
"static/js/453.709b0993.chunk.js": "/MyMind-Portal/static/js/453.709b0993.chunk.js",
"static/media/placeholder.png": "/MyMind-Portal/static/media/placeholder.ba3e9327f074cac4e49e.png",
"static/media/MyLogo.png": "/MyMind-Portal/static/media/MyLogo.e6e2f1ca8c59d9a76703.png",
"index.html": "/MyMind-Portal/index.html",
"main.c55bdca2.css.map": "/MyMind-Portal/static/css/main.c55bdca2.css.map",
- "main.39ff1b4e.js.map": "/MyMind-Portal/static/js/main.39ff1b4e.js.map",
+ "main.278e63f1.js.map": "/MyMind-Portal/static/js/main.278e63f1.js.map",
"453.709b0993.chunk.js.map": "/MyMind-Portal/static/js/453.709b0993.chunk.js.map"
},
"entrypoints": [
"static/css/main.c55bdca2.css",
- "static/js/main.39ff1b4e.js"
+ "static/js/main.278e63f1.js"
]
}
\ No newline at end of file
diff --git a/index.html b/index.html
index 8bd0170..0c44848 100644
--- a/index.html
+++ b/index.html
@@ -1 +1 @@
-
MyMind | Portal
\ No newline at end of file
+MyMind | Portal
\ No newline at end of file
diff --git a/static/js/main.39ff1b4e.js b/static/js/main.278e63f1.js
similarity index 91%
rename from static/js/main.39ff1b4e.js
rename to static/js/main.278e63f1.js
index cbc7c18..49343f1 100644
--- a/static/js/main.39ff1b4e.js
+++ b/static/js/main.278e63f1.js
@@ -1,5 +1,5 @@
-/*! For license information please see main.39ff1b4e.js.LICENSE.txt */
-(()=>{var e={219:(e,t,n)=>{"use strict";var r=n(763),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function l(e){return r.isMemo(e)?s:a[e.$$typeof]||i}a[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[r.Memo]=s;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var i=f(n);i&&i!==p&&e(t,i,r)}var s=u(n);d&&(s=s.concat(d(n)));for(var a=l(t),m=l(n),g=0;g{"use strict";var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,_=n?Symbol.for("react.responder"):60118,b=n?Symbol.for("react.scope"):60119;function w(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case o:case a:case s:case f:return e;default:switch(e=e&&e.$$typeof){case c:case h:case g:case m:case l:return e;default:return t}}case i:return t}}}function S(e){return w(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=h,t.Fragment=o,t.Lazy=g,t.Memo=m,t.Portal=i,t.Profiler=a,t.StrictMode=s,t.Suspense=f,t.isAsyncMode=function(e){return S(e)||w(e)===u},t.isConcurrentMode=S,t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===h},t.isFragment=function(e){return w(e)===o},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===a},t.isStrictMode=function(e){return w(e)===s},t.isSuspense=function(e){return w(e)===f},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===o||e===d||e===a||e===s||e===f||e===p||"object"===typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===h||e.$$typeof===v||e.$$typeof===_||e.$$typeof===b||e.$$typeof===y)},t.typeOf=w},763:(e,t,n)=>{"use strict";e.exports=n(983)},730:(e,t,n)=>{"use strict";var r=n(43),i=n(853);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nt}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!d.call(p,e)||!d.call(f,e)&&(h.test(e)?p[e]=!0:(f[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"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(e){var t=e.replace(y,v);g[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(y,v);g[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(y,v);g[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var b=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),S=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),x=Symbol.for("react.provider"),T=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),N=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var O=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var D=Symbol.iterator;function L(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=D&&e[D]||e["@@iterator"])?e:null}var M,F=Object.assign;function j(e){if(void 0===M)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);M=t&&t[1]||""}return"\n"+M+e}var U=!1;function $(e,t){if(!e||U)return"";U=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&"string"===typeof c.stack){for(var i=c.stack.split("\n"),o=r.stack.split("\n"),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(1!==s||1!==a)do{if(s--,0>--a||i[s]!==o[a]){var l="\n"+i[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}}while(1<=s&&0<=a);break}}}finally{U=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?j(e):""}function z(e){switch(e.tag){case 5:return j(e.type);case 16:return j("Lazy");case 13:return j("Suspense");case 19:return j("SuspenseList");case 0:case 2:case 15:return e=$(e.type,!1);case 11:return e=$(e.type.render,!1);case 1:return e=$(e.type,!0);default:return""}}function B(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case E:return"Fragment";case S:return"Portal";case k:return"Profiler";case C:return"StrictMode";case P:return"Suspense";case A:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case T:return(e.displayName||"Context")+".Consumer";case x:return(e._context.displayName||"Context")+".Provider";case I:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case R:return null!==(t=e.displayName||null)?t:B(e.type)||"Memo";case N:t=e._payload,e=e._init;try{return B(e(t))}catch(n){}}return null}function W(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return B(t);case 8:return t===C?"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("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function H(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function V(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function q(e){e._valueTracker||(e._valueTracker=function(e){var t=V(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function K(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=V(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function G(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Y(e,t){var n=t.checked;return F({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Q(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=H(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function J(e,t){null!=(t=t.checked)&&_(e,"checked",t,!1)}function X(e,t){J(e,t);var n=H(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,H(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Z(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&G(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ue(e,t)}))}:ue);function he(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var fe={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},pe=["Webkit","ms","Moz","O"];function me(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||fe.hasOwnProperty(e)&&fe[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=me(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(fe).forEach((function(e){pe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fe[t]=fe[e]}))}));var ye=F({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 ve(e,t){if(t){if(ye[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(o(62))}}function _e(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){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 be=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Se=null,Ee=null,Ce=null;function ke(e){if(e=_i(e)){if("function"!==typeof Se)throw Error(o(280));var t=e.stateNode;t&&(t=wi(t),Se(e.stateNode,e.type,t))}}function xe(e){Ee?Ce?Ce.push(e):Ce=[e]:Ee=e}function Te(){if(Ee){var e=Ee,t=Ce;if(Ce=Ee=null,ke(e),t)for(e=0;e>>=0,0===e?32:31-(at(e)/lt|0)|0},at=Math.log,lt=Math.LN2;var ct=64,ut=4194304;function dt(e){switch(e&-e){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 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ht(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=268435455&n;if(0!==s){var a=s&~i;0!==a?r=dt(a):0!==(o&=s)&&(r=dt(o))}else 0!==(s=n&~i)?r=dt(s):0!==o&&(r=dt(o));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&0!==(4194240&o)))return t;if(0!==(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function yt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-st(t)]=n}function vt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-st(n),i=1<=Ln),jn=String.fromCharCode(32),Un=!1;function $n(e,t){switch(e){case"keyup":return-1!==On.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Bn=!1;var Wn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Wn[e.type]:"textarea"===t}function Vn(e,t,n,r){xe(r),0<(t=qr(t,"onChange")).length&&(n=new un("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var qn=null,Kn=null;function Gn(e){jr(e,0)}function Yn(e){if(K(bi(e)))return e}function Qn(e,t){if("change"===e)return t}var Jn=!1;if(u){var Xn;if(u){var Zn="oninput"in document;if(!Zn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Zn="function"===typeof er.oninput}Xn=Zn}else Xn=!1;Jn=Xn&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=cr(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hr(){for(var e=window,t=G();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=G((e=t.contentWindow).document)}return t}function fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function pr(e){var t=hr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&fr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=ur(n,o);var s=ur(n,r);i&&s&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n=document.documentMode,gr=null,yr=null,vr=null,_r=!1;function br(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;_r||null==gr||gr!==G(r)||("selectionStart"in(r=gr)&&fr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},vr&&lr(vr,r)||(vr=r,0<(r=qr(yr,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}function wr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Sr={animationend:wr("Animation","AnimationEnd"),animationiteration:wr("Animation","AnimationIteration"),animationstart:wr("Animation","AnimationStart"),transitionend:wr("Transition","TransitionEnd")},Er={},Cr={};function kr(e){if(Er[e])return Er[e];if(!Sr[e])return e;var t,n=Sr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Cr)return Er[e]=n[t];return e}u&&(Cr=document.createElement("div").style,"AnimationEvent"in window||(delete Sr.animationend.animation,delete Sr.animationiteration.animation,delete Sr.animationstart.animation),"TransitionEvent"in window||delete Sr.transitionend.transition);var xr=kr("animationend"),Tr=kr("animationiteration"),Ir=kr("animationstart"),Pr=kr("transitionend"),Ar=new Map,Rr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Nr(e,t){Ar.set(e,t),l(t,[e])}for(var Or=0;OrEi||(e.current=Si[Ei],Si[Ei]=null,Ei--)}function xi(e,t){Ei++,Si[Ei]=e.current,e.current=t}var Ti={},Ii=Ci(Ti),Pi=Ci(!1),Ai=Ti;function Ri(e,t){var n=e.type.contextTypes;if(!n)return Ti;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ni(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Oi(){ki(Pi),ki(Ii)}function Di(e,t,n){if(Ii.current!==Ti)throw Error(o(168));xi(Ii,t),xi(Pi,n)}function Li(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(o(108,W(e)||"Unknown",i));return F({},n,r)}function Mi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ti,Ai=Ii.current,xi(Ii,e),xi(Pi,Pi.current),!0}function Fi(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=Li(e,t,Ai),r.__reactInternalMemoizedMergedChildContext=e,ki(Pi),ki(Ii),xi(Ii,e)):ki(Pi),xi(Pi,n)}var ji=null,Ui=!1,$i=!1;function zi(e){null===ji?ji=[e]:ji.push(e)}function Bi(){if(!$i&&null!==ji){$i=!0;var e=0,t=_t;try{var n=ji;for(_t=1;e>=s,i-=s,Qi=1<<32-st(t)+i|n<m?(g=d,d=null):g=d.sibling;var y=f(i,d,a[m],l);if(null===y){null===d&&(d=g);break}e&&d&&null===y.alternate&&t(i,d),o=s(y,o,m),null===u?c=y:u.sibling=y,u=y,d=g}if(m===a.length)return n(i,d),io&&Xi(i,m),c;if(null===d){for(;mg?(y=m,m=null):y=m.sibling;var _=f(i,m,v.value,c);if(null===_){null===m&&(m=y);break}e&&m&&null===_.alternate&&t(i,m),a=s(_,a,g),null===d?u=_:d.sibling=_,d=_,m=y}if(v.done)return n(i,m),io&&Xi(i,g),u;if(null===m){for(;!v.done;g++,v=l.next())null!==(v=h(i,v.value,c))&&(a=s(v,a,g),null===d?u=v:d.sibling=v,d=v);return io&&Xi(i,g),u}for(m=r(i,m);!v.done;g++,v=l.next())null!==(v=p(m,i,g,v.value,c))&&(e&&null!==v.alternate&&m.delete(null===v.key?g:v.key),a=s(v,a,g),null===d?u=v:d.sibling=v,d=v);return e&&m.forEach((function(e){return t(i,e)})),io&&Xi(i,g),u}return function e(r,o,s,l){if("object"===typeof s&&null!==s&&s.type===E&&null===s.key&&(s=s.props.children),"object"===typeof s&&null!==s){switch(s.$$typeof){case w:e:{for(var c=s.key,u=o;null!==u;){if(u.key===c){if((c=s.type)===E){if(7===u.tag){n(r,u.sibling),(o=i(u,s.props.children)).return=r,r=o;break e}}else if(u.elementType===c||"object"===typeof c&&null!==c&&c.$$typeof===N&&_o(c)===u.type){n(r,u.sibling),(o=i(u,s.props)).ref=yo(r,u,s),o.return=r,r=o;break e}n(r,u);break}t(r,u),u=u.sibling}s.type===E?((o=Lc(s.props.children,r.mode,l,s.key)).return=r,r=o):((l=Dc(s.type,s.key,s.props,null,r.mode,l)).ref=yo(r,o,s),l.return=r,r=l)}return a(r);case S:e:{for(u=s.key;null!==o;){if(o.key===u){if(4===o.tag&&o.stateNode.containerInfo===s.containerInfo&&o.stateNode.implementation===s.implementation){n(r,o.sibling),(o=i(o,s.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=jc(s,r.mode,l)).return=r,r=o}return a(r);case N:return e(r,o,(u=s._init)(s._payload),l)}if(te(s))return m(r,o,s,l);if(L(s))return g(r,o,s,l);vo(r,s)}return"string"===typeof s&&""!==s||"number"===typeof s?(s=""+s,null!==o&&6===o.tag?(n(r,o.sibling),(o=i(o,s)).return=r,r=o):(n(r,o),(o=Fc(s,r.mode,l)).return=r,r=o),a(r)):n(r,o)}}var wo=bo(!0),So=bo(!1),Eo=Ci(null),Co=null,ko=null,xo=null;function To(){xo=ko=Co=null}function Io(e){var t=Eo.current;ki(Eo),e._currentValue=t}function Po(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ao(e,t){Co=e,xo=ko=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(_a=!0),e.firstContext=null)}function Ro(e){var t=e._currentValue;if(xo!==e)if(e={context:e,memoizedValue:t,next:null},null===ko){if(null===Co)throw Error(o(308));ko=e,Co.dependencies={lanes:0,firstContext:e}}else ko=ko.next=e;return t}var No=null;function Oo(e){null===No?No=[e]:No.push(e)}function Do(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Oo(t)):(n.next=i.next,i.next=n),t.interleaved=n,Lo(e,r)}function Lo(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Mo=!1;function Fo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function jo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Uo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function $o(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&Il)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Lo(e,n)}return null===(i=r.interleaved)?(t.next=t,Oo(r)):(t.next=i.next,i.next=t),r.interleaved=t,Lo(e,n)}function zo(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,vt(e,n)}}function Bo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=s:o=o.next=s,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Wo(e,t,n,r){var i=e.updateQueue;Mo=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(null!==a){i.shared.pending=null;var l=a,c=l.next;l.next=null,null===s?o=c:s.next=c,s=l;var u=e.alternate;null!==u&&((a=(u=u.updateQueue).lastBaseUpdate)!==s&&(null===a?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(null!==o){var d=i.baseState;for(s=0,u=c=l=null,a=o;;){var h=a.lane,f=a.eventTime;if((r&h)===h){null!==u&&(u=u.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,m=a;switch(h=t,f=n,m.tag){case 1:if("function"===typeof(p=m.payload)){d=p.call(f,d,h);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null===(h="function"===typeof(p=m.payload)?p.call(f,d,h):p)||void 0===h)break e;d=F({},d,h);break e;case 2:Mo=!0}}null!==a.callback&&0!==a.lane&&(e.flags|=64,null===(h=i.effects)?i.effects=[a]:h.push(a))}else f={eventTime:f,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===u?(c=u=f,l=d):u=u.next=f,s|=h;if(null===(a=a.next)){if(null===(a=i.shared.pending))break;a=(h=a).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===u&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{s|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Ml|=s,e.lanes=s,e.memoizedState=d}}function Ho(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;tn?n:4,e(!0);var r=os.transition;os.transition={};try{e(!1),t()}finally{_t=n,os.transition=r}}function qs(){return _s().memoizedState}function Ks(e,t,n){var r=tc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ys(e))Qs(t,n);else if(null!==(n=Do(e,t,n,r))){nc(n,e,r,ec()),Js(n,t,r)}}function Gs(e,t,n){var r=tc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ys(e))Qs(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,ar(a,s)){var l=t.interleaved;return null===l?(i.next=i,Oo(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(c){}null!==(n=Do(e,t,i,r))&&(nc(n,e,r,i=ec()),Js(n,t,r))}}function Ys(e){var t=e.alternate;return e===as||null!==t&&t===as}function Qs(e,t){ds=us=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Js(e,t,n){if(0!==(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,vt(e,n)}}var Xs={readContext:Ro,useCallback:ps,useContext:ps,useEffect:ps,useImperativeHandle:ps,useInsertionEffect:ps,useLayoutEffect:ps,useMemo:ps,useReducer:ps,useRef:ps,useState:ps,useDebugValue:ps,useDeferredValue:ps,useTransition:ps,useMutableSource:ps,useSyncExternalStore:ps,useId:ps,unstable_isNewReconciler:!1},Zs={readContext:Ro,useCallback:function(e,t){return vs().memoizedState=[e,void 0===t?null:t],e},useContext:Ro,useEffect:Ls,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Os(4194308,4,Us.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Os(4194308,4,e,t)},useInsertionEffect:function(e,t){return Os(4,2,e,t)},useMemo:function(e,t){var n=vs();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=vs();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ks.bind(null,as,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},vs().memoizedState=e},useState:As,useDebugValue:zs,useDeferredValue:function(e){return vs().memoizedState=e},useTransition:function(){var e=As(!1),t=e[0];return e=Vs.bind(null,e[1]),vs().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=as,i=vs();if(io){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===Pl)throw Error(o(349));0!==(30&ss)||ks(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Ls(Ts.bind(null,r,s,e),[e]),r.flags|=2048,Rs(9,xs.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=vs(),t=Pl.identifierPrefix;if(io){var n=Ji;t=":"+t+"R"+(n=(Qi&~(1<<32-st(Qi)-1)).toString(32)+n),0<(n=hs++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=fs++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ea={readContext:Ro,useCallback:Bs,useContext:Ro,useEffect:Ms,useImperativeHandle:$s,useInsertionEffect:Fs,useLayoutEffect:js,useMemo:Ws,useReducer:ws,useRef:Ns,useState:function(){return ws(bs)},useDebugValue:zs,useDeferredValue:function(e){return Hs(_s(),ls.memoizedState,e)},useTransition:function(){return[ws(bs)[0],_s().memoizedState]},useMutableSource:Es,useSyncExternalStore:Cs,useId:qs,unstable_isNewReconciler:!1},ta={readContext:Ro,useCallback:Bs,useContext:Ro,useEffect:Ms,useImperativeHandle:$s,useInsertionEffect:Fs,useLayoutEffect:js,useMemo:Ws,useReducer:Ss,useRef:Ns,useState:function(){return Ss(bs)},useDebugValue:zs,useDeferredValue:function(e){var t=_s();return null===ls?t.memoizedState=e:Hs(t,ls.memoizedState,e)},useTransition:function(){return[Ss(bs)[0],_s().memoizedState]},useMutableSource:Es,useSyncExternalStore:Cs,useId:qs,unstable_isNewReconciler:!1};function na(e,t){if(e&&e.defaultProps){for(var n in t=F({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function ra(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:F({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var ia={isMounted:function(e){return!!(e=e._reactInternals)&&Be(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ec(),i=tc(e),o=Uo(r,i);o.payload=t,void 0!==n&&null!==n&&(o.callback=n),null!==(t=$o(e,o,i))&&(nc(t,e,i,r),zo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ec(),i=tc(e),o=Uo(r,i);o.tag=1,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),null!==(t=$o(e,o,i))&&(nc(t,e,i,r),zo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ec(),r=tc(e),i=Uo(n,r);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),null!==(t=$o(e,i,r))&&(nc(t,e,r,n),zo(t,e,r))}};function oa(e,t,n,r,i,o,s){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,s):!t.prototype||!t.prototype.isPureReactComponent||(!lr(n,r)||!lr(i,o))}function sa(e,t,n){var r=!1,i=Ti,o=t.contextType;return"object"===typeof o&&null!==o?o=Ro(o):(i=Ni(t)?Ai:Ii.current,o=(r=null!==(r=t.contextTypes)&&void 0!==r)?Ri(e,i):Ti),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ia,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function aa(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ia.enqueueReplaceState(t,t.state,null)}function la(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Fo(e);var o=t.contextType;"object"===typeof o&&null!==o?i.context=Ro(o):(o=Ni(t)?Ai:Ii.current,i.context=Ri(e,o)),i.state=e.memoizedState,"function"===typeof(o=t.getDerivedStateFromProps)&&(ra(e,t,o,n),i.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&ia.enqueueReplaceState(i,i.state,null),Wo(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4194308)}function ca(e,t){try{var n="",r=t;do{n+=z(r),r=r.return}while(r);var i=n}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:i,digest:null}}function ua(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function da(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var ha="function"===typeof WeakMap?WeakMap:Map;function fa(e,t,n){(n=Uo(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Hl||(Hl=!0,Vl=r),da(0,t)},n}function pa(e,t,n){(n=Uo(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){da(0,t)}}var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){da(0,t),"function"!==typeof r&&(null===ql?ql=new Set([this]):ql.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ma(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ha;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=kc.bind(null,e,t,n),t.then(e,e))}function ga(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ya(e,t,n,r,i){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Uo(-1,1)).tag=2,$o(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var va=b.ReactCurrentOwner,_a=!1;function ba(e,t,n,r){t.child=null===e?So(t,null,n,r):wo(t,e.child,n,r)}function wa(e,t,n,r,i){n=n.render;var o=t.ref;return Ao(t,i),r=gs(e,t,n,r,o,i),n=ys(),null===e||_a?(io&&n&&eo(t),t.flags|=1,ba(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ha(e,t,i))}function Sa(e,t,n,r,i){if(null===e){var o=n.type;return"function"!==typeof o||Nc(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Dc(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Ea(e,t,o,r,i))}if(o=e.child,0===(e.lanes&i)){var s=o.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(s,r)&&e.ref===t.ref)return Ha(e,t,i)}return t.flags|=1,(e=Oc(o,r)).ref=t.ref,e.return=t,t.child=e}function Ea(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(lr(o,r)&&e.ref===t.ref){if(_a=!1,t.pendingProps=r=o,0===(e.lanes&i))return t.lanes=e.lanes,Ha(e,t,i);0!==(131072&e.flags)&&(_a=!0)}}return xa(e,t,n,r,i)}function Ca(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},xi(Ol,Nl),Nl|=n;else{if(0===(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,xi(Ol,Nl),Nl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,xi(Ol,Nl),Nl|=r}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,xi(Ol,Nl),Nl|=r;return ba(e,t,i,n),t.child}function ka(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function xa(e,t,n,r,i){var o=Ni(n)?Ai:Ii.current;return o=Ri(t,o),Ao(t,i),n=gs(e,t,n,r,o,i),r=ys(),null===e||_a?(io&&r&&eo(t),t.flags|=1,ba(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ha(e,t,i))}function Ta(e,t,n,r,i){if(Ni(n)){var o=!0;Mi(t)}else o=!1;if(Ao(t,i),null===t.stateNode)Wa(e,t),sa(t,n,r),la(t,n,r,i),r=!0;else if(null===e){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=n.contextType;"object"===typeof c&&null!==c?c=Ro(c):c=Ri(t,c=Ni(n)?Ai:Ii.current);var u=n.getDerivedStateFromProps,d="function"===typeof u||"function"===typeof s.getSnapshotBeforeUpdate;d||"function"!==typeof s.UNSAFE_componentWillReceiveProps&&"function"!==typeof s.componentWillReceiveProps||(a!==r||l!==c)&&aa(t,s,r,c),Mo=!1;var h=t.memoizedState;s.state=h,Wo(t,r,s,i),l=t.memoizedState,a!==r||h!==l||Pi.current||Mo?("function"===typeof u&&(ra(t,n,u,r),l=t.memoizedState),(a=Mo||oa(t,n,a,r,h,l,c))?(d||"function"!==typeof s.UNSAFE_componentWillMount&&"function"!==typeof s.componentWillMount||("function"===typeof s.componentWillMount&&s.componentWillMount(),"function"===typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"===typeof s.componentDidMount&&(t.flags|=4194308)):("function"===typeof s.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=c,r=a):("function"===typeof s.componentDidMount&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,jo(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:na(t.type,a),s.props=c,d=t.pendingProps,h=s.context,"object"===typeof(l=n.contextType)&&null!==l?l=Ro(l):l=Ri(t,l=Ni(n)?Ai:Ii.current);var f=n.getDerivedStateFromProps;(u="function"===typeof f||"function"===typeof s.getSnapshotBeforeUpdate)||"function"!==typeof s.UNSAFE_componentWillReceiveProps&&"function"!==typeof s.componentWillReceiveProps||(a!==d||h!==l)&&aa(t,s,r,l),Mo=!1,h=t.memoizedState,s.state=h,Wo(t,r,s,i);var p=t.memoizedState;a!==d||h!==p||Pi.current||Mo?("function"===typeof f&&(ra(t,n,f,r),p=t.memoizedState),(c=Mo||oa(t,n,c,r,h,p,l)||!1)?(u||"function"!==typeof s.UNSAFE_componentWillUpdate&&"function"!==typeof s.componentWillUpdate||("function"===typeof s.componentWillUpdate&&s.componentWillUpdate(r,p,l),"function"===typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(r,p,l)),"function"===typeof s.componentDidUpdate&&(t.flags|=4),"function"===typeof s.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),s.props=r,s.state=p,s.context=l,r=c):("function"!==typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Ia(e,t,n,r,o,i)}function Ia(e,t,n,r,i,o){ka(e,t);var s=0!==(128&t.flags);if(!r&&!s)return i&&Fi(t,n,!1),Ha(e,t,o);r=t.stateNode,va.current=t;var a=s&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&s?(t.child=wo(t,e.child,null,o),t.child=wo(t,null,a,o)):ba(e,t,a,o),t.memoizedState=r.state,i&&Fi(t,n,!0),t.child}function Pa(e){var t=e.stateNode;t.pendingContext?Di(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Di(0,t.context,!1),Qo(e,t.containerInfo)}function Aa(e,t,n,r,i){return po(),mo(i),t.flags|=256,ba(e,t,n,r),t.child}var Ra,Na,Oa,Da,La={dehydrated:null,treeContext:null,retryLane:0};function Ma(e){return{baseLanes:e,cachePool:null,transitions:null}}function Fa(e,t,n){var r,i=t.pendingProps,s=es.current,a=!1,l=0!==(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!==(2&s)),r?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(s|=1),xi(es,1&s),null===e)return co(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=i.children,e=i.fallback,a?(i=t.mode,a=t.child,l={mode:"hidden",children:l},0===(1&i)&&null!==a?(a.childLanes=0,a.pendingProps=l):a=Mc(l,i,0,null),e=Lc(e,i,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Ma(n),t.memoizedState=La,e):ja(t,l));if(null!==(s=e.memoizedState)&&null!==(r=s.dehydrated))return function(e,t,n,r,i,s,a){if(n)return 256&t.flags?(t.flags&=-257,Ua(e,t,a,r=ua(Error(o(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Mc({mode:"visible",children:r.children},i,0,null),(s=Lc(s,i,a,null)).flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,0!==(1&t.mode)&&wo(t,e.child,null,a),t.child.memoizedState=Ma(a),t.memoizedState=La,s);if(0===(1&t.mode))return Ua(e,t,a,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,Ua(e,t,a,r=ua(s=Error(o(419)),r,void 0))}if(l=0!==(a&e.childLanes),_a||l){if(null!==(r=Pl)){switch(a&-a){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}0!==(i=0!==(i&(r.suspendedLanes|a))?0:i)&&i!==s.retryLane&&(s.retryLane=i,Lo(e,i),nc(r,e,i,-1))}return mc(),Ua(e,t,a,r=ua(Error(o(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Tc.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,ro=ci(i.nextSibling),no=t,io=!0,oo=null,null!==e&&(Ki[Gi++]=Qi,Ki[Gi++]=Ji,Ki[Gi++]=Yi,Qi=e.id,Ji=e.overflow,Yi=t),t=ja(t,r.children),t.flags|=4096,t)}(e,t,l,i,r,s,n);if(a){a=i.fallback,l=t.mode,r=(s=e.child).sibling;var c={mode:"hidden",children:i.children};return 0===(1&l)&&t.child!==s?((i=t.child).childLanes=0,i.pendingProps=c,t.deletions=null):(i=Oc(s,c)).subtreeFlags=14680064&s.subtreeFlags,null!==r?a=Oc(r,a):(a=Lc(a,l,n,null)).flags|=2,a.return=t,i.return=t,i.sibling=a,t.child=i,i=a,a=t.child,l=null===(l=e.child.memoizedState)?Ma(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},a.memoizedState=l,a.childLanes=e.childLanes&~n,t.memoizedState=La,i}return e=(a=e.child).sibling,i=Oc(a,{mode:"visible",children:i.children}),0===(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function ja(e,t){return(t=Mc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Ua(e,t,n,r){return null!==r&&mo(r),wo(t,e.child,null,n),(e=ja(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function $a(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Po(e.return,t,n)}function za(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Ba(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(ba(e,t,r.children,n),0!==(2&(r=es.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&$a(e,n,t);else if(19===e.tag)$a(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(xi(es,r),0===(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===ts(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),za(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ts(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}za(t,!0,n,null,o);break;case"together":za(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Wa(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ha(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Ml|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Oc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Oc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Va(e,t){if(!io)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function qa(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ka(e,t,n){var r=t.pendingProps;switch(to(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qa(t),null;case 1:case 17:return Ni(t.type)&&Oi(),qa(t),null;case 3:return r=t.stateNode,Jo(),ki(Pi),ki(Ii),rs(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(ho(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==oo&&(sc(oo),oo=null))),Na(e,t),qa(t),null;case 5:Zo(t);var i=Yo(Go.current);if(n=t.type,null!==e&&null!=t.stateNode)Oa(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(o(166));return qa(t),null}if(e=Yo(qo.current),ho(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[hi]=t,r[fi]=s,e=0!==(1&t.mode),n){case"dialog":Ur("cancel",r),Ur("close",r);break;case"iframe":case"object":case"embed":Ur("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[hi]=t,e[fi]=r,Ra(e,t,!1,!1),t.stateNode=e;e:{switch(l=_e(n,r),n){case"dialog":Ur("cancel",e),Ur("close",e),i=r;break;case"iframe":case"object":case"embed":Ur("load",e),i=r;break;case"video":case"audio":for(i=0;iBl&&(t.flags|=128,r=!0,Va(s,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ts(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Va(s,!0),null===s.tail&&"hidden"===s.tailMode&&!l.alternate&&!io)return qa(t),null}else 2*Je()-s.renderingStartTime>Bl&&1073741824!==n&&(t.flags|=128,r=!0,Va(s,!1),t.lanes=4194304);s.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=s.last)?n.sibling=l:t.child=l,s.last=l)}return null!==s.tail?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Je(),t.sibling=null,n=es.current,xi(es,r?1&n|2:1&n),t):(qa(t),null);case 22:case 23:return dc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(1&t.mode)?0!==(1073741824&Nl)&&(qa(t),6&t.subtreeFlags&&(t.flags|=8192)):qa(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function Ga(e,t){switch(to(t),t.tag){case 1:return Ni(t.type)&&Oi(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Jo(),ki(Pi),ki(Ii),rs(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Zo(t),null;case 13:if(ki(es),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));po()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return ki(es),null;case 4:return Jo(),null;case 10:return Io(t.type._context),null;case 22:case 23:return dc(),null;default:return null}}Ra=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Na=function(){},Oa=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Yo(qo.current);var o,s=null;switch(n){case"input":i=Y(e,i),r=Y(e,r),s=[];break;case"select":i=F({},i,{value:void 0}),r=F({},r,{value:void 0}),s=[];break;case"textarea":i=re(e,i),r=re(e,r),s=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=Zr)}for(u in ve(n,r),n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&null!=i[u])if("style"===u){var l=i[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(a.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var c=r[u];if(l=null!=i?i[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(s||(s=[]),s.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(s=s||[]).push(u,c)):"children"===u?"string"!==typeof c&&"number"!==typeof c||(s=s||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(a.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&Ur("scroll",e),s||l===c||(s=[])):(s=s||[]).push(u,c))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}},Da=function(e,t,n,r){n!==r&&(t.flags|=4)};var Ya=!1,Qa=!1,Ja="function"===typeof WeakSet?WeakSet:Set,Xa=null;function Za(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){Cc(e,t,r)}else n.current=null}function el(e,t,n){try{n()}catch(r){Cc(e,t,r)}}var tl=!1;function nl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&el(t,n,o)}i=i.next}while(i!==r)}}function rl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function il(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function ol(e){var t=e.alternate;null!==t&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[hi],delete t[fi],delete t[mi],delete t[gi],delete t[yi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function sl(e){return 5===e.tag||3===e.tag||4===e.tag}function al(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||sl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ll(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Zr));else if(4!==r&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}function cl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}var ul=null,dl=!1;function hl(e,t,n){for(n=n.child;null!==n;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(ot&&"function"===typeof ot.onCommitFiberUnmount)try{ot.onCommitFiberUnmount(it,n)}catch(a){}switch(n.tag){case 5:Qa||Za(n,t);case 6:var r=ul,i=dl;ul=null,hl(e,t,n),dl=i,null!==(ul=r)&&(dl?(e=ul,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):ul.removeChild(n.stateNode));break;case 18:null!==ul&&(dl?(e=ul,n=n.stateNode,8===e.nodeType?li(e.parentNode,n):1===e.nodeType&&li(e,n),Bt(e)):li(ul,n.stateNode));break;case 4:r=ul,i=dl,ul=n.stateNode.containerInfo,dl=!0,hl(e,t,n),ul=r,dl=i;break;case 0:case 11:case 14:case 15:if(!Qa&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,void 0!==s&&(0!==(2&o)||0!==(4&o))&&el(n,t,s),i=i.next}while(i!==r)}hl(e,t,n);break;case 1:if(!Qa&&(Za(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Cc(n,t,a)}hl(e,t,n);break;case 21:hl(e,t,n);break;case 22:1&n.mode?(Qa=(r=Qa)||null!==n.memoizedState,hl(e,t,n),Qa=r):hl(e,t,n);break;default:hl(e,t,n)}}function pl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Ja),t.forEach((function(t){var r=Ic.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function ml(e,t){var n=t.deletions;if(null!==n)for(var r=0;ri&&(i=a),r&=~s}if(r=i,10<(r=(120>(r=Je()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Cl(r/1960))-r)){e.timeoutHandle=ri(wc.bind(null,e,$l,Wl),r);break}wc(e,$l,Wl);break;default:throw Error(o(329))}}}return rc(e,Je()),e.callbackNode===n?ic.bind(null,e):null}function oc(e,t){var n=Ul;return e.current.memoizedState.isDehydrated&&(hc(e,t).flags|=256),2!==(e=gc(e,t))&&(t=$l,$l=n,null!==t&&sc(t)),e}function sc(e){null===$l?$l=e:$l.push.apply($l,e)}function ac(e,t){for(t&=~jl,t&=~Fl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0e?16:e,null===Gl)var r=!1;else{if(e=Gl,Gl=null,Yl=0,0!==(6&Il))throw Error(o(331));var i=Il;for(Il|=4,Xa=e.current;null!==Xa;){var s=Xa,a=s.child;if(0!==(16&Xa.flags)){var l=s.deletions;if(null!==l){for(var c=0;cJe()-zl?hc(e,0):jl|=n),rc(e,t)}function xc(e,t){0===t&&(0===(1&e.mode)?t=1:(t=ut,0===(130023424&(ut<<=1))&&(ut=4194304)));var n=ec();null!==(e=Lo(e,t))&&(yt(e,t,n),rc(e,n))}function Tc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),xc(e,n)}function Ic(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(o(314))}null!==r&&r.delete(t),xc(e,n)}function Pc(e,t){return Ke(e,t)}function Ac(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,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 Rc(e,t,n,r){return new Ac(e,t,n,r)}function Nc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Oc(e,t){var n=e.alternate;return null===n?((n=Rc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Dc(e,t,n,r,i,s){var a=2;if(r=e,"function"===typeof e)Nc(e)&&(a=1);else if("string"===typeof e)a=5;else e:switch(e){case E:return Lc(n.children,i,s,t);case C:a=8,i|=8;break;case k:return(e=Rc(12,n,t,2|i)).elementType=k,e.lanes=s,e;case P:return(e=Rc(13,n,t,i)).elementType=P,e.lanes=s,e;case A:return(e=Rc(19,n,t,i)).elementType=A,e.lanes=s,e;case O:return Mc(n,i,s,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case x:a=10;break e;case T:a=9;break e;case I:a=11;break e;case R:a=14;break e;case N:a=16,r=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Rc(a,n,t,i)).elementType=e,t.type=r,t.lanes=s,t}function Lc(e,t,n,r){return(e=Rc(7,e,r,t)).lanes=n,e}function Mc(e,t,n,r){return(e=Rc(22,e,r,t)).elementType=O,e.lanes=n,e.stateNode={isHidden:!1},e}function Fc(e,t,n){return(e=Rc(6,e,null,t)).lanes=n,e}function jc(e,t,n){return(t=Rc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Uc(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function $c(e,t,n,r,i,o,s,a,l){return e=new Uc(e,t,n,a,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Rc(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Fo(o),e}function zc(e){if(!e)return Ti;e:{if(Be(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ni(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var n=e.type;if(Ni(n))return Li(e,n,t)}return t}function Bc(e,t,n,r,i,o,s,a,l){return(e=$c(n,r,!0,e,0,o,0,a,l)).context=zc(null),n=e.current,(o=Uo(r=ec(),i=tc(n))).callback=void 0!==t&&null!==t?t:null,$o(n,o,i),e.current.lanes=i,yt(e,i,r),rc(e,r),e}function Wc(e,t,n,r){var i=t.current,o=ec(),s=tc(i);return n=zc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Uo(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=$o(i,t,s))&&(nc(e,i,s,o),zo(e,i,s)),s}function Hc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Vc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n{"use strict";var r=n(950);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},950:(e,t,n)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(730)},153:(e,t,n)=>{"use strict";var r=n(43),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,o={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,r)&&!l.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:u,props:o,_owner:a.current}}t.jsx=c,t.jsxs=c},202:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.iterator;var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}function v(){}function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=y.prototype;var b=_.prototype=new v;b.constructor=_,m(b,y.prototype),b.isPureReactComponent=!0;var w=Array.isArray,S=Object.prototype.hasOwnProperty,E={current:null},C={key:!0,ref:!0,__self:!0,__source:!0};function k(e,t,r){var i,o={},s=null,a=null;if(null!=t)for(i in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(s=""+t.key),t)S.call(t,i)&&!C.hasOwnProperty(i)&&(o[i]=t[i]);var l=arguments.length-2;if(1===l)o.children=r;else if(1{"use strict";e.exports=n(202)},579:(e,t,n)=>{"use strict";e.exports=n(153)},234:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0>>1,i=e[r];if(!(0>>1;ro(l,n))co(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[a]=n,r=a);else{if(!(co(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var a=Date,l=a.now();t.unstable_now=function(){return a.now()-l}}var c=[],u=[],d=1,h=null,f=3,p=!1,m=!1,g=!1,y="function"===typeof setTimeout?setTimeout:null,v="function"===typeof clearTimeout?clearTimeout:null,_="undefined"!==typeof setImmediate?setImmediate:null;function b(e){for(var t=r(u);null!==t;){if(null===t.callback)i(u);else{if(!(t.startTime<=e))break;i(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function w(e){if(g=!1,b(e),!m)if(null!==r(c))m=!0,O(S);else{var t=r(u);null!==t&&D(w,t.startTime-e)}}function S(e,n){m=!1,g&&(g=!1,v(x),x=-1),p=!0;var o=f;try{for(b(n),h=r(c);null!==h&&(!(h.expirationTime>n)||e&&!P());){var s=h.callback;if("function"===typeof s){h.callback=null,f=h.priorityLevel;var a=s(h.expirationTime<=n);n=t.unstable_now(),"function"===typeof a?h.callback=a:h===r(c)&&i(c),b(n)}else i(c);h=r(c)}if(null!==h)var l=!0;else{var d=r(u);null!==d&&D(w,d.startTime-n),l=!1}return l}finally{h=null,f=o,p=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E,C=!1,k=null,x=-1,T=5,I=-1;function P(){return!(t.unstable_now()-Ie||125s?(e.sortIndex=o,n(u,e),null===r(c)&&e===r(u)&&(g?(v(x),x=-1):g=!0,D(w,o-s))):(e.sortIndex=a,n(c,e),m||p||(m=!0,O(S))),e},t.unstable_shouldYield=P,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},853:(e,t,n)=>{"use strict";e.exports=n(234)},324:e=>{e.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!==typeof e||!e||"object"!==typeof t||!t)return!1;var o=Object.keys(e),s=Object.keys(t);if(o.length!==s.length)return!1;for(var a=Object.prototype.hasOwnProperty.bind(t),l=0;l{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,i){if(1&i&&(r=this(r)),8&i)return r;if("object"===typeof r&&r){if(4&i&&r.__esModule)return r;if(16&i&&"function"===typeof r.then)return r}var o=Object.create(null);n.r(o);var s={};e=e||[null,t({}),t([]),t(t)];for(var a=2&i&&r;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>s[e]=()=>r[e]));return s.default=()=>r,n.d(o,s),o}})(),n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[])),n.u=e=>"static/js/"+e+".709b0993.chunk.js",n.miniCssF=e=>{},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="mymind_portal:";n.l=(r,i,o,s)=>{if(e[r])e[r].push(i);else{var a,l;if(void 0!==o)for(var c=document.getElementsByTagName("script"),u=0;u{a.onerror=a.onload=null,clearTimeout(f);var i=e[r];if(delete e[r],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach((e=>e(n))),t)return t(n)},f=setTimeout(h.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=h.bind(null,a.onerror),a.onload=h.bind(null,a.onload),l&&document.head.appendChild(a)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/MyMind-Portal/",(()=>{var e={792:0};n.f.j=(t,r)=>{var i=n.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{var o=new Promise(((n,r)=>i=e[t]=[n,r]));r.push(i[2]=o);var s=n.p+n.u(t),a=new Error;n.l(s,(r=>{if(n.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var o=r&&("load"===r.type?"missing":r.type),s=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+s+")",a.name="ChunkLoadError",a.type=o,a.request=s,i[1](a)}}),"chunk-"+t,t)}};var t=(t,r)=>{var i,o,s=r[0],a=r[1],l=r[2],c=0;if(s.some((t=>0!==e[t]))){for(i in a)n.o(a,i)&&(n.m[i]=a[i]);if(l)l(n)}for(t&&t(r);c{"use strict";var e=n(43),t=n.t(e,2),r=n(391);const i={bg:"#1C1C27",bgLight:"#1C1E27",primary:"#854CE6",text_primary:"#F2F3F4",text_secondary:"#b1b2b3",card:"#171721",card_light:"#191924",button:"#854CE6",white:"#FFFFFF",black:"#000000"};var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?E(D,--N):0,A--,10===O&&(A=1,P--),O}function U(){return O=N2||W(O)>3?"":" "}function G(e,t){for(;--t&&U()&&!(O<48||O>102||O>57&&O<65||O>70&&O<97););return B(e,z()+(t<6&&32==$()&&32==U()))}function Y(e){for(;U();)switch(O){case e:return N;case 34:case 39:34!==e&&39!==e&&Y(O);break;case 40:41===e&&Y(e);break;case 92:U()}return N}function Q(e,t){for(;U()&&e+O!==57&&(e+O!==84||47!==$()););return"/*"+B(t,N-1)+"*"+y(47===e?e:U())}function J(e){for(;!W($());)U();return B(e,N)}function X(e,t){for(var n="",r=0;r6)switch(E(e,t+1)){case 109:if(45!==E(e,t+4))break;case 102:return w(e,/(.+:)(.+)-([^]+)/,"$1"+d+"$2-$3$1"+u+(108==E(e,t+3)?"$3":"$2-$3"))+e;case 115:return~S(e,"stretch",0)?ee(w(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return w(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(t,n,r,i,o,s,a){return c+n+":"+r+a+(i?c+n+"-span:"+(o?s:+s-+r)+a:"")+e}));case 4949:if(121===E(e,t+6))return w(e,":",":"+d)+e;break;case 6444:switch(E(e,45===E(e,14)?18:11)){case 120:return w(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+d+(45===E(e,14)?"inline-":"")+"box$3$1"+d+"$2$3$1"+c+"$2box$3")+e;case 100:return w(e,":",":"+c)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return w(e,"scroll-","scroll-snap-")+e}return e}function te(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case p:return void(e.return=ee(e.value,e.length,n));case m:return X([M(e,{value:w(e.value,"@","@"+d)})],r);case f:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,(function(t){switch(b(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":F(M(e,{props:[w(t,/:(read-\w+)/,":-moz-$1")]})),F(M(e,{props:[t]})),v(e,{props:I(n,r)});break;case"::placeholder":F(M(e,{props:[w(t,/:(plac\w+)/,":"+d+"input-$1")]})),F(M(e,{props:[w(t,/:(plac\w+)/,":-moz-$1")]})),F(M(e,{props:[w(t,/:(plac\w+)/,c+"input-$1")]})),F(M(e,{props:[t]})),v(e,{props:I(n,r)})}return""}))}}function ne(e){return V(re("",null,null,null,[""],e=H(e),0,[0],e))}function re(e,t,n,r,i,o,s,a,l){for(var c=0,u=0,d=s,h=0,f=0,p=0,m=1,v=1,_=1,b=0,C="",x=i,I=o,P=r,A=C;v;)switch(p=b,b=U()){case 40:if(108!=p&&58==E(A,d-1)){-1!=S(A+=w(q(b),"&","&\f"),"&\f",g(c?a[c-1]:0))&&(_=-1);break}case 34:case 39:case 91:A+=q(b);break;case 9:case 10:case 13:case 32:A+=K(p);break;case 92:A+=G(z()-1,7);continue;case 47:switch($()){case 42:case 47:T(oe(Q(U(),z()),t,n,l),l);break;default:A+="/"}break;case 123*m:a[c++]=k(A)*_;case 125*m:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+u:-1==_&&(A=w(A,/\f/g,"")),f>0&&k(A)-d&&T(f>32?se(A+";",r,n,d-1,l):se(w(A," ","")+";",r,n,d-2,l),l);break;case 59:A+=";";default:if(T(P=ie(A,t,n,c,u,i,a,C,x=[],I=[],d,o),o),123===b)if(0===u)re(A,t,P,P,x,o,d,a,I);else switch(99===h&&110===E(A,3)?100:h){case 100:case 108:case 109:case 115:re(e,P,P,r&&T(ie(e,P,P,0,0,i,a,C,i,x=[],d,I),I),i,I,d,a,r?x:I);break;default:re(A,P,P,P,[""],I,0,a,I)}}c=u=f=0,m=_=1,C=A="",d=s;break;case 58:d=1+k(A),f=p;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==j())continue;switch(A+=y(b),b*m){case 38:_=u>0?1:(A+="\f",-1);break;case 44:a[c++]=(k(A)-1)*_,_=1;break;case 64:45===$()&&(A+=q(U())),h=$(),u=d=k(C=A+=J(z())),b++;break;case 45:45===p&&2==k(A)&&(m=0)}}return o}function ie(e,t,n,r,i,o,s,a,l,c,u,d){for(var h=i-1,p=0===i?o:[""],m=x(p),y=0,v=0,b=0;y0?p[S]+" "+E:w(E,/&\f/g,p[S])))&&(l[b++]=k);return L(e,t,n,0===i?f:a,l,c,u,d)}function oe(e,t,n,r){return L(e,t,n,h,y(O),C(e,2,-2),0,r)}function se(e,t,n,r,i){return L(e,t,n,p,C(e,0,r),C(e,r+1,-1),r,i)}var ae={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},le="undefined"!=typeof process&&void 0!=={NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}&&({NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}.REACT_APP_SC_ATTR||{NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}.SC_ATTR)||"data-styled",ce="active",ue="data-styled-version",de="6.1.13",he="/*!sc*/\n",fe="undefined"!=typeof window&&"HTMLElement"in window,pe=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!=={NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}&&void 0!=={NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}.REACT_APP_SC_DISABLE_SPEEDY&&""!=={NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}.REACT_APP_SC_DISABLE_SPEEDY?"false"!=={NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}.REACT_APP_SC_DISABLE_SPEEDY&&{NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!=={NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}&&void 0!=={NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}.SC_DISABLE_SPEEDY&&""!=={NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}.SC_DISABLE_SPEEDY&&("false"!=={NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}.SC_DISABLE_SPEEDY&&{NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}.SC_DISABLE_SPEEDY)),me=(new Set,Object.freeze([])),ge=Object.freeze({});function ye(e,t,n){return void 0===n&&(n=ge),e.theme!==n.theme&&e.theme||t||n.theme}var ve=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),_e=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,be=/(^-|-$)/g;function we(e){return e.replace(_e,"-").replace(be,"")}var Se=/(a)(d)/gi,Ee=function(e){return String.fromCharCode(e+(e>25?39:97))};function Ce(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Ee(t%52)+n;return(Ee(t%52)+n).replace(Se,"$1-$2")}var ke,xe=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Te=function(e){return xe(5381,e)};function Ie(e){return Ce(Te(e)>>>0)}function Pe(e){return e.displayName||e.name||"Component"}function Ae(e){return"string"==typeof e&&!0}var Re="function"==typeof Symbol&&Symbol.for,Ne=Re?Symbol.for("react.memo"):60115,Oe=Re?Symbol.for("react.forward_ref"):60112,De={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Le={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Me={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Fe=((ke={})[Oe]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ke[Ne]=Me,ke);function je(e){return("type"in(t=e)&&t.type.$$typeof)===Ne?Me:"$$typeof"in e?Fe[e.$$typeof]:De;var t}var Ue=Object.defineProperty,$e=Object.getOwnPropertyNames,ze=Object.getOwnPropertySymbols,Be=Object.getOwnPropertyDescriptor,We=Object.getPrototypeOf,He=Object.prototype;function Ve(e,t,n){if("string"!=typeof t){if(He){var r=We(t);r&&r!==He&&Ve(e,r,n)}var i=$e(t);ze&&(i=i.concat(ze(t)));for(var o=je(e),s=je(t),a=0;a0?" Args: ".concat(t.join(", ")):""))}var et=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,i=r;e>=i;)if((i<<=1)<0)throw Ze(16,"".concat(e));this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var o=r;o=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n,o=r;o=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e0&&(l+="".concat(e,","))})),r+="".concat(s).concat(a,'{content:"').concat(l,'"}').concat(he)},o=0;o0?".".concat(t):e},u=l.slice();u.push((function(e){e.type===f&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(_t,n).replace(r,c))})),s.prefix&&u.push(te),u.push(Z);var d=function(e,i,o,a){void 0===i&&(i=""),void 0===o&&(o=""),void 0===a&&(a="&"),t=a,n=i,r=new RegExp("\\".concat(n,"\\b"),"g");var l=e.replace(bt,""),c=ne(o||i?"".concat(o," ").concat(i," { ").concat(l," }"):l);s.namespace&&(c=wt(c,s.namespace));var d,h=[];return X(c,function(e){var t=x(e);return function(n,r,i,o){for(var s="",a=0;a="A"&&e<="Z"};function Rt(e){for(var t="",n=0;n>>0);if(!t.hasNameForId(this.componentId,o)){var s=n(i,".".concat(o),void 0,this.componentId);t.insertRules(this.componentId,o,s)}r=Ge(r,o),this.staticRulesId=o}else{for(var a=xe(this.baseHash,n.hash),l="",c=0;c>>0);t.hasNameForId(this.componentId,h)||t.insertRules(this.componentId,h,n(l,".".concat(h),void 0,this.componentId)),r=Ge(r,h)}}return r},e}(),jt=e.createContext(void 0);jt.Consumer;function Ut(t){var n=e.useContext(jt),r=(0,e.useMemo)((function(){return function(e,t){if(!e)throw Ze(14);if(qe(e))return e(t);if(Array.isArray(e)||"object"!=typeof e)throw Ze(8);return t?o(o({},t),e):e}(t.theme,n)}),[t.theme,n]);return t.children?e.createElement(jt.Provider,{value:r},t.children):null}var $t={};new Set;function zt(t,n,r){var i=Ke(t),s=t,a=!Ae(t),l=n.attrs,c=void 0===l?me:l,u=n.componentId,d=void 0===u?function(e,t){var n="string"!=typeof e?"sc":we(e);$t[n]=($t[n]||0)+1;var r="".concat(n,"-").concat(Ie(de+n+$t[n]));return t?"".concat(t,"-").concat(r):r}(n.displayName,n.parentComponentId):u,h=n.displayName,f=void 0===h?function(e){return Ae(e)?"styled.".concat(e):"Styled(".concat(Pe(e),")")}(t):h,p=n.displayName&&n.componentId?"".concat(we(n.displayName),"-").concat(n.componentId):n.componentId||d,m=i&&s.attrs?s.attrs.concat(c).filter(Boolean):c,g=n.shouldForwardProp;if(i&&s.shouldForwardProp){var y=s.shouldForwardProp;if(n.shouldForwardProp){var v=n.shouldForwardProp;g=function(e,t){return y(e,t)&&v(e,t)}}else g=y}var _=new Ft(r,p,i?s.componentStyle:void 0);function b(t,n){return function(t,n,r){var i=t.attrs,s=t.componentStyle,a=t.defaultProps,l=t.foldedComponentIds,c=t.styledComponentId,u=t.target,d=e.useContext(jt),h=Tt(),f=t.shouldForwardProp||h.shouldForwardProp,p=ye(n,d,a)||ge,m=function(e,t,n){for(var r,i=o(o({},t),{className:void 0,theme:n}),s=0;s2&&vt.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)}}();var Gt;(function(){function t(){var t=this;this._emitSheetCSS=function(){var e=t.instance.toString();if(!e)return"";var n=dt(),r=Ye([n&&'nonce="'.concat(n,'"'),"".concat(le,'="true"'),"".concat(ue,'="').concat(de,'"')].filter(Boolean)," ");return"")},this.getStyleTags=function(){if(t.sealed)throw Ze(2);return t._emitSheetCSS()},this.getStyleElement=function(){var n;if(t.sealed)throw Ze(2);var r=t.instance.toString();if(!r)return[];var i=((n={})[le]="",n[ue]=de,n.dangerouslySetInnerHTML={__html:r},n),s=dt();return s&&(i.nonce=s),[e.createElement("style",o({},i,{key:"sc-0-0"}))]},this.seal=function(){t.sealed=!0},this.instance=new vt({isServer:!0}),this.sealed=!1}t.prototype.collectStyles=function(t){if(this.sealed)throw Ze(2);return e.createElement(It,{sheet:this.instance},t)},t.prototype.interleaveWithNodeStream=function(e){throw Ze(3)}})(),"__sc-".concat(le,"__");function Yt(){return Yt=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function rn(e,t,n,r){void 0===r&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=Gt.Pop,l=null,c=u();function u(){return(s.state||{idx:null}).idx}function d(){a=Gt.Pop;let e=u(),t=null==e?null:e-c;c=e,l&&l({action:a,location:f.location,delta:t})}function h(e){let t="null"!==i.location.origin?i.location.origin:i.location.href,n="string"===typeof e?e:tn(e);return n=n.replace(/ $/,"%20"),Jt(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==c&&(c=0,s.replaceState(Yt({},s.state,{idx:c}),""));let f={get action(){return a},get location(){return e(i,s)},listen(e){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Qt,d),l=e,()=>{i.removeEventListener(Qt,d),l=null}},createHref:e=>t(i,e),createURL:h,encodeLocation(e){let t=h(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){a=Gt.Push;let r=en(f.location,e,t);n&&n(r,e),c=u()+1;let d=Zt(r,c),h=f.createHref(r);try{s.pushState(d,"",h)}catch(ss){if(ss instanceof DOMException&&"DataCloneError"===ss.name)throw ss;i.location.assign(h)}o&&l&&l({action:a,location:f.location,delta:1})},replace:function(e,t){a=Gt.Replace;let r=en(f.location,e,t);n&&n(r,e),c=u();let i=Zt(r,c),d=f.createHref(r);s.replaceState(i,"",d),o&&l&&l({action:a,location:f.location,delta:0})},go:e=>s.go(e)};return f}var on;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(on||(on={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function sn(e,t,n){return void 0===n&&(n="/"),an(e,t,n,!1)}function an(e,t,n,r){let i=wn(("string"===typeof t?nn(t):t).pathname||"/",n);if(null==i)return null;let o=ln(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(o);let s=null;for(let a=0;null==s&&a{let s={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};s.relativePath.startsWith("/")&&(Jt(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(r.length));let a=xn([r,s.relativePath]),l=n.concat(s);e.children&&e.children.length>0&&(Jt(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),ln(e.children,t,l,a)),(null!=e.path||e.index)&&t.push({path:a,score:yn(a,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of cn(e.path))i(e,t,r);else i(e,t)})),t}function cn(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return i?[o,""]:[o];let s=cn(r.join("/")),a=[];return a.push(...s.map((e=>""===e?o:[o,e].join("/")))),i&&a.push(...s),a.map((t=>e.startsWith("/")&&""===t?"/":t))}const un=/^:[\w-]+$/,dn=3,hn=2,fn=1,pn=10,mn=-2,gn=e=>"*"===e;function yn(e,t){let n=e.split("/"),r=n.length;return n.some(gn)&&(r+=mn),t&&(r+=hn),n.filter((e=>!gn(e))).reduce(((e,t)=>e+(un.test(t)?dn:""===t?fn:pn)),r)}function vn(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,i={},o="/",s=[];for(let a=0;a(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");let o=new RegExp(i,t?void 0:"i");return[o,r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],s=o.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:i}=t;if("*"===r){let e=a[n]||"";s=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const l=a[n];return e[r]=i&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{}),pathname:o,pathnameBase:s,pattern:e}}function bn(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(ss){return Xt(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+ss+")."),e}}function wn(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function Sn(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` 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 En(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function Cn(e,t){let n=En(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}function kn(e,t,n,r){let i;void 0===r&&(r=!1),"string"===typeof e?i=nn(e):(i=Yt({},e),Jt(!i.pathname||!i.pathname.includes("?"),Sn("?","pathname","search",i)),Jt(!i.pathname||!i.pathname.includes("#"),Sn("#","pathname","hash",i)),Jt(!i.search||!i.search.includes("#"),Sn("#","search","hash",i)));let o,s=""===e||""===i.pathname,a=s?"/":i.pathname;if(null==a)o=n;else{let e=t.length-1;if(!r&&a.startsWith("..")){let t=a.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:i=""}="string"===typeof e?nn(e):e,o=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:o,search:In(r),hash:Pn(i)}}(i,o),c=a&&"/"!==a&&a.endsWith("/"),u=(s||"."===a)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}const xn=e=>e.join("/").replace(/\/\/+/g,"/"),Tn=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),In=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Pn=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;function An(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const Rn=["post","put","patch","delete"],Nn=(new Set(Rn),["get",...Rn]);new Set(Nn),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function On(){return On=Object.assign?Object.assign.bind():function(e){for(var t=1;t{r.current=!0})),e.useCallback((function(e,i){void 0===i&&(i={}),r.current&&("number"===typeof e?t.navigate(e):t.navigate(e,On({fromRouteId:n},i)))}),[t,n])}():function(){$n()||Jt(!1);let t=e.useContext(Dn),{basename:n,future:r,navigator:i}=e.useContext(Mn),{matches:o}=e.useContext(jn),{pathname:s}=zn(),a=JSON.stringify(Cn(o,r.v7_relativeSplatPath)),l=e.useRef(!1);return Bn((()=>{l.current=!0})),e.useCallback((function(e,r){if(void 0===r&&(r={}),!l.current)return;if("number"===typeof e)return void i.go(e);let o=kn(e,JSON.parse(a),s,"path"===r.relative);null==t&&"/"!==n&&(o.pathname="/"===o.pathname?n:xn([n,o.pathname])),(r.replace?i.replace:i.push)(o,r.state,r)}),[n,i,a,s,t])}()}function Hn(t,n){let{relative:r}=void 0===n?{}:n,{future:i}=e.useContext(Mn),{matches:o}=e.useContext(jn),{pathname:s}=zn(),a=JSON.stringify(Cn(o,i.v7_relativeSplatPath));return e.useMemo((()=>kn(t,JSON.parse(a),s,"path"===r)),[t,a,s,r])}function Vn(t,n,r,i){$n()||Jt(!1);let{navigator:o}=e.useContext(Mn),{matches:s}=e.useContext(jn),a=s[s.length-1],l=a?a.params:{},c=(a&&a.pathname,a?a.pathnameBase:"/");a&&a.route;let u,d=zn();if(n){var h;let e="string"===typeof n?nn(n):n;"/"===c||(null==(h=e.pathname)?void 0:h.startsWith(c))||Jt(!1),u=e}else u=d;let f=u.pathname||"/",p=f;if("/"!==c){let e=c.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(e.length).join("/")}let m=sn(t,{pathname:p});let g=Qn(m&&m.map((e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:xn([c,o.encodeLocation?o.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?c:xn([c,o.encodeLocation?o.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),s,r,i);return n&&g?e.createElement(Fn.Provider,{value:{location:On({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Gt.Pop}},g):g}function qn(){let t=function(){var t;let n=e.useContext(Un),r=er(Xn.UseRouteError),i=tr(Xn.UseRouteError);if(void 0!==n)return n;return null==(t=r.errors)?void 0:t[i]}(),n=An(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:i};return e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},n),r?e.createElement("pre",{style:o},r):null,null)}const Kn=e.createElement(qn,null);class Gn extends e.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,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?e.createElement(jn.Provider,{value:this.props.routeContext},e.createElement(Un.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Yn(t){let{routeContext:n,match:r,children:i}=t,o=e.useContext(Dn);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),e.createElement(jn.Provider,{value:n},i)}function Qn(t,n,r,i){var o;if(void 0===n&&(n=[]),void 0===r&&(r=null),void 0===i&&(i=null),null==t){var s;if(!r)return null;if(r.errors)t=r.matches;else{if(!(null!=(s=i)&&s.v7_partialHydration&&0===n.length&&!r.initialized&&r.matches.length>0))return null;t=r.matches}}let a=t,l=null==(o=r)?void 0:o.errors;if(null!=l){let e=a.findIndex((e=>e.route.id&&void 0!==(null==l?void 0:l[e.route.id])));e>=0||Jt(!1),a=a.slice(0,Math.min(a.length,e+1))}let c=!1,u=-1;if(r&&i&&i.v7_partialHydration)for(let e=0;e=0?a.slice(0,u+1):[a[0]];break}}}return a.reduceRight(((t,i,o)=>{let s,d=!1,h=null,f=null;var p;r&&(s=l&&i.route.id?l[i.route.id]:void 0,h=i.route.errorElement||Kn,c&&(u<0&&0===o?(p="route-fallback",!1||nr[p]||(nr[p]=!0),d=!0,f=null):u===o&&(d=!0,f=i.route.hydrateFallbackElement||null)));let m=n.concat(a.slice(0,o+1)),g=()=>{let n;return n=s?h:d?f:i.route.Component?e.createElement(i.route.Component,null):i.route.element?i.route.element:t,e.createElement(Yn,{match:i,routeContext:{outlet:t,matches:m,isDataRoute:null!=r},children:n})};return r&&(i.route.ErrorBoundary||i.route.errorElement||0===o)?e.createElement(Gn,{location:r.location,revalidation:r.revalidation,component:h,error:s,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):g()}),null)}var Jn=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Jn||{}),Xn=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Xn||{});function Zn(t){let n=e.useContext(Dn);return n||Jt(!1),n}function er(t){let n=e.useContext(Ln);return n||Jt(!1),n}function tr(t){let n=function(){let t=e.useContext(jn);return t||Jt(!1),t}(),r=n.matches[n.matches.length-1];return r.route.id||Jt(!1),r.route.id}const nr={};t.startTransition;function rr(t){let{to:n,replace:r,state:i,relative:o}=t;$n()||Jt(!1);let{future:s,static:a}=e.useContext(Mn),{matches:l}=e.useContext(jn),{pathname:c}=zn(),u=Wn(),d=kn(n,Cn(l,s.v7_relativeSplatPath),c,"path"===o),h=JSON.stringify(d);return e.useEffect((()=>u(JSON.parse(h),{replace:r,state:i,relative:o})),[u,h,o,r,i]),null}function ir(e){Jt(!1)}function or(t){let{basename:n="/",children:r=null,location:i,navigationType:o=Gt.Pop,navigator:s,static:a=!1,future:l}=t;$n()&&Jt(!1);let c=n.replace(/^\/*/,"/"),u=e.useMemo((()=>({basename:c,navigator:s,static:a,future:On({v7_relativeSplatPath:!1},l)})),[c,l,s,a]);"string"===typeof i&&(i=nn(i));let{pathname:d="/",search:h="",hash:f="",state:p=null,key:m="default"}=i,g=e.useMemo((()=>{let e=wn(d,c);return null==e?null:{location:{pathname:e,search:h,hash:f,state:p,key:m},navigationType:o}}),[c,d,h,f,p,m,o]);return null==g?null:e.createElement(Mn.Provider,{value:u},e.createElement(Fn.Provider,{children:r,value:g}))}function sr(e){let{children:t,location:n}=e;return Vn(ar(t),n)}new Promise((()=>{}));e.Component;function ar(t,n){void 0===n&&(n=[]);let r=[];return e.Children.forEach(t,((t,i)=>{if(!e.isValidElement(t))return;let o=[...n,i];if(t.type===e.Fragment)return void r.push.apply(r,ar(t.props.children,o));t.type!==ir&&Jt(!1),t.props.index&&t.props.children&&Jt(!1);let s={id:t.props.id||o.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(s.children=ar(t.props.children,o)),r.push(s)})),r}var lr=n(950),cr=n.t(lr,2);function ur(){return ur=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const hr=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"];try{window.__reactRouterVersion="6"}catch(DE){}new Map;const fr=t.startTransition;cr.flushSync,t.useId;function pr(t){let{basename:n,children:r,future:i,window:o}=t,s=e.useRef();var a;null==s.current&&(s.current=(void 0===(a={window:o,v5Compat:!0})&&(a={}),rn((function(e,t){let{pathname:n="/",search:r="",hash:i=""}=nn(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),en("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"===typeof t?t:tn(t))}),(function(e,t){Xt("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),a)));let l=s.current,[c,u]=e.useState({action:l.action,location:l.location}),{v7_startTransition:d}=i||{},h=e.useCallback((e=>{d&&fr?fr((()=>u(e))):u(e)}),[u,d]);return e.useLayoutEffect((()=>l.listen(h)),[l,h]),e.createElement(or,{basename:n,children:r,location:c.location,navigationType:c.action,navigator:l,future:i})}const mr="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,gr=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,yr=e.forwardRef((function(t,n){let r,{onClick:i,relative:o,reloadDocument:s,replace:a,state:l,target:c,to:u,preventScrollReset:d,unstable_viewTransition:h}=t,f=dr(t,hr),{basename:p}=e.useContext(Mn),m=!1;if("string"===typeof u&&gr.test(u)&&(r=u,mr))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),n=wn(t.pathname,p);t.origin===e.origin&&null!=n?u=n+t.search+t.hash:m=!0}catch(DE){}let g=function(t,n){let{relative:r}=void 0===n?{}:n;$n()||Jt(!1);let{basename:i,navigator:o}=e.useContext(Mn),{hash:s,pathname:a,search:l}=Hn(t,{relative:r}),c=a;return"/"!==i&&(c="/"===a?i:xn([i,a])),o.createHref({pathname:c,search:l,hash:s})}(u,{relative:o}),y=function(t,n){let{target:r,replace:i,state:o,preventScrollReset:s,relative:a,unstable_viewTransition:l}=void 0===n?{}:n,c=Wn(),u=zn(),d=Hn(t,{relative:a});return e.useCallback((e=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(e,r)){e.preventDefault();let n=void 0!==i?i:tn(u)===tn(d);c(t,{replace:n,state:o,preventScrollReset:s,relative:a,unstable_viewTransition:l})}}),[u,c,d,i,o,r,t,s,a,l])}(u,{replace:a,state:l,target:c,preventScrollReset:d,relative:o,unstable_viewTransition:h});return e.createElement("a",ur({},f,{href:r||g,onClick:m||s?i:function(e){i&&i(e),e.defaultPrevented||y(e)},ref:n,target:c}))}));var vr,_r;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(vr||(vr={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(_r||(_r={}));const br=!1,wr=!1,Sr="${JSCORE_VERSION}",Er=function(e,t){if(!e)throw Cr(t)},Cr=function(e){return new Error("Firebase Database ("+Sr+") INTERNAL ASSERT FAILED: "+e)},kr=function(e){const t=[];let n=0;for(let r=0;r>6|192,t[n++]=63&i|128):55296===(64512&i)&&r+1>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t},xr={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:"function"===typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i>2,u=(3&t)<<4|s>>4;let d=(15&s)<<2|l>>6,h=63&l;a||(h=64,o||(d=64)),r.push(n[c],n[u],n[d],n[h])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(kr(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){const t=[];let n=0,r=0;for(;n191&&i<224){const o=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){const o=((7&i)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(o>>10)),t[r++]=String.fromCharCode(56320+(1023&o))}else{const o=e[n++],s=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i>4;if(r.push(l),64!==s){const e=o<<4&240|s>>2;if(r.push(e),64!==a){const e=s<<6&192|a;r.push(e)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class Tr extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const Ir=function(e){const t=kr(e);return xr.encodeByteArray(t,!0)},Pr=function(e){return Ir(e).replace(/\./g,"")},Ar=function(e){try{return xr.decodeString(e,!0)}catch(DE){console.error("base64Decode failed: ",DE)}return null};function Rr(e){return Nr(void 0,e)}function Nr(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:return new Date(t.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t}for(const n in t)t.hasOwnProperty(n)&&"__proto__"!==n&&(e[n]=Nr(e[n],t[n]));return e}const Or=()=>function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__,Dr=()=>{try{return Or()||(()=>{if("undefined"===typeof process)return;const e={NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0})()||(()=>{if("undefined"===typeof document)return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(DE){return}const t=e&&Ar(e[1]);return t&&JSON.parse(t)})()}catch(DE){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${DE}`)}},Lr=e=>{var t,n;return null===(n=null===(t=Dr())||void 0===t?void 0:t.emulatorHosts)||void 0===n?void 0:n[e]},Mr=e=>{const t=Lr(e);if(!t)return;const n=t.lastIndexOf(":");if(n<=0||n+1===t.length)throw new Error(`Invalid host ${t} with no separate hostname and port!`);const r=parseInt(t.substring(n+1),10);return"["===t[0]?[t.substring(1,n-1),r]:[t.substring(0,n),r]},Fr=()=>{var e;return null===(e=Dr())||void 0===e?void 0:e.config},jr=e=>{var t;return null===(t=Dr())||void 0===t?void 0:t[`_${e}`]};class Ur{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}wrapCallback(e){return(t,n)=>{t?this.reject(t):this.resolve(n),"function"===typeof e&&(this.promise.catch((()=>{})),1===e.length?e(t):e(t,n))}}}function $r(e,t){if(e.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n=t||"demo-project",r=e.iat||0,i=e.sub||e.user_id;if(!i)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const o=Object.assign({iss:`https://securetoken.google.com/${n}`,aud:n,iat:r,exp:r+3600,auth_time:r,sub:i,user_id:i,firebase:{sign_in_provider:"custom",identities:{}}},e);return[Pr(JSON.stringify({alg:"none",type:"JWT"})),Pr(JSON.stringify(o)),""].join(".")}function zr(){return"undefined"!==typeof navigator&&"string"===typeof navigator.userAgent?navigator.userAgent:""}function Br(){return"undefined"!==typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(zr())}function Wr(){return"object"===typeof navigator&&"ReactNative"===navigator.product}function Hr(){return!0===br||!0===wr}class Vr extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,Vr.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,qr.prototype.create)}}class qr{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e){const t=(arguments.length<=1?void 0:arguments[1])||{},n=`${this.service}/${e}`,r=this.errors[e],i=r?function(e,t){return e.replace(Kr,((e,n)=>{const r=t[n];return null!=r?String(r):`<${n}?>`}))}(r,t):"Error",o=`${this.serviceName}: ${i} (${n}).`;return new Vr(n,o,t)}}const Kr=/\{\$([^}]+)}/g;function Gr(e){return JSON.parse(e)}function Yr(e){return JSON.stringify(e)}const Qr=function(e){let t={},n={},r={},i="";try{const o=e.split(".");t=Gr(Ar(o[0])||""),n=Gr(Ar(o[1])||""),i=o[2],r=n.d||{},delete n.d}catch(DE){}return{header:t,claims:n,data:r,signature:i}};function Jr(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Xr(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}function Zr(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function ei(e,t,n){const r={};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=t.call(n,e[i],i,e));return r}function ti(e,t){if(e===t)return!0;const n=Object.keys(e),r=Object.keys(t);for(const i of n){if(!r.includes(i))return!1;const n=e[i],o=t[i];if(ni(n)&&ni(o)){if(!ti(n,o))return!1}else if(n!==o)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function ni(e){return null!==e&&"object"===typeof e}function ri(e){const t=[];for(const[n,r]of Object.entries(e))Array.isArray(r)?r.forEach((e=>{t.push(encodeURIComponent(n)+"="+encodeURIComponent(e))})):t.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return t.length?"&"+t.join("&"):""}function ii(e){const t={};return e.replace(/^\?/,"").split("&").forEach((e=>{if(e){const[n,r]=e.split("=");t[decodeURIComponent(n)]=decodeURIComponent(r)}})),t}function oi(e){const t=e.indexOf("?");if(!t)return"";const n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)}class si{constructor(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(let e=1;e>>31)}let r,i,o=this.chain_[0],s=this.chain_[1],a=this.chain_[2],l=this.chain_[3],c=this.chain_[4];for(let u=0;u<80;u++){u<40?u<20?(r=l^s&(a^l),i=1518500249):(r=s^a^l,i=1859775393):u<60?(r=s&a|l&(s|a),i=2400959708):(r=s^a^l,i=3395469782);const e=(o<<5|o>>>27)+r+c+i+n[u]&4294967295;c=l,l=a,a=4294967295&(s<<30|s>>>2),s=o,o=e}this.chain_[0]=this.chain_[0]+o&4294967295,this.chain_[1]=this.chain_[1]+s&4294967295,this.chain_[2]=this.chain_[2]+a&4294967295,this.chain_[3]=this.chain_[3]+l&4294967295,this.chain_[4]=this.chain_[4]+c&4294967295}update(e,t){if(null==e)return;void 0===t&&(t=e.length);const n=t-this.blockSize;let r=0;const i=this.buf_;let o=this.inbuf_;for(;r=56;r--)this.buf_[r]=255&t,t/=256;this.compress_(this.buf_);let n=0;for(let r=0;r<5;r++)for(let t=24;t>=0;t-=8)e[n]=this.chain_[r]>>t&255,++n;return e}}class ai{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then((()=>{e(this)})).catch((e=>{this.error(e)}))}next(e){this.forEachObserver((t=>{t.next(e)}))}error(e){this.forEachObserver((t=>{t.error(e)})),this.close(e)}complete(){this.forEachObserver((e=>{e.complete()})),this.close()}subscribe(e,t,n){let r;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");r=function(e,t){if("object"!==typeof e||null===e)return!1;for(const n of t)if(n in e&&"function"===typeof e[n])return!0;return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:n},void 0===r.next&&(r.next=li),void 0===r.error&&(r.error=li),void 0===r.complete&&(r.complete=li);const i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch(DE){}})),this.observers.push(r),i}unsubscribeOne(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let t=0;t{if(void 0!==this.observers&&void 0!==this.observers[e])try{t(this.observers[e])}catch(DE){"undefined"!==typeof console&&console.error&&console.error(DE)}}))}close(e){this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then((()=>{this.observers=void 0,this.onNoObservers=void 0})))}}function li(){}function ci(e,t){return`${e} failed: ${t} argument `}const ui=function(e){let t=0;for(let n=0;n=55296&&r<=56319?(t+=4,n++):t+=3}return t};function di(e){return e&&e._delegate?e._delegate:e}class hi{constructor(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}const fi="[DEFAULT]";class pi{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const e=new Ur;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{const n=this.getOrInitializeService({instanceIdentifier:t});n&&e.resolve(n)}catch(DE){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;const n=this.normalizeInstanceIdentifier(null===e||void 0===e?void 0:e.identifier),r=null!==(t=null===e||void 0===e?void 0:e.optional)&&void 0!==t&&t;if(!this.isInitialized(n)&&!this.shouldAutoInitialize()){if(r)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:n})}catch(DE){if(r)return null;throw DE}}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(function(e){return"EAGER"===e.instantiationMode}(e))try{this.getOrInitializeService({instanceIdentifier:fi})}catch(DE){}for(const[e,t]of this.instancesDeferred.entries()){const n=this.normalizeInstanceIdentifier(e);try{const e=this.getOrInitializeService({instanceIdentifier:n});t.resolve(e)}catch(DE){}}}}clearInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fi;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((e=>"INTERNAL"in e)).map((e=>e.INTERNAL.delete())),...e.filter((e=>"_delete"in e)).map((e=>e._delete()))])}isComponentSet(){return null!=this.component}isInitialized(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fi;return this.instances.has(e)}getOptions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fi;return this.instancesOptions.get(e)||{}}initialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{options:t={}}=e,n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const r=this.getOrInitializeService({instanceIdentifier:n,options:t});for(const[i,o]of this.instancesDeferred.entries()){n===this.normalizeInstanceIdentifier(i)&&o.resolve(r)}return r}onInit(e,t){var n;const r=this.normalizeInstanceIdentifier(t),i=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;i.add(e),this.onInitCallbacks.set(r,i);const o=this.instances.get(r);return o&&e(o,r),()=>{i.delete(e)}}invokeOnInitCallbacks(e,t){const n=this.onInitCallbacks.get(t);if(n)for(const i of n)try{i(e,t)}catch(r){}}getOrInitializeService(e){let{instanceIdentifier:t,options:n={}}=e,r=this.instances.get(t);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:mi(t),options:n}),this.instances.set(t,r),this.instancesOptions.set(t,n),this.invokeOnInitCallbacks(r,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,r)}catch(i){}return r||null}normalizeInstanceIdentifier(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fi;return this.component?this.component.multipleInstances?e:fi:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}function mi(e){return e===fi?void 0:e}class gi{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);t.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 t=new pi(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}const yi=[];var vi;!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(vi||(vi={}));const _i={debug:vi.DEBUG,verbose:vi.VERBOSE,info:vi.INFO,warn:vi.WARN,error:vi.ERROR,silent:vi.SILENT},bi=vi.INFO,wi={[vi.DEBUG]:"log",[vi.VERBOSE]:"log",[vi.INFO]:"info",[vi.WARN]:"warn",[vi.ERROR]:"error"},Si=function(e,t){if(t2?i-2:0),s=2;s(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function Ni(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(ki||(ki=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(){for(var t=arguments.length,n=new Array(t),r=0;r1?n-1:0),i=1;i{const r=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",o),e.removeEventListener("abort",o)},i=()=>{t(),r()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",o),e.addEventListener("abort",o)}));Ti.set(e,t)}(e),t=e,(Ci||(Ci=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some((e=>t instanceof e))?new Proxy(e,Ri):e);var t}function Di(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",i),e.removeEventListener("error",o)},i=()=>{t(Di(e.result)),r()},o=()=>{n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",o)}));return t.then((t=>{t instanceof IDBCursor&&xi.set(t,e)})).catch((()=>{})),Ai.set(t,e),t}(e);if(Pi.has(e))return Pi.get(e);const t=Oi(e);return t!==e&&(Pi.set(e,t),Ai.set(t,e)),t}const Li=e=>Ai.get(e);const Mi=["get","getKey","getAll","getAllKeys","count"],Fi=["put","add","delete","clear"],ji=new Map;function Ui(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!==typeof t)return;if(ji.get(t))return ji.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=Fi.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!i&&!Mi.includes(n))return;const o=async function(e){const t=this.transaction(e,i?"readwrite":"readonly");let o=t.store;for(var s=arguments.length,a=new Array(s>1?s-1:0),l=1;l({...e,get:(t,n,r)=>Ui(t,n)||e.get(t,n,r),has:(t,n)=>!!Ui(t,n)||e.has(t,n)}))(Ri);class $i{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map((e=>{if(function(e){const t=e.getComponent();return"VERSION"===(null===t||void 0===t?void 0:t.type)}(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}return null})).filter((e=>e)).join(" ")}}const zi="@firebase/app",Bi="0.10.12",Wi=new Ei("@firebase/app"),Hi="@firebase/app-compat",Vi="@firebase/analytics-compat",qi="@firebase/analytics",Ki="@firebase/app-check-compat",Gi="@firebase/app-check",Yi="@firebase/auth",Qi="@firebase/auth-compat",Ji="@firebase/database",Xi="@firebase/data-connect",Zi="@firebase/database-compat",eo="@firebase/functions",to="@firebase/functions-compat",no="@firebase/installations",ro="@firebase/installations-compat",io="@firebase/messaging",oo="@firebase/messaging-compat",so="@firebase/performance",ao="@firebase/performance-compat",lo="@firebase/remote-config",co="@firebase/remote-config-compat",uo="@firebase/storage",ho="@firebase/storage-compat",fo="@firebase/firestore",po="@firebase/vertexai-preview",mo="@firebase/firestore-compat",go="firebase",yo="[DEFAULT]",vo={[zi]:"fire-core",[Hi]:"fire-core-compat",[qi]:"fire-analytics",[Vi]:"fire-analytics-compat",[Gi]:"fire-app-check",[Ki]:"fire-app-check-compat",[Yi]:"fire-auth",[Qi]:"fire-auth-compat",[Ji]:"fire-rtdb",[Xi]:"fire-data-connect",[Zi]:"fire-rtdb-compat",[eo]:"fire-fn",[to]:"fire-fn-compat",[no]:"fire-iid",[ro]:"fire-iid-compat",[io]:"fire-fcm",[oo]:"fire-fcm-compat",[so]:"fire-perf",[ao]:"fire-perf-compat",[lo]:"fire-rc",[co]:"fire-rc-compat",[uo]:"fire-gcs",[ho]:"fire-gcs-compat",[fo]:"fire-fst",[mo]:"fire-fst-compat",[po]:"fire-vertex","fire-js":"fire-js",[go]:"fire-js-all"},_o=new Map,bo=new Map,wo=new Map;function So(e,t){try{e.container.addComponent(t)}catch(DE){Wi.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,DE)}}function Eo(e){const t=e.name;if(wo.has(t))return Wi.debug(`There were multiple attempts to register component ${t}.`),!1;wo.set(t,e);for(const n of _o.values())So(n,e);for(const n of bo.values())So(n,e);return!0}function Co(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}function ko(e){return void 0!==e.settings}const xo=new qr("app","Firebase",{"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","server-app-deleted":"Firebase Server App has been 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}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."});class To{constructor(e,t,n){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new hi("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 xo.create("app-deleted",{appName:this._name})}}const Io="10.14.0";function Po(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e;if("object"!==typeof t){t={name:t}}const r=Object.assign({name:yo,automaticDataCollectionEnabled:!1},t),i=r.name;if("string"!==typeof i||!i)throw xo.create("bad-app-name",{appName:String(i)});if(n||(n=Fr()),!n)throw xo.create("no-options");const o=_o.get(i);if(o){if(ti(n,o.options)&&ti(r,o.config))return o;throw xo.create("duplicate-app",{appName:i})}const s=new gi(i);for(const l of wo.values())s.addComponent(l);const a=new To(n,r,s);return _o.set(i,a),a}function Ao(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:yo;const t=_o.get(e);if(!t&&e===yo&&Fr())return Po();if(!t)throw xo.create("no-app",{appName:e});return t}function Ro(e,t,n){var r;let i=null!==(r=vo[e])&&void 0!==r?r:e;n&&(i+=`-${n}`);const o=i.match(/\s|\//),s=t.match(/\s|\//);if(o||s){const e=[`Unable to register library "${i}" with version "${t}":`];return o&&e.push(`library name "${i}" contains illegal characters (whitespace or "/")`),o&&s&&e.push("and"),s&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void Wi.warn(e.join(" "))}Eo(new hi(`${i}-version`,(()=>({library:i,version:t})),"VERSION"))}const No="firebase-heartbeat-store";let Oo=null;function Do(){return Oo||(Oo=function(e,t){let{blocked:n,upgrade:r,blocking:i,terminated:o}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=indexedDB.open(e,t),a=Di(s);return r&&s.addEventListener("upgradeneeded",(e=>{r(Di(s.result),e.oldVersion,e.newVersion,Di(s.transaction),e)})),n&&s.addEventListener("blocked",(e=>n(e.oldVersion,e.newVersion,e))),a.then((e=>{o&&e.addEventListener("close",(()=>o())),i&&e.addEventListener("versionchange",(e=>i(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),a}("firebase-heartbeat-database",1,{upgrade:(e,t)=>{if(0===t)try{e.createObjectStore(No)}catch(DE){console.warn(DE)}}}).catch((e=>{throw xo.create("idb-open",{originalErrorMessage:e.message})}))),Oo}async function Lo(e,t){try{const n=(await Do()).transaction(No,"readwrite"),r=n.objectStore(No);await r.put(t,Mo(e)),await n.done}catch(DE){if(DE instanceof Vr)Wi.warn(DE.message);else{const t=xo.create("idb-set",{originalErrorMessage:null===DE||void 0===DE?void 0:DE.message});Wi.warn(t.message)}}}function Mo(e){return`${e.name}!${e.options.appId}`}class Fo{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new Uo(t),this._heartbeatsCachePromise=this._storage.read().then((e=>(this._heartbeatsCache=e,e)))}async triggerHeartbeat(){var e,t;try{const n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),r=jo();if(null==(null===(e=this._heartbeatsCache)||void 0===e?void 0:e.heartbeats)&&(this._heartbeatsCache=await this._heartbeatsCachePromise,null==(null===(t=this._heartbeatsCache)||void 0===t?void 0:t.heartbeats)))return;if(this._heartbeatsCache.lastSentHeartbeatDate===r||this._heartbeatsCache.heartbeats.some((e=>e.date===r)))return;return this._heartbeatsCache.heartbeats.push({date:r,agent:n}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter((e=>{const t=new Date(e.date).valueOf();return Date.now()-t<=2592e6})),this._storage.overwrite(this._heartbeatsCache)}catch(DE){Wi.warn(DE)}}async getHeartbeatsHeader(){var e;try{if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,null==(null===(e=this._heartbeatsCache)||void 0===e?void 0:e.heartbeats)||0===this._heartbeatsCache.heartbeats.length)return"";const t=jo(),{heartbeatsToSend:n,unsentEntries:r}=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1024;const n=[];let r=e.slice();for(const i of e){const e=n.find((e=>e.agent===i.agent));if(e){if(e.dates.push(i.date),$o(n)>t){e.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),$o(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}(this._heartbeatsCache.heartbeats),i=Pr(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=t,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}catch(DE){return Wi.warn(DE),""}}}function jo(){return(new Date).toISOString().substring(0,10)}class Uo{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!function(){try{return"object"===typeof indexedDB}catch(DE){return!1}}()&&new Promise(((e,t)=>{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),e(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(ss){t(ss)}})).then((()=>!0)).catch((()=>!1))}async read(){if(await this._canUseIndexedDBPromise){const e=await async function(e){try{const t=(await Do()).transaction(No),n=await t.objectStore(No).get(Mo(e));return await t.done,n}catch(DE){if(DE instanceof Vr)Wi.warn(DE.message);else{const t=xo.create("idb-get",{originalErrorMessage:null===DE||void 0===DE?void 0:DE.message});Wi.warn(t.message)}}}(this.app);return(null===e||void 0===e?void 0:e.heartbeats)?e:{heartbeats:[]}}return{heartbeats:[]}}async overwrite(e){var t;if(await this._canUseIndexedDBPromise){const n=await this.read();return Lo(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){var t;if(await this._canUseIndexedDBPromise){const n=await this.read();return Lo(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:[...n.heartbeats,...e.heartbeats]})}}}function $o(e){return Pr(JSON.stringify({version:2,heartbeats:e})).length}var zo;zo="",Eo(new hi("platform-logger",(e=>new $i(e)),"PRIVATE")),Eo(new hi("heartbeat",(e=>new Fo(e)),"PRIVATE")),Ro(zi,Bi,zo),Ro(zi,Bi,"esm2017"),Ro("fire-js","");const Bo="@firebase/database",Wo="1.0.8";let Ho="";function Vo(e){Ho=e}class qo{constructor(e){this.domStorage_=e,this.prefix_="firebase:"}set(e,t){null==t?this.domStorage_.removeItem(this.prefixedName_(e)):this.domStorage_.setItem(this.prefixedName_(e),Yr(t))}get(e){const t=this.domStorage_.getItem(this.prefixedName_(e));return null==t?null:Gr(t)}remove(e){this.domStorage_.removeItem(this.prefixedName_(e))}prefixedName_(e){return this.prefix_+e}toString(){return this.domStorage_.toString()}}class Ko{constructor(){this.cache_={},this.isInMemoryStorage=!0}set(e,t){null==t?delete this.cache_[e]:this.cache_[e]=t}get(e){return Jr(this.cache_,e)?this.cache_[e]:null}remove(e){delete this.cache_[e]}}const Go=function(e){try{if("undefined"!==typeof window&&"undefined"!==typeof window[e]){const t=window[e];return t.setItem("firebase:sentinel","cache"),t.removeItem("firebase:sentinel"),new qo(t)}}catch(DE){}return new Ko},Yo=Go("localStorage"),Qo=Go("sessionStorage"),Jo=new Ei("@firebase/database"),Xo=function(){let e=1;return function(){return e++}}(),Zo=function(e){const t=function(e){const t=[];let n=0;for(let r=0;r=55296&&i<=56319){const t=i-55296;r++,Er(r>6|192,t[n++]=63&i|128):i<65536?(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t}(e),n=new si;n.update(t);const r=n.digest();return xr.encodeByteArray(r)},es=function(){let e="";for(let t=0;tn?r.push(e.substring(i,n)):r.push(e.substring(i,i+t));return r};function ys(e,t){for(const n in e)e.hasOwnProperty(n)&&t(n,e[n])}const vs=function(e){Er(!cs(e),"Invalid JSON number");const t=1023;let n,r,i,o,s;0===e?(r=0,i=0,n=1/e===-1/0?1:0):(n=e<0,(e=Math.abs(e))>=Math.pow(2,-1022)?(o=Math.min(Math.floor(Math.log(e)/Math.LN2),t),r=o+t,i=Math.round(e*Math.pow(2,52-o)-Math.pow(2,52))):(r=0,i=Math.round(e/Math.pow(2,-1074))));const a=[];for(s=52;s;s-=1)a.push(i%2?1:0),i=Math.floor(i/2);for(s=11;s;s-=1)a.push(r%2?1:0),r=Math.floor(r/2);a.push(n?1:0),a.reverse();const l=a.join("");let c="";for(s=0;s<64;s+=8){let e=parseInt(l.substr(s,8),2).toString(16);1===e.length&&(e="0"+e),c+=e}return c.toLowerCase()};const _s=new RegExp("^-?(0*)\\d{1,10}$"),bs=function(e){if(_s.test(e)){const t=Number(e);if(t>=-2147483648&&t<=2147483647)return t}return null},ws=function(e){try{e()}catch(DE){setTimeout((()=>{const t=DE.stack||"";throw ls("Exception was thrown by user callback.",t),DE}),Math.floor(0))}},Ss=function(e,t){const n=setTimeout(e,t);return"number"===typeof n&&"undefined"!==typeof Deno&&Deno.unrefTimer?Deno.unrefTimer(n):"object"===typeof n&&n.unref&&n.unref(),n};class Es{constructor(e,t){this.appName_=e,this.appCheckProvider=t,this.appCheck=null===t||void 0===t?void 0:t.getImmediate({optional:!0}),this.appCheck||null===t||void 0===t||t.get().then((e=>this.appCheck=e))}getToken(e){return this.appCheck?this.appCheck.getToken(e):new Promise(((t,n)=>{setTimeout((()=>{this.appCheck?this.getToken(e).then(t,n):t(null)}),0)}))}addTokenChangeListener(e){var t;null===(t=this.appCheckProvider)||void 0===t||t.get().then((t=>t.addTokenListener(e)))}notifyForInvalidToken(){ls(`Provided AppCheck credentials for the app named "${this.appName_}" are invalid. This usually indicates your app was not initialized correctly.`)}}class Cs{constructor(e,t,n){this.appName_=e,this.firebaseOptions_=t,this.authProvider_=n,this.auth_=null,this.auth_=n.getImmediate({optional:!0}),this.auth_||n.onInit((e=>this.auth_=e))}getToken(e){return this.auth_?this.auth_.getToken(e).catch((e=>e&&"auth/token-not-initialized"===e.code?(is("Got auth/token-not-initialized error. Treating as null token."),null):Promise.reject(e))):new Promise(((t,n)=>{setTimeout((()=>{this.auth_?this.getToken(e).then(t,n):t(null)}),0)}))}addTokenChangeListener(e){this.auth_?this.auth_.addAuthTokenListener(e):this.authProvider_.get().then((t=>t.addAuthTokenListener(e)))}removeTokenChangeListener(e){this.authProvider_.get().then((t=>t.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/.',ls(e)}}class ks{constructor(e){this.accessToken=e}getToken(e){return Promise.resolve({accessToken:this.accessToken})}addTokenChangeListener(e){e(this.accessToken)}removeTokenChangeListener(e){}notifyForInvalidToken(){}}ks.OWNER="owner";const xs="5",Ts=/(console\.firebase|firebase-console-\w+\.corp|firebase\.corp)\.google\.com/,Is="ac",Ps="websocket",As="long_polling";class Rs{constructor(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",s=arguments.length>6&&void 0!==arguments[6]&&arguments[6],a=arguments.length>7&&void 0!==arguments[7]&&arguments[7];this.secure=t,this.namespace=n,this.webSocketOnly=r,this.nodeAdmin=i,this.persistenceKey=o,this.includeNamespaceInQueryParams=s,this.isUsingEmulator=a,this._host=e.toLowerCase(),this._domain=this._host.substr(this._host.indexOf(".")+1),this.internalHost=Yo.get("host:"+e)||this._host}isCacheableHost(){return"s-"===this.internalHost.substr(0,2)}isCustomHost(){return"firebaseio.com"!==this._domain&&"firebaseio-demo.com"!==this._domain}get host(){return this._host}set host(e){e!==this.internalHost&&(this.internalHost=e,this.isCacheableHost()&&Yo.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://",t=this.includeNamespaceInQueryParams?`?ns=${this.namespace}`:"";return`${e}${this.host}/${t}`}}function Ns(e,t,n){let r;if(Er("string"===typeof t,"typeof type must == string"),Er("object"===typeof n,"typeof params must == object"),t===Ps)r=(e.secure?"wss://":"ws://")+e.internalHost+"/.ws?";else{if(t!==As)throw new Error("Unknown connection type: "+t);r=(e.secure?"https://":"http://")+e.internalHost+"/.lp?"}(function(e){return e.host!==e.internalHost||e.isCustomHost()||e.includeNamespaceInQueryParams})(e)&&(n.ns=e.namespace);const i=[];return ys(n,((e,t)=>{i.push(e+"="+t)})),r+i.join("&")}class Os{constructor(){this.counters_={}}incrementCounter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;Jr(this.counters_,e)||(this.counters_[e]=0),this.counters_[e]+=t}get(){return Rr(this.counters_)}}const Ds={},Ls={};function Ms(e){const t=e.toString();return Ds[t]||(Ds[t]=new Os),Ds[t]}class Fs{constructor(e){this.onMessage_=e,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}closeAfter(e,t){this.closeAfterResponse=e,this.onClose=t,this.closeAfterResponse{this.onMessage_(e[t])}));if(this.currentResponseNum===this.closeAfterResponse){this.onClose&&(this.onClose(),this.onClose=null);break}this.currentResponseNum++}}}const js="start";class Us{constructor(e,t,n,r,i,o,s){this.connId=e,this.repoInfo=t,this.applicationId=n,this.appCheckToken=r,this.authToken=i,this.transportSessionId=o,this.lastSessionId=s,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=os(e),this.stats_=Ms(t),this.urlFn=e=>(this.appCheckToken&&(e[Is]=this.appCheckToken),Ns(t,As,e))}open(e,t){var n=this;this.curSegmentNum=0,this.onDisconnect_=t,this.myPacketOrderer=new Fs(e),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout((()=>{this.log_("Timed out trying to connect."),this.onClosed_(),this.connectTimeoutTimer_=null}),Math.floor(3e4)),function(e){if(Hr()||"complete"===document.readyState)e();else{let t=!1;const n=function(){document.body?t||(t=!0,e()):setTimeout(n,Math.floor(10))};document.addEventListener?(document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",(()=>{"complete"===document.readyState&&n()})),window.attachEvent("onload",n))}}((()=>{if(this.isClosed_)return;this.scriptTagHolder=new $s((function(){for(var e=arguments.length,t=new Array(e),r=0;r{n.onClosed_()}))):n.onClosed_()}}),(function(){for(var e=arguments.length,t=new Array(e),r=0;r{this.onClosed_()}),this.urlFn);const e={};e[js]="t",e.ser=Math.floor(1e8*Math.random()),this.scriptTagHolder.uniqueCallbackIdentifier&&(e.cb=this.scriptTagHolder.uniqueCallbackIdentifier),e.v=xs,this.transportSessionId&&(e.s=this.transportSessionId),this.lastSessionId&&(e.ls=this.lastSessionId),this.applicationId&&(e.p=this.applicationId),this.appCheckToken&&(e[Is]=this.appCheckToken),"undefined"!==typeof location&&location.hostname&&Ts.test(location.hostname)&&(e.r="f");const t=this.urlFn(e);this.log_("Connecting via long-poll to "+t),this.scriptTagHolder.addTag(t,(()=>{}))}))}start(){this.scriptTagHolder.startLongPoll(this.id,this.password),this.addDisconnectPingFrame(this.id,this.password)}static forceAllow(){Us.forceAllow_=!0}static forceDisallow(){Us.forceDisallow_=!0}static isAvailable(){return!Hr()&&(!!Us.forceAllow_||!Us.forceDisallow_&&"undefined"!==typeof document&&null!=document.createElement&&!("object"===typeof window&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))&&!("object"===typeof Windows&&"object"===typeof Windows.UI))}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 t=Yr(e);this.bytesSent+=t.length,this.stats_.incrementCounter("bytes_sent",t.length);const n=Ir(t),r=gs(n,1840);for(let i=0;idocument.domain="'+document.domain+'";<\/script>'}const r=""+n+"";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(r),this.myIFrame.doc.close()}catch(DE){is("frame writing exception"),DE.stack&&is(DE.stack),is(DE)}}}static createIFrame_(){const e=document.createElement("iframe");if(e.style.display="none",!document.body)throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";document.body.appendChild(e);try{e.contentWindow.document||is("No IE domain setting required")}catch(DE){const n=document.domain;e.src="javascript:void((function(){document.open();document.domain='"+n+"';document.close();})())"}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((()=>{null!==this.myIFrame&&(document.body.removeChild(this.myIFrame),this.myIFrame=null)}),Math.floor(0)));const e=this.onDisconnect;e&&(this.onDisconnect=null,e())}startLongPoll(e,t){for(this.myID=e,this.myPW=t,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.id=this.myID,e.pw=this.myPW,e.ser=this.currentSerial;let t=this.urlFn(e),n="",r=0;for(;this.pendingSegs.length>0;){if(!(this.pendingSegs[0].d.length+30+n.length<=1870))break;{const e=this.pendingSegs.shift();n=n+"&seg"+r+"="+e.seg+"&ts"+r+"="+e.ts+"&d"+r+"="+e.d,r++}}return t+=n,this.addLongPollTag_(t,this.currentSerial),!0}return!1}enqueueSegment(e,t,n){this.pendingSegs.push({seg:e,ts:t,d:n}),this.alive&&this.newRequest_()}addLongPollTag_(e,t){this.outstandingRequests.add(t);const n=()=>{this.outstandingRequests.delete(t),this.newRequest_()},r=setTimeout(n,Math.floor(25e3));this.addTag(e,(()=>{clearTimeout(r),n()}))}addTag(e,t){Hr()?this.doNodeLongPoll(e,t):setTimeout((()=>{try{if(!this.sendNewPolls)return;const n=this.myIFrame.doc.createElement("script");n.type="text/javascript",n.async=!0,n.src=e,n.onload=n.onreadystatechange=function(){const e=n.readyState;e&&"loaded"!==e&&"complete"!==e||(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),t())},n.onerror=()=>{is("Long-poll script failed to load: "+e),this.sendNewPolls=!1,this.close()},this.myIFrame.doc.body.appendChild(n)}catch(DE){}}),Math.floor(1))}}let zs=null;"undefined"!==typeof MozWebSocket?zs=MozWebSocket:"undefined"!==typeof WebSocket&&(zs=WebSocket);class Bs{constructor(e,t,n,r,i,o,s){this.connId=e,this.applicationId=n,this.appCheckToken=r,this.authToken=i,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=os(this.connId),this.stats_=Ms(t),this.connURL=Bs.connectionURL_(t,o,s,r,n),this.nodeAdmin=t.nodeAdmin}static connectionURL_(e,t,n,r,i){const o={};return o.v=xs,!Hr()&&"undefined"!==typeof location&&location.hostname&&Ts.test(location.hostname)&&(o.r="f"),t&&(o.s=t),n&&(o.ls=n),r&&(o[Is]=r),i&&(o.p=i),Ns(e,Ps,o)}open(e,t){this.onDisconnect=t,this.onMessage=e,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,Yo.set("previous_websocket_failure",!0);try{let e;if(Hr()){const t=this.nodeAdmin?"AdminNode":"Node";e={headers:{"User-Agent":`Firebase/${xs}/${Ho}/${process.platform}/${t}`,"X-Firebase-GMPID":this.applicationId||""}},this.authToken&&(e.headers.Authorization=`Bearer ${this.authToken}`),this.appCheckToken&&(e.headers["X-Firebase-AppCheck"]=this.appCheckToken);const n={NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"},r=0===this.connURL.indexOf("wss://")?n.HTTPS_PROXY||n.https_proxy:n.HTTP_PROXY||n.http_proxy;r&&(e.proxy={origin:r})}this.mySock=new zs(this.connURL,[],e)}catch(DE){this.log_("Error instantiating WebSocket.");const t=DE.message||DE.data;return t&&this.log_(t),void this.onClosed_()}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=e=>{this.handleIncomingFrame(e)},this.mySock.onerror=e=>{this.log_("WebSocket error. Closing connection.");const t=e.message||e.data;t&&this.log_(t),this.onClosed_()}}start(){}static forceDisallow(){Bs.forceDisallow_=!0}static isAvailable(){let e=!1;if("undefined"!==typeof navigator&&navigator.userAgent){const t=/Android ([0-9]{0,}\.[0-9]{0,})/,n=navigator.userAgent.match(t);n&&n.length>1&&parseFloat(n[1])<4.4&&(e=!0)}return!e&&null!==zs&&!Bs.forceDisallow_}static previouslyFailed(){return Yo.isInMemoryStorage||!0===Yo.get("previous_websocket_failure")}markConnectionHealthy(){Yo.remove("previous_websocket_failure")}appendFrame_(e){if(this.frames.push(e),this.frames.length===this.totalFrames){const e=this.frames.join("");this.frames=null;const t=Gr(e);this.onMessage(t)}}handleNewFrameCount_(e){this.totalFrames=e,this.frames=[]}extractFrameCount_(e){if(Er(null===this.frames,"We already have a frame buffer"),e.length<=6){const t=Number(e);if(!isNaN(t))return this.handleNewFrameCount_(t),null}return this.handleNewFrameCount_(1),e}handleIncomingFrame(e){if(null===this.mySock)return;const t=e.data;if(this.bytesReceived+=t.length,this.stats_.incrementCounter("bytes_received",t.length),this.resetKeepAlive(),null!==this.frames)this.appendFrame_(t);else{const e=this.extractFrameCount_(t);null!==e&&this.appendFrame_(e)}}send(e){this.resetKeepAlive();const t=Yr(e);this.bytesSent+=t.length,this.stats_.incrementCounter("bytes_sent",t.length);const n=gs(t,16384);n.length>1&&this.sendString_(String(n.length));for(let r=0;r{this.mySock&&this.sendString_("0"),this.resetKeepAlive()}),Math.floor(45e3))}sendString_(e){try{this.mySock.send(e)}catch(DE){this.log_("Exception thrown from WebSocket.send():",DE.message||DE.data,"Closing connection."),setTimeout(this.onClosed_.bind(this),0)}}}Bs.responsesRequiredToBeHealthy=2,Bs.healthyTimeout=3e4;class Ws{constructor(e){this.initTransports_(e)}static get ALL_TRANSPORTS(){return[Us,Bs]}static get IS_TRANSPORT_INITIALIZED(){return this.globalTransportInitialized_}initTransports_(e){const t=Bs&&Bs.isAvailable();let n=t&&!Bs.previouslyFailed();if(e.webSocketOnly&&(t||ls("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),n=!0),n)this.transports_=[Bs];else{const e=this.transports_=[];for(const t of Ws.ALL_TRANSPORTS)t&&t.isAvailable()&&e.push(t);Ws.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}}Ws.globalTransportInitialized_=!1;class Hs{constructor(e,t,n,r,i,o,s,a,l,c){this.id=e,this.repoInfo_=t,this.applicationId_=n,this.appCheckToken_=r,this.authToken_=i,this.onMessage_=o,this.onReady_=s,this.onDisconnect_=a,this.onKill_=l,this.lastSessionId=c,this.connectionCount=0,this.pendingDataMessages=[],this.state_=0,this.log_=os("c:"+this.id+":"),this.transportManager_=new Ws(t),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 t=this.connReceiver_(this.conn_),n=this.disconnReceiver_(this.conn_);this.tx_=this.conn_,this.rx_=this.conn_,this.secondaryConn_=null,this.isHealthy_=!1,setTimeout((()=>{this.conn_&&this.conn_.open(t,n)}),Math.floor(0));const r=e.healthyTimeout||0;r>0&&(this.healthyTimeout_=Ss((()=>{this.healthyTimeout_=null,this.isHealthy_||(this.conn_&&this.conn_.bytesReceived>102400?(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>10240?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(r)))}nextTransportId_(){return"c:"+this.id+":"+this.connectionCount++}disconnReceiver_(e){return t=>{e===this.conn_?this.onConnectionLost_(t):e===this.secondaryConn_?(this.log_("Secondary connection lost."),this.onSecondaryConnectionLost_()):this.log_("closing an old connection")}}connReceiver_(e){return t=>{2!==this.state_&&(e===this.rx_?this.onPrimaryMessageReceived_(t):e===this.secondaryConn_?this.onSecondaryMessageReceived_(t):this.log_("message on old connection"))}}sendRequest(e){const t={t:"d",d:e};this.sendData_(t)}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("t"in e){const t=e.t;"a"===t?this.upgradeIfSecondaryHealthy_():"r"===t?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),this.tx_!==this.secondaryConn_&&this.rx_!==this.secondaryConn_||this.close()):"o"===t&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}}onSecondaryMessageReceived_(e){const t=ps("t",e),n=ps("d",e);if("c"===t)this.onSecondaryControl_(n);else{if("d"!==t)throw new Error("Unknown protocol layer: "+t);this.pendingDataMessages.push(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:"p",d:{}}}))}proceedWithUpgrade_(){this.secondaryConn_.start(),this.log_("sending client ack on secondary"),this.secondaryConn_.send({t:"c",d:{t:"a",d:{}}}),this.log_("Ending transmission on primary"),this.conn_.send({t:"c",d:{t:"n",d:{}}}),this.tx_=this.secondaryConn_,this.tryCleanupConnection()}onPrimaryMessageReceived_(e){const t=ps("t",e),n=ps("d",e);"c"===t?this.onControl_(n):"d"===t&&this.onDataMessage_(n)}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 t=ps("t",e);if("d"in e){const n=e.d;if("h"===t){const e=Object.assign({},n);this.repoInfo_.isUsingEmulator&&(e.h=this.repoInfo_.host),this.onHandshake_(e)}else if("n"===t){this.log_("recvd end transmission on primary"),this.rx_=this.secondaryConn_;for(let e=0;e{this.secondaryConn_&&(this.log_("Timed out trying to upgrade."),this.secondaryConn_.close())}),Math.floor(6e4))}onReset_(e){this.log_("Reset packet received. New host: "+e),this.repoInfo_.host=e,1===this.state_?this.close():(this.closeConnections_(),this.start_())}onConnectionEstablished_(e,t){this.log_("Realtime connection established."),this.conn_=e,this.state_=1,this.onReady_&&(this.onReady_(t,this.sessionId),this.onReady_=null),0===this.primaryResponsesRequired_?(this.log_("Primary connection is healthy."),this.isHealthy_=!0):Ss((()=>{this.sendPingOnPrimaryIfNecessary_()}),Math.floor(5e3))}sendPingOnPrimaryIfNecessary_(){this.isHealthy_||1!==this.state_||(this.log_("sending ping on primary."),this.sendData_({t:"c",d:{t:"p",d:{}}}))}onSecondaryConnectionLost_(){const e=this.secondaryConn_;this.secondaryConn_=null,this.tx_!==e&&this.rx_!==e||this.close()}onConnectionLost_(e){this.conn_=null,e||0!==this.state_?1===this.state_&&this.log_("Realtime connection lost."):(this.log_("Realtime connection failed."),this.repoInfo_.isCacheableHost()&&(Yo.remove("host:"+this.repoInfo_.host),this.repoInfo_.internalHost=this.repoInfo_.host)),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(1!==this.state_)throw"Connection is not connected";this.tx_.send(e)}close(){2!==this.state_&&(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)}}class Vs{put(e,t,n,r){}merge(e,t,n,r){}refreshAuthToken(e){}refreshAppCheckToken(e){}onDisconnectPut(e,t,n){}onDisconnectMerge(e,t,n){}onDisconnectCancel(e,t){}reportStats(e){}}class qs{constructor(e){this.allowedEvents_=e,this.listeners_={},Er(Array.isArray(e)&&e.length>0,"Requires a non-empty array")}trigger(e){if(Array.isArray(this.listeners_[e])){const i=[...this.listeners_[e]];for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;rt===e)),"Unknown event: "+e)}}class Ks extends qs{constructor(){super(["online"]),this.online_=!0,"undefined"===typeof window||"undefined"===typeof window.addEventListener||Br()||(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 Ks}getInitialEvent(e){return Er("online"===e,"Unknown event type: "+e),[this.online_]}currentlyOnline(){return this.online_}}class Gs{constructor(e,t){if(void 0===t){this.pieces_=e.split("/");let t=0;for(let e=0;e0&&(this.pieces_[t]=this.pieces_[e],t++);this.pieces_.length=t,this.pieceNum_=0}else this.pieces_=e,this.pieceNum_=t}toString(){let e="";for(let t=this.pieceNum_;t=e.pieces_.length?null:e.pieces_[e.pieceNum_]}function Js(e){return e.pieces_.length-e.pieceNum_}function Xs(e){let t=e.pieceNum_;return t1&&void 0!==arguments[1]?arguments[1]:0;return e.pieces_.slice(e.pieceNum_+t)}function ta(e){if(e.pieceNum_>=e.pieces_.length)return null;const t=[];for(let n=e.pieceNum_;n0&&n.push(e[t])}return new Gs(n,0)}function ra(e){return e.pieceNum_>=e.pieces_.length}function ia(e,t){const n=Qs(e),r=Qs(t);if(null===n)return t;if(n===r)return ia(Xs(e),Xs(t));throw new Error("INTERNAL ERROR: innerPath ("+t+") is not within outerPath ("+e+")")}function oa(e,t){const n=ea(e,0),r=ea(t,0);for(let i=0;iJs(t))return!1;for(;n768)throw new Error(e.errorPrefix_+"has a key path longer than 768 bytes ("+e.byteLength_+").");if(e.parts_.length>32)throw new Error(e.errorPrefix_+"path specified exceeds the maximum depth that can be written (32) or object contains a cycle "+ua(e))}function ua(e){return 0===e.parts_.length?"":"in property '"+e.parts_.join(".")+"'"}class da extends qs{constructor(){let e,t;super(["visible"]),"undefined"!==typeof document&&"undefined"!==typeof document.addEventListener&&("undefined"!==typeof document.hidden?(t="visibilitychange",e="hidden"):"undefined"!==typeof document.mozHidden?(t="mozvisibilitychange",e="mozHidden"):"undefined"!==typeof document.msHidden?(t="msvisibilitychange",e="msHidden"):"undefined"!==typeof document.webkitHidden&&(t="webkitvisibilitychange",e="webkitHidden")),this.visible_=!0,t&&document.addEventListener(t,(()=>{const t=!document[e];t!==this.visible_&&(this.visible_=t,this.trigger("visible",t))}),!1)}static getInstance(){return new da}getInitialEvent(e){return Er("visible"===e,"Unknown event type: "+e),[this.visible_]}}const ha=1e3;class fa extends Vs{constructor(e,t,n,r,i,o,s,a){if(super(),this.repoInfo_=e,this.applicationId_=t,this.onDataUpdate_=n,this.onConnectStatus_=r,this.onServerInfoUpdate_=i,this.authTokenProvider_=o,this.appCheckTokenProvider_=s,this.authOverride_=a,this.id=fa.nextPersistentConnectionId_++,this.log_=os("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_=ha,this.maxReconnectDelay_=3e5,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&&!Hr())throw new Error("Auth override specified in options, but not supported on non Node.js platforms");da.getInstance().on("visible",this.onVisible_,this),-1===e.host.indexOf("fblocal")&&Ks.getInstance().on("online",this.onOnline_,this)}sendRequest(e,t,n){const r=++this.requestNumber_,i={r:r,a:e,b:t};this.log_(Yr(i)),Er(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(i),n&&(this.requestCBHash_[r]=n)}get(e){this.initConnection_();const t=new Ur,n={action:"g",request:{p:e._path.toString(),q:e._queryObject},onComplete:e=>{const n=e.d;"ok"===e.s?t.resolve(n):t.reject(n)}};this.outstandingGets_.push(n),this.outstandingGetCount_++;const r=this.outstandingGets_.length-1;return this.connected_&&this.sendGet_(r),t.promise}listen(e,t,n,r){this.initConnection_();const i=e._queryIdentifier,o=e._path.toString();this.log_("Listen called for "+o+" "+i),this.listens.has(o)||this.listens.set(o,new Map),Er(e._queryParams.isDefault()||!e._queryParams.loadsAllData(),"listen() called for non-default but complete query"),Er(!this.listens.get(o).has(i),"listen() called twice for same path/queryId.");const s={onComplete:r,hashFn:t,query:e,tag:n};this.listens.get(o).set(i,s),this.connected_&&this.sendListen_(s)}sendGet_(e){const t=this.outstandingGets_[e];this.sendRequest("g",t.request,(n=>{delete this.outstandingGets_[e],this.outstandingGetCount_--,0===this.outstandingGetCount_&&(this.outstandingGets_=[]),t.onComplete&&t.onComplete(n)}))}sendListen_(e){const t=e.query,n=t._path.toString(),r=t._queryIdentifier;this.log_("Listen on "+n+" for "+r);const i={p:n};e.tag&&(i.q=t._queryObject,i.t=e.tag),i.h=e.hashFn(),this.sendRequest("q",i,(i=>{const o=i.d,s=i.s;fa.warnOnListenWarnings_(o,t);(this.listens.get(n)&&this.listens.get(n).get(r))===e&&(this.log_("listen response",i),"ok"!==s&&this.removeListen_(n,r),e.onComplete&&e.onComplete(s,o))}))}static warnOnListenWarnings_(e,t){if(e&&"object"===typeof e&&Jr(e,"w")){const n=Xr(e,"w");if(Array.isArray(n)&&~n.indexOf("no_index")){const e='".indexOn": "'+t._queryParams.getIndex().toString()+'"',n=t._path.toString();ls(`Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding ${e} at ${n} 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&&40===e.length||function(e){const t=Qr(e).claims;return"object"===typeof t&&!0===t.admin}(e))&&(this.log_("Admin auth credential detected. Reducing max reconnect time."),this.maxReconnectDelay_=3e4)}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_,t=function(e){const t=Qr(e).claims;return!!t&&"object"===typeof t&&t.hasOwnProperty("iat")}(e)?"auth":"gauth",n={cred:e};null===this.authOverride_?n.noauth=!0:"object"===typeof this.authOverride_&&(n.authvar=this.authOverride_),this.sendRequest(t,n,(t=>{const n=t.s,r=t.d||"error";this.authToken_===e&&("ok"===n?this.invalidAuthTokenCount_=0:this.onAuthRevoked_(n,r))}))}}tryAppCheck(){this.connected_&&this.appCheckToken_&&this.sendRequest("appcheck",{token:this.appCheckToken_},(e=>{const t=e.s,n=e.d||"error";"ok"===t?this.invalidAppCheckTokenCount_=0:this.onAppCheckRevoked_(t,n)}))}unlisten(e,t){const n=e._path.toString(),r=e._queryIdentifier;this.log_("Unlisten called for "+n+" "+r),Er(e._queryParams.isDefault()||!e._queryParams.loadsAllData(),"unlisten() called for non-default but complete query");this.removeListen_(n,r)&&this.connected_&&this.sendUnlisten_(n,r,e._queryObject,t)}sendUnlisten_(e,t,n,r){this.log_("Unlisten on "+e+" for "+t);const i={p:e};r&&(i.q=n,i.t=r),this.sendRequest("n",i)}onDisconnectPut(e,t,n){this.initConnection_(),this.connected_?this.sendOnDisconnect_("o",e,t,n):this.onDisconnectRequestQueue_.push({pathString:e,action:"o",data:t,onComplete:n})}onDisconnectMerge(e,t,n){this.initConnection_(),this.connected_?this.sendOnDisconnect_("om",e,t,n):this.onDisconnectRequestQueue_.push({pathString:e,action:"om",data:t,onComplete:n})}onDisconnectCancel(e,t){this.initConnection_(),this.connected_?this.sendOnDisconnect_("oc",e,null,t):this.onDisconnectRequestQueue_.push({pathString:e,action:"oc",data:null,onComplete:t})}sendOnDisconnect_(e,t,n,r){const i={p:t,d:n};this.log_("onDisconnect "+e,i),this.sendRequest(e,i,(e=>{r&&setTimeout((()=>{r(e.s,e.d)}),Math.floor(0))}))}put(e,t,n,r){this.putInternal("p",e,t,n,r)}merge(e,t,n,r){this.putInternal("m",e,t,n,r)}putInternal(e,t,n,r,i){this.initConnection_();const o={p:t,d:n};void 0!==i&&(o.h=i),this.outstandingPuts_.push({action:e,request:o,onComplete:r}),this.outstandingPutCount_++;const s=this.outstandingPuts_.length-1;this.connected_?this.sendPut_(s):this.log_("Buffering put: "+t)}sendPut_(e){const t=this.outstandingPuts_[e].action,n=this.outstandingPuts_[e].request,r=this.outstandingPuts_[e].onComplete;this.outstandingPuts_[e].queued=this.connected_,this.sendRequest(t,n,(n=>{this.log_(t+" response",n),delete this.outstandingPuts_[e],this.outstandingPutCount_--,0===this.outstandingPutCount_&&(this.outstandingPuts_=[]),r&&r(n.s,n.d)}))}reportStats(e){if(this.connected_){const t={c:e};this.log_("reportStats",t),this.sendRequest("s",t,(e=>{if("ok"!==e.s){const t=e.d;this.log_("reportStats","Error sending stats: "+t)}}))}}onDataMessage_(e){if("r"in e){this.log_("from server: "+Yr(e));const t=e.r,n=this.requestCBHash_[t];n&&(delete this.requestCBHash_[t],n(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,t){this.log_("handleServerMessage",e,t),"d"===e?this.onDataUpdate_(t.p,t.d,!1,t.t):"m"===e?this.onDataUpdate_(t.p,t.d,!0,t.t):"c"===e?this.onListenRevoked_(t.p,t.q):"ac"===e?this.onAuthRevoked_(t.s,t.d):"apc"===e?this.onAppCheckRevoked_(t.s,t.d):"sd"===e?this.onSecurityDebugPacket_(t):ss("Unrecognized action received from server: "+Yr(e)+"\nAre you using the latest client?")}onReady_(e,t){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=(new Date).getTime(),this.handleTimestamp_(e),this.lastSessionId=t,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)}scheduleConnect_(e){Er(!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_=ha,this.realtime_||this.scheduleConnect_(0)),this.visible_=e}onOnline_(e){e?(this.log_("Browser went online."),this.reconnectDelay_=ha,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_()){if(this.visible_){if(this.lastConnectionEstablishedTime_){(new Date).getTime()-this.lastConnectionEstablishedTime_>3e4&&(this.reconnectDelay_=ha),this.lastConnectionEstablishedTime_=null}}else 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 t=Math.max(0,this.reconnectDelay_-e);t=Math.random()*t,this.log_("Trying to reconnect in "+t+"ms"),this.scheduleConnect_(t),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,1.3*this.reconnectDelay_)}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),t=this.onReady_.bind(this),n=this.onRealtimeDisconnect_.bind(this),r=this.id+":"+fa.nextConnectionId_++,i=this.lastSessionId;let o=!1,s=null;const a=function(){s?s.close():(o=!0,n())},l=function(e){Er(s,"sendRequest call when we're not connected not allowed."),s.sendRequest(e)};this.realtime_={close:a,sendRequest:l};const c=this.forceTokenRefresh_;this.forceTokenRefresh_=!1;try{const[a,l]=await Promise.all([this.authTokenProvider_.getToken(c),this.appCheckTokenProvider_.getToken(c)]);o?is("getToken() completed but was canceled"):(is("getToken() completed. Creating connection."),this.authToken_=a&&a.accessToken,this.appCheckToken_=l&&l.token,s=new Hs(r,this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,e,t,n,(e=>{ls(e+" ("+this.repoInfo_.toString()+")"),this.interrupt("server_kill")}),i))}catch(ss){this.log_("Failed to get token: "+ss),o||(this.repoInfo_.nodeAdmin&&ls(ss),a())}}}interrupt(e){is("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){is("Resuming connection for reason: "+e),delete this.interruptReasons_[e],Zr(this.interruptReasons_)&&(this.reconnectDelay_=ha,this.realtime_||this.scheduleConnect_(0))}handleTimestamp_(e){const t=e-(new Date).getTime();this.onServerInfoUpdate_({serverTimeOffset:t})}cancelSentTransactions_(){for(let e=0;ems(e))).join("$"):"default";const r=this.removeListen_(e,n);r&&r.onComplete&&r.onComplete("permission_denied")}removeListen_(e,t){const n=new Gs(e).toString();let r;if(this.listens.has(n)){const e=this.listens.get(n);r=e.get(t),e.delete(t),0===e.size&&this.listens.delete(n)}else r=void 0;return r}onAuthRevoked_(e,t){is("Auth token revoked: "+e+"/"+t),this.authToken_=null,this.forceTokenRefresh_=!0,this.realtime_.close(),"invalid_token"!==e&&"permission_denied"!==e||(this.invalidAuthTokenCount_++,this.invalidAuthTokenCount_>=3&&(this.reconnectDelay_=3e4,this.authTokenProvider_.notifyForInvalidToken()))}onAppCheckRevoked_(e,t){is("App check token revoked: "+e+"/"+t),this.appCheckToken_=null,this.forceTokenRefresh_=!0,"invalid_token"!==e&&"permission_denied"!==e||(this.invalidAppCheckTokenCount_++,this.invalidAppCheckTokenCount_>=3&&this.appCheckTokenProvider_.notifyForInvalidToken())}onSecurityDebugPacket_(e){this.securityDebugCallback_?this.securityDebugCallback_(e):"msg"in e&&console.log("FIREBASE: "+e.msg.replace("\n","\nFIREBASE: "))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of this.listens.values())for(const t of e.values())this.sendListen_(t);for(let e=0;e4&&void 0!==arguments[4]?arguments[4]:null;this.isReverse_=r,this.resultGenerator_=i,this.nodeStack_=[];let o=1;for(;!e.isEmpty();)if(o=t?n(e.key,t):1,r&&(o*=-1),o<0)e=this.isReverse_?e.left:e.right;else{if(0===o){this.nodeStack_.push(e);break}this.nodeStack_.push(e),e=this.isReverse_?e.right:e.left}}getNext(){if(0===this.nodeStack_.length)return null;let e,t=this.nodeStack_.pop();if(e=this.resultGenerator_?this.resultGenerator_(t.key,t.value):{key:t.key,value:t.value},this.isReverse_)for(t=t.left;!t.isEmpty();)this.nodeStack_.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.nodeStack_.push(t),t=t.left;return e}hasNext(){return this.nodeStack_.length>0}peek(){if(0===this.nodeStack_.length)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 ba{constructor(e,t,n,r,i){this.key=e,this.value=t,this.color=null!=n?n:ba.RED,this.left=null!=r?r:wa.EMPTY_NODE,this.right=null!=i?i:wa.EMPTY_NODE}copy(e,t,n,r,i){return new ba(null!=e?e:this.key,null!=t?t:this.value,null!=n?n:this.color,null!=r?r:this.left,null!=i?i: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,t,n){let r=this;const i=n(e,r.key);return r=i<0?r.copy(null,null,null,r.left.insert(e,t,n),null):0===i?r.copy(null,t,null,null,null):r.copy(null,null,null,null,r.right.insert(e,t,n)),r.fixUp_()}removeMin_(){if(this.left.isEmpty())return wa.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,t){let n,r;if(n=this,t(e,n.key)<0)n.left.isEmpty()||n.left.isRed_()||n.left.left.isRed_()||(n=n.moveRedLeft_()),n=n.copy(null,null,null,n.left.remove(e,t),null);else{if(n.left.isRed_()&&(n=n.rotateRight_()),n.right.isEmpty()||n.right.isRed_()||n.right.left.isRed_()||(n=n.moveRedRight_()),0===t(e,n.key)){if(n.right.isEmpty())return wa.EMPTY_NODE;r=n.right.min_(),n=n.copy(r.key,r.value,null,null,n.right.removeMin_())}n=n.copy(null,null,null,null,n.right.remove(e,t))}return n.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,ba.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight_(){const e=this.copy(null,null,ba.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),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)}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)}}ba.RED=!0,ba.BLACK=!1;class wa{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:wa.EMPTY_NODE;this.comparator_=e,this.root_=t}insert(e,t){return new wa(this.comparator_,this.root_.insert(e,t,this.comparator_).copy(null,null,ba.BLACK,null,null))}remove(e){return new wa(this.comparator_,this.root_.remove(e,this.comparator_).copy(null,null,ba.BLACK,null,null))}get(e){let t,n=this.root_;for(;!n.isEmpty();){if(t=this.comparator_(e,n.key),0===t)return n.value;t<0?n=n.left:t>0&&(n=n.right)}return null}getPredecessorKey(e){let t,n=this.root_,r=null;for(;!n.isEmpty();){if(t=this.comparator_(e,n.key),0===t){if(n.left.isEmpty())return r?r.key:null;for(n=n.left;!n.right.isEmpty();)n=n.right;return n.key}t<0?n=n.left:t>0&&(r=n,n=n.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 _a(this.root_,null,this.comparator_,!1,e)}getIteratorFrom(e,t){return new _a(this.root_,e,this.comparator_,!1,t)}getReverseIteratorFrom(e,t){return new _a(this.root_,e,this.comparator_,!0,t)}getReverseIterator(e){return new _a(this.root_,null,this.comparator_,!0,e)}}function Sa(e,t){return hs(e.name,t.name)}function Ea(e,t){return hs(e,t)}let Ca;wa.EMPTY_NODE=new class{copy(e,t,n,r,i){return this}insert(e,t,n){return new ba(e,t,null)}remove(e,t){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}};const ka=function(e){return"number"===typeof e?"number:"+vs(e):"string:"+e},xa=function(e){if(e.isLeafNode()){const t=e.val();Er("string"===typeof t||"number"===typeof t||"object"===typeof t&&Jr(t,".sv"),"Priority must be a string or number.")}else Er(e===Ca||e.isEmpty(),"priority of unexpected type.");Er(e===Ca||e.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")};let Ta,Ia,Pa;class Aa{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Aa.__childrenNodeConstructor.EMPTY_NODE;this.value_=e,this.priorityNode_=t,this.lazyHash_=null,Er(void 0!==this.value_&&null!==this.value_,"LeafNode shouldn't be created with null/undefined value."),xa(this.priorityNode_)}static set __childrenNodeConstructor(e){Ta=e}static get __childrenNodeConstructor(){return Ta}isLeafNode(){return!0}getPriority(){return this.priorityNode_}updatePriority(e){return new Aa(this.value_,e)}getImmediateChild(e){return".priority"===e?this.priorityNode_:Aa.__childrenNodeConstructor.EMPTY_NODE}getChild(e){return ra(e)?this:".priority"===Qs(e)?this.priorityNode_:Aa.__childrenNodeConstructor.EMPTY_NODE}hasChild(){return!1}getPredecessorChildName(e,t){return null}updateImmediateChild(e,t){return".priority"===e?this.updatePriority(t):t.isEmpty()&&".priority"!==e?this:Aa.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(e,t).updatePriority(this.priorityNode_)}updateChild(e,t){const n=Qs(e);return null===n?t:t.isEmpty()&&".priority"!==n?this:(Er(".priority"!==n||1===Js(e),".priority must be the last token in a path"),this.updateImmediateChild(n,Aa.__childrenNodeConstructor.EMPTY_NODE.updateChild(Xs(e),t)))}isEmpty(){return!1}numChildren(){return 0}forEachChild(e,t){return!1}val(e){return e&&!this.getPriority().isEmpty()?{".value":this.getValue(),".priority":this.getPriority().val()}:this.getValue()}hash(){if(null===this.lazyHash_){let e="";this.priorityNode_.isEmpty()||(e+="priority:"+ka(this.priorityNode_.val())+":");const t=typeof this.value_;e+=t+":",e+="number"===t?vs(this.value_):this.value_,this.lazyHash_=Zo(e)}return this.lazyHash_}getValue(){return this.value_}compareTo(e){return e===Aa.__childrenNodeConstructor.EMPTY_NODE?1:e instanceof Aa.__childrenNodeConstructor?-1:(Er(e.isLeafNode(),"Unknown node type"),this.compareToLeafNode_(e))}compareToLeafNode_(e){const t=typeof e.value_,n=typeof this.value_,r=Aa.VALUE_TYPE_ORDER.indexOf(t),i=Aa.VALUE_TYPE_ORDER.indexOf(n);return Er(r>=0,"Unknown leaf type: "+t),Er(i>=0,"Unknown leaf type: "+n),r===i?"object"===n?0:this.value_{const i=Xr(this.indexSet_,r);if(Er(i,"Missing index implementation for "+r),n===Ma){if(i.isDefinedOn(e.node)){const n=[],r=t.getIterator(pa.Wrap);let o=r.getNext();for(;o;)o.name!==e.name&&n.push(o),o=r.getNext();return n.push(e),Da(n,i.getCompare())}return Ma}{const r=t.get(e.name);let i=n;return r&&(i=i.remove(new pa(e.name,r))),i.insert(e,e.node)}}));return new Fa(n,this.indexSet_)}removeFromIndexes(e,t){const n=ei(this.indexes_,(n=>{if(n===Ma)return n;{const r=t.get(e.name);return r?n.remove(new pa(e.name,r)):n}}));return new Fa(n,this.indexSet_)}}let ja;class Ua{constructor(e,t,n){this.children_=e,this.priorityNode_=t,this.indexMap_=n,this.lazyHash_=null,this.priorityNode_&&xa(this.priorityNode_),this.children_.isEmpty()&&Er(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}static get EMPTY_NODE(){return ja||(ja=new Ua(new wa(Ea),null,Fa.Default))}isLeafNode(){return!1}getPriority(){return this.priorityNode_||ja}updatePriority(e){return this.children_.isEmpty()?this:new Ua(this.children_,e,this.indexMap_)}getImmediateChild(e){if(".priority"===e)return this.getPriority();{const t=this.children_.get(e);return null===t?ja:t}}getChild(e){const t=Qs(e);return null===t?this:this.getImmediateChild(t).getChild(Xs(e))}hasChild(e){return null!==this.children_.get(e)}updateImmediateChild(e,t){if(Er(t,"We should always be passing snapshot nodes"),".priority"===e)return this.updatePriority(t);{const n=new pa(e,t);let r,i;t.isEmpty()?(r=this.children_.remove(e),i=this.indexMap_.removeFromIndexes(n,this.children_)):(r=this.children_.insert(e,t),i=this.indexMap_.addToIndexes(n,this.children_));const o=r.isEmpty()?ja:this.priorityNode_;return new Ua(r,o,i)}}updateChild(e,t){const n=Qs(e);if(null===n)return t;{Er(".priority"!==Qs(e)||1===Js(e),".priority must be the last token in a path");const r=this.getImmediateChild(n).updateChild(Xs(e),t);return this.updateImmediateChild(n,r)}}isEmpty(){return this.children_.isEmpty()}numChildren(){return this.children_.count()}val(e){if(this.isEmpty())return null;const t={};let n=0,r=0,i=!0;if(this.forEachChild(Ra,((o,s)=>{t[o]=s.val(e),n++,i&&Ua.INTEGER_REGEXP_.test(o)?r=Math.max(r,Number(o)):i=!1})),!e&&i&&r<2*n){const e=[];for(const n in t)e[n]=t[n];return e}return e&&!this.getPriority().isEmpty()&&(t[".priority"]=this.getPriority().val()),t}hash(){if(null===this.lazyHash_){let e="";this.getPriority().isEmpty()||(e+="priority:"+ka(this.getPriority().val())+":"),this.forEachChild(Ra,((t,n)=>{const r=n.hash();""!==r&&(e+=":"+t+":"+r)})),this.lazyHash_=""===e?"":Zo(e)}return this.lazyHash_}getPredecessorChildName(e,t,n){const r=this.resolveIndex_(n);if(r){const n=r.getPredecessorKey(new pa(e,t));return n?n.name:null}return this.children_.getPredecessorKey(e)}getFirstChildName(e){const t=this.resolveIndex_(e);if(t){const e=t.minKey();return e&&e.name}return this.children_.minKey()}getFirstChild(e){const t=this.getFirstChildName(e);return t?new pa(t,this.children_.get(t)):null}getLastChildName(e){const t=this.resolveIndex_(e);if(t){const e=t.maxKey();return e&&e.name}return this.children_.maxKey()}getLastChild(e){const t=this.getLastChildName(e);return t?new pa(t,this.children_.get(t)):null}forEachChild(e,t){const n=this.resolveIndex_(e);return n?n.inorderTraversal((e=>t(e.name,e.node))):this.children_.inorderTraversal(t)}getIterator(e){return this.getIteratorFrom(e.minPost(),e)}getIteratorFrom(e,t){const n=this.resolveIndex_(t);if(n)return n.getIteratorFrom(e,(e=>e));{const n=this.children_.getIteratorFrom(e.name,pa.Wrap);let r=n.peek();for(;null!=r&&t.compare(r,e)<0;)n.getNext(),r=n.peek();return n}}getReverseIterator(e){return this.getReverseIteratorFrom(e.maxPost(),e)}getReverseIteratorFrom(e,t){const n=this.resolveIndex_(t);if(n)return n.getReverseIteratorFrom(e,(e=>e));{const n=this.children_.getReverseIteratorFrom(e.name,pa.Wrap);let r=n.peek();for(;null!=r&&t.compare(r,e)>0;)n.getNext(),r=n.peek();return n}}compareTo(e){return this.isEmpty()?e.isEmpty()?0:-1:e.isLeafNode()||e.isEmpty()?1:e===$a?-1:0}withIndex(e){if(e===va||this.indexMap_.hasIndex(e))return this;{const t=this.indexMap_.addIndex(e,this.children_);return new Ua(this.children_,this.priorityNode_,t)}}isIndexed(e){return e===va||this.indexMap_.hasIndex(e)}equals(e){if(e===this)return!0;if(e.isLeafNode())return!1;{const t=e;if(this.getPriority().equals(t.getPriority())){if(this.children_.count()===t.children_.count()){const e=this.getIterator(Ra),n=t.getIterator(Ra);let r=e.getNext(),i=n.getNext();for(;r&&i;){if(r.name!==i.name||!r.node.equals(i.node))return!1;r=e.getNext(),i=n.getNext()}return null===r&&null===i}return!1}return!1}}resolveIndex_(e){return e===va?null:this.indexMap_.get(e.toString())}}Ua.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/;const $a=new class extends Ua{constructor(){super(new wa(Ea),Ua.EMPTY_NODE,Fa.Default)}compareTo(e){return e===this?0:1}equals(e){return e===this}getPriority(){return this}getImmediateChild(e){return Ua.EMPTY_NODE}isEmpty(){return!1}};Object.defineProperties(pa,{MIN:{value:new pa(us,Ua.EMPTY_NODE)},MAX:{value:new pa(ds,$a)}}),ya.__EMPTY_NODE=Ua.EMPTY_NODE,Aa.__childrenNodeConstructor=Ua,Ca=$a,function(e){Pa=e}($a);function za(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(null===e)return Ua.EMPTY_NODE;if("object"===typeof e&&".priority"in e&&(t=e[".priority"]),Er(null===t||"string"===typeof t||"number"===typeof t||"object"===typeof t&&".sv"in t,"Invalid priority type found: "+typeof t),"object"===typeof e&&".value"in e&&null!==e[".value"]&&(e=e[".value"]),"object"!==typeof e||".sv"in e){return new Aa(e,za(t))}if(e instanceof Array){let n=Ua.EMPTY_NODE;return ys(e,((t,r)=>{if(Jr(e,t)&&"."!==t.substring(0,1)){const e=za(r);!e.isLeafNode()&&e.isEmpty()||(n=n.updateImmediateChild(t,e))}})),n.updatePriority(za(t))}{const n=[];let r=!1;if(ys(e,((e,t)=>{if("."!==e.substring(0,1)){const i=za(t);i.isEmpty()||(r=r||!i.getPriority().isEmpty(),n.push(new pa(e,i)))}})),0===n.length)return Ua.EMPTY_NODE;const i=Da(n,Sa,(e=>e.name),Ea);if(r){const e=Da(n,Ra.getCompare());return new Ua(i,za(t),new Fa({".priority":e},{".priority":Ra}))}return new Ua(i,za(t),Fa.Default)}}!function(e){Ia=e}(za);class Ba extends ma{constructor(e){super(),this.indexPath_=e,Er(!ra(e)&&".priority"!==Qs(e),"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,t){const n=this.extractChild(e.node),r=this.extractChild(t.node),i=n.compareTo(r);return 0===i?hs(e.name,t.name):i}makePost(e,t){const n=za(e),r=Ua.EMPTY_NODE.updateChild(this.indexPath_,n);return new pa(t,r)}maxPost(){const e=Ua.EMPTY_NODE.updateChild(this.indexPath_,$a);return new pa(ds,e)}toString(){return ea(this.indexPath_,0).join("/")}}const Wa=new class extends ma{compare(e,t){const n=e.node.compareTo(t.node);return 0===n?hs(e.name,t.name):n}isDefinedOn(e){return!0}indexedValueChanged(e,t){return!e.equals(t)}minPost(){return pa.MIN}maxPost(){return pa.MAX}makePost(e,t){const n=za(e);return new pa(t,n)}toString(){return".value"}};function Ha(e){return{type:"value",snapshotNode:e}}function Va(e,t){return{type:"child_added",snapshotNode:t,childName:e}}function qa(e,t){return{type:"child_removed",snapshotNode:t,childName:e}}function Ka(e,t,n){return{type:"child_changed",snapshotNode:t,childName:e,oldSnap:n}}class Ga{constructor(e){this.index_=e}updateChild(e,t,n,r,i,o){Er(e.isIndexed(this.index_),"A node must be indexed if only a child is updated");const s=e.getImmediateChild(t);return s.getChild(r).equals(n.getChild(r))&&s.isEmpty()===n.isEmpty()?e:(null!=o&&(n.isEmpty()?e.hasChild(t)?o.trackChildChange(qa(t,s)):Er(e.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):s.isEmpty()?o.trackChildChange(Va(t,n)):o.trackChildChange(Ka(t,n,s))),e.isLeafNode()&&n.isEmpty()?e:e.updateImmediateChild(t,n).withIndex(this.index_))}updateFullNode(e,t,n){return null!=n&&(e.isLeafNode()||e.forEachChild(Ra,((e,r)=>{t.hasChild(e)||n.trackChildChange(qa(e,r))})),t.isLeafNode()||t.forEachChild(Ra,((t,r)=>{if(e.hasChild(t)){const i=e.getImmediateChild(t);i.equals(r)||n.trackChildChange(Ka(t,r,i))}else n.trackChildChange(Va(t,r))}))),t.withIndex(this.index_)}updatePriority(e,t){return e.isEmpty()?Ua.EMPTY_NODE:e.updatePriority(t)}filtersNodes(){return!1}getIndexedFilter(){return this}getIndex(){return this.index_}}class Ya{constructor(e){this.indexedFilter_=new Ga(e.getIndex()),this.index_=e.getIndex(),this.startPost_=Ya.getStartPost_(e),this.endPost_=Ya.getEndPost_(e),this.startIsInclusive_=!e.startAfterSet_,this.endIsInclusive_=!e.endBeforeSet_}getStartPost(){return this.startPost_}getEndPost(){return this.endPost_}matches(e){const t=this.startIsInclusive_?this.index_.compare(this.getStartPost(),e)<=0:this.index_.compare(this.getStartPost(),e)<0,n=this.endIsInclusive_?this.index_.compare(e,this.getEndPost())<=0:this.index_.compare(e,this.getEndPost())<0;return t&&n}updateChild(e,t,n,r,i,o){return this.matches(new pa(t,n))||(n=Ua.EMPTY_NODE),this.indexedFilter_.updateChild(e,t,n,r,i,o)}updateFullNode(e,t,n){t.isLeafNode()&&(t=Ua.EMPTY_NODE);let r=t.withIndex(this.index_);r=r.updatePriority(Ua.EMPTY_NODE);const i=this;return t.forEachChild(Ra,((e,t)=>{i.matches(new pa(e,t))||(r=r.updateImmediateChild(e,Ua.EMPTY_NODE))})),this.indexedFilter_.updateFullNode(e,r,n)}updatePriority(e,t){return e}filtersNodes(){return!0}getIndexedFilter(){return this.indexedFilter_}getIndex(){return this.index_}static getStartPost_(e){if(e.hasStart()){const t=e.getIndexStartName();return e.getIndex().makePost(e.getIndexStartValue(),t)}return e.getIndex().minPost()}static getEndPost_(e){if(e.hasEnd()){const t=e.getIndexEndName();return e.getIndex().makePost(e.getIndexEndValue(),t)}return e.getIndex().maxPost()}}class Qa{constructor(e){this.withinDirectionalStart=e=>this.reverse_?this.withinEndPost(e):this.withinStartPost(e),this.withinDirectionalEnd=e=>this.reverse_?this.withinStartPost(e):this.withinEndPost(e),this.withinStartPost=e=>{const t=this.index_.compare(this.rangedFilter_.getStartPost(),e);return this.startIsInclusive_?t<=0:t<0},this.withinEndPost=e=>{const t=this.index_.compare(e,this.rangedFilter_.getEndPost());return this.endIsInclusive_?t<=0:t<0},this.rangedFilter_=new Ya(e),this.index_=e.getIndex(),this.limit_=e.getLimit(),this.reverse_=!e.isViewFromLeft(),this.startIsInclusive_=!e.startAfterSet_,this.endIsInclusive_=!e.endBeforeSet_}updateChild(e,t,n,r,i,o){return this.rangedFilter_.matches(new pa(t,n))||(n=Ua.EMPTY_NODE),e.getImmediateChild(t).equals(n)?e:e.numChildren()e(n,t)}else o=this.index_.getCompare();const s=e;Er(s.numChildren()===this.limit_,"");const a=new pa(t,n),l=this.reverse_?s.getFirstChild(this.index_):s.getLastChild(this.index_),c=this.rangedFilter_.matches(a);if(s.hasChild(t)){const e=s.getImmediateChild(t);let u=r.getChildAfterChild(this.index_,l,this.reverse_);for(;null!=u&&(u.name===t||s.hasChild(u.name));)u=r.getChildAfterChild(this.index_,u,this.reverse_);const d=null==u?1:o(u,a);if(c&&!n.isEmpty()&&d>=0)return null!=i&&i.trackChildChange(Ka(t,n,e)),s.updateImmediateChild(t,n);{null!=i&&i.trackChildChange(qa(t,e));const n=s.updateImmediateChild(t,Ua.EMPTY_NODE);return null!=u&&this.rangedFilter_.matches(u)?(null!=i&&i.trackChildChange(Va(u.name,u.node)),n.updateImmediateChild(u.name,u.node)):n}}return n.isEmpty()?e:c&&o(l,a)>=0?(null!=i&&(i.trackChildChange(qa(l.name,l.node)),i.trackChildChange(Va(t,n))),s.updateImmediateChild(t,n).updateImmediateChild(l.name,Ua.EMPTY_NODE)):e}}class Ja{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_=Ra}hasStart(){return this.startSet_}isViewFromLeft(){return""===this.viewFrom_?this.startSet_:"l"===this.viewFrom_}getIndexStartValue(){return Er(this.startSet_,"Only valid if start has been set"),this.indexStartValue_}getIndexStartName(){return Er(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:us}hasEnd(){return this.endSet_}getIndexEndValue(){return Er(this.endSet_,"Only valid if end has been set"),this.indexEndValue_}getIndexEndName(){return Er(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:ds}hasLimit(){return this.limitSet_}hasAnchoredLimit(){return this.limitSet_&&""!==this.viewFrom_}getLimit(){return Er(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_===Ra}copy(){const e=new Ja;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 Xa(e){const t={};if(e.isDefault())return t;let n;if(e.index_===Ra?n="$priority":e.index_===Wa?n="$value":e.index_===va?n="$key":(Er(e.index_ instanceof Ba,"Unrecognized index type!"),n=e.index_.toString()),t.orderBy=Yr(n),e.startSet_){const n=e.startAfterSet_?"startAfter":"startAt";t[n]=Yr(e.indexStartValue_),e.startNameSet_&&(t[n]+=","+Yr(e.indexStartName_))}if(e.endSet_){const n=e.endBeforeSet_?"endBefore":"endAt";t[n]=Yr(e.indexEndValue_),e.endNameSet_&&(t[n]+=","+Yr(e.indexEndName_))}return e.limitSet_&&(e.isViewFromLeft()?t.limitToFirst=e.limit_:t.limitToLast=e.limit_),t}function Za(e){const t={};if(e.startSet_&&(t.sp=e.indexStartValue_,e.startNameSet_&&(t.sn=e.indexStartName_),t.sin=!e.startAfterSet_),e.endSet_&&(t.ep=e.indexEndValue_,e.endNameSet_&&(t.en=e.indexEndName_),t.ein=!e.endBeforeSet_),e.limitSet_){t.l=e.limit_;let n=e.viewFrom_;""===n&&(n=e.isViewFromLeft()?"l":"r"),t.vf=n}return e.index_!==Ra&&(t.i=e.index_.toString()),t}class el extends Vs{constructor(e,t,n,r){super(),this.repoInfo_=e,this.onDataUpdate_=t,this.authTokenProvider_=n,this.appCheckTokenProvider_=r,this.log_=os("p:rest:"),this.listens_={}}reportStats(e){throw new Error("Method not implemented.")}static getListenId_(e,t){return void 0!==t?"tag$"+t:(Er(e._queryParams.isDefault(),"should have a tag if it's not a default query."),e._path.toString())}listen(e,t,n,r){const i=e._path.toString();this.log_("Listen called for "+i+" "+e._queryIdentifier);const o=el.getListenId_(e,n),s={};this.listens_[o]=s;const a=Xa(e._queryParams);this.restRequest_(i+".json",a,((e,t)=>{let a=t;if(404===e&&(a=null,e=null),null===e&&this.onDataUpdate_(i,a,!1,n),Xr(this.listens_,o)===s){let t;t=e?401===e?"permission_denied":"rest_error:"+e:"ok",r(t,null)}}))}unlisten(e,t){const n=el.getListenId_(e,t);delete this.listens_[n]}get(e){const t=Xa(e._queryParams),n=e._path.toString(),r=new Ur;return this.restRequest_(n+".json",t,((e,t)=>{let i=t;404===e&&(i=null,e=null),null===e?(this.onDataUpdate_(n,i,!1,null),r.resolve(i)):r.reject(new Error(i))})),r.promise}refreshAuthToken(e){}restRequest_(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return t.format="export",Promise.all([this.authTokenProvider_.getToken(!1),this.appCheckTokenProvider_.getToken(!1)]).then((r=>{let[i,o]=r;i&&i.accessToken&&(t.auth=i.accessToken),o&&o.token&&(t.ac=o.token);const s=(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host+e+"?ns="+this.repoInfo_.namespace+ri(t);this.log_("Sending REST request for "+s);const a=new XMLHttpRequest;a.onreadystatechange=()=>{if(n&&4===a.readyState){this.log_("REST Response for "+s+" received. status:",a.status,"response:",a.responseText);let e=null;if(a.status>=200&&a.status<300){try{e=Gr(a.responseText)}catch(DE){ls("Failed to parse JSON response for "+s+": "+a.responseText)}n(null,e)}else 401!==a.status&&404!==a.status&&ls("Got unsuccessful REST response for "+s+" Status: "+a.status),n(a.status);n=null}},a.open("GET",s,!0),a.send()}))}}class tl{constructor(){this.rootNode_=Ua.EMPTY_NODE}getNode(e){return this.rootNode_.getChild(e)}updateSnapshot(e,t){this.rootNode_=this.rootNode_.updateChild(e,t)}}function nl(){return{value:null,children:new Map}}function rl(e,t,n){if(ra(t))e.value=n,e.children.clear();else if(null!==e.value)e.value=e.value.updateChild(t,n);else{const r=Qs(t);e.children.has(r)||e.children.set(r,nl());rl(e.children.get(r),t=Xs(t),n)}}function il(e,t,n){null!==e.value?n(t,e.value):function(e,t){e.children.forEach(((e,n)=>{t(n,e)}))}(e,((e,r)=>{il(r,new Gs(t.toString()+"/"+e),n)}))}class ol{constructor(e){this.collection_=e,this.last_=null}get(){const e=this.collection_.get(),t=Object.assign({},e);return this.last_&&ys(this.last_,((e,n)=>{t[e]=t[e]-n})),this.last_=e,t}}class sl{constructor(e,t){this.server_=t,this.statsToReport_={},this.statsListener_=new ol(e);const n=1e4+2e4*Math.random();Ss(this.reportStats_.bind(this),Math.floor(n))}reportStats_(){const e=this.statsListener_.get(),t={};let n=!1;ys(e,((e,r)=>{r>0&&Jr(this.statsToReport_,e)&&(t[e]=r,n=!0)})),n&&this.server_.reportStats(t),Ss(this.reportStats_.bind(this),Math.floor(2*Math.random()*3e5))}}var al;function ll(e){return{fromUser:!1,fromServer:!0,queryId:e,tagged:!0}}!function(e){e[e.OVERWRITE=0]="OVERWRITE",e[e.MERGE=1]="MERGE",e[e.ACK_USER_WRITE=2]="ACK_USER_WRITE",e[e.LISTEN_COMPLETE=3]="LISTEN_COMPLETE"}(al||(al={}));class cl{constructor(e,t,n){this.path=e,this.affectedTree=t,this.revert=n,this.type=al.ACK_USER_WRITE,this.source={fromUser:!0,fromServer:!1,queryId:null,tagged:!1}}operationForChild(e){if(ra(this.path)){if(null!=this.affectedTree.value)return Er(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;{const t=this.affectedTree.subtree(new Gs(e));return new cl(Ys(),t,this.revert)}}return Er(Qs(this.path)===e,"operationForChild called for unrelated child."),new cl(Xs(this.path),this.affectedTree,this.revert)}}class ul{constructor(e,t){this.source=e,this.path=t,this.type=al.LISTEN_COMPLETE}operationForChild(e){return ra(this.path)?new ul(this.source,Ys()):new ul(this.source,Xs(this.path))}}class dl{constructor(e,t,n){this.source=e,this.path=t,this.snap=n,this.type=al.OVERWRITE}operationForChild(e){return ra(this.path)?new dl(this.source,Ys(),this.snap.getImmediateChild(e)):new dl(this.source,Xs(this.path),this.snap)}}class hl{constructor(e,t,n){this.source=e,this.path=t,this.children=n,this.type=al.MERGE}operationForChild(e){if(ra(this.path)){const t=this.children.subtree(new Gs(e));return t.isEmpty()?null:t.value?new dl(this.source,Ys(),t.value):new hl(this.source,Ys(),t)}return Er(Qs(this.path)===e,"Can't get a merge for a child not on the path of the operation"),new hl(this.source,Xs(this.path),this.children)}toString(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"}}class fl{constructor(e,t,n){this.node_=e,this.fullyInitialized_=t,this.filtered_=n}isFullyInitialized(){return this.fullyInitialized_}isFiltered(){return this.filtered_}isCompleteForPath(e){if(ra(e))return this.isFullyInitialized()&&!this.filtered_;const t=Qs(e);return this.isCompleteForChild(t)}isCompleteForChild(e){return this.isFullyInitialized()&&!this.filtered_||this.node_.hasChild(e)}getNode(){return this.node_}}class pl{constructor(e){this.query_=e,this.index_=this.query_._queryParams.getIndex()}}function ml(e,t,n,r,i,o){const s=r.filter((e=>e.type===n));s.sort(((t,n)=>function(e,t,n){if(null==t.childName||null==n.childName)throw Cr("Should only compare child_ events.");const r=new pa(t.childName,t.snapshotNode),i=new pa(n.childName,n.snapshotNode);return e.index_.compare(r,i)}(e,t,n))),s.forEach((n=>{const r=function(e,t,n){return"value"===t.type||"child_removed"===t.type||(t.prevName=n.getPredecessorChildName(t.childName,t.snapshotNode,e.index_)),t}(e,n,o);i.forEach((i=>{i.respondsTo(n.type)&&t.push(i.createEvent(r,e.query_))}))}))}function gl(e,t){return{eventCache:e,serverCache:t}}function yl(e,t,n,r){return gl(new fl(t,n,r),e.serverCache)}function vl(e,t,n,r){return gl(e.eventCache,new fl(t,n,r))}function _l(e){return e.eventCache.isFullyInitialized()?e.eventCache.getNode():null}function bl(e){return e.serverCache.isFullyInitialized()?e.serverCache.getNode():null}let wl;class Sl{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(wl||(wl=new wa(fs)),wl);this.value=e,this.children=t}static fromObject(e){let t=new Sl(null);return ys(e,((e,n)=>{t=t.set(new Gs(e),n)})),t}isEmpty(){return null===this.value&&this.children.isEmpty()}findRootMostMatchingPathAndValue(e,t){if(null!=this.value&&t(this.value))return{path:Ys(),value:this.value};if(ra(e))return null;{const n=Qs(e),r=this.children.get(n);if(null!==r){const i=r.findRootMostMatchingPathAndValue(Xs(e),t);if(null!=i){return{path:na(new Gs(n),i.path),value:i.value}}return null}return null}}findRootMostValueAndPath(e){return this.findRootMostMatchingPathAndValue(e,(()=>!0))}subtree(e){if(ra(e))return this;{const t=Qs(e),n=this.children.get(t);return null!==n?n.subtree(Xs(e)):new Sl(null)}}set(e,t){if(ra(e))return new Sl(t,this.children);{const n=Qs(e),r=(this.children.get(n)||new Sl(null)).set(Xs(e),t),i=this.children.insert(n,r);return new Sl(this.value,i)}}remove(e){if(ra(e))return this.children.isEmpty()?new Sl(null):new Sl(null,this.children);{const t=Qs(e),n=this.children.get(t);if(n){const r=n.remove(Xs(e));let i;return i=r.isEmpty()?this.children.remove(t):this.children.insert(t,r),null===this.value&&i.isEmpty()?new Sl(null):new Sl(this.value,i)}return this}}get(e){if(ra(e))return this.value;{const t=Qs(e),n=this.children.get(t);return n?n.get(Xs(e)):null}}setTree(e,t){if(ra(e))return t;{const n=Qs(e),r=(this.children.get(n)||new Sl(null)).setTree(Xs(e),t);let i;return i=r.isEmpty()?this.children.remove(n):this.children.insert(n,r),new Sl(this.value,i)}}fold(e){return this.fold_(Ys(),e)}fold_(e,t){const n={};return this.children.inorderTraversal(((r,i)=>{n[r]=i.fold_(na(e,r),t)})),t(e,this.value,n)}findOnPath(e,t){return this.findOnPath_(e,Ys(),t)}findOnPath_(e,t,n){const r=!!this.value&&n(t,this.value);if(r)return r;if(ra(e))return null;{const r=Qs(e),i=this.children.get(r);return i?i.findOnPath_(Xs(e),na(t,r),n):null}}foreachOnPath(e,t){return this.foreachOnPath_(e,Ys(),t)}foreachOnPath_(e,t,n){if(ra(e))return this;{this.value&&n(t,this.value);const r=Qs(e),i=this.children.get(r);return i?i.foreachOnPath_(Xs(e),na(t,r),n):new Sl(null)}}foreach(e){this.foreach_(Ys(),e)}foreach_(e,t){this.children.inorderTraversal(((n,r)=>{r.foreach_(na(e,n),t)})),this.value&&t(e,this.value)}foreachChild(e){this.children.inorderTraversal(((t,n)=>{n.value&&e(t,n.value)}))}}class El{constructor(e){this.writeTree_=e}static empty(){return new El(new Sl(null))}}function Cl(e,t,n){if(ra(t))return new El(new Sl(n));{const r=e.writeTree_.findRootMostValueAndPath(t);if(null!=r){const i=r.path;let o=r.value;const s=ia(i,t);return o=o.updateChild(s,n),new El(e.writeTree_.set(i,o))}{const r=new Sl(n),i=e.writeTree_.setTree(t,r);return new El(i)}}}function kl(e,t,n){let r=e;return ys(n,((e,n)=>{r=Cl(r,na(t,e),n)})),r}function xl(e,t){if(ra(t))return El.empty();{const n=e.writeTree_.setTree(t,new Sl(null));return new El(n)}}function Tl(e,t){return null!=Il(e,t)}function Il(e,t){const n=e.writeTree_.findRootMostValueAndPath(t);return null!=n?e.writeTree_.get(n.path).getChild(ia(n.path,t)):null}function Pl(e){const t=[],n=e.writeTree_.value;return null!=n?n.isLeafNode()||n.forEachChild(Ra,((e,n)=>{t.push(new pa(e,n))})):e.writeTree_.children.inorderTraversal(((e,n)=>{null!=n.value&&t.push(new pa(e,n.value))})),t}function Al(e,t){if(ra(t))return e;{const n=Il(e,t);return new El(null!=n?new Sl(n):e.writeTree_.subtree(t))}}function Rl(e){return e.writeTree_.isEmpty()}function Nl(e,t){return Ol(Ys(),e.writeTree_,t)}function Ol(e,t,n){if(null!=t.value)return n.updateChild(e,t.value);{let r=null;return t.children.inorderTraversal(((t,i)=>{".priority"===t?(Er(null!==i.value,"Priority writes must always be leaf nodes"),r=i.value):n=Ol(na(e,t),i,n)})),n.getChild(e).isEmpty()||null===r||(n=n.updateChild(na(e,".priority"),r)),n}}function Dl(e,t){return Kl(t,e)}function Ll(e,t){const n=e.allWrites.findIndex((e=>e.writeId===t));Er(n>=0,"removeWrite called with nonexistent writeId.");const r=e.allWrites[n];e.allWrites.splice(n,1);let i=r.visible,o=!1,s=e.allWrites.length-1;for(;i&&s>=0;){const t=e.allWrites[s];t.visible&&(s>=n&&Ml(t,r.path)?i=!1:aa(r.path,t.path)&&(o=!0)),s--}if(i){if(o)return function(e){e.visibleWrites=jl(e.allWrites,Fl,Ys()),e.allWrites.length>0?e.lastWriteId=e.allWrites[e.allWrites.length-1].writeId:e.lastWriteId=-1}(e),!0;if(r.snap)e.visibleWrites=xl(e.visibleWrites,r.path);else{ys(r.children,(t=>{e.visibleWrites=xl(e.visibleWrites,na(r.path,t))}))}return!0}return!1}function Ml(e,t){if(e.snap)return aa(e.path,t);for(const n in e.children)if(e.children.hasOwnProperty(n)&&aa(na(e.path,n),t))return!0;return!1}function Fl(e){return e.visible}function jl(e,t,n){let r=El.empty();for(let i=0;i{r=r.updateImmediateChild(e,t)})),r;if(n){const i=Al(e.visibleWrites,t);return n.forEachChild(Ra,((e,t)=>{const n=Nl(Al(i,new Gs(e)),t);r=r.updateImmediateChild(e,n)})),Pl(i).forEach((e=>{r=r.updateImmediateChild(e.name,e.node)})),r}return Pl(Al(e.visibleWrites,t)).forEach((e=>{r=r.updateImmediateChild(e.name,e.node)})),r}(e.writeTree,e.treePath,t)}function Bl(e,t,n,r){return function(e,t,n,r,i){Er(r||i,"Either existingEventSnap or existingServerSnap must exist");const o=na(t,n);if(Tl(e.visibleWrites,o))return null;{const t=Al(e.visibleWrites,o);return Rl(t)?i.getChild(n):Nl(t,i.getChild(n))}}(e.writeTree,e.treePath,t,n,r)}function Wl(e,t){return function(e,t){return Il(e.visibleWrites,t)}(e.writeTree,na(e.treePath,t))}function Hl(e,t,n,r,i,o){return function(e,t,n,r,i,o,s){let a;const l=Al(e.visibleWrites,t),c=Il(l,Ys());if(null!=c)a=c;else{if(null==n)return[];a=Nl(l,n)}if(a=a.withIndex(s),a.isEmpty()||a.isLeafNode())return[];{const e=[],t=s.getCompare(),n=o?a.getReverseIteratorFrom(r,s):a.getIteratorFrom(r,s);let l=n.getNext();for(;l&&e.length2&&void 0!==arguments[2]?arguments[2]:null;this.writes_=e,this.viewCache_=t,this.optCompleteServerCache_=n}getCompleteChild(e){const t=this.viewCache_.eventCache;if(t.isCompleteForChild(e))return t.getNode().getImmediateChild(e);{const t=null!=this.optCompleteServerCache_?new fl(this.optCompleteServerCache_,!0,!1):this.viewCache_.serverCache;return Vl(this.writes_,e,t)}}getChildAfterChild(e,t,n){const r=null!=this.optCompleteServerCache_?this.optCompleteServerCache_:bl(this.viewCache_),i=Hl(this.writes_,r,t,1,n,e);return 0===i.length?null:i[0]}}function Jl(e,t,n,r,i){const o=new Gl;let s,a;if(n.type===al.OVERWRITE){const l=n;l.source.fromUser?s=ec(e,t,l.path,l.snap,r,i,o):(Er(l.source.fromServer,"Unknown source."),a=l.source.tagged||t.serverCache.isFiltered()&&!ra(l.path),s=Zl(e,t,l.path,l.snap,r,i,a,o))}else if(n.type===al.MERGE){const l=n;l.source.fromUser?s=function(e,t,n,r,i,o,s){let a=t;return r.foreach(((r,l)=>{const c=na(n,r);tc(t,Qs(c))&&(a=ec(e,a,c,l,i,o,s))})),r.foreach(((r,l)=>{const c=na(n,r);tc(t,Qs(c))||(a=ec(e,a,c,l,i,o,s))})),a}(e,t,l.path,l.children,r,i,o):(Er(l.source.fromServer,"Unknown source."),a=l.source.tagged||t.serverCache.isFiltered(),s=rc(e,t,l.path,l.children,r,i,a,o))}else if(n.type===al.ACK_USER_WRITE){const a=n;s=a.revert?function(e,t,n,r,i,o){let s;if(null!=Wl(r,n))return t;{const a=new Ql(r,t,i),l=t.eventCache.getNode();let c;if(ra(n)||".priority"===Qs(n)){let n;if(t.serverCache.isFullyInitialized())n=$l(r,bl(t));else{const e=t.serverCache.getNode();Er(e instanceof Ua,"serverChildren would be complete if leaf node"),n=zl(r,e)}c=e.filter.updateFullNode(l,n,o)}else{const i=Qs(n);let u=Vl(r,i,t.serverCache);null==u&&t.serverCache.isCompleteForChild(i)&&(u=l.getImmediateChild(i)),c=null!=u?e.filter.updateChild(l,i,u,Xs(n),a,o):t.eventCache.getNode().hasChild(i)?e.filter.updateChild(l,i,Ua.EMPTY_NODE,Xs(n),a,o):l,c.isEmpty()&&t.serverCache.isFullyInitialized()&&(s=$l(r,bl(t)),s.isLeafNode()&&(c=e.filter.updateFullNode(c,s,o)))}return s=t.serverCache.isFullyInitialized()||null!=Wl(r,Ys()),yl(t,c,s,e.filter.filtersNodes())}}(e,t,a.path,r,i,o):function(e,t,n,r,i,o,s){if(null!=Wl(i,n))return t;const a=t.serverCache.isFiltered(),l=t.serverCache;if(null!=r.value){if(ra(n)&&l.isFullyInitialized()||l.isCompleteForPath(n))return Zl(e,t,n,l.getNode().getChild(n),i,o,a,s);if(ra(n)){let r=new Sl(null);return l.getNode().forEachChild(va,((e,t)=>{r=r.set(new Gs(e),t)})),rc(e,t,n,r,i,o,a,s)}return t}{let c=new Sl(null);return r.foreach(((e,t)=>{const r=na(n,e);l.isCompleteForPath(r)&&(c=c.set(e,l.getNode().getChild(r)))})),rc(e,t,n,c,i,o,a,s)}}(e,t,a.path,a.affectedTree,r,i,o)}else{if(n.type!==al.LISTEN_COMPLETE)throw Cr("Unknown operation type: "+n.type);s=function(e,t,n,r,i){const o=t.serverCache,s=vl(t,o.getNode(),o.isFullyInitialized()||ra(n),o.isFiltered());return Xl(e,s,n,r,Yl,i)}(e,t,n.path,r,o)}const l=o.getChanges();return function(e,t,n){const r=t.eventCache;if(r.isFullyInitialized()){const i=r.getNode().isLeafNode()||r.getNode().isEmpty(),o=_l(e);(n.length>0||!e.eventCache.isFullyInitialized()||i&&!r.getNode().equals(o)||!r.getNode().getPriority().equals(o.getPriority()))&&n.push(Ha(_l(t)))}}(t,s,l),{viewCache:s,changes:l}}function Xl(e,t,n,r,i,o){const s=t.eventCache;if(null!=Wl(r,n))return t;{let a,l;if(ra(n))if(Er(t.serverCache.isFullyInitialized(),"If change path is empty, we must have complete server data"),t.serverCache.isFiltered()){const n=bl(t),i=zl(r,n instanceof Ua?n:Ua.EMPTY_NODE);a=e.filter.updateFullNode(t.eventCache.getNode(),i,o)}else{const n=$l(r,bl(t));a=e.filter.updateFullNode(t.eventCache.getNode(),n,o)}else{const c=Qs(n);if(".priority"===c){Er(1===Js(n),"Can't have a priority with additional path components");const i=s.getNode();l=t.serverCache.getNode();const o=Bl(r,n,i,l);a=null!=o?e.filter.updatePriority(i,o):s.getNode()}else{const u=Xs(n);let d;if(s.isCompleteForChild(c)){l=t.serverCache.getNode();const e=Bl(r,n,s.getNode(),l);d=null!=e?s.getNode().getImmediateChild(c).updateChild(u,e):s.getNode().getImmediateChild(c)}else d=Vl(r,c,t.serverCache);a=null!=d?e.filter.updateChild(s.getNode(),c,d,u,i,o):s.getNode()}}return yl(t,a,s.isFullyInitialized()||ra(n),e.filter.filtersNodes())}}function Zl(e,t,n,r,i,o,s,a){const l=t.serverCache;let c;const u=s?e.filter:e.filter.getIndexedFilter();if(ra(n))c=u.updateFullNode(l.getNode(),r,null);else if(u.filtersNodes()&&!l.isFiltered()){const e=l.getNode().updateChild(n,r);c=u.updateFullNode(l.getNode(),e,null)}else{const e=Qs(n);if(!l.isCompleteForPath(n)&&Js(n)>1)return t;const i=Xs(n),o=l.getNode().getImmediateChild(e).updateChild(i,r);c=".priority"===e?u.updatePriority(l.getNode(),o):u.updateChild(l.getNode(),e,o,i,Yl,null)}const d=vl(t,c,l.isFullyInitialized()||ra(n),u.filtersNodes());return Xl(e,d,n,i,new Ql(i,d,o),a)}function ec(e,t,n,r,i,o,s){const a=t.eventCache;let l,c;const u=new Ql(i,t,o);if(ra(n))c=e.filter.updateFullNode(t.eventCache.getNode(),r,s),l=yl(t,c,!0,e.filter.filtersNodes());else{const i=Qs(n);if(".priority"===i)c=e.filter.updatePriority(t.eventCache.getNode(),r),l=yl(t,c,a.isFullyInitialized(),a.isFiltered());else{const o=Xs(n),c=a.getNode().getImmediateChild(i);let d;if(ra(o))d=r;else{const e=u.getCompleteChild(i);d=null!=e?".priority"===Zs(o)&&e.getChild(ta(o)).isEmpty()?e:e.updateChild(o,r):Ua.EMPTY_NODE}if(c.equals(d))l=t;else{l=yl(t,e.filter.updateChild(a.getNode(),i,d,o,u,s),a.isFullyInitialized(),e.filter.filtersNodes())}}}return l}function tc(e,t){return e.eventCache.isCompleteForChild(t)}function nc(e,t,n){return n.foreach(((e,n)=>{t=t.updateChild(e,n)})),t}function rc(e,t,n,r,i,o,s,a){if(t.serverCache.getNode().isEmpty()&&!t.serverCache.isFullyInitialized())return t;let l,c=t;l=ra(n)?r:new Sl(null).setTree(n,r);const u=t.serverCache.getNode();return l.children.inorderTraversal(((n,r)=>{if(u.hasChild(n)){const l=nc(0,t.serverCache.getNode().getImmediateChild(n),r);c=Zl(e,c,new Gs(n),l,i,o,s,a)}})),l.children.inorderTraversal(((n,r)=>{const l=!t.serverCache.isCompleteForChild(n)&&null===r.value;if(!u.hasChild(n)&&!l){const l=nc(0,t.serverCache.getNode().getImmediateChild(n),r);c=Zl(e,c,new Gs(n),l,i,o,s,a)}})),c}class ic{constructor(e,t){this.query_=e,this.eventRegistrations_=[];const n=this.query_._queryParams,r=new Ga(n.getIndex()),i=(o=n).loadsAllData()?new Ga(o.getIndex()):o.hasLimit()?new Qa(o):new Ya(o);var o;this.processor_=function(e){return{filter:e}}(i);const s=t.serverCache,a=t.eventCache,l=r.updateFullNode(Ua.EMPTY_NODE,s.getNode(),null),c=i.updateFullNode(Ua.EMPTY_NODE,a.getNode(),null),u=new fl(l,s.isFullyInitialized(),r.filtersNodes()),d=new fl(c,a.isFullyInitialized(),i.filtersNodes());this.viewCache_=gl(d,u),this.eventGenerator_=new pl(this.query_)}get query(){return this.query_}}function oc(e,t){const n=bl(e.viewCache_);return n&&(e.query._queryParams.loadsAllData()||!ra(t)&&!n.getImmediateChild(Qs(t)).isEmpty())?n.getChild(t):null}function sc(e){return 0===e.eventRegistrations_.length}function ac(e,t,n){const r=[];if(n){Er(null==t,"A cancel should cancel all event registrations.");const i=e.query._path;e.eventRegistrations_.forEach((e=>{const t=e.createCancelEvent(n,i);t&&r.push(t)}))}if(t){let n=[];for(let r=0;r{var n;"child_changed"===t.type&&e.index_.indexedValueChanged(t.oldSnap,t.snapshotNode)&&o.push((n=t.childName,{type:"child_moved",snapshotNode:t.snapshotNode,childName:n}))})),ml(e,i,"child_removed",t,r,n),ml(e,i,"child_added",t,r,n),ml(e,i,"child_moved",o,r,n),ml(e,i,"child_changed",t,r,n),ml(e,i,"value",t,r,n),i}(e.eventGenerator_,t,n,i)}let uc,dc;class hc{constructor(){this.views=new Map}}function fc(e,t,n,r){const i=t.source.queryId;if(null!==i){const o=e.views.get(i);return Er(null!=o,"SyncTree gave us an op for an invalid query."),lc(o,t,n,r)}{let i=[];for(const o of e.views.values())i=i.concat(lc(o,t,n,r));return i}}function pc(e,t,n,r,i){const o=t._queryIdentifier,s=e.views.get(o);if(!s){let e=$l(n,i?r:null),o=!1;e?o=!0:r instanceof Ua?(e=zl(n,r),o=!1):(e=Ua.EMPTY_NODE,o=!1);const s=gl(new fl(e,o,!1),new fl(r,i,!1));return new ic(t,s)}return s}function mc(e,t,n,r,i,o){const s=pc(e,t,r,i,o);return e.views.has(t._queryIdentifier)||e.views.set(t._queryIdentifier,s),function(e,t){e.eventRegistrations_.push(t)}(s,n),function(e,t){const n=e.viewCache_.eventCache,r=[];n.getNode().isLeafNode()||n.getNode().forEachChild(Ra,((e,t)=>{r.push(Va(e,t))}));return n.isFullyInitialized()&&r.push(Ha(n.getNode())),cc(e,r,n.getNode(),t)}(s,n)}function gc(e,t,n,r){const i=t._queryIdentifier,o=[];let s=[];const a=wc(e);if("default"===i)for(const[l,c]of e.views.entries())s=s.concat(ac(c,n,r)),sc(c)&&(e.views.delete(l),c.query._queryParams.loadsAllData()||o.push(c.query));else{const t=e.views.get(i);t&&(s=s.concat(ac(t,n,r)),sc(t)&&(e.views.delete(i),t.query._queryParams.loadsAllData()||o.push(t.query)))}return a&&!wc(e)&&o.push(new(Er(uc,"Reference.ts has not been loaded"),uc)(t._repo,t._path)),{removed:o,events:s}}function yc(e){const t=[];for(const n of e.views.values())n.query._queryParams.loadsAllData()||t.push(n);return t}function vc(e,t){let n=null;for(const r of e.views.values())n=n||oc(r,t);return n}function _c(e,t){if(t._queryParams.loadsAllData())return Sc(e);{const n=t._queryIdentifier;return e.views.get(n)}}function bc(e,t){return null!=_c(e,t)}function wc(e){return null!=Sc(e)}function Sc(e){for(const t of e.views.values())if(t.query._queryParams.loadsAllData())return t;return null}let Ec=1;class Cc{constructor(e){this.listenProvider_=e,this.syncPointTree_=new Sl(null),this.pendingWriteTree_={visibleWrites:El.empty(),allWrites:[],lastWriteId:-1},this.tagToQueryMap=new Map,this.queryToTagMap=new Map}}function kc(e,t,n,r,i){return function(e,t,n,r,i){Er(r>e.lastWriteId,"Stacking an older write on top of newer ones"),void 0===i&&(i=!0),e.allWrites.push({path:t,snap:n,writeId:r,visible:i}),i&&(e.visibleWrites=Cl(e.visibleWrites,t,n)),e.lastWriteId=r}(e.pendingWriteTree_,t,n,r,i),i?Dc(e,new dl({fromUser:!0,fromServer:!1,queryId:null,tagged:!1},t,n)):[]}function xc(e,t,n,r){!function(e,t,n,r){Er(r>e.lastWriteId,"Stacking an older merge on top of newer ones"),e.allWrites.push({path:t,children:n,writeId:r,visible:!0}),e.visibleWrites=kl(e.visibleWrites,t,n),e.lastWriteId=r}(e.pendingWriteTree_,t,n,r);const i=Sl.fromObject(n);return Dc(e,new hl({fromUser:!0,fromServer:!1,queryId:null,tagged:!1},t,i))}function Tc(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=function(e,t){for(let n=0;n{t=t.set(new Gs(e),!0)})),Dc(e,new cl(r.path,t,n))}return[]}function Ic(e,t,n){return Dc(e,new dl({fromUser:!1,fromServer:!0,queryId:null,tagged:!1},t,n))}function Pc(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const o=t._path,s=e.syncPointTree_.get(o);let a=[];if(s&&("default"===t._queryIdentifier||bc(s,t))){const l=gc(s,t,n,r);0===s.views.size&&(e.syncPointTree_=e.syncPointTree_.remove(o));const c=l.removed;if(a=l.events,!i){const n=-1!==c.findIndex((e=>e._queryParams.loadsAllData())),i=e.syncPointTree_.findOnPath(o,((e,t)=>wc(t)));if(n&&!i){const t=e.syncPointTree_.subtree(o);if(!t.isEmpty()){const n=function(e){return e.fold(((e,t,n)=>{if(t&&wc(t)){return[Sc(t)]}{let e=[];return t&&(e=yc(t)),ys(n,((t,n)=>{e=e.concat(n)})),e}}))}(t);for(let t=0;t0&&!r)if(n){const n=null;e.listenProvider_.stopListening(Wc(t),n)}else c.forEach((t=>{const n=e.queryToTagMap.get(Uc(t));e.listenProvider_.stopListening(Wc(t),n)}))}!function(e,t){for(let n=0;n3&&void 0!==arguments[3]&&arguments[3];const i=t._path;let o=null,s=!1;e.syncPointTree_.foreachOnPath(i,((e,t)=>{const n=ia(e,i);o=o||vc(t,n),s=s||wc(t)}));let a,l=e.syncPointTree_.get(i);if(l?(s=s||wc(l),o=o||vc(l,Ys())):(l=new hc,e.syncPointTree_=e.syncPointTree_.set(i,l)),null!=o)a=!0;else{a=!1,o=Ua.EMPTY_NODE;e.syncPointTree_.subtree(i).foreachChild(((e,t)=>{const n=vc(t,Ys());n&&(o=o.updateImmediateChild(e,n))}))}const c=bc(l,t);if(!c&&!t._queryParams.loadsAllData()){const n=Uc(t);Er(!e.queryToTagMap.has(n),"View does not exist, but we have a tag");const r=Ec++;e.queryToTagMap.set(n,r),e.tagToQueryMap.set(r,n)}let u=mc(l,t,n,Dl(e.pendingWriteTree_,i),o,a);if(!c&&!s&&!r){const n=_c(l,t);u=u.concat(function(e,t,n){const r=t._path,i=jc(e,t),o=Fc(e,n),s=e.listenProvider_.startListening(Wc(t),i,o.hashFn,o.onComplete),a=e.syncPointTree_.subtree(r);if(i)Er(!wc(a.value),"If we're adding a query, it shouldn't be shadowed");else{const t=a.fold(((e,t,n)=>{if(!ra(e)&&t&&wc(t))return[Sc(t).query];{let e=[];return t&&(e=e.concat(yc(t).map((e=>e.query)))),ys(n,((t,n)=>{e=e.concat(n)})),e}}));for(let n=0;n{const r=vc(n,ia(e,t));if(r)return r}));return Ul(r,t,i,n,!0)}function Oc(e,t){const n=t._path;let r=null;e.syncPointTree_.foreachOnPath(n,((e,t)=>{const i=ia(e,n);r=r||vc(t,i)}));let i=e.syncPointTree_.get(n);i?r=r||vc(i,Ys()):(i=new hc,e.syncPointTree_=e.syncPointTree_.set(n,i));const o=null!=r,s=o?new fl(r,!0,!1):null;return function(e){return _l(e.viewCache_)}(pc(i,t,Dl(e.pendingWriteTree_,t._path),o?s.getNode():Ua.EMPTY_NODE,o))}function Dc(e,t){return Lc(t,e.syncPointTree_,null,Dl(e.pendingWriteTree_,Ys()))}function Lc(e,t,n,r){if(ra(e.path))return Mc(e,t,n,r);{const i=t.get(Ys());null==n&&null!=i&&(n=vc(i,Ys()));let o=[];const s=Qs(e.path),a=e.operationForChild(s),l=t.children.get(s);if(l&&a){const e=n?n.getImmediateChild(s):null,t=ql(r,s);o=o.concat(Lc(a,l,e,t))}return i&&(o=o.concat(fc(i,e,r,n))),o}}function Mc(e,t,n,r){const i=t.get(Ys());null==n&&null!=i&&(n=vc(i,Ys()));let o=[];return t.children.inorderTraversal(((t,i)=>{const s=n?n.getImmediateChild(t):null,a=ql(r,t),l=e.operationForChild(t);l&&(o=o.concat(Mc(l,i,s,a)))})),i&&(o=o.concat(fc(i,e,r,n))),o}function Fc(e,t){const n=t.query,r=jc(e,n);return{hashFn:()=>{const e=function(e){return e.viewCache_.serverCache.getNode()}(t)||Ua.EMPTY_NODE;return e.hash()},onComplete:t=>{if("ok"===t)return r?function(e,t,n){const r=$c(e,n);if(r){const n=zc(r),i=n.path,o=n.queryId,s=ia(i,t);return Bc(e,i,new ul(ll(o),s))}return[]}(e,n._path,r):function(e,t){return Dc(e,new ul({fromUser:!1,fromServer:!0,queryId:null,tagged:!1},t))}(e,n._path);{const r=function(e,t){let n="Unknown Error";"too_big"===e?n="The data requested exceeds the maximum size that can be accessed with a single request.":"permission_denied"===e?n="Client doesn't have permission to access the desired data.":"unavailable"===e&&(n="The service is unavailable");const r=new Error(e+" at "+t._path.toString()+": "+n);return r.code=e.toUpperCase(),r}(t,n);return Pc(e,n,null,r)}}}}function jc(e,t){const n=Uc(t);return e.queryToTagMap.get(n)}function Uc(e){return e._path.toString()+"$"+e._queryIdentifier}function $c(e,t){return e.tagToQueryMap.get(t)}function zc(e){const t=e.indexOf("$");return Er(-1!==t&&t{const i=Jc(r,t.getImmediateChild(e),n);i!==r&&(o=o.updateImmediateChild(e,i))})),o}}class Xc{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{children:{},childCount:0};this.name=e,this.parent=t,this.node=n}}function Zc(e,t){let n=t instanceof Gs?t:new Gs(t),r=e,i=Qs(n);for(;null!==i;){const e=Xr(r.node.children,i)||{children:{},childCount:0};r=new Xc(i,r,e),n=Xs(n),i=Qs(n)}return r}function eu(e){return e.node.value}function tu(e,t){e.node.value=t,su(e)}function nu(e){return e.node.childCount>0}function ru(e,t){ys(e.node.children,((n,r)=>{t(new Xc(n,e,r))}))}function iu(e,t,n,r){n&&!r&&t(e),ru(e,(e=>{iu(e,t,!0,r)})),n&&r&&t(e)}function ou(e){return new Gs(null===e.parent?e.name:ou(e.parent)+"/"+e.name)}function su(e){null!==e.parent&&function(e,t,n){const r=function(e){return void 0===eu(e)&&!nu(e)}(n),i=Jr(e.node.children,t);r&&i?(delete e.node.children[t],e.node.childCount--,su(e)):r||i||(e.node.children[t]=n.node,e.node.childCount++,su(e))}(e.parent,e.name,e)}const au=/[\[\].#$\/\u0000-\u001F\u007F]/,lu=/[\[\].#$\u0000-\u001F\u007F]/,cu=10485760,uu=function(e){return"string"===typeof e&&0!==e.length&&!au.test(e)},du=function(e){return"string"===typeof e&&0!==e.length&&!lu.test(e)},hu=function(e){return null===e||"string"===typeof e||"number"===typeof e&&!cs(e)||e&&"object"===typeof e&&Jr(e,".sv")},fu=function(e,t,n,r){r&&void 0===t||pu(ci(e,"value"),t,n)},pu=function(e,t,n){const r=n instanceof Gs?new la(n,e):n;if(void 0===t)throw new Error(e+"contains undefined "+ua(r));if("function"===typeof t)throw new Error(e+"contains a function "+ua(r)+" with contents = "+t.toString());if(cs(t))throw new Error(e+"contains "+t.toString()+" "+ua(r));if("string"===typeof t&&t.length>cu/3&&ui(t)>cu)throw new Error(e+"contains a string greater than "+cu+" utf8 bytes "+ua(r)+" ('"+t.substring(0,50)+"...')");if(t&&"object"===typeof t){let n=!1,i=!1;if(ys(t,((t,o)=>{if(".value"===t)n=!0;else if(".priority"!==t&&".sv"!==t&&(i=!0,!uu(t)))throw new Error(e+" contains an invalid key ("+t+") "+ua(r)+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');!function(e,t){e.parts_.length>0&&(e.byteLength_+=1),e.parts_.push(t),e.byteLength_+=ui(t),ca(e)}(r,t),pu(e,o,r),function(e){const t=e.parts_.pop();e.byteLength_-=ui(t),e.parts_.length>0&&(e.byteLength_-=1)}(r)})),n&&i)throw new Error(e+' contains ".value" child '+ua(r)+" in addition to actual children.")}},mu=function(e,t,n,r){if(r&&void 0===t)return;const i=ci(e,"values");if(!t||"object"!==typeof t||Array.isArray(t))throw new Error(i+" must be an object containing the children to replace.");const o=[];ys(t,((e,t)=>{const r=new Gs(e);if(pu(i,t,na(n,r)),".priority"===Zs(r)&&!hu(t))throw new Error(i+"contains an invalid value for '"+r.toString()+"', which must be a valid Firebase priority (a string, finite number, server value, or null).");o.push(r)})),function(e,t){let n,r;for(n=0;nsa(e,t)))}function Su(e,t,n){bu(e,n),Eu(e,(e=>aa(e,t)||aa(t,e)))}function Eu(e,t){e.recursionDepth_++;let n=!0;for(let r=0;r=0)e.server_=new el(e.repoInfo_,((t,n,r,i)=>{Au(e,t,n,r,i)}),e.authTokenProvider_,e.appCheckProvider_),setTimeout((()=>Ru(e,!0)),0);else{if("undefined"!==typeof n&&null!==n){if("object"!==typeof n)throw new Error("Only objects are supported for option databaseAuthVariableOverride");try{Yr(n)}catch(DE){throw new Error("Invalid authOverride provided: "+DE)}}e.persistentConnection_=new fa(e.repoInfo_,t,((t,n,r,i)=>{Au(e,t,n,r,i)}),(t=>{Ru(e,t)}),(t=>{!function(e,t){ys(t,((t,n)=>{Nu(e,t,n)}))}(e,t)}),e.authTokenProvider_,e.appCheckProvider_,n),e.server_=e.persistentConnection_}e.authTokenProvider_.addTokenChangeListener((t=>{e.server_.refreshAuthToken(t)})),e.appCheckProvider_.addTokenChangeListener((t=>{e.server_.refreshAppCheckToken(t.token)})),e.statsReporter_=function(e,t){const n=e.toString();return Ls[n]||(Ls[n]=t()),Ls[n]}(e.repoInfo_,(()=>new sl(e.stats_,e.server_))),e.infoData_=new tl,e.infoSyncTree_=new Cc({startListening:(t,n,r,i)=>{let o=[];const s=e.infoData_.getNode(t._path);return s.isEmpty()||(o=Ic(e.infoSyncTree_,t._path,s),setTimeout((()=>{i("ok")}),0)),o},stopListening:()=>{}}),Nu(e,"connected",!1),e.serverSyncTree_=new Cc({startListening:(t,n,r,i)=>(e.server_.listen(t,r,n,((n,r)=>{const o=i(n,r);Su(e.eventQueue_,t._path,o)})),[]),stopListening:(t,n)=>{e.server_.unlisten(t,n)}})}function Iu(e){const t=e.infoData_.getNode(new Gs(".info/serverTimeOffset")).val()||0;return(new Date).getTime()+t}function Pu(e){return function(e){return(e=e||{}).timestamp=e.timestamp||(new Date).getTime(),e}({timestamp:Iu(e)})}function Au(e,t,n,r,i){e.dataUpdateCount++;const o=new Gs(t);n=e.interceptServerDataCallback_?e.interceptServerDataCallback_(t,n):n;let s=[];if(i)if(r){const t=ei(n,(e=>za(e)));s=function(e,t,n,r){const i=$c(e,r);if(i){const r=zc(i),o=r.path,s=r.queryId,a=ia(o,t),l=Sl.fromObject(n);return Bc(e,o,new hl(ll(s),a,l))}return[]}(e.serverSyncTree_,o,t,i)}else{const t=za(n);s=Ac(e.serverSyncTree_,o,t,i)}else if(r){const t=ei(n,(e=>za(e)));s=function(e,t,n){const r=Sl.fromObject(n);return Dc(e,new hl({fromUser:!1,fromServer:!0,queryId:null,tagged:!1},t,r))}(e.serverSyncTree_,o,t)}else{const t=za(n);s=Ic(e.serverSyncTree_,o,t)}let a=o;s.length>0&&(a=zu(e,o)),Su(e.eventQueue_,a,s)}function Ru(e,t){Nu(e,"connected",t),!1===t&&function(e){Fu(e,"onDisconnectEvents");const t=Pu(e),n=nl();il(e.onDisconnect_,Ys(),((r,i)=>{const o=Yc(r,i,e.serverSyncTree_,t);rl(n,r,o)}));let r=[];il(n,Ys(),((t,n)=>{r=r.concat(Ic(e.serverSyncTree_,t,n));const i=qu(e,t);zu(e,i)})),e.onDisconnect_=nl(),Su(e.eventQueue_,Ys(),r)}(e)}function Nu(e,t,n){const r=new Gs("/.info/"+t),i=za(n);e.infoData_.updateSnapshot(r,i);const o=Ic(e.infoSyncTree_,r,i);Su(e.eventQueue_,r,o)}function Ou(e){return e.nextWriteId_++}function Du(e,t,n,r,i){Fu(e,"set",{path:t.toString(),value:n,priority:r});const o=Pu(e),s=za(n,r),a=Nc(e.serverSyncTree_,t),l=Qc(s,a,o),c=Ou(e),u=kc(e.serverSyncTree_,t,l,c,!0);bu(e.eventQueue_,u),e.server_.put(t.toString(),s.val(!0),((n,r)=>{const o="ok"===n;o||ls("set at "+t+" failed: "+n);const s=Tc(e.serverSyncTree_,c,!o);Su(e.eventQueue_,t,s),ju(e,i,n,r)}));const d=qu(e,t);zu(e,d),Su(e.eventQueue_,d,[])}function Lu(e,t,n){let r;r=".info"===Qs(t._path)?Pc(e.infoSyncTree_,t,n):Pc(e.serverSyncTree_,t,n),wu(e.eventQueue_,t._path,r)}function Mu(e){e.persistentConnection_&&e.persistentConnection_.interrupt(ku)}function Fu(e){let t="";e.persistentConnection_&&(t=e.persistentConnection_.id+":");for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{if("ok"===n)t(null);else{const e=(n||"error").toUpperCase();let i=e;r&&(i+=": "+r);const o=new Error(i);o.code=e,t(o)}}))}function Uu(e,t,n){return Nc(e.serverSyncTree_,t,n)||Ua.EMPTY_NODE}function $u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.transactionQueueTree_;if(t||Vu(e,t),eu(t)){const n=Wu(e,t);Er(n.length>0,"Sending zero length transaction queue");n.every((e=>0===e.status))&&function(e,t,n){const r=n.map((e=>e.currentWriteId)),i=Uu(e,t,r);let o=i;const s=i.hash();for(let c=0;c{Fu(e,"transaction put response",{path:l.toString(),status:r});let i=[];if("ok"===r){const r=[];for(let t=0;tn[t].onComplete(null,!0,n[t].currentOutputSnapshotResolved))),n[t].unwatcher();Vu(e,Zc(e.transactionQueueTree_,t)),$u(e,e.transactionQueueTree_),Su(e.eventQueue_,t,i);for(let e=0;e{$u(e,t)}))}function zu(e,t){const n=Bu(e,t),r=ou(n);return function(e,t,n){if(0===t.length)return;const r=[];let i=[];const o=t.filter((e=>0===e.status)),s=o.map((e=>e.currentWriteId));for(let l=0;l=25)d=!0,u="maxretry",i=i.concat(Tc(e.serverSyncTree_,o.currentWriteId,!0));else{const n=Uu(e,o.path,s);o.currentInputSnapshot=n;const r=t[l].update(n.val());if(void 0!==r){pu("transaction failed: Data returned ",r,o.path);let t=za(r);"object"===typeof r&&null!=r&&Jr(r,".priority")||(t=t.updatePriority(n.getPriority()));const a=o.currentWriteId,l=Pu(e),c=Qc(t,n,l);o.currentOutputSnapshotRaw=t,o.currentOutputSnapshotResolved=c,o.currentWriteId=Ou(e),s.splice(s.indexOf(a),1),i=i.concat(kc(e.serverSyncTree_,o.path,c,o.currentWriteId,o.applyLocally)),i=i.concat(Tc(e.serverSyncTree_,a,!0))}else d=!0,u="nodata",i=i.concat(Tc(e.serverSyncTree_,o.currentWriteId,!0))}Su(e.eventQueue_,n,i),i=[],d&&(t[l].status=2,a=t[l].unwatcher,setTimeout(a,Math.floor(0)),t[l].onComplete&&("nodata"===u?r.push((()=>t[l].onComplete(null,!1,t[l].currentInputSnapshot))):r.push((()=>t[l].onComplete(new Error(u),!1,null)))))}var a;Vu(e,e.transactionQueueTree_);for(let l=0;le.order-t.order)),n}function Hu(e,t,n){const r=eu(t);if(r)for(let i=0;i{Hu(e,t,n)}))}function Vu(e,t){const n=eu(t);if(n){let e=0;for(let t=0;t0?n:void 0)}ru(t,(t=>{Vu(e,t)}))}function qu(e,t){const n=ou(Bu(e,t)),r=Zc(e.transactionQueueTree_,t);return function(e,t,n){let r=n?e:e.parent;for(;null!==r;){if(t(r))return!0;r=r.parent}}(r,(t=>{Ku(e,t)})),Ku(e,r),iu(r,(t=>{Ku(e,t)})),n}function Ku(e,t){const n=eu(t);if(n){const r=[];let i=[],o=-1;for(let t=0;t.firebaseio.com instead"),r&&"undefined"!==r||"localhost"===n.domain||as("Cannot parse Firebase url. Please use https://.firebaseio.com"),n.secure||"undefined"!==typeof window&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&ls("Insecure Firebase access from a secure page. Please use https in calls to new Firebase().");const i="ws"===n.scheme||"wss"===n.scheme;return{repoInfo:new Rs(n.host,n.secure,r,i,t,"",r!==n.subdomain),path:new Gs(n.pathString)}},Yu=function(e){let t="",n="",r="",i="",o="",s=!0,a="https",l=443;if("string"===typeof e){let c=e.indexOf("//");c>=0&&(a=e.substring(0,c-1),e=e.substring(c+2));let u=e.indexOf("/");-1===u&&(u=e.length);let d=e.indexOf("?");-1===d&&(d=e.length),t=e.substring(0,Math.min(u,d)),u0){let e=n[r];try{e=decodeURIComponent(e.replace(/\+/g," "))}catch(DE){}t+="/"+e}return t}(e.substring(u,d)));const h=function(e){const t={};"?"===e.charAt(0)&&(e=e.substring(1));for(const n of e.split("&")){if(0===n.length)continue;const r=n.split("=");2===r.length?t[decodeURIComponent(r[0])]=decodeURIComponent(r[1]):ls(`Invalid query segment '${n}' in query '${e}'`)}return t}(e.substring(Math.min(e.length,d)));c=t.indexOf(":"),c>=0?(s="https"===a||"wss"===a,l=parseInt(t.substring(c+1),10)):c=t.length;const f=t.slice(0,c);if("localhost"===f.toLowerCase())n="localhost";else if(f.split(".").length<=2)n=f;else{const e=t.indexOf(".");r=t.substring(0,e).toLowerCase(),n=t.substring(e+1),o=r}"ns"in h&&(o=h.ns)}return{host:t,port:l,domain:n,subdomain:r,secure:s,scheme:a,pathString:i,namespace:o}},Qu="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz";!function(){let e=0;const t=[]}();class Ju{constructor(e,t,n,r){this.eventType=e,this.eventRegistration=t,this.snapshot=n,this.prevName=r}getPath(){const e=this.snapshot.ref;return"value"===this.eventType?e._path:e.parent._path}getEventType(){return this.eventType}getEventRunner(){return this.eventRegistration.getEventRunner(this)}toString(){return this.getPath().toString()+":"+this.eventType+":"+Yr(this.snapshot.exportVal())}}class Xu{constructor(e,t,n){this.eventRegistration=e,this.error=t,this.path=n}getPath(){return this.path}getEventType(){return"cancel"}getEventRunner(){return this.eventRegistration.getEventRunner(this)}toString(){return this.path.toString()+":cancel"}}class Zu{constructor(e,t){this.snapshotCallback=e,this.cancelCallback=t}onValue(e,t){this.snapshotCallback.call(null,e,t)}onCancel(e){return Er(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||void 0!==this.snapshotCallback.userCallback&&this.snapshotCallback.userCallback===e.snapshotCallback.userCallback&&this.snapshotCallback.context===e.snapshotCallback.context}}class ed{constructor(e,t,n,r){this._repo=e,this._path=t,this._queryParams=n,this._orderByCalled=r}get key(){return ra(this._path)?null:Zs(this._path)}get ref(){return new td(this._repo,this._path)}get _queryIdentifier(){const e=Za(this._queryParams),t=ms(e);return"{}"===t?"default":t}get _queryObject(){return Za(this._queryParams)}isEqual(e){if(!((e=di(e))instanceof ed))return!1;const t=this._repo===e._repo,n=sa(this._path,e._path),r=this._queryIdentifier===e._queryIdentifier;return t&&n&&r}toJSON(){return this.toString()}toString(){return this._repo.toString()+function(e){let t="";for(let n=e.pieceNum_;ne(new nd(n,id(this.ref,t),Ra))))}hasChild(e){const t=new Gs(e);return!this._node.getChild(t).isEmpty()}hasChildren(){return!this._node.isLeafNode()&&!this._node.isEmpty()}toJSON(){return this.exportVal()}val(){return this._node.val()}}function rd(e,t){return(e=di(e))._checkNotDeleted("ref"),void 0!==t?id(e._root,t):e._root}function id(e,t){var n,r,i,o;return null===Qs((e=di(e))._path)?(n="child",r="path",o=!1,(i=t)&&(i=i.replace(/^\/*\.info(\/|$)/,"/")),gu(n,r,i,o)):gu("child","path",t,!1),new td(e._repo,na(e._path,t))}function od(e){return yu("remove",e._path),sd(e,null)}function sd(e,t){e=di(e),yu("set",e._path),fu("set",t,e._path,!1);const n=new Ur;return Du(e._repo,e._path,t,null,n.wrapCallback((()=>{}))),n.promise}function ad(e,t){mu("update",t,e._path,!1);const n=new Ur;return function(e,t,n,r){Fu(e,"update",{path:t.toString(),value:n});let i=!0;const o=Pu(e),s={};if(ys(n,((n,r)=>{i=!1,s[n]=Yc(na(t,n),za(r),e.serverSyncTree_,o)})),i)is("update() called with empty data. Don't do anything."),ju(0,r,"ok",void 0);else{const i=Ou(e),o=xc(e.serverSyncTree_,t,s,i);bu(e.eventQueue_,o),e.server_.merge(t.toString(),n,((n,o)=>{const s="ok"===n;s||ls("update at "+t+" failed: "+n);const a=Tc(e.serverSyncTree_,i,!s),l=a.length>0?zu(e,t):t;Su(e.eventQueue_,l,a),ju(0,r,n,o)})),ys(n,(n=>{const r=qu(e,na(t,n));zu(e,r)})),Su(e.eventQueue_,t,[])}}(e._repo,e._path,t,n.wrapCallback((()=>{}))),n.promise}function ld(e){e=di(e);const t=new Zu((()=>{})),n=new cd(t);return function(e,t,n){const r=Oc(e.serverSyncTree_,t);return null!=r?Promise.resolve(r):e.server_.get(t).then((r=>{const i=za(r).withIndex(t._queryParams.getIndex());let o;if(Rc(e.serverSyncTree_,t,n,!0),t._queryParams.loadsAllData())o=Ic(e.serverSyncTree_,t._path,i);else{const n=jc(e.serverSyncTree_,t);o=Ac(e.serverSyncTree_,t._path,i,n)}return Su(e.eventQueue_,t._path,o),Pc(e.serverSyncTree_,t,n,null,!0),i}),(n=>(Fu(e,"get for query "+Yr(t)+" failed: "+n),Promise.reject(new Error(n)))))}(e._repo,e,n).then((t=>new nd(t,new td(e._repo,e._path),e._queryParams.getIndex())))}class cd{constructor(e){this.callbackContext=e}respondsTo(e){return"value"===e}createEvent(e,t){const n=t._queryParams.getIndex();return new Ju("value",this,new nd(e.snapshotNode,new td(t._repo,t._path),n))}getEventRunner(e){return"cancel"===e.getEventType()?()=>this.callbackContext.onCancel(e.error):()=>this.callbackContext.onValue(e.snapshot,null)}createCancelEvent(e,t){return this.callbackContext.hasCancelCallback?new Xu(this,e,t):null}matches(e){return e instanceof cd&&(!e.callbackContext||!this.callbackContext||e.callbackContext.matches(this.callbackContext))}hasAnyCallback(){return null!==this.callbackContext}}class ud{constructor(e,t){this.eventType=e,this.callbackContext=t}respondsTo(e){let t="children_added"===e?"child_added":e;return t="children_removed"===t?"child_removed":t,this.eventType===t}createCancelEvent(e,t){return this.callbackContext.hasCancelCallback?new Xu(this,e,t):null}createEvent(e,t){Er(null!=e.childName,"Child events should have a childName.");const n=id(new td(t._repo,t._path),e.childName),r=t._queryParams.getIndex();return new Ju(e.type,this,new nd(e.snapshotNode,n,r),e.prevName)}getEventRunner(e){return"cancel"===e.getEventType()?()=>this.callbackContext.onCancel(e.error):()=>this.callbackContext.onValue(e.snapshot,e.prevName)}matches(e){return e instanceof ud&&(this.eventType===e.eventType&&(!this.callbackContext||!e.callbackContext||this.callbackContext.matches(e.callbackContext)))}hasAnyCallback(){return!!this.callbackContext}}function dd(e,t,n,r,i){let o;if("object"===typeof r&&(o=void 0,i=r),"function"===typeof r&&(o=r),i&&i.onlyOnce){const t=n,r=(n,r)=>{Lu(e._repo,e,a),t(n,r)};r.userCallback=n.userCallback,r.context=n.context,n=r}const s=new Zu(n,o||void 0),a="value"===t?new cd(s):new ud(t,s);return function(e,t,n){let r;r=".info"===Qs(t._path)?Rc(e.infoSyncTree_,t,n):Rc(e.serverSyncTree_,t,n),wu(e.eventQueue_,t._path,r)}(e._repo,e,a),()=>Lu(e._repo,e,a)}function hd(e,t,n,r){return dd(e,"value",t,n,r)}!function(e){Er(!uc,"__referenceConstructor has already been defined"),uc=e}(td),function(e){Er(!dc,"__referenceConstructor has already been defined"),dc=e}(td);const fd={};let pd=!1;function md(e,t,n,r,i){let o=r||e.options.databaseURL;void 0===o&&(e.options.projectId||as("Can't determine Firebase Database URL. Be sure to include a Project ID when calling firebase.initializeApp()."),is("Using default host for project ",e.options.projectId),o=`${e.options.projectId}-default-rtdb.firebaseio.com`);let s,a,l=Gu(o,i),c=l.repoInfo;"undefined"!==typeof process&&(a={NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}.FIREBASE_DATABASE_EMULATOR_HOST),a?(s=!0,o=`http://${a}?ns=${c.namespace}`,l=Gu(o,i),c=l.repoInfo):s=!l.repoInfo.secure;const u=i&&s?new ks(ks.OWNER):new Cs(e.name,e.options,t);vu("Invalid Firebase Database URL",l),ra(l.path)||as("Database URL must point to the root of a Firebase Database (not including a child path).");const d=function(e,t,n,r){let i=fd[t.name];i||(i={},fd[t.name]=i);let o=i[e.toURLString()];o&&as("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call.");return o=new xu(e,pd,n,r),i[e.toURLString()]=o,o}(c,e,u,new Es(e.name,n));return new gd(d,e)}class gd{constructor(e,t){this._repoInternal=e,this.app=t,this.type="database",this._instanceStarted=!1}get _repo(){return this._instanceStarted||(Tu(this._repoInternal,this.app.options.appId,this.app.options.databaseAuthVariableOverride),this._instanceStarted=!0),this._repoInternal}get _root(){return this._rootInternal||(this._rootInternal=new td(this._repo,Ys())),this._rootInternal}_delete(){return null!==this._rootInternal&&(!function(e,t){const n=fd[t];n&&n[e.key]===e||as(`Database ${t}(${e.repoInfo_}) has already been deleted.`),Mu(e),delete n[e.key]}(this._repo,this.app.name),this._repoInternal=null,this._rootInternal=null),Promise.resolve()}_checkNotDeleted(e){null===this._rootInternal&&as("Cannot call "+e+" on a deleted database.")}}fa.prototype.simpleListen=function(e,t){this.sendRequest("q",{p:e},t)},fa.prototype.echo=function(e,t){this.sendRequest("echo",{d:e},t)};!function(e){Vo(Io),Eo(new hi("database",((e,t)=>{let{instanceIdentifier:n}=t;return md(e.getProvider("app").getImmediate(),e.getProvider("auth-internal"),e.getProvider("app-check-internal"),n)}),"PUBLIC").setMultipleInstances(!0)),Ro(Bo,Wo,e),Ro(Bo,Wo,"esm2017")}();const yd="firebasestorage.googleapis.com",vd="storageBucket";class _d extends Vr{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;super(Sd(e),`Firebase Storage: ${t} (${Sd(e)})`),this.status_=n,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,_d.prototype)}get status(){return this.status_}set status(e){this.status_=e}_codeEquals(e){return Sd(e)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message=`${this._baseMessage}\n${this.customData.serverResponse}`:this.message=this._baseMessage}}var bd,wd;function Sd(e){return"storage/"+e}function Ed(){return new _d(bd.UNKNOWN,"An unknown error occurred, please check the error payload for server response.")}function Cd(){return new _d(bd.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function kd(){return new _d(bd.CANCELED,"User canceled the upload/download.")}function xd(){return new _d(bd.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function Td(e){return new _d(bd.INVALID_ARGUMENT,e)}function Id(){return new _d(bd.APP_DELETED,"The Firebase app was deleted.")}function Pd(e,t){return new _d(bd.INVALID_FORMAT,"String does not match format '"+e+"': "+t)}function Ad(e){throw new _d(bd.INTERNAL_ERROR,"Internal error: "+e)}!function(e){e.UNKNOWN="unknown",e.OBJECT_NOT_FOUND="object-not-found",e.BUCKET_NOT_FOUND="bucket-not-found",e.PROJECT_NOT_FOUND="project-not-found",e.QUOTA_EXCEEDED="quota-exceeded",e.UNAUTHENTICATED="unauthenticated",e.UNAUTHORIZED="unauthorized",e.UNAUTHORIZED_APP="unauthorized-app",e.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",e.INVALID_CHECKSUM="invalid-checksum",e.CANCELED="canceled",e.INVALID_EVENT_NAME="invalid-event-name",e.INVALID_URL="invalid-url",e.INVALID_DEFAULT_BUCKET="invalid-default-bucket",e.NO_DEFAULT_BUCKET="no-default-bucket",e.CANNOT_SLICE_BLOB="cannot-slice-blob",e.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",e.NO_DOWNLOAD_URL="no-download-url",e.INVALID_ARGUMENT="invalid-argument",e.INVALID_ARGUMENT_COUNT="invalid-argument-count",e.APP_DELETED="app-deleted",e.INVALID_ROOT_OPERATION="invalid-root-operation",e.INVALID_FORMAT="invalid-format",e.INTERNAL_ERROR="internal-error",e.UNSUPPORTED_ENVIRONMENT="unsupported-environment"}(bd||(bd={}));class Rd{constructor(e,t){this.bucket=e,this.path_=t}get path(){return this.path_}get isRoot(){return 0===this.path.length}fullServerUrl(){const e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(e,t){let n;try{n=Rd.makeFromUrl(e,t)}catch(DE){return new Rd(e,"")}if(""===n.path)return n;throw r=e,new _d(bd.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+r+"'.");var r}static makeFromUrl(e,t){let n=null;const r="([A-Za-z0-9.\\-_]+)";const i=new RegExp("^gs://"+r+"(/(.*))?$","i");function o(e){e.path_=decodeURIComponent(e.path)}const s=t.replace(/[.]/g,"\\."),a=[{regex:i,indices:{bucket:1,path:3},postModify:function(e){"/"===e.path.charAt(e.path.length-1)&&(e.path_=e.path_.slice(0,-1))}},{regex:new RegExp(`^https?://${s}/v[A-Za-z0-9_]+/b/${r}/o(/([^?#]*).*)?$`,"i"),indices:{bucket:1,path:3},postModify:o},{regex:new RegExp(`^https?://${t===yd?"(?:storage.googleapis.com|storage.cloud.google.com)":t}/${r}/([^?#]*)`,"i"),indices:{bucket:1,path:2},postModify:o}];for(let l=0;ln)throw Td(`Invalid value for '${e}'. Expected ${n} or less.`)}function Fd(e,t,n){let r=t;return null==n&&(r=`https://${t}`),`${n}://${r}/v0${e}`}function jd(e){const t=encodeURIComponent;let n="?";for(const r in e)if(e.hasOwnProperty(r)){n=n+(t(r)+"="+t(e[r]))+"&"}return n=n.slice(0,-1),n}function Ud(e,t){const n=e>=500&&e<600,r=-1!==[408,429].indexOf(e),i=-1!==t.indexOf(e);return n||r||i}!function(e){e[e.NO_ERROR=0]="NO_ERROR",e[e.NETWORK_ERROR=1]="NETWORK_ERROR",e[e.ABORT=2]="ABORT"}(wd||(wd={}));class $d{constructor(e,t,n,r,i,o,s,a,l,c,u){let d=!(arguments.length>11&&void 0!==arguments[11])||arguments[11];this.url_=e,this.method_=t,this.headers_=n,this.body_=r,this.successCodes_=i,this.additionalRetryCodes_=o,this.callback_=s,this.errorCallback_=a,this.timeout_=l,this.progressCallback_=c,this.connectionFactory_=u,this.retry=d,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise(((e,t)=>{this.resolve_=e,this.reject_=t,this.start_()}))}start_(){const e=(e,t)=>{if(t)return void e(!1,new zd(!1,null,!0));const n=this.connectionFactory_();this.pendingConnection_=n;const r=e=>{const t=e.loaded,n=e.lengthComputable?e.total:-1;null!==this.progressCallback_&&this.progressCallback_(t,n)};null!==this.progressCallback_&&n.addUploadProgressListener(r),n.send(this.url_,this.method_,this.body_,this.headers_).then((()=>{null!==this.progressCallback_&&n.removeUploadProgressListener(r),this.pendingConnection_=null;const t=n.getErrorCode()===wd.NO_ERROR,i=n.getStatus();if(!t||Ud(i,this.additionalRetryCodes_)&&this.retry){const t=n.getErrorCode()===wd.ABORT;return void e(!1,new zd(!1,null,t))}const o=-1!==this.successCodes_.indexOf(i);e(!0,new zd(o,n))}))},t=(e,t)=>{const n=this.resolve_,r=this.reject_,i=t.connection;if(t.wasSuccessCode)try{const e=this.callback_(i,i.getResponse());void 0!==e?n(e):n()}catch(DE){r(DE)}else if(null!==i){const e=Ed();e.serverResponse=i.getErrorText(),this.errorCallback_?r(this.errorCallback_(i,e)):r(e)}else if(t.canceled){r(this.appDelete_?Id():kd())}else{r(Cd())}};this.canceled_?t(0,new zd(!1,null,!0)):this.backoffId_=function(e,t,n){let r=1,i=null,o=null,s=!1,a=0;function l(){return 2===a}let c=!1;function u(){if(!c){c=!0;for(var e=arguments.length,n=new Array(e),r=0;r{i=null,e(f,l())}),t)}function h(){o&&clearTimeout(o)}function f(e){if(c)return void h();for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i{s=!0,m(!0)}),n),m}(e,t,this.timeout_)}getPromise(){return this.promise_}cancel(e){this.canceled_=!0,this.appDelete_=e||!1,null!==this.backoffId_&&(0,this.backoffId_)(!1),null!==this.pendingConnection_&&this.pendingConnection_.abort()}}class zd{constructor(e,t,n){this.wasSuccessCode=e,this.connection=t,this.canceled=!!n}}function Bd(){return"undefined"!==typeof BlobBuilder?BlobBuilder:"undefined"!==typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0}function Wd(){const e=Bd();for(var t=arguments.length,n=new Array(t),r=0;r>6,128|63&r);else if(55296===(64512&r)){if(n>18,128|r>>12&63,128|r>>6&63,128|63&r)}else t.push(239,191,189)}else 56320===(64512&r)?t.push(239,191,189):t.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(t)}function Xd(e,t){switch(e){case qd:{const n=-1!==t.indexOf("-"),r=-1!==t.indexOf("_");if(n||r){throw Pd(e,"Invalid character '"+(n?"-":"_")+"' found: is it base64url encoded?")}break}case Kd:{const n=-1!==t.indexOf("+"),r=-1!==t.indexOf("/");if(n||r){throw Pd(e,"Invalid character '"+(n?"+":"/")+"' found: is it base64 encoded?")}t=t.replace(/-/g,"+").replace(/_/g,"/");break}}let n;try{n=Hd(t)}catch(DE){if(DE.message.includes("polyfill"))throw DE;throw Pd(e,"Invalid character found")}const r=new Uint8Array(n.length);for(let i=0;i][;base64],");const n=t[1]||null;null!=n&&(this.base64=function(e,t){if(!(e.length>=t.length))return!1;return e.substring(e.length-t.length)===t}(n,";base64"),this.contentType=this.base64?n.substring(0,n.length-7):n),this.rest=e.substring(e.indexOf(",")+1)}}class eh{constructor(e,t){let n=0,r="";Dd(e)?(this.data_=e,n=e.size,r=e.type):e instanceof ArrayBuffer?(t?this.data_=new Uint8Array(e):(this.data_=new Uint8Array(e.byteLength),this.data_.set(new Uint8Array(e))),n=this.data_.length):e instanceof Uint8Array&&(t?this.data_=e:(this.data_=new Uint8Array(e.length),this.data_.set(e)),n=e.length),this.size_=n,this.type_=r}size(){return this.size_}type(){return this.type_}slice(e,t){if(Dd(this.data_)){const n=function(e,t,n){return e.webkitSlice?e.webkitSlice(t,n):e.mozSlice?e.mozSlice(t,n):e.slice?e.slice(t,n):null}(this.data_,e,t);return null===n?null:new eh(n)}{const n=new Uint8Array(this.data_.buffer,e,t-e);return new eh(n,!0)}}static getBlob(){for(var e=arguments.length,t=new Array(e),n=0;ne instanceof eh?e.data_:e));return new eh(Wd.apply(null,e))}{const e=t.map((e=>Od(e)?Qd(Vd,e).data:e.data_));let n=0;e.forEach((e=>{n+=e.byteLength}));const r=new Uint8Array(n);let i=0;return e.forEach((e=>{for(let t=0;t{const i=e.bucket,o=e.fullPath;return Fd("/b/"+s(i)+"/o/"+s(o),n,r)+jd({alt:"media",token:t})}));return a[0]}(i,r,e.host,e._protocol)}}function ph(e){return function(t,n){let r;var i,o;return 401===t.getStatus()?r=t.getErrorText().includes("Firebase App Check token is invalid")?new _d(bd.UNAUTHORIZED_APP,"This app does not have permission to access Firebase Storage on this project."):new _d(bd.UNAUTHENTICATED,"User is not authenticated, please authenticate using Firebase Authentication and try again."):402===t.getStatus()?(o=e.bucket,r=new _d(bd.QUOTA_EXCEEDED,"Quota for bucket '"+o+"' exceeded, please view quota on https://firebase.google.com/pricing/.")):403===t.getStatus()?(i=e.path,r=new _d(bd.UNAUTHORIZED,"User does not have permission to access '"+i+"'.")):r=n,r.status=t.getStatus(),r.serverResponse=n.serverResponse,r}}function mh(e){const t=ph(e);return function(n,r){let i=t(n,r);var o;return 404===n.getStatus()&&(o=e.path,i=new _d(bd.OBJECT_NOT_FOUND,"Object '"+o+"' does not exist.")),i.serverResponse=r.serverResponse,i}}function gh(e,t,n){const r=Object.assign({},n);return r.fullPath=e.path,r.size=t.size(),r.contentType||(r.contentType=function(e,t){return e&&e.contentType||t&&t.type()||"application/octet-stream"}(null,t)),r}function yh(e,t,n,r,i){const o=t.bucketOnlyServerUrl(),s={"X-Goog-Upload-Protocol":"multipart"};const a=function(){let e="";for(let t=0;t<2;t++)e+=Math.random().toString().slice(2);return e}();s["Content-Type"]="multipart/related; boundary="+a;const l=gh(t,r,i),c="--"+a+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+ch(l,n)+"\r\n--"+a+"\r\nContent-Type: "+l.contentType+"\r\n\r\n",u="\r\n--"+a+"--",d=eh.getBlob(c,r,u);if(null===d)throw xd();const h={name:l.fullPath},f=Fd(o,e.host,e._protocol),p=e.maxUploadRetryTime,m=new uh(f,"POST",hh(e,n),p);return m.urlParams=h,m.headers=s,m.body=d.uploadData(),m.errorHandler=ph(t),m}class vh{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=wd.NO_ERROR,this.sendPromise_=new Promise((e=>{this.xhr_.addEventListener("abort",(()=>{this.errorCode_=wd.ABORT,e()})),this.xhr_.addEventListener("error",(()=>{this.errorCode_=wd.NETWORK_ERROR,e()})),this.xhr_.addEventListener("load",(()=>{e()}))}))}send(e,t,n,r){if(this.sent_)throw Ad("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(t,e,!0),void 0!==r)for(const i in r)r.hasOwnProperty(i)&&this.xhr_.setRequestHeader(i,r[i].toString());return void 0!==n?this.xhr_.send(n):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw Ad("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw Ad("cannot .getStatus() before sending");try{return this.xhr_.status}catch(DE){return-1}}getResponse(){if(!this.sent_)throw Ad("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw Ad("cannot .getErrorText() before sending");return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader(e){return this.xhr_.getResponseHeader(e)}addUploadProgressListener(e){null!=this.xhr_.upload&&this.xhr_.upload.addEventListener("progress",e)}removeUploadProgressListener(e){null!=this.xhr_.upload&&this.xhr_.upload.removeEventListener("progress",e)}}class _h extends vh{initXhr(){this.xhr_.responseType="text"}}function bh(){return new _h}class wh{constructor(e,t){this._service=e,this._location=t instanceof Rd?t:Rd.makeFromUrl(t,e.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(e,t){return new wh(e,t)}get root(){const e=new Rd(this._location.bucket,"");return this._newRef(this._service,e)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return nh(this._location.path)}get storage(){return this._service}get parent(){const e=function(e){if(0===e.length)return null;const t=e.lastIndexOf("/");return-1===t?"":e.slice(0,t)}(this._location.path);if(null===e)return null;const t=new Rd(this._location.bucket,e);return new wh(this._service,t)}_throwIfRoot(e){if(""===this._location.path)throw function(e){return new _d(bd.INVALID_ROOT_OPERATION,"The operation '"+e+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}(e)}}function Sh(e,t,n){e._throwIfRoot("uploadBytes");const r=yh(e.storage,e._location,sh(),new eh(t,!0),n);return e.storage.makeRequestWithTokens(r,bh).then((t=>({metadata:t,ref:e})))}function Eh(e){e._throwIfRoot("getDownloadURL");const t=function(e,t,n){const r=Fd(t.fullServerUrl(),e.host,e._protocol),i=e.maxOperationRetryTime,o=new uh(r,"GET",fh(e,n),i);return o.errorHandler=mh(t),o}(e.storage,e._location,sh());return e.storage.makeRequestWithTokens(t,bh).then((e=>{if(null===e)throw new _d(bd.NO_DOWNLOAD_URL,"The given file does not have any download URLs.");return e}))}function Ch(e){e._throwIfRoot("deleteObject");const t=function(e,t){const n=Fd(t.fullServerUrl(),e.host,e._protocol),r=e.maxOperationRetryTime,i=new uh(n,"DELETE",(function(e,t){}),r);return i.successCodes=[200,204],i.errorHandler=mh(t),i}(e.storage,e._location);return e.storage.makeRequestWithTokens(t,bh)}function kh(e,t){const n=function(e,t){const n=t.split("/").filter((e=>e.length>0)).join("/");return 0===e.length?n:e+"/"+n}(e._location.path,t),r=new Rd(e._location.bucket,n);return new wh(e.storage,r)}function xh(e,t){if(e instanceof Ph){const n=e;if(null==n._bucket)throw new _d(bd.NO_DEFAULT_BUCKET,"No default bucket found. Did you set the '"+vd+"' property when initializing the app?");const r=new wh(n,n._bucket);return null!=t?xh(r,t):r}return void 0!==t?kh(e,t):e}function Th(e,t){if(t&&/^[A-Za-z]+:\/\//.test(t)){if(e instanceof Ph)return new wh(e,t);throw Td("To use ref(service, url), the first argument must be a Storage instance.")}return xh(e,t)}function Ih(e,t){const n=null===t||void 0===t?void 0:t[vd];return null==n?null:Rd.makeFromBucketSpec(n,e)}class Ph{constructor(e,t,n,r,i){this.app=e,this._authProvider=t,this._appCheckProvider=n,this._url=r,this._firebaseVersion=i,this._bucket=null,this._host=yd,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,this._bucket=null!=r?Rd.makeFromBucketSpec(r,this._host):Ih(this._host,this.app.options)}get host(){return this._host}set host(e){this._host=e,null!=this._url?this._bucket=Rd.makeFromBucketSpec(this._url,e):this._bucket=Ih(e,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(e){Md("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(e){Md("time",0,Number.POSITIVE_INFINITY,e),this._maxOperationRetryTime=e}async _getAuthToken(){if(this._overrideAuthToken)return this._overrideAuthToken;const e=this._authProvider.getImmediate({optional:!0});if(e){const t=await e.getToken();if(null!==t)return t.accessToken}return null}async _getAppCheckToken(){const e=this._appCheckProvider.getImmediate({optional:!0});if(e){return(await e.getToken()).token}return null}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEach((e=>e.cancel())),this._requests.clear()),Promise.resolve()}_makeStorageReference(e){return new wh(this,e)}_makeRequest(e,t,n,r){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(this._deleted)return new Nd(Id());{const o=function(e,t,n,r,i,o){let s=!(arguments.length>6&&void 0!==arguments[6])||arguments[6];const a=jd(e.urlParams),l=e.url+a,c=Object.assign({},e.headers);return function(e,t){t&&(e["X-Firebase-GMPID"]=t)}(c,t),function(e,t){null!==t&&t.length>0&&(e.Authorization="Firebase "+t)}(c,n),function(e,t){e["X-Firebase-Storage-Version"]="webjs/"+(null!==t&&void 0!==t?t:"AppManager")}(c,o),function(e,t){null!==t&&(e["X-Firebase-AppCheck"]=t)}(c,r),new $d(l,e.method,c,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,i,s)}(e,this._appId,n,r,t,this._firebaseVersion,i);return this._requests.add(o),o.getPromise().then((()=>this._requests.delete(o)),(()=>this._requests.delete(o))),o}}async makeRequestWithTokens(e,t){const[n,r]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(e,t,n,r).getPromise()}}const Ah="@firebase/storage",Rh="0.13.2",Nh="storage";function Oh(e,t,n){return Sh(e=di(e),t,n)}function Dh(e){return Eh(e=di(e))}function Lh(e){return Ch(e=di(e))}function Mh(e,t){return Th(e=di(e),t)}function Fh(e,t){let{instanceIdentifier:n}=t;const r=e.getProvider("app").getImmediate(),i=e.getProvider("auth-internal"),o=e.getProvider("app-check-internal");return new Ph(r,i,o,n,Io)}Eo(new hi(Nh,Fh,"PUBLIC").setMultipleInstances(!0)),Ro(Ah,Rh,""),Ro(Ah,Rh,"esm2017");Ro("firebase","10.14.0","app");function jh(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r2?n-2:0),i=2;ie,"Short delay should be less than long delay!"),this.isMobile=Br()||Wr()}get(){return tf()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}function rf(e,t){Jh(e.emulator,"Emulator should always be set here");const{url:n}=e.emulator;return t?`${n}${t.startsWith("/")?t.slice(1):t}`:n}class of{static initialize(e,t,n){this.fetchImpl=e,t&&(this.headersImpl=t),n&&(this.responseImpl=n)}static fetch(){return this.fetchImpl?this.fetchImpl:"undefined"!==typeof self&&"fetch"in self?self.fetch:"undefined"!==typeof globalThis&&globalThis.fetch?globalThis.fetch:"undefined"!==typeof fetch?fetch:void Qh("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){return this.headersImpl?this.headersImpl:"undefined"!==typeof self&&"Headers"in self?self.Headers:"undefined"!==typeof globalThis&&globalThis.Headers?globalThis.Headers:"undefined"!==typeof Headers?Headers:void Qh("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){return this.responseImpl?this.responseImpl:"undefined"!==typeof self&&"Response"in self?self.Response:"undefined"!==typeof globalThis&&globalThis.Response?globalThis.Response:"undefined"!==typeof Response?Response:void Qh("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}const sf={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"},af=new nf(3e4,6e4);function lf(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}async function cf(e,t,n,r){return uf(e,arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},(async()=>{let i={},o={};r&&("GET"===t?o=r:i={body:JSON.stringify(r)});const s=ri(Object.assign({key:e.config.apiKey},o)).slice(1),a=await e._getAdditionalHeaders();a["Content-Type"]="application/json",e.languageCode&&(a["X-Firebase-Locale"]=e.languageCode);const l=Object.assign({method:t,headers:a},i);return"undefined"!==typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||(l.referrerPolicy="no-referrer"),of.fetch()(hf(e,e.config.apiHost,n,s),l)}))}async function uf(e,t,n){e._canInitEmulator=!1;const r=Object.assign(Object.assign({},sf),t);try{const t=new pf(e),i=await Promise.race([n(),t.promise]);t.clearNetworkTimeout();const o=await i.json();if("needConfirmation"in o)throw mf(e,"account-exists-with-different-credential",o);if(i.ok&&!("errorMessage"in o))return o;{const t=i.ok?o.errorMessage:o.error.message,[n,s]=t.split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===n)throw mf(e,"credential-already-in-use",o);if("EMAIL_EXISTS"===n)throw mf(e,"email-already-in-use",o);if("USER_DISABLED"===n)throw mf(e,"user-disabled",o);const a=r[n]||n.toLowerCase().replace(/[_\s]+/g,"-");if(s)throw qh(e,a,s);Hh(e,a)}}catch(DE){if(DE instanceof Vr)throw DE;Hh(e,"network-request-failed",{message:String(DE)})}}async function df(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const o=await cf(e,t,n,r,i);return"mfaPendingCredential"in o&&Hh(e,"multi-factor-auth-required",{_serverResponse:o}),o}function hf(e,t,n,r){const i=`${t}${n}?${r}`;return e.config.emulator?rf(e.config,i):`${e.config.apiScheme}://${i}`}function ff(e){switch(e){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}class pf{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise(((e,t)=>{this.timer=setTimeout((()=>t(Vh(this.auth,"network-request-failed"))),af.get())}))}clearNetworkTimeout(){clearTimeout(this.timer)}}function mf(e,t,n){const r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const i=Vh(e,t,r);return i.customData._tokenResponse=n,i}function gf(e){return void 0!==e&&void 0!==e.enterprise}class yf{constructor(e){if(this.siteKey="",this.recaptchaEnforcementState=[],void 0===e.recaptchaKey)throw new Error("recaptchaKey undefined");this.siteKey=e.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=e.recaptchaEnforcementState}getProviderEnforcementState(e){if(!this.recaptchaEnforcementState||0===this.recaptchaEnforcementState.length)return null;for(const t of this.recaptchaEnforcementState)if(t.provider&&t.provider===e)return ff(t.enforcementState);return null}isProviderEnabled(e){return"ENFORCE"===this.getProviderEnforcementState(e)||"AUDIT"===this.getProviderEnforcementState(e)}}async function vf(e,t){return cf(e,"GET","/v2/recaptchaConfig",lf(e,t))}async function _f(e,t){return cf(e,"POST","/v1/accounts:lookup",t)}function bf(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(DE){}}function wf(e){return 1e3*Number(e)}function Sf(e){const[t,n,r]=e.split(".");if(void 0===t||void 0===n||void 0===r)return Wh("JWT malformed, contained fewer than 3 sections"),null;try{const e=Ar(n);return e?JSON.parse(e):(Wh("Failed to decode base64 JWT payload"),null)}catch(DE){return Wh("Caught error parsing JWT payload as JSON",null===DE||void 0===DE?void 0:DE.toString()),null}}function Ef(e){const t=Sf(e);return Yh(t,"internal-error"),Yh("undefined"!==typeof t.exp,"internal-error"),Yh("undefined"!==typeof t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}async function Cf(e,t){if(arguments.length>2&&void 0!==arguments[2]&&arguments[2])return t;try{return await t}catch(DE){throw DE instanceof Vr&&function(e){let{code:t}=e;return"auth/user-disabled"===t||"auth/user-token-expired"===t}(DE)&&e.auth.currentUser===e&&await e.auth.signOut(),DE}}class kf{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}getInterval(e){var t;if(e){const e=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),e}{this.errorBackoff=3e4;const e=(null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t:0)-Date.now()-3e5;return Math.max(0,e)}}schedule(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.isRunning)return;const t=this.getInterval(e);this.timerId=setTimeout((async()=>{await this.iteration()}),t)}async iteration(){try{await this.user.getIdToken(!0)}catch(DE){return void("auth/network-request-failed"===(null===DE||void 0===DE?void 0:DE.code)&&this.schedule(!0))}this.schedule()}}class xf{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=bf(this.lastLoginAt),this.creationTime=bf(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}async function Tf(e){var t;const n=e.auth,r=await e.getIdToken(),i=await Cf(e,_f(n,{idToken:r}));Yh(null===i||void 0===i?void 0:i.users.length,n,"internal-error");const o=i.users[0];e._notifyReloadListener(o);const s=(null===(t=o.providerUserInfo)||void 0===t?void 0:t.length)?If(o.providerUserInfo):[],a=(l=e.providerData,c=s,[...l.filter((e=>!c.some((t=>t.providerId===e.providerId)))),...c]);var l,c;const u=e.isAnonymous,d=!(e.email&&o.passwordHash)&&!(null===a||void 0===a?void 0:a.length),h=!!u&&d,f={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:a,metadata:new xf(o.createdAt,o.lastLoginAt),isAnonymous:h};Object.assign(e,f)}function If(e){return e.map((e=>{var{providerId:t}=e,n=jh(e,["providerId"]);return{providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}}))}class Pf{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){Yh(e.idToken,"internal-error"),Yh("undefined"!==typeof e.idToken,"internal-error"),Yh("undefined"!==typeof e.refreshToken,"internal-error");const t="expiresIn"in e&&"undefined"!==typeof e.expiresIn?Number(e.expiresIn):Ef(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}updateFromIdToken(e){Yh(0!==e.length,"internal-error");const t=Ef(e);this.updateTokensAndExpiration(e,null,t)}async getToken(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]||!this.accessToken||this.isExpired?(Yh(this.refreshToken,e,"user-token-expired"),this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null):this.accessToken}clearRefreshToken(){this.refreshToken=null}async refresh(e,t){const{accessToken:n,refreshToken:r,expiresIn:i}=await async function(e,t){const n=await uf(e,{},(async()=>{const n=ri({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:r,apiKey:i}=e.config,o=hf(e,r,"/v1/token",`key=${i}`),s=await e._getAdditionalHeaders();return s["Content-Type"]="application/x-www-form-urlencoded",of.fetch()(o,{method:"POST",headers:s,body:n})}));return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}(e,t);this.updateTokensAndExpiration(n,r,Number(i))}updateTokensAndExpiration(e,t,n){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*n}static fromJSON(e,t){const{refreshToken:n,accessToken:r,expirationTime:i}=t,o=new Pf;return n&&(Yh("string"===typeof n,"internal-error",{appName:e}),o.refreshToken=n),r&&(Yh("string"===typeof r,"internal-error",{appName:e}),o.accessToken=r),i&&(Yh("number"===typeof i,"internal-error",{appName:e}),o.expirationTime=i),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new Pf,this.toJSON())}_performRefresh(){return Qh("not implemented")}}function Af(e,t){Yh("string"===typeof e||"undefined"===typeof e,"internal-error",{appName:t})}class Rf{constructor(e){var{uid:t,auth:n,stsTokenManager:r}=e,i=jh(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new kf(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=n,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=i.displayName||null,this.email=i.email||null,this.emailVerified=i.emailVerified||!1,this.phoneNumber=i.phoneNumber||null,this.photoURL=i.photoURL||null,this.isAnonymous=i.isAnonymous||!1,this.tenantId=i.tenantId||null,this.providerData=i.providerData?[...i.providerData]:[],this.metadata=new xf(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(e){const t=await Cf(this,this.stsTokenManager.getToken(this.auth,e));return Yh(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return async function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=di(e),r=await n.getIdToken(t),i=Sf(r);Yh(i&&i.exp&&i.auth_time&&i.iat,n.auth,"internal-error");const o="object"===typeof i.firebase?i.firebase:void 0,s=null===o||void 0===o?void 0:o.sign_in_provider;return{claims:i,token:r,authTime:bf(wf(i.auth_time)),issuedAtTime:bf(wf(i.iat)),expirationTime:bf(wf(i.exp)),signInProvider:s||null,signInSecondFactor:(null===o||void 0===o?void 0:o.sign_in_second_factor)||null}}(this,e)}reload(){return async function(e){const t=di(e);await Tf(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}(this)}_assign(e){this!==e&&(Yh(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map((e=>Object.assign({},e))),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){const t=new Rf(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return t.metadata._copy(this.metadata),t}_onReload(e){Yh(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),n=!0),t&&await Tf(this),await this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(ko(this.auth.app))return Promise.reject(Kh(this.auth));const e=await this.getIdToken();return await Cf(this,async function(e,t){return cf(e,"POST","/v1/accounts:delete",t)}(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map((e=>Object.assign({},e))),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,t){var n,r,i,o,s,a,l,c;const u=null!==(n=t.displayName)&&void 0!==n?n:void 0,d=null!==(r=t.email)&&void 0!==r?r:void 0,h=null!==(i=t.phoneNumber)&&void 0!==i?i:void 0,f=null!==(o=t.photoURL)&&void 0!==o?o:void 0,p=null!==(s=t.tenantId)&&void 0!==s?s:void 0,m=null!==(a=t._redirectEventId)&&void 0!==a?a:void 0,g=null!==(l=t.createdAt)&&void 0!==l?l:void 0,y=null!==(c=t.lastLoginAt)&&void 0!==c?c:void 0,{uid:v,emailVerified:_,isAnonymous:b,providerData:w,stsTokenManager:S}=t;Yh(v&&S,e,"internal-error");const E=Pf.fromJSON(this.name,S);Yh("string"===typeof v,e,"internal-error"),Af(u,e.name),Af(d,e.name),Yh("boolean"===typeof _,e,"internal-error"),Yh("boolean"===typeof b,e,"internal-error"),Af(h,e.name),Af(f,e.name),Af(p,e.name),Af(m,e.name),Af(g,e.name),Af(y,e.name);const C=new Rf({uid:v,auth:e,email:d,emailVerified:_,displayName:u,isAnonymous:b,photoURL:f,phoneNumber:h,tenantId:p,stsTokenManager:E,createdAt:g,lastLoginAt:y});return w&&Array.isArray(w)&&(C.providerData=w.map((e=>Object.assign({},e)))),m&&(C._redirectEventId=m),C}static async _fromIdTokenResponse(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=new Pf;r.updateFromServerResponse(t);const i=new Rf({uid:t.localId,auth:e,stsTokenManager:r,isAnonymous:n});return await Tf(i),i}static async _fromGetAccountInfoResponse(e,t,n){const r=t.users[0];Yh(void 0!==r.localId,"internal-error");const i=void 0!==r.providerUserInfo?If(r.providerUserInfo):[],o=!(r.email&&r.passwordHash)&&!(null===i||void 0===i?void 0:i.length),s=new Pf;s.updateFromIdToken(n);const a=new Rf({uid:r.localId,auth:e,stsTokenManager:s,isAnonymous:o}),l={uid:r.localId,displayName:r.displayName||null,photoURL:r.photoUrl||null,email:r.email||null,emailVerified:r.emailVerified||!1,phoneNumber:r.phoneNumber||null,tenantId:r.tenantId||null,providerData:i,metadata:new xf(r.createdAt,r.lastLoginAt),isAnonymous:!(r.email&&r.passwordHash)&&!(null===i||void 0===i?void 0:i.length)};return Object.assign(a,l),a}}const Nf=new Map;function Of(e){Jh(e instanceof Function,"Expected a class definition");let t=Nf.get(e);return t?(Jh(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,Nf.set(e,t),t)}class Df{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){const t=this.storage[e];return void 0===t?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}}Df.type="NONE";const Lf=Df;function Mf(e,t,n){return`firebase:${e}:${t}:${n}`}class Ff{constructor(e,t,n){this.persistence=e,this.auth=t,this.userKey=n;const{config:r,name:i}=this.auth;this.fullUserKey=Mf(this.userKey,r.apiKey,i),this.fullPersistenceKey=Mf("persistence",r.apiKey,i),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){const e=await this.persistence._get(this.fullUserKey);return e?Rf._fromJSON(this.auth,e):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;const t=await this.getCurrentUser();return await this.removeCurrentUser(),this.persistence=e,t?this.setCurrentUser(t):void 0}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"authUser";if(!t.length)return new Ff(Of(Lf),e,n);const r=(await Promise.all(t.map((async e=>{if(await e._isAvailable())return e})))).filter((e=>e));let i=r[0]||Of(Lf);const o=Mf(n,e.config.apiKey,e.name);let s=null;for(const c of t)try{const t=await c._get(o);if(t){const n=Rf._fromJSON(e,t);c!==i&&(s=n),i=c;break}}catch(l){}const a=r.filter((e=>e._shouldAllowMigration));return i._shouldAllowMigration&&a.length?(i=a[0],s&&await i._set(o,s.toJSON()),await Promise.all(t.map((async e=>{if(e!==i)try{await e._remove(o)}catch(l){}}))),new Ff(i,e,n)):new Ff(i,e,n)}}function jf(e){const t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(Bf(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(Uf(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(Hf(t))return"Blackberry";if(Vf(t))return"Webos";if($f(t))return"Safari";if((t.includes("chrome/")||zf(t))&&!t.includes("edge/"))return"Chrome";if(Wf(t))return"Android";{const t=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,n=e.match(t);if(2===(null===n||void 0===n?void 0:n.length))return n[1]}return"Other"}function Uf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zr();return/firefox\//i.test(e)}function $f(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:zr()).toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function zf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zr();return/crios\//i.test(e)}function Bf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zr();return/iemobile/i.test(e)}function Wf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zr();return/android/i.test(e)}function Hf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zr();return/blackberry/i.test(e)}function Vf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zr();return/webos/i.test(e)}function qf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zr();return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function Kf(){return function(){const e=zr();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}()&&10===document.documentMode}function Gf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zr();return qf(e)||Wf(e)||Vf(e)||Hf(e)||/windows phone/i.test(e)||Bf(e)}function Yf(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];switch(e){case"Browser":t=jf(zr());break;case"Worker":t=`${jf(zr())}-${e}`;break;default:t=e}const r=n.length?n.join(","):"FirebaseCore-web";return`${t}/JsCore/${Io}/${r}`}class Qf{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){const n=t=>new Promise(((n,r)=>{try{n(e(t))}catch(DE){r(DE)}}));n.onAbort=t,this.queue.push(n);const r=this.queue.length-1;return()=>{this.queue[r]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;const t=[];try{for(const n of this.queue)await n(e),n.onAbort&&t.push(n.onAbort)}catch(DE){t.reverse();for(const n of t)try{n()}catch(me){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null===DE||void 0===DE?void 0:DE.message})}}}class Jf{constructor(e){var t,n,r,i;const o=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=null!==(t=o.minPasswordLength)&&void 0!==t?t:6,o.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=o.maxPasswordLength),void 0!==o.containsLowercaseCharacter&&(this.customStrengthOptions.containsLowercaseLetter=o.containsLowercaseCharacter),void 0!==o.containsUppercaseCharacter&&(this.customStrengthOptions.containsUppercaseLetter=o.containsUppercaseCharacter),void 0!==o.containsNumericCharacter&&(this.customStrengthOptions.containsNumericCharacter=o.containsNumericCharacter),void 0!==o.containsNonAlphanumericCharacter&&(this.customStrengthOptions.containsNonAlphanumericCharacter=o.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,"ENFORCEMENT_STATE_UNSPECIFIED"===this.enforcementState&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=null!==(r=null===(n=e.allowedNonAlphanumericCharacters)||void 0===n?void 0:n.join(""))&&void 0!==r?r:"",this.forceUpgradeOnSignin=null!==(i=e.forceUpgradeOnSignin)&&void 0!==i&&i,this.schemaVersion=e.schemaVersion}validatePassword(e){var t,n,r,i,o,s;const a={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,a),this.validatePasswordCharacterOptions(e,a),a.isValid&&(a.isValid=null===(t=a.meetsMinPasswordLength)||void 0===t||t),a.isValid&&(a.isValid=null===(n=a.meetsMaxPasswordLength)||void 0===n||n),a.isValid&&(a.isValid=null===(r=a.containsLowercaseLetter)||void 0===r||r),a.isValid&&(a.isValid=null===(i=a.containsUppercaseLetter)||void 0===i||i),a.isValid&&(a.isValid=null===(o=a.containsNumericCharacter)||void 0===o||o),a.isValid&&(a.isValid=null===(s=a.containsNonAlphanumericCharacter)||void 0===s||s),a}validatePasswordLengthOptions(e,t){const n=this.customStrengthOptions.minPasswordLength,r=this.customStrengthOptions.maxPasswordLength;n&&(t.meetsMinPasswordLength=e.length>=n),r&&(t.meetsMaxPasswordLength=e.length<=r)}validatePasswordCharacterOptions(e,t){let n;this.updatePasswordCharacterOptionsStatuses(t,!1,!1,!1,!1);for(let r=0;r="a"&&n<="z",n>="A"&&n<="Z",n>="0"&&n<="9",this.allowedNonAlphanumericCharacters.includes(n))}updatePasswordCharacterOptionsStatuses(e,t,n,r,i){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=t)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=n)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=r)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=i))}}class Xf{constructor(e,t,n,r){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=n,this.config=r,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new ep(this),this.idTokenSubscription=new ep(this),this.beforeStateQueue=new Qf(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=zh,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=r.sdkClientVersion}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=Of(t)),this._initializationPromise=this.queue((async()=>{var n,r;if(!this._deleted&&(this.persistenceManager=await Ff.create(this,e),!this._deleted)){if(null===(n=this._popupRedirectResolver)||void 0===n?void 0:n._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch(DE){}await this.initializeCurrentUser(t),this.lastNotifiedUid=(null===(r=this.currentUser)||void 0===r?void 0:r.uid)||null,this._deleted||(this._isInitialized=!0)}})),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const e=await this.assertedPersistence.getCurrentUser();return this.currentUser||e?this.currentUser&&e&&this.currentUser.uid===e.uid?(this._currentUser._assign(e),void await this.currentUser.getIdToken()):void await this._updateCurrentUser(e,!0):void 0}async initializeCurrentUserFromIdToken(e){try{const t=await _f(this,{idToken:e}),n=await Rf._fromGetAccountInfoResponse(this,t,e);await this.directlySetCurrentUser(n)}catch(t){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",t),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(e){var t;if(ko(this.app)){const e=this.app.settings.authIdToken;return e?new Promise((t=>{setTimeout((()=>this.initializeCurrentUserFromIdToken(e).then(t,t)))})):this.directlySetCurrentUser(null)}const n=await this.assertedPersistence.getCurrentUser();let r=n,i=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const n=null===(t=this.redirectUser)||void 0===t?void 0:t._redirectEventId,o=null===r||void 0===r?void 0:r._redirectEventId,s=await this.tryRedirectSignIn(e);n&&n!==o||!(null===s||void 0===s?void 0:s.user)||(r=s.user,i=!0)}if(!r)return this.directlySetCurrentUser(null);if(!r._redirectEventId){if(i)try{await this.beforeStateQueue.runMiddleware(r)}catch(DE){r=n,this._popupRedirectResolver._overrideRedirectResult(this,(()=>Promise.reject(DE)))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return Yh(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch(DE){await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await Tf(e)}catch(DE){if("auth/network-request-failed"!==(null===DE||void 0===DE?void 0:DE.code))return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=function(){if("undefined"===typeof navigator)return null;const e=navigator;return e.languages&&e.languages[0]||e.language||null}()}async _delete(){this._deleted=!0}async updateCurrentUser(e){if(ko(this.app))return Promise.reject(Kh(this));const t=e?di(e):null;return t&&Yh(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this._deleted)return e&&Yh(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),t||await this.beforeStateQueue.runMiddleware(e),this.queue((async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()}))}async signOut(){return ko(this.app)?Promise.reject(Kh(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(e){return ko(this.app)?Promise.reject(Kh(this)):this.queue((async()=>{await this.assertedPersistence.setPersistence(Of(e))}))}_getRecaptchaConfig(){return null==this.tenantId?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();const t=this._getPasswordPolicyInternal();return t.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):t.validatePassword(e)}_getPasswordPolicyInternal(){return null===this.tenantId?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const e=await async function(e){return cf(e,"GET","/v2/passwordPolicy",lf(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}))}(this),t=new Jf(e);null===this.tenantId?this._projectPasswordPolicy=t:this._tenantPasswordPolicies[this.tenantId]=t}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new qr("auth","Firebase",e())}onAuthStateChanged(e,t,n){return this.registerStateListener(this.authStateSubscription,e,t,n)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,n){return this.registerStateListener(this.idTokenSubscription,e,t,n)}authStateReady(){return new Promise(((e,t)=>{if(this.currentUser)e();else{const n=this.onAuthStateChanged((()=>{n(),e()}),t)}}))}async revokeAccessToken(e){if(this.currentUser){const t={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:await this.currentUser.getIdToken()};null!=this.tenantId&&(t.tenantId=this.tenantId),await async function(e,t){return cf(e,"POST","/v2/accounts:revokeToken",lf(e,t))}(this,t)}}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:null===(e=this._currentUser)||void 0===e?void 0:e.toJSON()}}async _setRedirectUser(e,t){const n=await this.getOrInitRedirectPersistenceManager(t);return null===e?n.removeCurrentUser():n.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){const t=e&&Of(e)||this._popupRedirectResolver;Yh(t,this,"argument-error"),this.redirectPersistenceManager=await Ff.create(this,[Of(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var t,n;return this._isInitialized&&await this.queue((async()=>{})),(null===(t=this._currentUser)||void 0===t?void 0:t._redirectEventId)===e?this._currentUser:(null===(n=this.redirectUser)||void 0===n?void 0:n._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue((async()=>this.directlySetCurrentUser(e)))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,t;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const n=null!==(t=null===(e=this.currentUser)||void 0===e?void 0:e.uid)&&void 0!==t?t:null;this.lastNotifiedUid!==n&&(this.lastNotifiedUid=n,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,n,r){if(this._deleted)return()=>{};const i="function"===typeof t?t:t.next.bind(t);let o=!1;const s=this._isInitialized?Promise.resolve():this._initializationPromise;if(Yh(s,this,"internal-error"),s.then((()=>{o||i(this.currentUser)})),"function"===typeof t){const i=e.addObserver(t,n,r);return()=>{o=!0,i()}}{const n=e.addObserver(t);return()=>{o=!0,n()}}}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return Yh(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){e&&!this.frameworks.includes(e)&&(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=Yf(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var e;const t={"X-Client-Version":this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);const n=await(null===(e=this.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getHeartbeatsHeader());n&&(t["X-Firebase-Client"]=n);const r=await this._getAppCheckToken();return r&&(t["X-Firebase-AppCheck"]=r),t}async _getAppCheckToken(){var e;const t=await(null===(e=this.appCheckServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getToken());return(null===t||void 0===t?void 0:t.error)&&function(e){if(Bh.logLevel<=vi.WARN){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;rthis.observer=e))}get next(){return Yh(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}let tp={async loadJS(){throw new Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function np(e){return tp.loadJS(e)}function rp(e){return`__${e}${Math.floor(1e6*Math.random())}`}class ip{constructor(e){this.type="recaptcha-enterprise",this.auth=Zf(e)}async verify(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"verify",t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];function n(t,n,r){const i=window.grecaptcha;gf(i)?i.enterprise.ready((()=>{i.enterprise.execute(t,{action:e}).then((e=>{n(e)})).catch((()=>{n("NO_RECAPTCHA")}))})):r(Error("No reCAPTCHA enterprise script loaded."))}return new Promise(((e,r)=>{(async function(e){if(!t){if(null==e.tenantId&&null!=e._agentRecaptchaConfig)return e._agentRecaptchaConfig.siteKey;if(null!=e.tenantId&&void 0!==e._tenantRecaptchaConfigs[e.tenantId])return e._tenantRecaptchaConfigs[e.tenantId].siteKey}return new Promise((async(t,n)=>{vf(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then((r=>{if(void 0!==r.recaptchaKey){const n=new yf(r);return null==e.tenantId?e._agentRecaptchaConfig=n:e._tenantRecaptchaConfigs[e.tenantId]=n,t(n.siteKey)}n(new Error("recaptcha Enterprise site key undefined"))})).catch((e=>{n(e)}))}))})(this.auth).then((i=>{if(!t&&gf(window.grecaptcha))n(i,e,r);else{if("undefined"===typeof window)return void r(new Error("RecaptchaVerifier is only supported in browser"));let t=tp.recaptchaEnterpriseScript;0!==t.length&&(t+=i),np(t).then((()=>{n(i,e,r)})).catch((e=>{r(e)}))}})).catch((e=>{r(e)}))}))}}async function op(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=new ip(e);let o;try{o=await i.verify(n)}catch(ss){o=await i.verify(n,!0)}const s=Object.assign({},t);return r?Object.assign(s,{captchaResp:o}):Object.assign(s,{captchaResponse:o}),Object.assign(s,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(s,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),s}async function sp(e,t,n,r){var i;if(null===(i=e._getRecaptchaConfig())||void 0===i?void 0:i.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")){const i=await op(e,t,n,"getOobCode"===n);return r(e,i)}return r(e,t).catch((async i=>{if("auth/missing-recaptcha-token"===i.code){console.log(`${n} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);const i=await op(e,t,n,"getOobCode"===n);return r(e,i)}return Promise.reject(i)}))}function ap(e,t,n){const r=Zf(e);Yh(r._canInitEmulator,r,"emulator-config-failed"),Yh(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");const i=!!(null===n||void 0===n?void 0:n.disableWarnings),o=lp(t),{host:s,port:a}=function(e){const t=lp(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};const r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){const e=i[1];return{host:e,port:cp(r.substr(e.length+1))}}{const[e,t]=r.split(":");return{host:e,port:cp(t)}}}(t),l=null===a?"":`:${a}`;r.config.emulator={url:`${o}//${s}${l}/`},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:s,port:a,protocol:o.replace(":",""),options:Object.freeze({disableWarnings:i})}),i||function(){function e(){const e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}"undefined"!==typeof console&&"function"===typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials.");"undefined"!==typeof window&&"undefined"!==typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}()}function lp(e){const t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function cp(e){if(!e)return null;const t=Number(e);return isNaN(t)?null:t}class up{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return Qh("not implemented")}_getIdTokenResponse(e){return Qh("not implemented")}_linkToIdToken(e,t){return Qh("not implemented")}_getReauthenticationResolver(e){return Qh("not implemented")}}async function dp(e,t){return cf(e,"POST","/v1/accounts:signUp",t)}async function hp(e,t){return df(e,"POST","/v1/accounts:signInWithPassword",lf(e,t))}class fp extends up{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;super("password",n),this._email=e,this._password=t,this._tenantId=r}static _fromEmailAndPassword(e,t){return new fp(e,t,"password")}static _fromEmailAndCode(e,t){return new fp(e,t,"emailLink",arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){const t="string"===typeof e?JSON.parse(e):e;if((null===t||void 0===t?void 0:t.email)&&(null===t||void 0===t?void 0:t.password)){if("password"===t.signInMethod)return this._fromEmailAndPassword(t.email,t.password);if("emailLink"===t.signInMethod)return this._fromEmailAndCode(t.email,t.password,t.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":return sp(e,{returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signInWithPassword",hp);case"emailLink":return async function(e,t){return df(e,"POST","/v1/accounts:signInWithEmailLink",lf(e,t))}(e,{email:this._email,oobCode:this._password});default:Hh(e,"internal-error")}}async _linkToIdToken(e,t){switch(this.signInMethod){case"password":return sp(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",dp);case"emailLink":return async function(e,t){return df(e,"POST","/v1/accounts:signInWithEmailLink",lf(e,t))}(e,{idToken:t,email:this._email,oobCode:this._password});default:Hh(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}async function pp(e,t){return df(e,"POST","/v1/accounts:signInWithIdp",lf(e,t))}class mp extends up{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const t=new mp(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(t.idToken=e.idToken),e.accessToken&&(t.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(t.nonce=e.nonce),e.pendingToken&&(t.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(t.accessToken=e.oauthToken,t.secret=e.oauthTokenSecret):Hh("argument-error"),t}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){const t="string"===typeof e?JSON.parse(e):e,{providerId:n,signInMethod:r}=t,i=jh(t,["providerId","signInMethod"]);if(!n||!r)return null;const o=new mp(n,r);return o.idToken=i.idToken||void 0,o.accessToken=i.accessToken||void 0,o.secret=i.secret,o.nonce=i.nonce,o.pendingToken=i.pendingToken||null,o}_getIdTokenResponse(e){return pp(e,this.buildRequest())}_linkToIdToken(e,t){const n=this.buildRequest();return n.idToken=t,pp(e,n)}_getReauthenticationResolver(e){const t=this.buildRequest();return t.autoCreate=!1,pp(e,t)}buildRequest(){const e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{const t={};this.idToken&&(t.id_token=this.idToken),this.accessToken&&(t.access_token=this.accessToken),this.secret&&(t.oauth_token_secret=this.secret),t.providerId=this.providerId,this.nonce&&!this.pendingToken&&(t.nonce=this.nonce),e.postBody=ri(t)}return e}}const gp={USER_NOT_FOUND:"user-not-found"};class yp extends up{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new yp({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new yp({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return async function(e,t){return df(e,"POST","/v1/accounts:signInWithPhoneNumber",lf(e,t))}(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return async function(e,t){const n=await df(e,"POST","/v1/accounts:signInWithPhoneNumber",lf(e,t));if(n.temporaryProof)throw mf(e,"account-exists-with-different-credential",n);return n}(e,Object.assign({idToken:t},this._makeVerificationRequest()))}_getReauthenticationResolver(e){return async function(e,t){return df(e,"POST","/v1/accounts:signInWithPhoneNumber",lf(e,Object.assign(Object.assign({},t),{operation:"REAUTH"})),gp)}(e,this._makeVerificationRequest())}_makeVerificationRequest(){const{temporaryProof:e,phoneNumber:t,verificationId:n,verificationCode:r}=this.params;return e&&t?{temporaryProof:e,phoneNumber:t}:{sessionInfo:n,code:r}}toJSON(){const e={providerId:this.providerId};return this.params.phoneNumber&&(e.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&(e.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&(e.verificationCode=this.params.verificationCode),this.params.verificationId&&(e.verificationId=this.params.verificationId),e}static fromJSON(e){"string"===typeof e&&(e=JSON.parse(e));const{verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:i}=e;return n||t||r||i?new yp({verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:i}):null}}class vp{constructor(e){var t,n,r,i,o,s;const a=ii(oi(e)),l=null!==(t=a.apiKey)&&void 0!==t?t:null,c=null!==(n=a.oobCode)&&void 0!==n?n:null,u=function(e){switch(e){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}(null!==(r=a.mode)&&void 0!==r?r:null);Yh(l&&c&&u,"argument-error"),this.apiKey=l,this.operation=u,this.code=c,this.continueUrl=null!==(i=a.continueUrl)&&void 0!==i?i:null,this.languageCode=null!==(o=a.languageCode)&&void 0!==o?o:null,this.tenantId=null!==(s=a.tenantId)&&void 0!==s?s:null}static parseLink(e){const t=function(e){const t=ii(oi(e)).link,n=t?ii(oi(t)).deep_link_id:null,r=ii(oi(e)).deep_link_id;return(r?ii(oi(r)).link:null)||r||n||t||e}(e);try{return new vp(t)}catch(n){return null}}}class _p{constructor(){this.providerId=_p.PROVIDER_ID}static credential(e,t){return fp._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){const n=vp.parseLink(t);return Yh(n,"argument-error"),fp._fromEmailAndCode(e,n.code,n.tenantId)}}_p.PROVIDER_ID="password",_p.EMAIL_PASSWORD_SIGN_IN_METHOD="password",_p.EMAIL_LINK_SIGN_IN_METHOD="emailLink";class bp{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}class wp extends bp{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}class Sp extends wp{constructor(){super("facebook.com")}static credential(e){return mp._fromParams({providerId:Sp.PROVIDER_ID,signInMethod:Sp.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Sp.credentialFromTaggedObject(e)}static credentialFromError(e){return Sp.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject(e){let{_tokenResponse:t}=e;if(!t||!("oauthAccessToken"in t))return null;if(!t.oauthAccessToken)return null;try{return Sp.credential(t.oauthAccessToken)}catch(n){return null}}}Sp.FACEBOOK_SIGN_IN_METHOD="facebook.com",Sp.PROVIDER_ID="facebook.com";class Ep extends wp{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return mp._fromParams({providerId:Ep.PROVIDER_ID,signInMethod:Ep.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return Ep.credentialFromTaggedObject(e)}static credentialFromError(e){return Ep.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject(e){let{_tokenResponse:t}=e;if(!t)return null;const{oauthIdToken:n,oauthAccessToken:r}=t;if(!n&&!r)return null;try{return Ep.credential(n,r)}catch(i){return null}}}Ep.GOOGLE_SIGN_IN_METHOD="google.com",Ep.PROVIDER_ID="google.com";class Cp extends wp{constructor(){super("github.com")}static credential(e){return mp._fromParams({providerId:Cp.PROVIDER_ID,signInMethod:Cp.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Cp.credentialFromTaggedObject(e)}static credentialFromError(e){return Cp.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject(e){let{_tokenResponse:t}=e;if(!t||!("oauthAccessToken"in t))return null;if(!t.oauthAccessToken)return null;try{return Cp.credential(t.oauthAccessToken)}catch(n){return null}}}Cp.GITHUB_SIGN_IN_METHOD="github.com",Cp.PROVIDER_ID="github.com";class kp extends wp{constructor(){super("twitter.com")}static credential(e,t){return mp._fromParams({providerId:kp.PROVIDER_ID,signInMethod:kp.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return kp.credentialFromTaggedObject(e)}static credentialFromError(e){return kp.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject(e){let{_tokenResponse:t}=e;if(!t)return null;const{oauthAccessToken:n,oauthTokenSecret:r}=t;if(!n||!r)return null;try{return kp.credential(n,r)}catch(i){return null}}}kp.TWITTER_SIGN_IN_METHOD="twitter.com",kp.PROVIDER_ID="twitter.com";class xp{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=await Rf._fromIdTokenResponse(e,n,r),o=Tp(n);return new xp({user:i,providerId:o,_tokenResponse:n,operationType:t})}static async _forOperation(e,t,n){await e._updateTokensIfNecessary(n,!0);const r=Tp(n);return new xp({user:e,providerId:r,_tokenResponse:n,operationType:t})}}function Tp(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}class Ip extends Vr{constructor(e,t,n,r){var i;super(t.code,t.message),this.operationType=n,this.user=r,Object.setPrototypeOf(this,Ip.prototype),this.customData={appName:e.name,tenantId:null!==(i=e.tenantId)&&void 0!==i?i:void 0,_serverResponse:t.customData._serverResponse,operationType:n}}static _fromErrorAndOperation(e,t,n,r){return new Ip(e,t,n,r)}}function Pp(e,t,n,r){return("reauthenticate"===t?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch((n=>{if("auth/multi-factor-auth-required"===n.code)throw Ip._fromErrorAndOperation(e,n,t,r);throw n}))}async function Ap(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=await Cf(e,t._linkToIdToken(e.auth,await e.getIdToken()),n);return xp._forOperation(e,"link",r)}async function Rp(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const{auth:r}=e;if(ko(r.app))return Promise.reject(Kh(r));const i="reauthenticate";try{const o=await Cf(e,Pp(r,i,t,e),n);Yh(o.idToken,r,"internal-error");const s=Sf(o.idToken);Yh(s,r,"internal-error");const{sub:a}=s;return Yh(e.uid===a,r,"user-mismatch"),xp._forOperation(e,i,o)}catch(DE){throw"auth/user-not-found"===(null===DE||void 0===DE?void 0:DE.code)&&Hh(r,"user-mismatch"),DE}}async function Np(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(ko(e.app))return Promise.reject(Kh(e));const r="signIn",i=await Pp(e,r,t),o=await xp._fromIdTokenResponse(e,r,i);return n||await e._updateCurrentUser(o.user),o}async function Op(e,t){return Np(Zf(e),t)}async function Dp(e){const t=Zf(e);t._getPasswordPolicyInternal()&&await t._updatePasswordPolicy()}new WeakMap;const Lp="__sak";class Mp{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{return this.storage?(this.storage.setItem(Lp,"1"),this.storage.removeItem(Lp),Promise.resolve(!0)):Promise.resolve(!1)}catch(e){return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){const t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}class Fp extends Mp{constructor(){super((()=>window.localStorage),"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=Gf(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const t of Object.keys(this.listeners)){const n=this.storage.getItem(t),r=this.localCache[t];n!==r&&e(t,r,n)}}onStorageEvent(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e.key)return void this.forAllChangedKeys(((e,t,n)=>{this.notifyListeners(e,n)}));const n=e.key;t?this.detachListener():this.stopPolling();const r=()=>{const e=this.storage.getItem(n);(t||this.localCache[n]!==e)&&this.notifyListeners(n,e)},i=this.storage.getItem(n);Kf()&&i!==e.newValue&&e.newValue!==e.oldValue?setTimeout(r,10):r()}notifyListeners(e,t){this.localCache[e]=t;const n=this.listeners[e];if(n)for(const r of Array.from(n))r(t?JSON.parse(t):t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval((()=>{this.forAllChangedKeys(((e,t,n)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:n}),!0)}))}),1e3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,t){0===Object.keys(this.listeners).length&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&(this.detachListener(),this.stopPolling())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){const t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}Fp.type="LOCAL";const jp=Fp;class Up extends Mp{constructor(){super((()=>window.sessionStorage),"SESSION")}_addListener(e,t){}_removeListener(e,t){}}Up.type="SESSION";const $p=Up;class zp{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){const t=this.receivers.find((t=>t.isListeningto(e)));if(t)return t;const n=new zp(e);return this.receivers.push(n),n}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const t=e,{eventId:n,eventType:r,data:i}=t.data,o=this.handlersMap[r];if(!(null===o||void 0===o?void 0:o.size))return;t.ports[0].postMessage({status:"ack",eventId:n,eventType:r});const s=Array.from(o).map((async e=>e(t.origin,i))),a=await function(e){return Promise.all(e.map((async e=>{try{return{fulfilled:!0,value:await e}}catch(t){return{fulfilled:!1,reason:t}}})))}(s);t.ports[0].postMessage({status:"done",eventId:n,eventType:r,response:a})}_subscribe(e,t){0===Object.keys(this.handlersMap).length&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(t)}_unsubscribe(e,t){this.handlersMap[e]&&t&&this.handlersMap[e].delete(t),t&&0!==this.handlersMap[e].size||delete this.handlersMap[e],0===Object.keys(this.handlersMap).length&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}function Bp(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n="";for(let r=0;r2&&void 0!==arguments[2]?arguments[2]:50;const r="undefined"!==typeof MessageChannel?new MessageChannel:null;if(!r)throw new Error("connection_unavailable");let i,o;return new Promise(((s,a)=>{const l=Bp("",20);r.port1.start();const c=setTimeout((()=>{a(new Error("unsupported_event"))}),n);o={messageChannel:r,onMessage(e){const t=e;if(t.data.eventId===l)switch(t.data.status){case"ack":clearTimeout(c),i=setTimeout((()=>{a(new Error("timeout"))}),3e3);break;case"done":clearTimeout(i),s(t.data.response);break;default:clearTimeout(c),clearTimeout(i),a(new Error("invalid_response"))}}},this.handlers.add(o),r.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:e,eventId:l,data:t},[r.port2])})).finally((()=>{o&&this.removeMessageHandler(o)}))}}function Hp(){return window}function Vp(){return"undefined"!==typeof Hp().WorkerGlobalScope&&"function"===typeof Hp().importScripts}const qp="firebaseLocalStorageDb",Kp="firebaseLocalStorage",Gp="fbase_key";class Yp{constructor(e){this.request=e}toPromise(){return new Promise(((e,t)=>{this.request.addEventListener("success",(()=>{e(this.request.result)})),this.request.addEventListener("error",(()=>{t(this.request.error)}))}))}}function Qp(e,t){return e.transaction([Kp],t?"readwrite":"readonly").objectStore(Kp)}function Jp(){const e=indexedDB.open(qp,1);return new Promise(((t,n)=>{e.addEventListener("error",(()=>{n(e.error)})),e.addEventListener("upgradeneeded",(()=>{const t=e.result;try{t.createObjectStore(Kp,{keyPath:Gp})}catch(DE){n(DE)}})),e.addEventListener("success",(async()=>{const n=e.result;n.objectStoreNames.contains(Kp)?t(n):(n.close(),await function(){const e=indexedDB.deleteDatabase(qp);return new Yp(e).toPromise()}(),t(await Jp()))}))}))}async function Xp(e,t,n){const r=Qp(e,!0).put({[Gp]:t,value:n});return new Yp(r).toPromise()}function Zp(e,t){const n=Qp(e,!0).delete(t);return new Yp(n).toPromise()}class em{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then((()=>{}),(()=>{}))}async _openDb(){return this.db||(this.db=await Jp()),this.db}async _withRetries(e){let t=0;for(;;)try{const t=await this._openDb();return await e(t)}catch(DE){if(t++>3)throw DE;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return Vp()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=zp._getInstance(Vp()?self:null),this.receiver._subscribe("keyChanged",(async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)}))),this.receiver._subscribe("ping",(async(e,t)=>["keyChanged"]))}async initializeSender(){var e,t;if(this.activeServiceWorker=await async function(){if(!(null===navigator||void 0===navigator?void 0:navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch(e){return null}}(),!this.activeServiceWorker)return;this.sender=new Wp(this.activeServiceWorker);const n=await this.sender._send("ping",{},800);n&&(null===(e=n[0])||void 0===e?void 0:e.fulfilled)&&(null===(t=n[0])||void 0===t?void 0:t.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(this.sender&&this.activeServiceWorker&&function(){var e;return(null===(e=null===navigator||void 0===navigator?void 0:navigator.serviceWorker)||void 0===e?void 0:e.controller)||null}()===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch(t){}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await Jp();return await Xp(e,Lp,"1"),await Zp(e,Lp),!0}catch(e){}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite((async()=>(await this._withRetries((n=>Xp(n,e,t))),this.localCache[e]=t,this.notifyServiceWorker(e))))}async _get(e){const t=await this._withRetries((t=>async function(e,t){const n=Qp(e,!1).get(t),r=await new Yp(n).toPromise();return void 0===r?null:r.value}(t,e)));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite((async()=>(await this._withRetries((t=>Zp(t,e))),delete this.localCache[e],this.notifyServiceWorker(e))))}async _poll(){const e=await this._withRetries((e=>{const t=Qp(e,!1).getAll();return new Yp(t).toPromise()}));if(!e)return[];if(0!==this.pendingWrites)return[];const t=[],n=new Set;if(0!==e.length)for(const{fbase_key:r,value:i}of e)n.add(r),JSON.stringify(this.localCache[r])!==JSON.stringify(i)&&(this.notifyListeners(r,i),t.push(r));for(const r of Object.keys(this.localCache))this.localCache[r]&&!n.has(r)&&(this.notifyListeners(r,null),t.push(r));return t}notifyListeners(e,t){this.localCache[e]=t;const n=this.listeners[e];if(n)for(const r of Array.from(n))r(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval((async()=>this._poll()),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&this.stopPolling()}}em.type="LOCAL";const tm=em;rp("rcb"),new nf(3e4,6e4);const nm="recaptcha";async function rm(e,t,n){var r;const i=await n.verify();try{let o;if(Yh("string"===typeof i,e,"argument-error"),Yh(n.type===nm,e,"argument-error"),o="string"===typeof t?{phoneNumber:t}:t,"session"in o){const t=o.session;if("phoneNumber"in o){Yh("enroll"===t.type,e,"internal-error");const n=await function(e,t){return cf(e,"POST","/v2/accounts/mfaEnrollment:start",lf(e,t))}(e,{idToken:t.credential,phoneEnrollmentInfo:{phoneNumber:o.phoneNumber,recaptchaToken:i}});return n.phoneSessionInfo.sessionInfo}{Yh("signin"===t.type,e,"internal-error");const n=(null===(r=o.multiFactorHint)||void 0===r?void 0:r.uid)||o.multiFactorUid;Yh(n,e,"missing-multi-factor-info");const s=await function(e,t){return cf(e,"POST","/v2/accounts/mfaSignIn:start",lf(e,t))}(e,{mfaPendingCredential:t.credential,mfaEnrollmentId:n,phoneSignInInfo:{recaptchaToken:i}});return s.phoneResponseInfo.sessionInfo}}{const{sessionInfo:t}=await async function(e,t){return cf(e,"POST","/v1/accounts:sendVerificationCode",lf(e,t))}(e,{phoneNumber:o.phoneNumber,recaptchaToken:i});return t}}finally{n._reset()}}class im{constructor(e){this.providerId=im.PROVIDER_ID,this.auth=Zf(e)}verifyPhoneNumber(e,t){return rm(this.auth,e,di(t))}static credential(e,t){return yp._fromVerification(e,t)}static credentialFromResult(e){const t=e;return im.credentialFromTaggedObject(t)}static credentialFromError(e){return im.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject(e){let{_tokenResponse:t}=e;if(!t)return null;const{phoneNumber:n,temporaryProof:r}=t;return n&&r?yp._fromTokenResponse(n,r):null}}function om(e,t){return t?Of(t):(Yh(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}im.PROVIDER_ID="phone",im.PHONE_SIGN_IN_METHOD="phone";class sm extends up{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return pp(e,this._buildIdpRequest())}_linkToIdToken(e,t){return pp(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return pp(e,this._buildIdpRequest())}_buildIdpRequest(e){const t={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(t.idToken=e),t}}function am(e){return Np(e.auth,new sm(e),e.bypassAuthState)}function lm(e){const{auth:t,user:n}=e;return Yh(n,t,"internal-error"),Rp(n,new sm(e),e.bypassAuthState)}async function cm(e){const{auth:t,user:n}=e;return Yh(n,t,"internal-error"),Ap(n,new sm(e),e.bypassAuthState)}class um{constructor(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];this.auth=e,this.resolver=n,this.user=r,this.bypassAuthState=i,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(t)?t:[t]}execute(){return new Promise((async(e,t)=>{this.pendingPromise={resolve:e,reject:t};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(DE){this.reject(DE)}}))}async onAuthEvent(e){const{urlResponse:t,sessionId:n,postBody:r,tenantId:i,error:o,type:s}=e;if(o)return void this.reject(o);const a={auth:this.auth,requestUri:t,sessionId:n,tenantId:i||void 0,postBody:r||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(s)(a))}catch(DE){this.reject(DE)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return am;case"linkViaPopup":case"linkViaRedirect":return cm;case"reauthViaPopup":case"reauthViaRedirect":return lm;default:Hh(this.auth,"internal-error")}}resolve(e){Jh(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){Jh(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}const dm=new nf(2e3,1e4);class hm extends um{constructor(e,t,n,r,i){super(e,t,r,i),this.provider=n,this.authWindow=null,this.pollId=null,hm.currentPopupAction&&hm.currentPopupAction.cancel(),hm.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return Yh(e,this.auth,"internal-error"),e}async onExecution(){Jh(1===this.filter.length,"Popup operations only handle one event");const e=Bp();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch((e=>{this.reject(e)})),this.resolver._isIframeWebStorageSupported(this.auth,(e=>{e||this.reject(Vh(this.auth,"web-storage-unsupported"))})),this.pollUserCancellation()}get eventId(){var e;return(null===(e=this.authWindow)||void 0===e?void 0:e.associatedEvent)||null}cancel(){this.reject(Vh(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,hm.currentPopupAction=null}pollUserCancellation(){const e=()=>{var t,n;(null===(n=null===(t=this.authWindow)||void 0===t?void 0:t.window)||void 0===n?void 0:n.closed)?this.pollId=window.setTimeout((()=>{this.pollId=null,this.reject(Vh(this.auth,"popup-closed-by-user"))}),8e3):this.pollId=window.setTimeout(e,dm.get())};e()}}hm.currentPopupAction=null;const fm=new Map;class pm extends um{constructor(e,t){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,arguments.length>2&&void 0!==arguments[2]&&arguments[2]),this.eventId=null}async execute(){let e=fm.get(this.auth._key());if(!e){try{const t=await async function(e,t){const n=ym(t),r=gm(e);if(!await r._isAvailable())return!1;const i="true"===await r._get(n);return await r._remove(n),i}(this.resolver,this.auth),n=t?await super.execute():null;e=()=>Promise.resolve(n)}catch(DE){e=()=>Promise.reject(DE)}fm.set(this.auth._key(),e)}return this.bypassAuthState||fm.set(this.auth._key(),(()=>Promise.resolve(null))),e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);if("unknown"!==e.type){if(e.eventId){const t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}else this.resolve(null)}async onExecution(){}cleanUp(){}}function mm(e,t){fm.set(e._key(),t)}function gm(e){return Of(e._redirectPersistence)}function ym(e){return Mf("pendingRedirect",e.config.apiKey,e.name)}async function vm(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(ko(e.app))return Promise.reject(Kh(e));const r=Zf(e),i=om(r,t),o=new pm(r,i,n),s=await o.execute();return s&&!n&&(delete s.user._redirectEventId,await r._persistUserIfCurrent(s.user),await r._setRedirectUser(null,t)),s}class _m{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let t=!1;return this.consumers.forEach((n=>{this.isEventForConsumer(e,n)&&(t=!0,this.sendToConsumer(e,n),this.saveEventToCache(e))})),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return wm(e);default:return!1}}(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){var n;if(e.error&&!wm(e)){const r=(null===(n=e.error.code)||void 0===n?void 0:n.split("auth/")[1])||"internal-error";t.onError(Vh(this.auth,r))}else t.onAuthEvent(e)}isEventForConsumer(e,t){const n=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&n}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(bm(e))}saveEventToCache(e){this.cachedEventUids.add(bm(e)),this.lastProcessedEventTime=Date.now()}}function bm(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter((e=>e)).join("-")}function wm(e){let{type:t,error:n}=e;return"unknown"===t&&"auth/no-auth-event"===(null===n||void 0===n?void 0:n.code)}const Sm=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,Em=/^https?/;async function Cm(e){if(e.config.emulator)return;const{authorizedDomains:t}=await async function(e){return cf(e,"GET","/v1/projects",arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(e);for(const r of t)try{if(km(r))return}catch(n){}Hh(e,"unauthorized-domain")}function km(e){const t=Xh(),{protocol:n,hostname:r}=new URL(t);if(e.startsWith("chrome-extension://")){const i=new URL(e);return""===i.hostname&&""===r?"chrome-extension:"===n&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===n&&i.hostname===r}if(!Em.test(n))return!1;if(Sm.test(e))return r===e;const i=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}const xm=new nf(3e4,6e4);function Tm(){const e=Hp().___jsl;if(null===e||void 0===e?void 0:e.H)for(const t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let n=0;n{var r,i,o;function s(){Tm(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{Tm(),n(Vh(e,"network-request-failed"))},timeout:xm.get()})}if(null===(i=null===(r=Hp().gapi)||void 0===r?void 0:r.iframes)||void 0===i?void 0:i.Iframe)t(gapi.iframes.getContext());else{if(!(null===(o=Hp().gapi)||void 0===o?void 0:o.load)){const t=rp("iframefcb");return Hp()[t]=()=>{gapi.load?s():n(Vh(e,"network-request-failed"))},np(`${tp.gapiScript}?onload=${t}`).catch((e=>n(e)))}s()}})).catch((e=>{throw Pm=null,e}))}let Pm=null;const Am=new nf(5e3,15e3),Rm={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},Nm=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function Om(e){const t=e.config;Yh(t.authDomain,e,"auth-domain-config-required");const n=t.emulator?rf(t,"emulator/auth/iframe"):`https://${e.config.authDomain}/__/auth/iframe`,r={apiKey:t.apiKey,appName:e.name,v:Io},i=Nm.get(e.config.apiHost);i&&(r.eid=i);const o=e._getFrameworks();return o.length&&(r.fw=o.join(",")),`${n}?${ri(r).slice(1)}`}async function Dm(e){const t=await function(e){return Pm=Pm||Im(e),Pm}(e),n=Hp().gapi;return Yh(n,e,"internal-error"),t.open({where:document.body,url:Om(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:Rm,dontclear:!0},(t=>new Promise((async(n,r)=>{await t.restyle({setHideOnLeave:!1});const i=Vh(e,"network-request-failed"),o=Hp().setTimeout((()=>{r(i)}),Am.get());function s(){Hp().clearTimeout(o),n(t)}t.ping(s).then(s,(()=>{r(i)}))}))))}const Lm={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class Mm{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(DE){}}}function Fm(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:500,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:600;const o=Math.max((window.screen.availHeight-i)/2,0).toString(),s=Math.max((window.screen.availWidth-r)/2,0).toString();let a="";const l=Object.assign(Object.assign({},Lm),{width:r.toString(),height:i.toString(),top:o,left:s}),c=zr().toLowerCase();n&&(a=zf(c)?"_blank":n),Uf(c)&&(t=t||"http://localhost",l.scrollbars="yes");const u=Object.entries(l).reduce(((e,t)=>{let[n,r]=t;return`${e}${n}=${r},`}),"");if(function(){var e;return qf(arguments.length>0&&void 0!==arguments[0]?arguments[0]:zr())&&!!(null===(e=window.navigator)||void 0===e?void 0:e.standalone)}(c)&&"_self"!==a)return function(e,t){const n=document.createElement("a");n.href=e,n.target=t;const r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}(t||"",a),new Mm(null);const d=window.open(t||"",a,u);Yh(d,e,"popup-blocked");try{d.focus()}catch(DE){}return new Mm(d)}const jm="__/auth/handler",Um="emulator/auth/handler",$m=encodeURIComponent("fac");async function zm(e,t,n,r,i,o){Yh(e.config.authDomain,e,"auth-domain-config-required"),Yh(e.config.apiKey,e,"invalid-api-key");const s={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:r,v:Io,eventId:i};if(t instanceof bp){t.setDefaultLanguage(e.languageCode),s.providerId=t.providerId||"",Zr(t.getCustomParameters())||(s.customParameters=JSON.stringify(t.getCustomParameters()));for(const[e,t]of Object.entries(o||{}))s[e]=t}if(t instanceof wp){const e=t.getScopes().filter((e=>""!==e));e.length>0&&(s.scopes=e.join(","))}e.tenantId&&(s.tid=e.tenantId);const a=s;for(const u of Object.keys(a))void 0===a[u]&&delete a[u];const l=await e._getAppCheckToken(),c=l?`#${$m}=${encodeURIComponent(l)}`:"";return`${function(e){let{config:t}=e;if(!t.emulator)return`https://${t.authDomain}/${jm}`;return rf(t,Um)}(e)}?${ri(a).slice(1)}${c}`}const Bm="webStorageSupport";const Wm=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=$p,this._completeRedirectFn=vm,this._overrideRedirectResult=mm}async _openPopup(e,t,n,r){var i;Jh(null===(i=this.eventManagers[e._key()])||void 0===i?void 0:i.manager,"_initialize() not called before _openPopup()");return Fm(e,await zm(e,t,n,Xh(),r),Bp())}async _openRedirect(e,t,n,r){await this._originValidation(e);return function(e){Hp().location.href=e}(await zm(e,t,n,Xh(),r)),new Promise((()=>{}))}_initialize(e){const t=e._key();if(this.eventManagers[t]){const{manager:e,promise:n}=this.eventManagers[t];return e?Promise.resolve(e):(Jh(n,"If manager is not set, promise should be"),n)}const n=this.initAndGetManager(e);return this.eventManagers[t]={promise:n},n.catch((()=>{delete this.eventManagers[t]})),n}async initAndGetManager(e){const t=await Dm(e),n=new _m(e);return t.register("authEvent",(t=>{Yh(null===t||void 0===t?void 0:t.authEvent,e,"invalid-auth-event");return{status:n.onEvent(t.authEvent)?"ACK":"ERROR"}}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:n},this.iframes[e._key()]=t,n}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(Bm,{type:Bm},(n=>{var r;const i=null===(r=null===n||void 0===n?void 0:n[0])||void 0===r?void 0:r[Bm];void 0!==i&&t(!!i),Hh(e,"internal-error")}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=Cm(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return Gf()||$f()||qf()}};var Hm="@firebase/auth",Vm="1.7.9";class qm{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.uid)||null}async getToken(e){if(this.assertAuthConfigured(),await this.auth._initializationPromise,!this.auth.currentUser)return null;return{accessToken:await this.auth.currentUser.getIdToken(e)}}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;const t=this.auth.onIdTokenChanged((t=>{e((null===t||void 0===t?void 0:t.stsTokenManager.accessToken)||null)}));this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();const t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){Yh(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}const Km=jr("authIdTokenMaxAge")||300;let Gm=null;var Ym,Qm;Ym={loadJS:e=>new Promise(((t,n)=>{const r=document.createElement("script");r.setAttribute("src",e),r.onload=t,r.onerror=e=>{const t=Vh("internal-error");t.customData=e,n(t)},r.type="text/javascript",r.charset="UTF-8",function(){var e,t;return null!==(t=null===(e=document.getElementsByTagName("head"))||void 0===e?void 0:e[0])&&void 0!==t?t:document}().appendChild(r)})),gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="},tp=Ym,Qm="Browser",Eo(new hi("auth",((e,t)=>{let{options:n}=t;const r=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),o=e.getProvider("app-check-internal"),{apiKey:s,authDomain:a}=r.options;Yh(s&&!s.includes(":"),"invalid-api-key",{appName:r.name});const l={apiKey:s,authDomain:a,clientPlatform:Qm,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Yf(Qm)},c=new Xf(r,i,o,l);return function(e,t){const n=(null===t||void 0===t?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(Of);(null===t||void 0===t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,null===t||void 0===t?void 0:t.popupRedirectResolver)}(c,n),c}),"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback(((e,t,n)=>{e.getProvider("auth-internal").initialize()}))),Eo(new hi("auth-internal",(e=>(e=>new qm(e))(Zf(e.getProvider("auth").getImmediate()))),"PRIVATE").setInstantiationMode("EXPLICIT")),Ro(Hm,Vm,function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}(Qm)),Ro(Hm,Vm,"esm2017");const Jm=Po({apiKey:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",authDomain:"my-portfolio-f3107.firebaseapp.com",databaseURL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",projectId:"my-portfolio-f3107",storageBucket:"my-portfolio-f3107.appspot.com",messagingSenderId:"265407310518",appId:"1:265407310518:web:0893e6f15e60c009229417",measurementId:"G-VQL5ESJ2YT"}),Xm=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ao(),t=arguments.length>1?arguments[1]:void 0;const n=Co(e,"database").getImmediate({identifier:t});if(!n._instanceStarted){const e=Mr("database");e&&function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};e=di(e),e._checkNotDeleted("useEmulator"),e._instanceStarted&&as("Cannot call useEmulator() after instance has already been initialized.");const i=e._repoInternal;let o;if(i.repoInfo_.nodeAdmin)r.mockUserToken&&as('mockUserToken is not supported by the Admin SDK. For client access with mock users, please use the "firebase" package instead of "firebase-admin".'),o=new ks(ks.OWNER);else if(r.mockUserToken){const t="string"===typeof r.mockUserToken?r.mockUserToken:$r(r.mockUserToken,e.app.options.projectId);o=new ks(t)}!function(e,t,n,r){e.repoInfo_=new Rs(`${t}:${n}`,!1,e.repoInfo_.namespace,e.repoInfo_.webSocketOnly,e.repoInfo_.nodeAdmin,e.repoInfo_.persistenceKey,e.repoInfo_.includeNamespaceInQueryParams,!0),r&&(e.authTokenProvider_=r)}(i,t,n,o)}(n,...e)}return n}(Jm),Zm=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ao(),t=arguments.length>1?arguments[1]:void 0;e=di(e);const n=Co(e,Nh).getImmediate({identifier:t}),r=Mr("storage");return r&&function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};!function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};e.host=`${t}:${n}`,e._protocol="http";const{mockUserToken:i}=r;i&&(e._overrideAuthToken="string"===typeof i?i:$r(i,e.app.options.projectId))}(e,t,n,r)}(n,...r),n}(Jm),eg=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ao();const t=Co(e,"auth");if(t.isInitialized())return t.getImmediate();const n=function(e,t){const n=Co(e,"auth");if(n.isInitialized()){const e=n.getImmediate();if(ti(n.getOptions(),null!==t&&void 0!==t?t:{}))return e;Hh(e,"already-initialized")}return n.initialize({options:t})}(e,{popupRedirectResolver:Wm,persistence:[tm,jp,$p]}),r=jr("authTokenSyncURL");if(r&&"boolean"===typeof isSecureContext&&isSecureContext){const e=new URL(r,location.origin);if(location.origin===e.origin){const t=(i=e.toString(),async e=>{const t=e&&await e.getIdTokenResult(),n=t&&((new Date).getTime()-Date.parse(t.issuedAtTime))/1e3;if(n&&n>Km)return;const r=null===t||void 0===t?void 0:t.token;Gm!==r&&(Gm=r,await fetch(i,{method:r?"POST":"DELETE",headers:r?{Authorization:`Bearer ${r}`}:{}}))});!function(e,t,n){di(e).beforeAuthStateChanged(t,n)}(n,t,(()=>t(n.currentUser))),function(e,t,n,r){di(e).onIdTokenChanged(t,n,r)}(n,(e=>t(e)))}}var i;const o=Lr("auth");return o&&ap(n,`http://${o}`),n}(Jm);var tg={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ng=e.createContext&&e.createContext(tg),rg=["attr","size","title"];function ig(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function og(){return og=Object.assign?Object.assign.bind():function(e){for(var t=1;te.createElement(t.tag,ag({key:n},t.attr),cg(t.child))))}function ug(t){return n=>e.createElement(dg,og({attr:ag({},t.attr)},n),cg(t.child))}function dg(t){var n=n=>{var r,{attr:i,size:o,title:s}=t,a=ig(t,rg),l=o||n.size||"1em";return n.className&&(r=n.className),t.className&&(r=(r?r+" ":"")+t.className),e.createElement("svg",og({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,i,a,{className:r,style:ag(ag({color:t.color||n.color},n.style),t.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),s&&e.createElement("title",null,s),t.children)};return void 0!==ng?e.createElement(ng.Consumer,null,(e=>n(e))):n(tg)}var hg=n(579);const fg=Kt.div`
+/*! For license information please see main.278e63f1.js.LICENSE.txt */
+(()=>{var e={219:(e,t,n)=>{"use strict";var r=n(763),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function l(e){return r.isMemo(e)?s:a[e.$$typeof]||i}a[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[r.Memo]=s;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(f){var i=p(n);i&&i!==f&&e(t,i,r)}var s=u(n);d&&(s=s.concat(d(n)));for(var a=l(t),m=l(n),g=0;g{"use strict";var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,f=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,_=n?Symbol.for("react.responder"):60118,b=n?Symbol.for("react.scope"):60119;function w(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case o:case a:case s:case p:return e;default:switch(e=e&&e.$$typeof){case c:case h:case g:case m:case l:return e;default:return t}}case i:return t}}}function S(e){return w(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=h,t.Fragment=o,t.Lazy=g,t.Memo=m,t.Portal=i,t.Profiler=a,t.StrictMode=s,t.Suspense=p,t.isAsyncMode=function(e){return S(e)||w(e)===u},t.isConcurrentMode=S,t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===h},t.isFragment=function(e){return w(e)===o},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===a},t.isStrictMode=function(e){return w(e)===s},t.isSuspense=function(e){return w(e)===p},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===o||e===d||e===a||e===s||e===p||e===f||"object"===typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===h||e.$$typeof===v||e.$$typeof===_||e.$$typeof===b||e.$$typeof===y)},t.typeOf=w},763:(e,t,n)=>{"use strict";e.exports=n(983)},730:(e,t,n)=>{"use strict";var r=n(43),i=n(853);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nt}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!d.call(f,e)||!d.call(p,e)&&(h.test(e)?f[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"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(e){var t=e.replace(y,v);g[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(y,v);g[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(y,v);g[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var b=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),S=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),x=Symbol.for("react.provider"),T=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),N=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var O=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var D=Symbol.iterator;function L(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=D&&e[D]||e["@@iterator"])?e:null}var M,F=Object.assign;function j(e){if(void 0===M)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);M=t&&t[1]||""}return"\n"+M+e}var U=!1;function $(e,t){if(!e||U)return"";U=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&"string"===typeof c.stack){for(var i=c.stack.split("\n"),o=r.stack.split("\n"),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(1!==s||1!==a)do{if(s--,0>--a||i[s]!==o[a]){var l="\n"+i[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}}while(1<=s&&0<=a);break}}}finally{U=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?j(e):""}function z(e){switch(e.tag){case 5:return j(e.type);case 16:return j("Lazy");case 13:return j("Suspense");case 19:return j("SuspenseList");case 0:case 2:case 15:return e=$(e.type,!1);case 11:return e=$(e.type.render,!1);case 1:return e=$(e.type,!0);default:return""}}function B(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case E:return"Fragment";case S:return"Portal";case k:return"Profiler";case C:return"StrictMode";case P:return"Suspense";case A:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case T:return(e.displayName||"Context")+".Consumer";case x:return(e._context.displayName||"Context")+".Provider";case I:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case R:return null!==(t=e.displayName||null)?t:B(e.type)||"Memo";case N:t=e._payload,e=e._init;try{return B(e(t))}catch(n){}}return null}function W(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return B(t);case 8:return t===C?"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("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function H(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function V(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function q(e){e._valueTracker||(e._valueTracker=function(e){var t=V(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function K(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=V(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function G(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Y(e,t){var n=t.checked;return F({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Q(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=H(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function J(e,t){null!=(t=t.checked)&&_(e,"checked",t,!1)}function X(e,t){J(e,t);var n=H(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,H(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Z(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&G(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ue(e,t)}))}:ue);function he(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var pe={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},fe=["Webkit","ms","Moz","O"];function me(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||pe.hasOwnProperty(e)&&pe[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=me(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(pe).forEach((function(e){fe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pe[t]=pe[e]}))}));var ye=F({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 ve(e,t){if(t){if(ye[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(o(62))}}function _e(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){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 be=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Se=null,Ee=null,Ce=null;function ke(e){if(e=_i(e)){if("function"!==typeof Se)throw Error(o(280));var t=e.stateNode;t&&(t=wi(t),Se(e.stateNode,e.type,t))}}function xe(e){Ee?Ce?Ce.push(e):Ce=[e]:Ee=e}function Te(){if(Ee){var e=Ee,t=Ce;if(Ce=Ee=null,ke(e),t)for(e=0;e>>=0,0===e?32:31-(at(e)/lt|0)|0},at=Math.log,lt=Math.LN2;var ct=64,ut=4194304;function dt(e){switch(e&-e){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 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ht(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=268435455&n;if(0!==s){var a=s&~i;0!==a?r=dt(a):0!==(o&=s)&&(r=dt(o))}else 0!==(s=n&~i)?r=dt(s):0!==o&&(r=dt(o));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&0!==(4194240&o)))return t;if(0!==(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function yt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-st(t)]=n}function vt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-st(n),i=1<=Ln),jn=String.fromCharCode(32),Un=!1;function $n(e,t){switch(e){case"keyup":return-1!==On.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Bn=!1;var Wn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Wn[e.type]:"textarea"===t}function Vn(e,t,n,r){xe(r),0<(t=qr(t,"onChange")).length&&(n=new un("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var qn=null,Kn=null;function Gn(e){jr(e,0)}function Yn(e){if(K(bi(e)))return e}function Qn(e,t){if("change"===e)return t}var Jn=!1;if(u){var Xn;if(u){var Zn="oninput"in document;if(!Zn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Zn="function"===typeof er.oninput}Xn=Zn}else Xn=!1;Jn=Xn&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=cr(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hr(){for(var e=window,t=G();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=G((e=t.contentWindow).document)}return t}function pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function fr(e){var t=hr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&pr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=ur(n,o);var s=ur(n,r);i&&s&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n=document.documentMode,gr=null,yr=null,vr=null,_r=!1;function br(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;_r||null==gr||gr!==G(r)||("selectionStart"in(r=gr)&&pr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},vr&&lr(vr,r)||(vr=r,0<(r=qr(yr,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}function wr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Sr={animationend:wr("Animation","AnimationEnd"),animationiteration:wr("Animation","AnimationIteration"),animationstart:wr("Animation","AnimationStart"),transitionend:wr("Transition","TransitionEnd")},Er={},Cr={};function kr(e){if(Er[e])return Er[e];if(!Sr[e])return e;var t,n=Sr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Cr)return Er[e]=n[t];return e}u&&(Cr=document.createElement("div").style,"AnimationEvent"in window||(delete Sr.animationend.animation,delete Sr.animationiteration.animation,delete Sr.animationstart.animation),"TransitionEvent"in window||delete Sr.transitionend.transition);var xr=kr("animationend"),Tr=kr("animationiteration"),Ir=kr("animationstart"),Pr=kr("transitionend"),Ar=new Map,Rr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Nr(e,t){Ar.set(e,t),l(t,[e])}for(var Or=0;OrEi||(e.current=Si[Ei],Si[Ei]=null,Ei--)}function xi(e,t){Ei++,Si[Ei]=e.current,e.current=t}var Ti={},Ii=Ci(Ti),Pi=Ci(!1),Ai=Ti;function Ri(e,t){var n=e.type.contextTypes;if(!n)return Ti;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ni(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Oi(){ki(Pi),ki(Ii)}function Di(e,t,n){if(Ii.current!==Ti)throw Error(o(168));xi(Ii,t),xi(Pi,n)}function Li(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(o(108,W(e)||"Unknown",i));return F({},n,r)}function Mi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ti,Ai=Ii.current,xi(Ii,e),xi(Pi,Pi.current),!0}function Fi(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=Li(e,t,Ai),r.__reactInternalMemoizedMergedChildContext=e,ki(Pi),ki(Ii),xi(Ii,e)):ki(Pi),xi(Pi,n)}var ji=null,Ui=!1,$i=!1;function zi(e){null===ji?ji=[e]:ji.push(e)}function Bi(){if(!$i&&null!==ji){$i=!0;var e=0,t=_t;try{var n=ji;for(_t=1;e>=s,i-=s,Qi=1<<32-st(t)+i|n<m?(g=d,d=null):g=d.sibling;var y=p(i,d,a[m],l);if(null===y){null===d&&(d=g);break}e&&d&&null===y.alternate&&t(i,d),o=s(y,o,m),null===u?c=y:u.sibling=y,u=y,d=g}if(m===a.length)return n(i,d),io&&Xi(i,m),c;if(null===d){for(;mg?(y=m,m=null):y=m.sibling;var _=p(i,m,v.value,c);if(null===_){null===m&&(m=y);break}e&&m&&null===_.alternate&&t(i,m),a=s(_,a,g),null===d?u=_:d.sibling=_,d=_,m=y}if(v.done)return n(i,m),io&&Xi(i,g),u;if(null===m){for(;!v.done;g++,v=l.next())null!==(v=h(i,v.value,c))&&(a=s(v,a,g),null===d?u=v:d.sibling=v,d=v);return io&&Xi(i,g),u}for(m=r(i,m);!v.done;g++,v=l.next())null!==(v=f(m,i,g,v.value,c))&&(e&&null!==v.alternate&&m.delete(null===v.key?g:v.key),a=s(v,a,g),null===d?u=v:d.sibling=v,d=v);return e&&m.forEach((function(e){return t(i,e)})),io&&Xi(i,g),u}return function e(r,o,s,l){if("object"===typeof s&&null!==s&&s.type===E&&null===s.key&&(s=s.props.children),"object"===typeof s&&null!==s){switch(s.$$typeof){case w:e:{for(var c=s.key,u=o;null!==u;){if(u.key===c){if((c=s.type)===E){if(7===u.tag){n(r,u.sibling),(o=i(u,s.props.children)).return=r,r=o;break e}}else if(u.elementType===c||"object"===typeof c&&null!==c&&c.$$typeof===N&&_o(c)===u.type){n(r,u.sibling),(o=i(u,s.props)).ref=yo(r,u,s),o.return=r,r=o;break e}n(r,u);break}t(r,u),u=u.sibling}s.type===E?((o=Lc(s.props.children,r.mode,l,s.key)).return=r,r=o):((l=Dc(s.type,s.key,s.props,null,r.mode,l)).ref=yo(r,o,s),l.return=r,r=l)}return a(r);case S:e:{for(u=s.key;null!==o;){if(o.key===u){if(4===o.tag&&o.stateNode.containerInfo===s.containerInfo&&o.stateNode.implementation===s.implementation){n(r,o.sibling),(o=i(o,s.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=jc(s,r.mode,l)).return=r,r=o}return a(r);case N:return e(r,o,(u=s._init)(s._payload),l)}if(te(s))return m(r,o,s,l);if(L(s))return g(r,o,s,l);vo(r,s)}return"string"===typeof s&&""!==s||"number"===typeof s?(s=""+s,null!==o&&6===o.tag?(n(r,o.sibling),(o=i(o,s)).return=r,r=o):(n(r,o),(o=Fc(s,r.mode,l)).return=r,r=o),a(r)):n(r,o)}}var wo=bo(!0),So=bo(!1),Eo=Ci(null),Co=null,ko=null,xo=null;function To(){xo=ko=Co=null}function Io(e){var t=Eo.current;ki(Eo),e._currentValue=t}function Po(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ao(e,t){Co=e,xo=ko=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(_a=!0),e.firstContext=null)}function Ro(e){var t=e._currentValue;if(xo!==e)if(e={context:e,memoizedValue:t,next:null},null===ko){if(null===Co)throw Error(o(308));ko=e,Co.dependencies={lanes:0,firstContext:e}}else ko=ko.next=e;return t}var No=null;function Oo(e){null===No?No=[e]:No.push(e)}function Do(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Oo(t)):(n.next=i.next,i.next=n),t.interleaved=n,Lo(e,r)}function Lo(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Mo=!1;function Fo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function jo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Uo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function $o(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&Il)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Lo(e,n)}return null===(i=r.interleaved)?(t.next=t,Oo(r)):(t.next=i.next,i.next=t),r.interleaved=t,Lo(e,n)}function zo(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,vt(e,n)}}function Bo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=s:o=o.next=s,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Wo(e,t,n,r){var i=e.updateQueue;Mo=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(null!==a){i.shared.pending=null;var l=a,c=l.next;l.next=null,null===s?o=c:s.next=c,s=l;var u=e.alternate;null!==u&&((a=(u=u.updateQueue).lastBaseUpdate)!==s&&(null===a?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(null!==o){var d=i.baseState;for(s=0,u=c=l=null,a=o;;){var h=a.lane,p=a.eventTime;if((r&h)===h){null!==u&&(u=u.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var f=e,m=a;switch(h=t,p=n,m.tag){case 1:if("function"===typeof(f=m.payload)){d=f.call(p,d,h);break e}d=f;break e;case 3:f.flags=-65537&f.flags|128;case 0:if(null===(h="function"===typeof(f=m.payload)?f.call(p,d,h):f)||void 0===h)break e;d=F({},d,h);break e;case 2:Mo=!0}}null!==a.callback&&0!==a.lane&&(e.flags|=64,null===(h=i.effects)?i.effects=[a]:h.push(a))}else p={eventTime:p,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===u?(c=u=p,l=d):u=u.next=p,s|=h;if(null===(a=a.next)){if(null===(a=i.shared.pending))break;a=(h=a).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===u&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{s|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Ml|=s,e.lanes=s,e.memoizedState=d}}function Ho(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;tn?n:4,e(!0);var r=os.transition;os.transition={};try{e(!1),t()}finally{_t=n,os.transition=r}}function qs(){return _s().memoizedState}function Ks(e,t,n){var r=tc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ys(e))Qs(t,n);else if(null!==(n=Do(e,t,n,r))){nc(n,e,r,ec()),Js(n,t,r)}}function Gs(e,t,n){var r=tc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ys(e))Qs(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,ar(a,s)){var l=t.interleaved;return null===l?(i.next=i,Oo(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(c){}null!==(n=Do(e,t,i,r))&&(nc(n,e,r,i=ec()),Js(n,t,r))}}function Ys(e){var t=e.alternate;return e===as||null!==t&&t===as}function Qs(e,t){ds=us=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Js(e,t,n){if(0!==(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,vt(e,n)}}var Xs={readContext:Ro,useCallback:fs,useContext:fs,useEffect:fs,useImperativeHandle:fs,useInsertionEffect:fs,useLayoutEffect:fs,useMemo:fs,useReducer:fs,useRef:fs,useState:fs,useDebugValue:fs,useDeferredValue:fs,useTransition:fs,useMutableSource:fs,useSyncExternalStore:fs,useId:fs,unstable_isNewReconciler:!1},Zs={readContext:Ro,useCallback:function(e,t){return vs().memoizedState=[e,void 0===t?null:t],e},useContext:Ro,useEffect:Ls,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Os(4194308,4,Us.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Os(4194308,4,e,t)},useInsertionEffect:function(e,t){return Os(4,2,e,t)},useMemo:function(e,t){var n=vs();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=vs();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ks.bind(null,as,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},vs().memoizedState=e},useState:As,useDebugValue:zs,useDeferredValue:function(e){return vs().memoizedState=e},useTransition:function(){var e=As(!1),t=e[0];return e=Vs.bind(null,e[1]),vs().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=as,i=vs();if(io){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===Pl)throw Error(o(349));0!==(30&ss)||ks(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Ls(Ts.bind(null,r,s,e),[e]),r.flags|=2048,Rs(9,xs.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=vs(),t=Pl.identifierPrefix;if(io){var n=Ji;t=":"+t+"R"+(n=(Qi&~(1<<32-st(Qi)-1)).toString(32)+n),0<(n=hs++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=ps++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ea={readContext:Ro,useCallback:Bs,useContext:Ro,useEffect:Ms,useImperativeHandle:$s,useInsertionEffect:Fs,useLayoutEffect:js,useMemo:Ws,useReducer:ws,useRef:Ns,useState:function(){return ws(bs)},useDebugValue:zs,useDeferredValue:function(e){return Hs(_s(),ls.memoizedState,e)},useTransition:function(){return[ws(bs)[0],_s().memoizedState]},useMutableSource:Es,useSyncExternalStore:Cs,useId:qs,unstable_isNewReconciler:!1},ta={readContext:Ro,useCallback:Bs,useContext:Ro,useEffect:Ms,useImperativeHandle:$s,useInsertionEffect:Fs,useLayoutEffect:js,useMemo:Ws,useReducer:Ss,useRef:Ns,useState:function(){return Ss(bs)},useDebugValue:zs,useDeferredValue:function(e){var t=_s();return null===ls?t.memoizedState=e:Hs(t,ls.memoizedState,e)},useTransition:function(){return[Ss(bs)[0],_s().memoizedState]},useMutableSource:Es,useSyncExternalStore:Cs,useId:qs,unstable_isNewReconciler:!1};function na(e,t){if(e&&e.defaultProps){for(var n in t=F({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function ra(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:F({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var ia={isMounted:function(e){return!!(e=e._reactInternals)&&Be(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ec(),i=tc(e),o=Uo(r,i);o.payload=t,void 0!==n&&null!==n&&(o.callback=n),null!==(t=$o(e,o,i))&&(nc(t,e,i,r),zo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ec(),i=tc(e),o=Uo(r,i);o.tag=1,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),null!==(t=$o(e,o,i))&&(nc(t,e,i,r),zo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ec(),r=tc(e),i=Uo(n,r);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),null!==(t=$o(e,i,r))&&(nc(t,e,r,n),zo(t,e,r))}};function oa(e,t,n,r,i,o,s){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,s):!t.prototype||!t.prototype.isPureReactComponent||(!lr(n,r)||!lr(i,o))}function sa(e,t,n){var r=!1,i=Ti,o=t.contextType;return"object"===typeof o&&null!==o?o=Ro(o):(i=Ni(t)?Ai:Ii.current,o=(r=null!==(r=t.contextTypes)&&void 0!==r)?Ri(e,i):Ti),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ia,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function aa(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ia.enqueueReplaceState(t,t.state,null)}function la(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Fo(e);var o=t.contextType;"object"===typeof o&&null!==o?i.context=Ro(o):(o=Ni(t)?Ai:Ii.current,i.context=Ri(e,o)),i.state=e.memoizedState,"function"===typeof(o=t.getDerivedStateFromProps)&&(ra(e,t,o,n),i.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&ia.enqueueReplaceState(i,i.state,null),Wo(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4194308)}function ca(e,t){try{var n="",r=t;do{n+=z(r),r=r.return}while(r);var i=n}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:i,digest:null}}function ua(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function da(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var ha="function"===typeof WeakMap?WeakMap:Map;function pa(e,t,n){(n=Uo(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Hl||(Hl=!0,Vl=r),da(0,t)},n}function fa(e,t,n){(n=Uo(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){da(0,t)}}var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){da(0,t),"function"!==typeof r&&(null===ql?ql=new Set([this]):ql.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ma(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ha;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=kc.bind(null,e,t,n),t.then(e,e))}function ga(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ya(e,t,n,r,i){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Uo(-1,1)).tag=2,$o(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var va=b.ReactCurrentOwner,_a=!1;function ba(e,t,n,r){t.child=null===e?So(t,null,n,r):wo(t,e.child,n,r)}function wa(e,t,n,r,i){n=n.render;var o=t.ref;return Ao(t,i),r=gs(e,t,n,r,o,i),n=ys(),null===e||_a?(io&&n&&eo(t),t.flags|=1,ba(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ha(e,t,i))}function Sa(e,t,n,r,i){if(null===e){var o=n.type;return"function"!==typeof o||Nc(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Dc(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Ea(e,t,o,r,i))}if(o=e.child,0===(e.lanes&i)){var s=o.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(s,r)&&e.ref===t.ref)return Ha(e,t,i)}return t.flags|=1,(e=Oc(o,r)).ref=t.ref,e.return=t,t.child=e}function Ea(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(lr(o,r)&&e.ref===t.ref){if(_a=!1,t.pendingProps=r=o,0===(e.lanes&i))return t.lanes=e.lanes,Ha(e,t,i);0!==(131072&e.flags)&&(_a=!0)}}return xa(e,t,n,r,i)}function Ca(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},xi(Ol,Nl),Nl|=n;else{if(0===(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,xi(Ol,Nl),Nl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,xi(Ol,Nl),Nl|=r}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,xi(Ol,Nl),Nl|=r;return ba(e,t,i,n),t.child}function ka(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function xa(e,t,n,r,i){var o=Ni(n)?Ai:Ii.current;return o=Ri(t,o),Ao(t,i),n=gs(e,t,n,r,o,i),r=ys(),null===e||_a?(io&&r&&eo(t),t.flags|=1,ba(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ha(e,t,i))}function Ta(e,t,n,r,i){if(Ni(n)){var o=!0;Mi(t)}else o=!1;if(Ao(t,i),null===t.stateNode)Wa(e,t),sa(t,n,r),la(t,n,r,i),r=!0;else if(null===e){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=n.contextType;"object"===typeof c&&null!==c?c=Ro(c):c=Ri(t,c=Ni(n)?Ai:Ii.current);var u=n.getDerivedStateFromProps,d="function"===typeof u||"function"===typeof s.getSnapshotBeforeUpdate;d||"function"!==typeof s.UNSAFE_componentWillReceiveProps&&"function"!==typeof s.componentWillReceiveProps||(a!==r||l!==c)&&aa(t,s,r,c),Mo=!1;var h=t.memoizedState;s.state=h,Wo(t,r,s,i),l=t.memoizedState,a!==r||h!==l||Pi.current||Mo?("function"===typeof u&&(ra(t,n,u,r),l=t.memoizedState),(a=Mo||oa(t,n,a,r,h,l,c))?(d||"function"!==typeof s.UNSAFE_componentWillMount&&"function"!==typeof s.componentWillMount||("function"===typeof s.componentWillMount&&s.componentWillMount(),"function"===typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"===typeof s.componentDidMount&&(t.flags|=4194308)):("function"===typeof s.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=c,r=a):("function"===typeof s.componentDidMount&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,jo(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:na(t.type,a),s.props=c,d=t.pendingProps,h=s.context,"object"===typeof(l=n.contextType)&&null!==l?l=Ro(l):l=Ri(t,l=Ni(n)?Ai:Ii.current);var p=n.getDerivedStateFromProps;(u="function"===typeof p||"function"===typeof s.getSnapshotBeforeUpdate)||"function"!==typeof s.UNSAFE_componentWillReceiveProps&&"function"!==typeof s.componentWillReceiveProps||(a!==d||h!==l)&&aa(t,s,r,l),Mo=!1,h=t.memoizedState,s.state=h,Wo(t,r,s,i);var f=t.memoizedState;a!==d||h!==f||Pi.current||Mo?("function"===typeof p&&(ra(t,n,p,r),f=t.memoizedState),(c=Mo||oa(t,n,c,r,h,f,l)||!1)?(u||"function"!==typeof s.UNSAFE_componentWillUpdate&&"function"!==typeof s.componentWillUpdate||("function"===typeof s.componentWillUpdate&&s.componentWillUpdate(r,f,l),"function"===typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(r,f,l)),"function"===typeof s.componentDidUpdate&&(t.flags|=4),"function"===typeof s.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=f),s.props=r,s.state=f,s.context=l,r=c):("function"!==typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Ia(e,t,n,r,o,i)}function Ia(e,t,n,r,i,o){ka(e,t);var s=0!==(128&t.flags);if(!r&&!s)return i&&Fi(t,n,!1),Ha(e,t,o);r=t.stateNode,va.current=t;var a=s&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&s?(t.child=wo(t,e.child,null,o),t.child=wo(t,null,a,o)):ba(e,t,a,o),t.memoizedState=r.state,i&&Fi(t,n,!0),t.child}function Pa(e){var t=e.stateNode;t.pendingContext?Di(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Di(0,t.context,!1),Qo(e,t.containerInfo)}function Aa(e,t,n,r,i){return fo(),mo(i),t.flags|=256,ba(e,t,n,r),t.child}var Ra,Na,Oa,Da,La={dehydrated:null,treeContext:null,retryLane:0};function Ma(e){return{baseLanes:e,cachePool:null,transitions:null}}function Fa(e,t,n){var r,i=t.pendingProps,s=es.current,a=!1,l=0!==(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!==(2&s)),r?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(s|=1),xi(es,1&s),null===e)return co(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=i.children,e=i.fallback,a?(i=t.mode,a=t.child,l={mode:"hidden",children:l},0===(1&i)&&null!==a?(a.childLanes=0,a.pendingProps=l):a=Mc(l,i,0,null),e=Lc(e,i,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Ma(n),t.memoizedState=La,e):ja(t,l));if(null!==(s=e.memoizedState)&&null!==(r=s.dehydrated))return function(e,t,n,r,i,s,a){if(n)return 256&t.flags?(t.flags&=-257,Ua(e,t,a,r=ua(Error(o(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Mc({mode:"visible",children:r.children},i,0,null),(s=Lc(s,i,a,null)).flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,0!==(1&t.mode)&&wo(t,e.child,null,a),t.child.memoizedState=Ma(a),t.memoizedState=La,s);if(0===(1&t.mode))return Ua(e,t,a,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,Ua(e,t,a,r=ua(s=Error(o(419)),r,void 0))}if(l=0!==(a&e.childLanes),_a||l){if(null!==(r=Pl)){switch(a&-a){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}0!==(i=0!==(i&(r.suspendedLanes|a))?0:i)&&i!==s.retryLane&&(s.retryLane=i,Lo(e,i),nc(r,e,i,-1))}return mc(),Ua(e,t,a,r=ua(Error(o(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Tc.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,ro=ci(i.nextSibling),no=t,io=!0,oo=null,null!==e&&(Ki[Gi++]=Qi,Ki[Gi++]=Ji,Ki[Gi++]=Yi,Qi=e.id,Ji=e.overflow,Yi=t),t=ja(t,r.children),t.flags|=4096,t)}(e,t,l,i,r,s,n);if(a){a=i.fallback,l=t.mode,r=(s=e.child).sibling;var c={mode:"hidden",children:i.children};return 0===(1&l)&&t.child!==s?((i=t.child).childLanes=0,i.pendingProps=c,t.deletions=null):(i=Oc(s,c)).subtreeFlags=14680064&s.subtreeFlags,null!==r?a=Oc(r,a):(a=Lc(a,l,n,null)).flags|=2,a.return=t,i.return=t,i.sibling=a,t.child=i,i=a,a=t.child,l=null===(l=e.child.memoizedState)?Ma(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},a.memoizedState=l,a.childLanes=e.childLanes&~n,t.memoizedState=La,i}return e=(a=e.child).sibling,i=Oc(a,{mode:"visible",children:i.children}),0===(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function ja(e,t){return(t=Mc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Ua(e,t,n,r){return null!==r&&mo(r),wo(t,e.child,null,n),(e=ja(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function $a(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Po(e.return,t,n)}function za(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Ba(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(ba(e,t,r.children,n),0!==(2&(r=es.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&$a(e,n,t);else if(19===e.tag)$a(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(xi(es,r),0===(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===ts(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),za(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ts(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}za(t,!0,n,null,o);break;case"together":za(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Wa(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ha(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Ml|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Oc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Oc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Va(e,t){if(!io)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function qa(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ka(e,t,n){var r=t.pendingProps;switch(to(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qa(t),null;case 1:case 17:return Ni(t.type)&&Oi(),qa(t),null;case 3:return r=t.stateNode,Jo(),ki(Pi),ki(Ii),rs(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(ho(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==oo&&(sc(oo),oo=null))),Na(e,t),qa(t),null;case 5:Zo(t);var i=Yo(Go.current);if(n=t.type,null!==e&&null!=t.stateNode)Oa(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(o(166));return qa(t),null}if(e=Yo(qo.current),ho(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[hi]=t,r[pi]=s,e=0!==(1&t.mode),n){case"dialog":Ur("cancel",r),Ur("close",r);break;case"iframe":case"object":case"embed":Ur("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[hi]=t,e[pi]=r,Ra(e,t,!1,!1),t.stateNode=e;e:{switch(l=_e(n,r),n){case"dialog":Ur("cancel",e),Ur("close",e),i=r;break;case"iframe":case"object":case"embed":Ur("load",e),i=r;break;case"video":case"audio":for(i=0;iBl&&(t.flags|=128,r=!0,Va(s,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ts(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Va(s,!0),null===s.tail&&"hidden"===s.tailMode&&!l.alternate&&!io)return qa(t),null}else 2*Je()-s.renderingStartTime>Bl&&1073741824!==n&&(t.flags|=128,r=!0,Va(s,!1),t.lanes=4194304);s.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=s.last)?n.sibling=l:t.child=l,s.last=l)}return null!==s.tail?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Je(),t.sibling=null,n=es.current,xi(es,r?1&n|2:1&n),t):(qa(t),null);case 22:case 23:return dc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(1&t.mode)?0!==(1073741824&Nl)&&(qa(t),6&t.subtreeFlags&&(t.flags|=8192)):qa(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function Ga(e,t){switch(to(t),t.tag){case 1:return Ni(t.type)&&Oi(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Jo(),ki(Pi),ki(Ii),rs(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Zo(t),null;case 13:if(ki(es),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));fo()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return ki(es),null;case 4:return Jo(),null;case 10:return Io(t.type._context),null;case 22:case 23:return dc(),null;default:return null}}Ra=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Na=function(){},Oa=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Yo(qo.current);var o,s=null;switch(n){case"input":i=Y(e,i),r=Y(e,r),s=[];break;case"select":i=F({},i,{value:void 0}),r=F({},r,{value:void 0}),s=[];break;case"textarea":i=re(e,i),r=re(e,r),s=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=Zr)}for(u in ve(n,r),n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&null!=i[u])if("style"===u){var l=i[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(a.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var c=r[u];if(l=null!=i?i[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(s||(s=[]),s.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(s=s||[]).push(u,c)):"children"===u?"string"!==typeof c&&"number"!==typeof c||(s=s||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(a.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&Ur("scroll",e),s||l===c||(s=[])):(s=s||[]).push(u,c))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}},Da=function(e,t,n,r){n!==r&&(t.flags|=4)};var Ya=!1,Qa=!1,Ja="function"===typeof WeakSet?WeakSet:Set,Xa=null;function Za(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){Cc(e,t,r)}else n.current=null}function el(e,t,n){try{n()}catch(r){Cc(e,t,r)}}var tl=!1;function nl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&el(t,n,o)}i=i.next}while(i!==r)}}function rl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function il(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function ol(e){var t=e.alternate;null!==t&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[hi],delete t[pi],delete t[mi],delete t[gi],delete t[yi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function sl(e){return 5===e.tag||3===e.tag||4===e.tag}function al(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||sl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ll(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Zr));else if(4!==r&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}function cl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}var ul=null,dl=!1;function hl(e,t,n){for(n=n.child;null!==n;)pl(e,t,n),n=n.sibling}function pl(e,t,n){if(ot&&"function"===typeof ot.onCommitFiberUnmount)try{ot.onCommitFiberUnmount(it,n)}catch(a){}switch(n.tag){case 5:Qa||Za(n,t);case 6:var r=ul,i=dl;ul=null,hl(e,t,n),dl=i,null!==(ul=r)&&(dl?(e=ul,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):ul.removeChild(n.stateNode));break;case 18:null!==ul&&(dl?(e=ul,n=n.stateNode,8===e.nodeType?li(e.parentNode,n):1===e.nodeType&&li(e,n),Bt(e)):li(ul,n.stateNode));break;case 4:r=ul,i=dl,ul=n.stateNode.containerInfo,dl=!0,hl(e,t,n),ul=r,dl=i;break;case 0:case 11:case 14:case 15:if(!Qa&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,void 0!==s&&(0!==(2&o)||0!==(4&o))&&el(n,t,s),i=i.next}while(i!==r)}hl(e,t,n);break;case 1:if(!Qa&&(Za(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Cc(n,t,a)}hl(e,t,n);break;case 21:hl(e,t,n);break;case 22:1&n.mode?(Qa=(r=Qa)||null!==n.memoizedState,hl(e,t,n),Qa=r):hl(e,t,n);break;default:hl(e,t,n)}}function fl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Ja),t.forEach((function(t){var r=Ic.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function ml(e,t){var n=t.deletions;if(null!==n)for(var r=0;ri&&(i=a),r&=~s}if(r=i,10<(r=(120>(r=Je()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Cl(r/1960))-r)){e.timeoutHandle=ri(wc.bind(null,e,$l,Wl),r);break}wc(e,$l,Wl);break;default:throw Error(o(329))}}}return rc(e,Je()),e.callbackNode===n?ic.bind(null,e):null}function oc(e,t){var n=Ul;return e.current.memoizedState.isDehydrated&&(hc(e,t).flags|=256),2!==(e=gc(e,t))&&(t=$l,$l=n,null!==t&&sc(t)),e}function sc(e){null===$l?$l=e:$l.push.apply($l,e)}function ac(e,t){for(t&=~jl,t&=~Fl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0e?16:e,null===Gl)var r=!1;else{if(e=Gl,Gl=null,Yl=0,0!==(6&Il))throw Error(o(331));var i=Il;for(Il|=4,Xa=e.current;null!==Xa;){var s=Xa,a=s.child;if(0!==(16&Xa.flags)){var l=s.deletions;if(null!==l){for(var c=0;cJe()-zl?hc(e,0):jl|=n),rc(e,t)}function xc(e,t){0===t&&(0===(1&e.mode)?t=1:(t=ut,0===(130023424&(ut<<=1))&&(ut=4194304)));var n=ec();null!==(e=Lo(e,t))&&(yt(e,t,n),rc(e,n))}function Tc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),xc(e,n)}function Ic(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(o(314))}null!==r&&r.delete(t),xc(e,n)}function Pc(e,t){return Ke(e,t)}function Ac(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,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 Rc(e,t,n,r){return new Ac(e,t,n,r)}function Nc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Oc(e,t){var n=e.alternate;return null===n?((n=Rc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Dc(e,t,n,r,i,s){var a=2;if(r=e,"function"===typeof e)Nc(e)&&(a=1);else if("string"===typeof e)a=5;else e:switch(e){case E:return Lc(n.children,i,s,t);case C:a=8,i|=8;break;case k:return(e=Rc(12,n,t,2|i)).elementType=k,e.lanes=s,e;case P:return(e=Rc(13,n,t,i)).elementType=P,e.lanes=s,e;case A:return(e=Rc(19,n,t,i)).elementType=A,e.lanes=s,e;case O:return Mc(n,i,s,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case x:a=10;break e;case T:a=9;break e;case I:a=11;break e;case R:a=14;break e;case N:a=16,r=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Rc(a,n,t,i)).elementType=e,t.type=r,t.lanes=s,t}function Lc(e,t,n,r){return(e=Rc(7,e,r,t)).lanes=n,e}function Mc(e,t,n,r){return(e=Rc(22,e,r,t)).elementType=O,e.lanes=n,e.stateNode={isHidden:!1},e}function Fc(e,t,n){return(e=Rc(6,e,null,t)).lanes=n,e}function jc(e,t,n){return(t=Rc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Uc(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function $c(e,t,n,r,i,o,s,a,l){return e=new Uc(e,t,n,a,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Rc(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Fo(o),e}function zc(e){if(!e)return Ti;e:{if(Be(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ni(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var n=e.type;if(Ni(n))return Li(e,n,t)}return t}function Bc(e,t,n,r,i,o,s,a,l){return(e=$c(n,r,!0,e,0,o,0,a,l)).context=zc(null),n=e.current,(o=Uo(r=ec(),i=tc(n))).callback=void 0!==t&&null!==t?t:null,$o(n,o,i),e.current.lanes=i,yt(e,i,r),rc(e,r),e}function Wc(e,t,n,r){var i=t.current,o=ec(),s=tc(i);return n=zc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Uo(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=$o(i,t,s))&&(nc(e,i,s,o),zo(e,i,s)),s}function Hc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Vc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n{"use strict";var r=n(950);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},950:(e,t,n)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(730)},153:(e,t,n)=>{"use strict";var r=n(43),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,o={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,r)&&!l.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:u,props:o,_owner:a.current}}t.jsx=c,t.jsxs=c},202:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator;var f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||f}function v(){}function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||f}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=y.prototype;var b=_.prototype=new v;b.constructor=_,m(b,y.prototype),b.isPureReactComponent=!0;var w=Array.isArray,S=Object.prototype.hasOwnProperty,E={current:null},C={key:!0,ref:!0,__self:!0,__source:!0};function k(e,t,r){var i,o={},s=null,a=null;if(null!=t)for(i in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(s=""+t.key),t)S.call(t,i)&&!C.hasOwnProperty(i)&&(o[i]=t[i]);var l=arguments.length-2;if(1===l)o.children=r;else if(1{"use strict";e.exports=n(202)},579:(e,t,n)=>{"use strict";e.exports=n(153)},234:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0>>1,i=e[r];if(!(0>>1;ro(l,n))co(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[a]=n,r=a);else{if(!(co(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var a=Date,l=a.now();t.unstable_now=function(){return a.now()-l}}var c=[],u=[],d=1,h=null,p=3,f=!1,m=!1,g=!1,y="function"===typeof setTimeout?setTimeout:null,v="function"===typeof clearTimeout?clearTimeout:null,_="undefined"!==typeof setImmediate?setImmediate:null;function b(e){for(var t=r(u);null!==t;){if(null===t.callback)i(u);else{if(!(t.startTime<=e))break;i(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function w(e){if(g=!1,b(e),!m)if(null!==r(c))m=!0,O(S);else{var t=r(u);null!==t&&D(w,t.startTime-e)}}function S(e,n){m=!1,g&&(g=!1,v(x),x=-1),f=!0;var o=p;try{for(b(n),h=r(c);null!==h&&(!(h.expirationTime>n)||e&&!P());){var s=h.callback;if("function"===typeof s){h.callback=null,p=h.priorityLevel;var a=s(h.expirationTime<=n);n=t.unstable_now(),"function"===typeof a?h.callback=a:h===r(c)&&i(c),b(n)}else i(c);h=r(c)}if(null!==h)var l=!0;else{var d=r(u);null!==d&&D(w,d.startTime-n),l=!1}return l}finally{h=null,p=o,f=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E,C=!1,k=null,x=-1,T=5,I=-1;function P(){return!(t.unstable_now()-Ie||125s?(e.sortIndex=o,n(u,e),null===r(c)&&e===r(u)&&(g?(v(x),x=-1):g=!0,D(w,o-s))):(e.sortIndex=a,n(c,e),m||f||(m=!0,O(S))),e},t.unstable_shouldYield=P,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},853:(e,t,n)=>{"use strict";e.exports=n(234)},324:e=>{e.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!==typeof e||!e||"object"!==typeof t||!t)return!1;var o=Object.keys(e),s=Object.keys(t);if(o.length!==s.length)return!1;for(var a=Object.prototype.hasOwnProperty.bind(t),l=0;l{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,i){if(1&i&&(r=this(r)),8&i)return r;if("object"===typeof r&&r){if(4&i&&r.__esModule)return r;if(16&i&&"function"===typeof r.then)return r}var o=Object.create(null);n.r(o);var s={};e=e||[null,t({}),t([]),t(t)];for(var a=2&i&&r;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>s[e]=()=>r[e]));return s.default=()=>r,n.d(o,s),o}})(),n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[])),n.u=e=>"static/js/"+e+".709b0993.chunk.js",n.miniCssF=e=>{},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="mymind_portal:";n.l=(r,i,o,s)=>{if(e[r])e[r].push(i);else{var a,l;if(void 0!==o)for(var c=document.getElementsByTagName("script"),u=0;u{a.onerror=a.onload=null,clearTimeout(p);var i=e[r];if(delete e[r],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach((e=>e(n))),t)return t(n)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=h.bind(null,a.onerror),a.onload=h.bind(null,a.onload),l&&document.head.appendChild(a)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/MyMind-Portal/",(()=>{var e={792:0};n.f.j=(t,r)=>{var i=n.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{var o=new Promise(((n,r)=>i=e[t]=[n,r]));r.push(i[2]=o);var s=n.p+n.u(t),a=new Error;n.l(s,(r=>{if(n.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var o=r&&("load"===r.type?"missing":r.type),s=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+s+")",a.name="ChunkLoadError",a.type=o,a.request=s,i[1](a)}}),"chunk-"+t,t)}};var t=(t,r)=>{var i,o,s=r[0],a=r[1],l=r[2],c=0;if(s.some((t=>0!==e[t]))){for(i in a)n.o(a,i)&&(n.m[i]=a[i]);if(l)l(n)}for(t&&t(r);c{"use strict";var e=n(43),t=n.t(e,2),r=n(391);const i={bg:"#1C1C27",bgLight:"#1C1E27",primary:"#854CE6",text_primary:"#F2F3F4",text_secondary:"#b1b2b3",card:"#171721",card_light:"#191924",button:"#854CE6",white:"#FFFFFF",black:"#000000"};var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?E(D,--N):0,A--,10===O&&(A=1,P--),O}function U(){return O=N2||W(O)>3?"":" "}function G(e,t){for(;--t&&U()&&!(O<48||O>102||O>57&&O<65||O>70&&O<97););return B(e,z()+(t<6&&32==$()&&32==U()))}function Y(e){for(;U();)switch(O){case e:return N;case 34:case 39:34!==e&&39!==e&&Y(O);break;case 40:41===e&&Y(e);break;case 92:U()}return N}function Q(e,t){for(;U()&&e+O!==57&&(e+O!==84||47!==$()););return"/*"+B(t,N-1)+"*"+y(47===e?e:U())}function J(e){for(;!W($());)U();return B(e,N)}function X(e,t){for(var n="",r=0;r6)switch(E(e,t+1)){case 109:if(45!==E(e,t+4))break;case 102:return w(e,/(.+:)(.+)-([^]+)/,"$1"+d+"$2-$3$1"+u+(108==E(e,t+3)?"$3":"$2-$3"))+e;case 115:return~S(e,"stretch",0)?ee(w(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return w(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(t,n,r,i,o,s,a){return c+n+":"+r+a+(i?c+n+"-span:"+(o?s:+s-+r)+a:"")+e}));case 4949:if(121===E(e,t+6))return w(e,":",":"+d)+e;break;case 6444:switch(E(e,45===E(e,14)?18:11)){case 120:return w(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+d+(45===E(e,14)?"inline-":"")+"box$3$1"+d+"$2$3$1"+c+"$2box$3")+e;case 100:return w(e,":",":"+c)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return w(e,"scroll-","scroll-snap-")+e}return e}function te(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case f:return void(e.return=ee(e.value,e.length,n));case m:return X([M(e,{value:w(e.value,"@","@"+d)})],r);case p:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,(function(t){switch(b(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":F(M(e,{props:[w(t,/:(read-\w+)/,":-moz-$1")]})),F(M(e,{props:[t]})),v(e,{props:I(n,r)});break;case"::placeholder":F(M(e,{props:[w(t,/:(plac\w+)/,":"+d+"input-$1")]})),F(M(e,{props:[w(t,/:(plac\w+)/,":-moz-$1")]})),F(M(e,{props:[w(t,/:(plac\w+)/,c+"input-$1")]})),F(M(e,{props:[t]})),v(e,{props:I(n,r)})}return""}))}}function ne(e){return V(re("",null,null,null,[""],e=H(e),0,[0],e))}function re(e,t,n,r,i,o,s,a,l){for(var c=0,u=0,d=s,h=0,p=0,f=0,m=1,v=1,_=1,b=0,C="",x=i,I=o,P=r,A=C;v;)switch(f=b,b=U()){case 40:if(108!=f&&58==E(A,d-1)){-1!=S(A+=w(q(b),"&","&\f"),"&\f",g(c?a[c-1]:0))&&(_=-1);break}case 34:case 39:case 91:A+=q(b);break;case 9:case 10:case 13:case 32:A+=K(f);break;case 92:A+=G(z()-1,7);continue;case 47:switch($()){case 42:case 47:T(oe(Q(U(),z()),t,n,l),l);break;default:A+="/"}break;case 123*m:a[c++]=k(A)*_;case 125*m:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+u:-1==_&&(A=w(A,/\f/g,"")),p>0&&k(A)-d&&T(p>32?se(A+";",r,n,d-1,l):se(w(A," ","")+";",r,n,d-2,l),l);break;case 59:A+=";";default:if(T(P=ie(A,t,n,c,u,i,a,C,x=[],I=[],d,o),o),123===b)if(0===u)re(A,t,P,P,x,o,d,a,I);else switch(99===h&&110===E(A,3)?100:h){case 100:case 108:case 109:case 115:re(e,P,P,r&&T(ie(e,P,P,0,0,i,a,C,i,x=[],d,I),I),i,I,d,a,r?x:I);break;default:re(A,P,P,P,[""],I,0,a,I)}}c=u=p=0,m=_=1,C=A="",d=s;break;case 58:d=1+k(A),p=f;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==j())continue;switch(A+=y(b),b*m){case 38:_=u>0?1:(A+="\f",-1);break;case 44:a[c++]=(k(A)-1)*_,_=1;break;case 64:45===$()&&(A+=q(U())),h=$(),u=d=k(C=A+=J(z())),b++;break;case 45:45===f&&2==k(A)&&(m=0)}}return o}function ie(e,t,n,r,i,o,s,a,l,c,u,d){for(var h=i-1,f=0===i?o:[""],m=x(f),y=0,v=0,b=0;y0?f[S]+" "+E:w(E,/&\f/g,f[S])))&&(l[b++]=k);return L(e,t,n,0===i?p:a,l,c,u,d)}function oe(e,t,n,r){return L(e,t,n,h,y(O),C(e,2,-2),0,r)}function se(e,t,n,r,i){return L(e,t,n,f,C(e,0,r),C(e,r+1,-1),r,i)}var ae={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},le="undefined"!=typeof process&&void 0!=={NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}&&({NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}.REACT_APP_SC_ATTR||{NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}.SC_ATTR)||"data-styled",ce="active",ue="data-styled-version",de="6.1.13",he="/*!sc*/\n",pe="undefined"!=typeof window&&"HTMLElement"in window,fe=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!=={NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}&&void 0!=={NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}.REACT_APP_SC_DISABLE_SPEEDY&&""!=={NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}.REACT_APP_SC_DISABLE_SPEEDY?"false"!=={NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}.REACT_APP_SC_DISABLE_SPEEDY&&{NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!=={NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}&&void 0!=={NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}.SC_DISABLE_SPEEDY&&""!=={NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}.SC_DISABLE_SPEEDY&&("false"!=={NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}.SC_DISABLE_SPEEDY&&{NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}.SC_DISABLE_SPEEDY)),me=(new Set,Object.freeze([])),ge=Object.freeze({});function ye(e,t,n){return void 0===n&&(n=ge),e.theme!==n.theme&&e.theme||t||n.theme}var ve=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),_e=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,be=/(^-|-$)/g;function we(e){return e.replace(_e,"-").replace(be,"")}var Se=/(a)(d)/gi,Ee=function(e){return String.fromCharCode(e+(e>25?39:97))};function Ce(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Ee(t%52)+n;return(Ee(t%52)+n).replace(Se,"$1-$2")}var ke,xe=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Te=function(e){return xe(5381,e)};function Ie(e){return Ce(Te(e)>>>0)}function Pe(e){return e.displayName||e.name||"Component"}function Ae(e){return"string"==typeof e&&!0}var Re="function"==typeof Symbol&&Symbol.for,Ne=Re?Symbol.for("react.memo"):60115,Oe=Re?Symbol.for("react.forward_ref"):60112,De={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Le={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Me={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Fe=((ke={})[Oe]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ke[Ne]=Me,ke);function je(e){return("type"in(t=e)&&t.type.$$typeof)===Ne?Me:"$$typeof"in e?Fe[e.$$typeof]:De;var t}var Ue=Object.defineProperty,$e=Object.getOwnPropertyNames,ze=Object.getOwnPropertySymbols,Be=Object.getOwnPropertyDescriptor,We=Object.getPrototypeOf,He=Object.prototype;function Ve(e,t,n){if("string"!=typeof t){if(He){var r=We(t);r&&r!==He&&Ve(e,r,n)}var i=$e(t);ze&&(i=i.concat(ze(t)));for(var o=je(e),s=je(t),a=0;a0?" Args: ".concat(t.join(", ")):""))}var et=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,i=r;e>=i;)if((i<<=1)<0)throw Ze(16,"".concat(e));this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var o=r;o=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n,o=r;o=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e0&&(l+="".concat(e,","))})),r+="".concat(s).concat(a,'{content:"').concat(l,'"}').concat(he)},o=0;o0?".".concat(t):e},u=l.slice();u.push((function(e){e.type===p&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(_t,n).replace(r,c))})),s.prefix&&u.push(te),u.push(Z);var d=function(e,i,o,a){void 0===i&&(i=""),void 0===o&&(o=""),void 0===a&&(a="&"),t=a,n=i,r=new RegExp("\\".concat(n,"\\b"),"g");var l=e.replace(bt,""),c=ne(o||i?"".concat(o," ").concat(i," { ").concat(l," }"):l);s.namespace&&(c=wt(c,s.namespace));var d,h=[];return X(c,function(e){var t=x(e);return function(n,r,i,o){for(var s="",a=0;a="A"&&e<="Z"};function Rt(e){for(var t="",n=0;n>>0);if(!t.hasNameForId(this.componentId,o)){var s=n(i,".".concat(o),void 0,this.componentId);t.insertRules(this.componentId,o,s)}r=Ge(r,o),this.staticRulesId=o}else{for(var a=xe(this.baseHash,n.hash),l="",c=0;c>>0);t.hasNameForId(this.componentId,h)||t.insertRules(this.componentId,h,n(l,".".concat(h),void 0,this.componentId)),r=Ge(r,h)}}return r},e}(),jt=e.createContext(void 0);jt.Consumer;function Ut(t){var n=e.useContext(jt),r=(0,e.useMemo)((function(){return function(e,t){if(!e)throw Ze(14);if(qe(e))return e(t);if(Array.isArray(e)||"object"!=typeof e)throw Ze(8);return t?o(o({},t),e):e}(t.theme,n)}),[t.theme,n]);return t.children?e.createElement(jt.Provider,{value:r},t.children):null}var $t={};new Set;function zt(t,n,r){var i=Ke(t),s=t,a=!Ae(t),l=n.attrs,c=void 0===l?me:l,u=n.componentId,d=void 0===u?function(e,t){var n="string"!=typeof e?"sc":we(e);$t[n]=($t[n]||0)+1;var r="".concat(n,"-").concat(Ie(de+n+$t[n]));return t?"".concat(t,"-").concat(r):r}(n.displayName,n.parentComponentId):u,h=n.displayName,p=void 0===h?function(e){return Ae(e)?"styled.".concat(e):"Styled(".concat(Pe(e),")")}(t):h,f=n.displayName&&n.componentId?"".concat(we(n.displayName),"-").concat(n.componentId):n.componentId||d,m=i&&s.attrs?s.attrs.concat(c).filter(Boolean):c,g=n.shouldForwardProp;if(i&&s.shouldForwardProp){var y=s.shouldForwardProp;if(n.shouldForwardProp){var v=n.shouldForwardProp;g=function(e,t){return y(e,t)&&v(e,t)}}else g=y}var _=new Ft(r,f,i?s.componentStyle:void 0);function b(t,n){return function(t,n,r){var i=t.attrs,s=t.componentStyle,a=t.defaultProps,l=t.foldedComponentIds,c=t.styledComponentId,u=t.target,d=e.useContext(jt),h=Tt(),p=t.shouldForwardProp||h.shouldForwardProp,f=ye(n,d,a)||ge,m=function(e,t,n){for(var r,i=o(o({},t),{className:void 0,theme:n}),s=0;s2&&vt.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)}}();var Gt;(function(){function t(){var t=this;this._emitSheetCSS=function(){var e=t.instance.toString();if(!e)return"";var n=dt(),r=Ye([n&&'nonce="'.concat(n,'"'),"".concat(le,'="true"'),"".concat(ue,'="').concat(de,'"')].filter(Boolean)," ");return"")},this.getStyleTags=function(){if(t.sealed)throw Ze(2);return t._emitSheetCSS()},this.getStyleElement=function(){var n;if(t.sealed)throw Ze(2);var r=t.instance.toString();if(!r)return[];var i=((n={})[le]="",n[ue]=de,n.dangerouslySetInnerHTML={__html:r},n),s=dt();return s&&(i.nonce=s),[e.createElement("style",o({},i,{key:"sc-0-0"}))]},this.seal=function(){t.sealed=!0},this.instance=new vt({isServer:!0}),this.sealed=!1}t.prototype.collectStyles=function(t){if(this.sealed)throw Ze(2);return e.createElement(It,{sheet:this.instance},t)},t.prototype.interleaveWithNodeStream=function(e){throw Ze(3)}})(),"__sc-".concat(le,"__");function Yt(){return Yt=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function rn(e,t,n,r){void 0===r&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=Gt.Pop,l=null,c=u();function u(){return(s.state||{idx:null}).idx}function d(){a=Gt.Pop;let e=u(),t=null==e?null:e-c;c=e,l&&l({action:a,location:p.location,delta:t})}function h(e){let t="null"!==i.location.origin?i.location.origin:i.location.href,n="string"===typeof e?e:tn(e);return n=n.replace(/ $/,"%20"),Jt(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==c&&(c=0,s.replaceState(Yt({},s.state,{idx:c}),""));let p={get action(){return a},get location(){return e(i,s)},listen(e){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Qt,d),l=e,()=>{i.removeEventListener(Qt,d),l=null}},createHref:e=>t(i,e),createURL:h,encodeLocation(e){let t=h(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){a=Gt.Push;let r=en(p.location,e,t);n&&n(r,e),c=u()+1;let d=Zt(r,c),h=p.createHref(r);try{s.pushState(d,"",h)}catch(ss){if(ss instanceof DOMException&&"DataCloneError"===ss.name)throw ss;i.location.assign(h)}o&&l&&l({action:a,location:p.location,delta:1})},replace:function(e,t){a=Gt.Replace;let r=en(p.location,e,t);n&&n(r,e),c=u();let i=Zt(r,c),d=p.createHref(r);s.replaceState(i,"",d),o&&l&&l({action:a,location:p.location,delta:0})},go:e=>s.go(e)};return p}var on;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(on||(on={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function sn(e,t,n){return void 0===n&&(n="/"),an(e,t,n,!1)}function an(e,t,n,r){let i=wn(("string"===typeof t?nn(t):t).pathname||"/",n);if(null==i)return null;let o=ln(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(o);let s=null;for(let a=0;null==s&&a{let s={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};s.relativePath.startsWith("/")&&(Jt(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(r.length));let a=xn([r,s.relativePath]),l=n.concat(s);e.children&&e.children.length>0&&(Jt(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),ln(e.children,t,l,a)),(null!=e.path||e.index)&&t.push({path:a,score:yn(a,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of cn(e.path))i(e,t,r);else i(e,t)})),t}function cn(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return i?[o,""]:[o];let s=cn(r.join("/")),a=[];return a.push(...s.map((e=>""===e?o:[o,e].join("/")))),i&&a.push(...s),a.map((t=>e.startsWith("/")&&""===t?"/":t))}const un=/^:[\w-]+$/,dn=3,hn=2,pn=1,fn=10,mn=-2,gn=e=>"*"===e;function yn(e,t){let n=e.split("/"),r=n.length;return n.some(gn)&&(r+=mn),t&&(r+=hn),n.filter((e=>!gn(e))).reduce(((e,t)=>e+(un.test(t)?dn:""===t?pn:fn)),r)}function vn(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,i={},o="/",s=[];for(let a=0;a(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");let o=new RegExp(i,t?void 0:"i");return[o,r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],s=o.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:i}=t;if("*"===r){let e=a[n]||"";s=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const l=a[n];return e[r]=i&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{}),pathname:o,pathnameBase:s,pattern:e}}function bn(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(ss){return Xt(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+ss+")."),e}}function wn(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function Sn(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` 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 En(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function Cn(e,t){let n=En(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}function kn(e,t,n,r){let i;void 0===r&&(r=!1),"string"===typeof e?i=nn(e):(i=Yt({},e),Jt(!i.pathname||!i.pathname.includes("?"),Sn("?","pathname","search",i)),Jt(!i.pathname||!i.pathname.includes("#"),Sn("#","pathname","hash",i)),Jt(!i.search||!i.search.includes("#"),Sn("#","search","hash",i)));let o,s=""===e||""===i.pathname,a=s?"/":i.pathname;if(null==a)o=n;else{let e=t.length-1;if(!r&&a.startsWith("..")){let t=a.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:i=""}="string"===typeof e?nn(e):e,o=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:o,search:In(r),hash:Pn(i)}}(i,o),c=a&&"/"!==a&&a.endsWith("/"),u=(s||"."===a)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}const xn=e=>e.join("/").replace(/\/\/+/g,"/"),Tn=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),In=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Pn=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;function An(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const Rn=["post","put","patch","delete"],Nn=(new Set(Rn),["get",...Rn]);new Set(Nn),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function On(){return On=Object.assign?Object.assign.bind():function(e){for(var t=1;t{r.current=!0})),e.useCallback((function(e,i){void 0===i&&(i={}),r.current&&("number"===typeof e?t.navigate(e):t.navigate(e,On({fromRouteId:n},i)))}),[t,n])}():function(){$n()||Jt(!1);let t=e.useContext(Dn),{basename:n,future:r,navigator:i}=e.useContext(Mn),{matches:o}=e.useContext(jn),{pathname:s}=zn(),a=JSON.stringify(Cn(o,r.v7_relativeSplatPath)),l=e.useRef(!1);return Bn((()=>{l.current=!0})),e.useCallback((function(e,r){if(void 0===r&&(r={}),!l.current)return;if("number"===typeof e)return void i.go(e);let o=kn(e,JSON.parse(a),s,"path"===r.relative);null==t&&"/"!==n&&(o.pathname="/"===o.pathname?n:xn([n,o.pathname])),(r.replace?i.replace:i.push)(o,r.state,r)}),[n,i,a,s,t])}()}function Hn(t,n){let{relative:r}=void 0===n?{}:n,{future:i}=e.useContext(Mn),{matches:o}=e.useContext(jn),{pathname:s}=zn(),a=JSON.stringify(Cn(o,i.v7_relativeSplatPath));return e.useMemo((()=>kn(t,JSON.parse(a),s,"path"===r)),[t,a,s,r])}function Vn(t,n,r,i){$n()||Jt(!1);let{navigator:o}=e.useContext(Mn),{matches:s}=e.useContext(jn),a=s[s.length-1],l=a?a.params:{},c=(a&&a.pathname,a?a.pathnameBase:"/");a&&a.route;let u,d=zn();if(n){var h;let e="string"===typeof n?nn(n):n;"/"===c||(null==(h=e.pathname)?void 0:h.startsWith(c))||Jt(!1),u=e}else u=d;let p=u.pathname||"/",f=p;if("/"!==c){let e=c.replace(/^\//,"").split("/");f="/"+p.replace(/^\//,"").split("/").slice(e.length).join("/")}let m=sn(t,{pathname:f});let g=Qn(m&&m.map((e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:xn([c,o.encodeLocation?o.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?c:xn([c,o.encodeLocation?o.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),s,r,i);return n&&g?e.createElement(Fn.Provider,{value:{location:On({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Gt.Pop}},g):g}function qn(){let t=function(){var t;let n=e.useContext(Un),r=er(Xn.UseRouteError),i=tr(Xn.UseRouteError);if(void 0!==n)return n;return null==(t=r.errors)?void 0:t[i]}(),n=An(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:i};return e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},n),r?e.createElement("pre",{style:o},r):null,null)}const Kn=e.createElement(qn,null);class Gn extends e.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,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?e.createElement(jn.Provider,{value:this.props.routeContext},e.createElement(Un.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Yn(t){let{routeContext:n,match:r,children:i}=t,o=e.useContext(Dn);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),e.createElement(jn.Provider,{value:n},i)}function Qn(t,n,r,i){var o;if(void 0===n&&(n=[]),void 0===r&&(r=null),void 0===i&&(i=null),null==t){var s;if(!r)return null;if(r.errors)t=r.matches;else{if(!(null!=(s=i)&&s.v7_partialHydration&&0===n.length&&!r.initialized&&r.matches.length>0))return null;t=r.matches}}let a=t,l=null==(o=r)?void 0:o.errors;if(null!=l){let e=a.findIndex((e=>e.route.id&&void 0!==(null==l?void 0:l[e.route.id])));e>=0||Jt(!1),a=a.slice(0,Math.min(a.length,e+1))}let c=!1,u=-1;if(r&&i&&i.v7_partialHydration)for(let e=0;e=0?a.slice(0,u+1):[a[0]];break}}}return a.reduceRight(((t,i,o)=>{let s,d=!1,h=null,p=null;var f;r&&(s=l&&i.route.id?l[i.route.id]:void 0,h=i.route.errorElement||Kn,c&&(u<0&&0===o?(f="route-fallback",!1||nr[f]||(nr[f]=!0),d=!0,p=null):u===o&&(d=!0,p=i.route.hydrateFallbackElement||null)));let m=n.concat(a.slice(0,o+1)),g=()=>{let n;return n=s?h:d?p:i.route.Component?e.createElement(i.route.Component,null):i.route.element?i.route.element:t,e.createElement(Yn,{match:i,routeContext:{outlet:t,matches:m,isDataRoute:null!=r},children:n})};return r&&(i.route.ErrorBoundary||i.route.errorElement||0===o)?e.createElement(Gn,{location:r.location,revalidation:r.revalidation,component:h,error:s,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):g()}),null)}var Jn=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Jn||{}),Xn=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Xn||{});function Zn(t){let n=e.useContext(Dn);return n||Jt(!1),n}function er(t){let n=e.useContext(Ln);return n||Jt(!1),n}function tr(t){let n=function(){let t=e.useContext(jn);return t||Jt(!1),t}(),r=n.matches[n.matches.length-1];return r.route.id||Jt(!1),r.route.id}const nr={};t.startTransition;function rr(t){let{to:n,replace:r,state:i,relative:o}=t;$n()||Jt(!1);let{future:s,static:a}=e.useContext(Mn),{matches:l}=e.useContext(jn),{pathname:c}=zn(),u=Wn(),d=kn(n,Cn(l,s.v7_relativeSplatPath),c,"path"===o),h=JSON.stringify(d);return e.useEffect((()=>u(JSON.parse(h),{replace:r,state:i,relative:o})),[u,h,o,r,i]),null}function ir(e){Jt(!1)}function or(t){let{basename:n="/",children:r=null,location:i,navigationType:o=Gt.Pop,navigator:s,static:a=!1,future:l}=t;$n()&&Jt(!1);let c=n.replace(/^\/*/,"/"),u=e.useMemo((()=>({basename:c,navigator:s,static:a,future:On({v7_relativeSplatPath:!1},l)})),[c,l,s,a]);"string"===typeof i&&(i=nn(i));let{pathname:d="/",search:h="",hash:p="",state:f=null,key:m="default"}=i,g=e.useMemo((()=>{let e=wn(d,c);return null==e?null:{location:{pathname:e,search:h,hash:p,state:f,key:m},navigationType:o}}),[c,d,h,p,f,m,o]);return null==g?null:e.createElement(Mn.Provider,{value:u},e.createElement(Fn.Provider,{children:r,value:g}))}function sr(e){let{children:t,location:n}=e;return Vn(ar(t),n)}new Promise((()=>{}));e.Component;function ar(t,n){void 0===n&&(n=[]);let r=[];return e.Children.forEach(t,((t,i)=>{if(!e.isValidElement(t))return;let o=[...n,i];if(t.type===e.Fragment)return void r.push.apply(r,ar(t.props.children,o));t.type!==ir&&Jt(!1),t.props.index&&t.props.children&&Jt(!1);let s={id:t.props.id||o.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(s.children=ar(t.props.children,o)),r.push(s)})),r}var lr=n(950),cr=n.t(lr,2);function ur(){return ur=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const hr=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"];try{window.__reactRouterVersion="6"}catch(DE){}new Map;const pr=t.startTransition;cr.flushSync,t.useId;function fr(t){let{basename:n,children:r,future:i,window:o}=t,s=e.useRef();var a;null==s.current&&(s.current=(void 0===(a={window:o,v5Compat:!0})&&(a={}),rn((function(e,t){let{pathname:n="/",search:r="",hash:i=""}=nn(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),en("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"===typeof t?t:tn(t))}),(function(e,t){Xt("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),a)));let l=s.current,[c,u]=e.useState({action:l.action,location:l.location}),{v7_startTransition:d}=i||{},h=e.useCallback((e=>{d&&pr?pr((()=>u(e))):u(e)}),[u,d]);return e.useLayoutEffect((()=>l.listen(h)),[l,h]),e.createElement(or,{basename:n,children:r,location:c.location,navigationType:c.action,navigator:l,future:i})}const mr="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,gr=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,yr=e.forwardRef((function(t,n){let r,{onClick:i,relative:o,reloadDocument:s,replace:a,state:l,target:c,to:u,preventScrollReset:d,unstable_viewTransition:h}=t,p=dr(t,hr),{basename:f}=e.useContext(Mn),m=!1;if("string"===typeof u&&gr.test(u)&&(r=u,mr))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),n=wn(t.pathname,f);t.origin===e.origin&&null!=n?u=n+t.search+t.hash:m=!0}catch(DE){}let g=function(t,n){let{relative:r}=void 0===n?{}:n;$n()||Jt(!1);let{basename:i,navigator:o}=e.useContext(Mn),{hash:s,pathname:a,search:l}=Hn(t,{relative:r}),c=a;return"/"!==i&&(c="/"===a?i:xn([i,a])),o.createHref({pathname:c,search:l,hash:s})}(u,{relative:o}),y=function(t,n){let{target:r,replace:i,state:o,preventScrollReset:s,relative:a,unstable_viewTransition:l}=void 0===n?{}:n,c=Wn(),u=zn(),d=Hn(t,{relative:a});return e.useCallback((e=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(e,r)){e.preventDefault();let n=void 0!==i?i:tn(u)===tn(d);c(t,{replace:n,state:o,preventScrollReset:s,relative:a,unstable_viewTransition:l})}}),[u,c,d,i,o,r,t,s,a,l])}(u,{replace:a,state:l,target:c,preventScrollReset:d,relative:o,unstable_viewTransition:h});return e.createElement("a",ur({},p,{href:r||g,onClick:m||s?i:function(e){i&&i(e),e.defaultPrevented||y(e)},ref:n,target:c}))}));var vr,_r;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(vr||(vr={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(_r||(_r={}));const br=!1,wr=!1,Sr="${JSCORE_VERSION}",Er=function(e,t){if(!e)throw Cr(t)},Cr=function(e){return new Error("Firebase Database ("+Sr+") INTERNAL ASSERT FAILED: "+e)},kr=function(e){const t=[];let n=0;for(let r=0;r>6|192,t[n++]=63&i|128):55296===(64512&i)&&r+1>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t},xr={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:"function"===typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i>2,u=(3&t)<<4|s>>4;let d=(15&s)<<2|l>>6,h=63&l;a||(h=64,o||(d=64)),r.push(n[c],n[u],n[d],n[h])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(kr(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){const t=[];let n=0,r=0;for(;n191&&i<224){const o=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){const o=((7&i)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(o>>10)),t[r++]=String.fromCharCode(56320+(1023&o))}else{const o=e[n++],s=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i>4;if(r.push(l),64!==s){const e=o<<4&240|s>>2;if(r.push(e),64!==a){const e=s<<6&192|a;r.push(e)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class Tr extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const Ir=function(e){const t=kr(e);return xr.encodeByteArray(t,!0)},Pr=function(e){return Ir(e).replace(/\./g,"")},Ar=function(e){try{return xr.decodeString(e,!0)}catch(DE){console.error("base64Decode failed: ",DE)}return null};function Rr(e){return Nr(void 0,e)}function Nr(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:return new Date(t.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t}for(const n in t)t.hasOwnProperty(n)&&"__proto__"!==n&&(e[n]=Nr(e[n],t[n]));return e}const Or=()=>function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__,Dr=()=>{try{return Or()||(()=>{if("undefined"===typeof process)return;const e={NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0})()||(()=>{if("undefined"===typeof document)return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(DE){return}const t=e&&Ar(e[1]);return t&&JSON.parse(t)})()}catch(DE){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${DE}`)}},Lr=e=>{var t,n;return null===(n=null===(t=Dr())||void 0===t?void 0:t.emulatorHosts)||void 0===n?void 0:n[e]},Mr=e=>{const t=Lr(e);if(!t)return;const n=t.lastIndexOf(":");if(n<=0||n+1===t.length)throw new Error(`Invalid host ${t} with no separate hostname and port!`);const r=parseInt(t.substring(n+1),10);return"["===t[0]?[t.substring(1,n-1),r]:[t.substring(0,n),r]},Fr=()=>{var e;return null===(e=Dr())||void 0===e?void 0:e.config},jr=e=>{var t;return null===(t=Dr())||void 0===t?void 0:t[`_${e}`]};class Ur{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}wrapCallback(e){return(t,n)=>{t?this.reject(t):this.resolve(n),"function"===typeof e&&(this.promise.catch((()=>{})),1===e.length?e(t):e(t,n))}}}function $r(e,t){if(e.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n=t||"demo-project",r=e.iat||0,i=e.sub||e.user_id;if(!i)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const o=Object.assign({iss:`https://securetoken.google.com/${n}`,aud:n,iat:r,exp:r+3600,auth_time:r,sub:i,user_id:i,firebase:{sign_in_provider:"custom",identities:{}}},e);return[Pr(JSON.stringify({alg:"none",type:"JWT"})),Pr(JSON.stringify(o)),""].join(".")}function zr(){return"undefined"!==typeof navigator&&"string"===typeof navigator.userAgent?navigator.userAgent:""}function Br(){return"undefined"!==typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(zr())}function Wr(){return"object"===typeof navigator&&"ReactNative"===navigator.product}function Hr(){return!0===br||!0===wr}class Vr extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,Vr.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,qr.prototype.create)}}class qr{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e){const t=(arguments.length<=1?void 0:arguments[1])||{},n=`${this.service}/${e}`,r=this.errors[e],i=r?function(e,t){return e.replace(Kr,((e,n)=>{const r=t[n];return null!=r?String(r):`<${n}?>`}))}(r,t):"Error",o=`${this.serviceName}: ${i} (${n}).`;return new Vr(n,o,t)}}const Kr=/\{\$([^}]+)}/g;function Gr(e){return JSON.parse(e)}function Yr(e){return JSON.stringify(e)}const Qr=function(e){let t={},n={},r={},i="";try{const o=e.split(".");t=Gr(Ar(o[0])||""),n=Gr(Ar(o[1])||""),i=o[2],r=n.d||{},delete n.d}catch(DE){}return{header:t,claims:n,data:r,signature:i}};function Jr(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Xr(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}function Zr(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function ei(e,t,n){const r={};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=t.call(n,e[i],i,e));return r}function ti(e,t){if(e===t)return!0;const n=Object.keys(e),r=Object.keys(t);for(const i of n){if(!r.includes(i))return!1;const n=e[i],o=t[i];if(ni(n)&&ni(o)){if(!ti(n,o))return!1}else if(n!==o)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function ni(e){return null!==e&&"object"===typeof e}function ri(e){const t=[];for(const[n,r]of Object.entries(e))Array.isArray(r)?r.forEach((e=>{t.push(encodeURIComponent(n)+"="+encodeURIComponent(e))})):t.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return t.length?"&"+t.join("&"):""}function ii(e){const t={};return e.replace(/^\?/,"").split("&").forEach((e=>{if(e){const[n,r]=e.split("=");t[decodeURIComponent(n)]=decodeURIComponent(r)}})),t}function oi(e){const t=e.indexOf("?");if(!t)return"";const n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)}class si{constructor(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(let e=1;e>>31)}let r,i,o=this.chain_[0],s=this.chain_[1],a=this.chain_[2],l=this.chain_[3],c=this.chain_[4];for(let u=0;u<80;u++){u<40?u<20?(r=l^s&(a^l),i=1518500249):(r=s^a^l,i=1859775393):u<60?(r=s&a|l&(s|a),i=2400959708):(r=s^a^l,i=3395469782);const e=(o<<5|o>>>27)+r+c+i+n[u]&4294967295;c=l,l=a,a=4294967295&(s<<30|s>>>2),s=o,o=e}this.chain_[0]=this.chain_[0]+o&4294967295,this.chain_[1]=this.chain_[1]+s&4294967295,this.chain_[2]=this.chain_[2]+a&4294967295,this.chain_[3]=this.chain_[3]+l&4294967295,this.chain_[4]=this.chain_[4]+c&4294967295}update(e,t){if(null==e)return;void 0===t&&(t=e.length);const n=t-this.blockSize;let r=0;const i=this.buf_;let o=this.inbuf_;for(;r=56;r--)this.buf_[r]=255&t,t/=256;this.compress_(this.buf_);let n=0;for(let r=0;r<5;r++)for(let t=24;t>=0;t-=8)e[n]=this.chain_[r]>>t&255,++n;return e}}class ai{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then((()=>{e(this)})).catch((e=>{this.error(e)}))}next(e){this.forEachObserver((t=>{t.next(e)}))}error(e){this.forEachObserver((t=>{t.error(e)})),this.close(e)}complete(){this.forEachObserver((e=>{e.complete()})),this.close()}subscribe(e,t,n){let r;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");r=function(e,t){if("object"!==typeof e||null===e)return!1;for(const n of t)if(n in e&&"function"===typeof e[n])return!0;return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:n},void 0===r.next&&(r.next=li),void 0===r.error&&(r.error=li),void 0===r.complete&&(r.complete=li);const i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch(DE){}})),this.observers.push(r),i}unsubscribeOne(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let t=0;t{if(void 0!==this.observers&&void 0!==this.observers[e])try{t(this.observers[e])}catch(DE){"undefined"!==typeof console&&console.error&&console.error(DE)}}))}close(e){this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then((()=>{this.observers=void 0,this.onNoObservers=void 0})))}}function li(){}function ci(e,t){return`${e} failed: ${t} argument `}const ui=function(e){let t=0;for(let n=0;n=55296&&r<=56319?(t+=4,n++):t+=3}return t};function di(e){return e&&e._delegate?e._delegate:e}class hi{constructor(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}const pi="[DEFAULT]";class fi{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const e=new Ur;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{const n=this.getOrInitializeService({instanceIdentifier:t});n&&e.resolve(n)}catch(DE){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;const n=this.normalizeInstanceIdentifier(null===e||void 0===e?void 0:e.identifier),r=null!==(t=null===e||void 0===e?void 0:e.optional)&&void 0!==t&&t;if(!this.isInitialized(n)&&!this.shouldAutoInitialize()){if(r)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:n})}catch(DE){if(r)return null;throw DE}}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(function(e){return"EAGER"===e.instantiationMode}(e))try{this.getOrInitializeService({instanceIdentifier:pi})}catch(DE){}for(const[e,t]of this.instancesDeferred.entries()){const n=this.normalizeInstanceIdentifier(e);try{const e=this.getOrInitializeService({instanceIdentifier:n});t.resolve(e)}catch(DE){}}}}clearInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pi;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((e=>"INTERNAL"in e)).map((e=>e.INTERNAL.delete())),...e.filter((e=>"_delete"in e)).map((e=>e._delete()))])}isComponentSet(){return null!=this.component}isInitialized(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pi;return this.instances.has(e)}getOptions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pi;return this.instancesOptions.get(e)||{}}initialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{options:t={}}=e,n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const r=this.getOrInitializeService({instanceIdentifier:n,options:t});for(const[i,o]of this.instancesDeferred.entries()){n===this.normalizeInstanceIdentifier(i)&&o.resolve(r)}return r}onInit(e,t){var n;const r=this.normalizeInstanceIdentifier(t),i=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;i.add(e),this.onInitCallbacks.set(r,i);const o=this.instances.get(r);return o&&e(o,r),()=>{i.delete(e)}}invokeOnInitCallbacks(e,t){const n=this.onInitCallbacks.get(t);if(n)for(const i of n)try{i(e,t)}catch(r){}}getOrInitializeService(e){let{instanceIdentifier:t,options:n={}}=e,r=this.instances.get(t);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:mi(t),options:n}),this.instances.set(t,r),this.instancesOptions.set(t,n),this.invokeOnInitCallbacks(r,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,r)}catch(i){}return r||null}normalizeInstanceIdentifier(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pi;return this.component?this.component.multipleInstances?e:pi:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}function mi(e){return e===pi?void 0:e}class gi{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);t.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 t=new fi(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}const yi=[];var vi;!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(vi||(vi={}));const _i={debug:vi.DEBUG,verbose:vi.VERBOSE,info:vi.INFO,warn:vi.WARN,error:vi.ERROR,silent:vi.SILENT},bi=vi.INFO,wi={[vi.DEBUG]:"log",[vi.VERBOSE]:"log",[vi.INFO]:"info",[vi.WARN]:"warn",[vi.ERROR]:"error"},Si=function(e,t){if(t2?i-2:0),s=2;s(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function Ni(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(ki||(ki=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(){for(var t=arguments.length,n=new Array(t),r=0;r1?n-1:0),i=1;i{const r=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",o),e.removeEventListener("abort",o)},i=()=>{t(),r()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",o),e.addEventListener("abort",o)}));Ti.set(e,t)}(e),t=e,(Ci||(Ci=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some((e=>t instanceof e))?new Proxy(e,Ri):e);var t}function Di(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",i),e.removeEventListener("error",o)},i=()=>{t(Di(e.result)),r()},o=()=>{n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",o)}));return t.then((t=>{t instanceof IDBCursor&&xi.set(t,e)})).catch((()=>{})),Ai.set(t,e),t}(e);if(Pi.has(e))return Pi.get(e);const t=Oi(e);return t!==e&&(Pi.set(e,t),Ai.set(t,e)),t}const Li=e=>Ai.get(e);const Mi=["get","getKey","getAll","getAllKeys","count"],Fi=["put","add","delete","clear"],ji=new Map;function Ui(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!==typeof t)return;if(ji.get(t))return ji.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=Fi.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!i&&!Mi.includes(n))return;const o=async function(e){const t=this.transaction(e,i?"readwrite":"readonly");let o=t.store;for(var s=arguments.length,a=new Array(s>1?s-1:0),l=1;l({...e,get:(t,n,r)=>Ui(t,n)||e.get(t,n,r),has:(t,n)=>!!Ui(t,n)||e.has(t,n)}))(Ri);class $i{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map((e=>{if(function(e){const t=e.getComponent();return"VERSION"===(null===t||void 0===t?void 0:t.type)}(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}return null})).filter((e=>e)).join(" ")}}const zi="@firebase/app",Bi="0.10.12",Wi=new Ei("@firebase/app"),Hi="@firebase/app-compat",Vi="@firebase/analytics-compat",qi="@firebase/analytics",Ki="@firebase/app-check-compat",Gi="@firebase/app-check",Yi="@firebase/auth",Qi="@firebase/auth-compat",Ji="@firebase/database",Xi="@firebase/data-connect",Zi="@firebase/database-compat",eo="@firebase/functions",to="@firebase/functions-compat",no="@firebase/installations",ro="@firebase/installations-compat",io="@firebase/messaging",oo="@firebase/messaging-compat",so="@firebase/performance",ao="@firebase/performance-compat",lo="@firebase/remote-config",co="@firebase/remote-config-compat",uo="@firebase/storage",ho="@firebase/storage-compat",po="@firebase/firestore",fo="@firebase/vertexai-preview",mo="@firebase/firestore-compat",go="firebase",yo="[DEFAULT]",vo={[zi]:"fire-core",[Hi]:"fire-core-compat",[qi]:"fire-analytics",[Vi]:"fire-analytics-compat",[Gi]:"fire-app-check",[Ki]:"fire-app-check-compat",[Yi]:"fire-auth",[Qi]:"fire-auth-compat",[Ji]:"fire-rtdb",[Xi]:"fire-data-connect",[Zi]:"fire-rtdb-compat",[eo]:"fire-fn",[to]:"fire-fn-compat",[no]:"fire-iid",[ro]:"fire-iid-compat",[io]:"fire-fcm",[oo]:"fire-fcm-compat",[so]:"fire-perf",[ao]:"fire-perf-compat",[lo]:"fire-rc",[co]:"fire-rc-compat",[uo]:"fire-gcs",[ho]:"fire-gcs-compat",[po]:"fire-fst",[mo]:"fire-fst-compat",[fo]:"fire-vertex","fire-js":"fire-js",[go]:"fire-js-all"},_o=new Map,bo=new Map,wo=new Map;function So(e,t){try{e.container.addComponent(t)}catch(DE){Wi.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,DE)}}function Eo(e){const t=e.name;if(wo.has(t))return Wi.debug(`There were multiple attempts to register component ${t}.`),!1;wo.set(t,e);for(const n of _o.values())So(n,e);for(const n of bo.values())So(n,e);return!0}function Co(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}function ko(e){return void 0!==e.settings}const xo=new qr("app","Firebase",{"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","server-app-deleted":"Firebase Server App has been 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}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."});class To{constructor(e,t,n){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new hi("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 xo.create("app-deleted",{appName:this._name})}}const Io="10.14.0";function Po(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e;if("object"!==typeof t){t={name:t}}const r=Object.assign({name:yo,automaticDataCollectionEnabled:!1},t),i=r.name;if("string"!==typeof i||!i)throw xo.create("bad-app-name",{appName:String(i)});if(n||(n=Fr()),!n)throw xo.create("no-options");const o=_o.get(i);if(o){if(ti(n,o.options)&&ti(r,o.config))return o;throw xo.create("duplicate-app",{appName:i})}const s=new gi(i);for(const l of wo.values())s.addComponent(l);const a=new To(n,r,s);return _o.set(i,a),a}function Ao(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:yo;const t=_o.get(e);if(!t&&e===yo&&Fr())return Po();if(!t)throw xo.create("no-app",{appName:e});return t}function Ro(e,t,n){var r;let i=null!==(r=vo[e])&&void 0!==r?r:e;n&&(i+=`-${n}`);const o=i.match(/\s|\//),s=t.match(/\s|\//);if(o||s){const e=[`Unable to register library "${i}" with version "${t}":`];return o&&e.push(`library name "${i}" contains illegal characters (whitespace or "/")`),o&&s&&e.push("and"),s&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void Wi.warn(e.join(" "))}Eo(new hi(`${i}-version`,(()=>({library:i,version:t})),"VERSION"))}const No="firebase-heartbeat-store";let Oo=null;function Do(){return Oo||(Oo=function(e,t){let{blocked:n,upgrade:r,blocking:i,terminated:o}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=indexedDB.open(e,t),a=Di(s);return r&&s.addEventListener("upgradeneeded",(e=>{r(Di(s.result),e.oldVersion,e.newVersion,Di(s.transaction),e)})),n&&s.addEventListener("blocked",(e=>n(e.oldVersion,e.newVersion,e))),a.then((e=>{o&&e.addEventListener("close",(()=>o())),i&&e.addEventListener("versionchange",(e=>i(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),a}("firebase-heartbeat-database",1,{upgrade:(e,t)=>{if(0===t)try{e.createObjectStore(No)}catch(DE){console.warn(DE)}}}).catch((e=>{throw xo.create("idb-open",{originalErrorMessage:e.message})}))),Oo}async function Lo(e,t){try{const n=(await Do()).transaction(No,"readwrite"),r=n.objectStore(No);await r.put(t,Mo(e)),await n.done}catch(DE){if(DE instanceof Vr)Wi.warn(DE.message);else{const t=xo.create("idb-set",{originalErrorMessage:null===DE||void 0===DE?void 0:DE.message});Wi.warn(t.message)}}}function Mo(e){return`${e.name}!${e.options.appId}`}class Fo{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new Uo(t),this._heartbeatsCachePromise=this._storage.read().then((e=>(this._heartbeatsCache=e,e)))}async triggerHeartbeat(){var e,t;try{const n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),r=jo();if(null==(null===(e=this._heartbeatsCache)||void 0===e?void 0:e.heartbeats)&&(this._heartbeatsCache=await this._heartbeatsCachePromise,null==(null===(t=this._heartbeatsCache)||void 0===t?void 0:t.heartbeats)))return;if(this._heartbeatsCache.lastSentHeartbeatDate===r||this._heartbeatsCache.heartbeats.some((e=>e.date===r)))return;return this._heartbeatsCache.heartbeats.push({date:r,agent:n}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter((e=>{const t=new Date(e.date).valueOf();return Date.now()-t<=2592e6})),this._storage.overwrite(this._heartbeatsCache)}catch(DE){Wi.warn(DE)}}async getHeartbeatsHeader(){var e;try{if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,null==(null===(e=this._heartbeatsCache)||void 0===e?void 0:e.heartbeats)||0===this._heartbeatsCache.heartbeats.length)return"";const t=jo(),{heartbeatsToSend:n,unsentEntries:r}=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1024;const n=[];let r=e.slice();for(const i of e){const e=n.find((e=>e.agent===i.agent));if(e){if(e.dates.push(i.date),$o(n)>t){e.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),$o(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}(this._heartbeatsCache.heartbeats),i=Pr(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=t,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}catch(DE){return Wi.warn(DE),""}}}function jo(){return(new Date).toISOString().substring(0,10)}class Uo{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!function(){try{return"object"===typeof indexedDB}catch(DE){return!1}}()&&new Promise(((e,t)=>{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),e(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(ss){t(ss)}})).then((()=>!0)).catch((()=>!1))}async read(){if(await this._canUseIndexedDBPromise){const e=await async function(e){try{const t=(await Do()).transaction(No),n=await t.objectStore(No).get(Mo(e));return await t.done,n}catch(DE){if(DE instanceof Vr)Wi.warn(DE.message);else{const t=xo.create("idb-get",{originalErrorMessage:null===DE||void 0===DE?void 0:DE.message});Wi.warn(t.message)}}}(this.app);return(null===e||void 0===e?void 0:e.heartbeats)?e:{heartbeats:[]}}return{heartbeats:[]}}async overwrite(e){var t;if(await this._canUseIndexedDBPromise){const n=await this.read();return Lo(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){var t;if(await this._canUseIndexedDBPromise){const n=await this.read();return Lo(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:[...n.heartbeats,...e.heartbeats]})}}}function $o(e){return Pr(JSON.stringify({version:2,heartbeats:e})).length}var zo;zo="",Eo(new hi("platform-logger",(e=>new $i(e)),"PRIVATE")),Eo(new hi("heartbeat",(e=>new Fo(e)),"PRIVATE")),Ro(zi,Bi,zo),Ro(zi,Bi,"esm2017"),Ro("fire-js","");const Bo="@firebase/database",Wo="1.0.8";let Ho="";function Vo(e){Ho=e}class qo{constructor(e){this.domStorage_=e,this.prefix_="firebase:"}set(e,t){null==t?this.domStorage_.removeItem(this.prefixedName_(e)):this.domStorage_.setItem(this.prefixedName_(e),Yr(t))}get(e){const t=this.domStorage_.getItem(this.prefixedName_(e));return null==t?null:Gr(t)}remove(e){this.domStorage_.removeItem(this.prefixedName_(e))}prefixedName_(e){return this.prefix_+e}toString(){return this.domStorage_.toString()}}class Ko{constructor(){this.cache_={},this.isInMemoryStorage=!0}set(e,t){null==t?delete this.cache_[e]:this.cache_[e]=t}get(e){return Jr(this.cache_,e)?this.cache_[e]:null}remove(e){delete this.cache_[e]}}const Go=function(e){try{if("undefined"!==typeof window&&"undefined"!==typeof window[e]){const t=window[e];return t.setItem("firebase:sentinel","cache"),t.removeItem("firebase:sentinel"),new qo(t)}}catch(DE){}return new Ko},Yo=Go("localStorage"),Qo=Go("sessionStorage"),Jo=new Ei("@firebase/database"),Xo=function(){let e=1;return function(){return e++}}(),Zo=function(e){const t=function(e){const t=[];let n=0;for(let r=0;r=55296&&i<=56319){const t=i-55296;r++,Er(r>6|192,t[n++]=63&i|128):i<65536?(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t}(e),n=new si;n.update(t);const r=n.digest();return xr.encodeByteArray(r)},es=function(){let e="";for(let t=0;tn?r.push(e.substring(i,n)):r.push(e.substring(i,i+t));return r};function ys(e,t){for(const n in e)e.hasOwnProperty(n)&&t(n,e[n])}const vs=function(e){Er(!cs(e),"Invalid JSON number");const t=1023;let n,r,i,o,s;0===e?(r=0,i=0,n=1/e===-1/0?1:0):(n=e<0,(e=Math.abs(e))>=Math.pow(2,-1022)?(o=Math.min(Math.floor(Math.log(e)/Math.LN2),t),r=o+t,i=Math.round(e*Math.pow(2,52-o)-Math.pow(2,52))):(r=0,i=Math.round(e/Math.pow(2,-1074))));const a=[];for(s=52;s;s-=1)a.push(i%2?1:0),i=Math.floor(i/2);for(s=11;s;s-=1)a.push(r%2?1:0),r=Math.floor(r/2);a.push(n?1:0),a.reverse();const l=a.join("");let c="";for(s=0;s<64;s+=8){let e=parseInt(l.substr(s,8),2).toString(16);1===e.length&&(e="0"+e),c+=e}return c.toLowerCase()};const _s=new RegExp("^-?(0*)\\d{1,10}$"),bs=function(e){if(_s.test(e)){const t=Number(e);if(t>=-2147483648&&t<=2147483647)return t}return null},ws=function(e){try{e()}catch(DE){setTimeout((()=>{const t=DE.stack||"";throw ls("Exception was thrown by user callback.",t),DE}),Math.floor(0))}},Ss=function(e,t){const n=setTimeout(e,t);return"number"===typeof n&&"undefined"!==typeof Deno&&Deno.unrefTimer?Deno.unrefTimer(n):"object"===typeof n&&n.unref&&n.unref(),n};class Es{constructor(e,t){this.appName_=e,this.appCheckProvider=t,this.appCheck=null===t||void 0===t?void 0:t.getImmediate({optional:!0}),this.appCheck||null===t||void 0===t||t.get().then((e=>this.appCheck=e))}getToken(e){return this.appCheck?this.appCheck.getToken(e):new Promise(((t,n)=>{setTimeout((()=>{this.appCheck?this.getToken(e).then(t,n):t(null)}),0)}))}addTokenChangeListener(e){var t;null===(t=this.appCheckProvider)||void 0===t||t.get().then((t=>t.addTokenListener(e)))}notifyForInvalidToken(){ls(`Provided AppCheck credentials for the app named "${this.appName_}" are invalid. This usually indicates your app was not initialized correctly.`)}}class Cs{constructor(e,t,n){this.appName_=e,this.firebaseOptions_=t,this.authProvider_=n,this.auth_=null,this.auth_=n.getImmediate({optional:!0}),this.auth_||n.onInit((e=>this.auth_=e))}getToken(e){return this.auth_?this.auth_.getToken(e).catch((e=>e&&"auth/token-not-initialized"===e.code?(is("Got auth/token-not-initialized error. Treating as null token."),null):Promise.reject(e))):new Promise(((t,n)=>{setTimeout((()=>{this.auth_?this.getToken(e).then(t,n):t(null)}),0)}))}addTokenChangeListener(e){this.auth_?this.auth_.addAuthTokenListener(e):this.authProvider_.get().then((t=>t.addAuthTokenListener(e)))}removeTokenChangeListener(e){this.authProvider_.get().then((t=>t.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/.',ls(e)}}class ks{constructor(e){this.accessToken=e}getToken(e){return Promise.resolve({accessToken:this.accessToken})}addTokenChangeListener(e){e(this.accessToken)}removeTokenChangeListener(e){}notifyForInvalidToken(){}}ks.OWNER="owner";const xs="5",Ts=/(console\.firebase|firebase-console-\w+\.corp|firebase\.corp)\.google\.com/,Is="ac",Ps="websocket",As="long_polling";class Rs{constructor(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",s=arguments.length>6&&void 0!==arguments[6]&&arguments[6],a=arguments.length>7&&void 0!==arguments[7]&&arguments[7];this.secure=t,this.namespace=n,this.webSocketOnly=r,this.nodeAdmin=i,this.persistenceKey=o,this.includeNamespaceInQueryParams=s,this.isUsingEmulator=a,this._host=e.toLowerCase(),this._domain=this._host.substr(this._host.indexOf(".")+1),this.internalHost=Yo.get("host:"+e)||this._host}isCacheableHost(){return"s-"===this.internalHost.substr(0,2)}isCustomHost(){return"firebaseio.com"!==this._domain&&"firebaseio-demo.com"!==this._domain}get host(){return this._host}set host(e){e!==this.internalHost&&(this.internalHost=e,this.isCacheableHost()&&Yo.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://",t=this.includeNamespaceInQueryParams?`?ns=${this.namespace}`:"";return`${e}${this.host}/${t}`}}function Ns(e,t,n){let r;if(Er("string"===typeof t,"typeof type must == string"),Er("object"===typeof n,"typeof params must == object"),t===Ps)r=(e.secure?"wss://":"ws://")+e.internalHost+"/.ws?";else{if(t!==As)throw new Error("Unknown connection type: "+t);r=(e.secure?"https://":"http://")+e.internalHost+"/.lp?"}(function(e){return e.host!==e.internalHost||e.isCustomHost()||e.includeNamespaceInQueryParams})(e)&&(n.ns=e.namespace);const i=[];return ys(n,((e,t)=>{i.push(e+"="+t)})),r+i.join("&")}class Os{constructor(){this.counters_={}}incrementCounter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;Jr(this.counters_,e)||(this.counters_[e]=0),this.counters_[e]+=t}get(){return Rr(this.counters_)}}const Ds={},Ls={};function Ms(e){const t=e.toString();return Ds[t]||(Ds[t]=new Os),Ds[t]}class Fs{constructor(e){this.onMessage_=e,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}closeAfter(e,t){this.closeAfterResponse=e,this.onClose=t,this.closeAfterResponse{this.onMessage_(e[t])}));if(this.currentResponseNum===this.closeAfterResponse){this.onClose&&(this.onClose(),this.onClose=null);break}this.currentResponseNum++}}}const js="start";class Us{constructor(e,t,n,r,i,o,s){this.connId=e,this.repoInfo=t,this.applicationId=n,this.appCheckToken=r,this.authToken=i,this.transportSessionId=o,this.lastSessionId=s,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=os(e),this.stats_=Ms(t),this.urlFn=e=>(this.appCheckToken&&(e[Is]=this.appCheckToken),Ns(t,As,e))}open(e,t){var n=this;this.curSegmentNum=0,this.onDisconnect_=t,this.myPacketOrderer=new Fs(e),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout((()=>{this.log_("Timed out trying to connect."),this.onClosed_(),this.connectTimeoutTimer_=null}),Math.floor(3e4)),function(e){if(Hr()||"complete"===document.readyState)e();else{let t=!1;const n=function(){document.body?t||(t=!0,e()):setTimeout(n,Math.floor(10))};document.addEventListener?(document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",(()=>{"complete"===document.readyState&&n()})),window.attachEvent("onload",n))}}((()=>{if(this.isClosed_)return;this.scriptTagHolder=new $s((function(){for(var e=arguments.length,t=new Array(e),r=0;r{n.onClosed_()}))):n.onClosed_()}}),(function(){for(var e=arguments.length,t=new Array(e),r=0;r{this.onClosed_()}),this.urlFn);const e={};e[js]="t",e.ser=Math.floor(1e8*Math.random()),this.scriptTagHolder.uniqueCallbackIdentifier&&(e.cb=this.scriptTagHolder.uniqueCallbackIdentifier),e.v=xs,this.transportSessionId&&(e.s=this.transportSessionId),this.lastSessionId&&(e.ls=this.lastSessionId),this.applicationId&&(e.p=this.applicationId),this.appCheckToken&&(e[Is]=this.appCheckToken),"undefined"!==typeof location&&location.hostname&&Ts.test(location.hostname)&&(e.r="f");const t=this.urlFn(e);this.log_("Connecting via long-poll to "+t),this.scriptTagHolder.addTag(t,(()=>{}))}))}start(){this.scriptTagHolder.startLongPoll(this.id,this.password),this.addDisconnectPingFrame(this.id,this.password)}static forceAllow(){Us.forceAllow_=!0}static forceDisallow(){Us.forceDisallow_=!0}static isAvailable(){return!Hr()&&(!!Us.forceAllow_||!Us.forceDisallow_&&"undefined"!==typeof document&&null!=document.createElement&&!("object"===typeof window&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))&&!("object"===typeof Windows&&"object"===typeof Windows.UI))}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 t=Yr(e);this.bytesSent+=t.length,this.stats_.incrementCounter("bytes_sent",t.length);const n=Ir(t),r=gs(n,1840);for(let i=0;idocument.domain="'+document.domain+'";<\/script>'}const r=""+n+"";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(r),this.myIFrame.doc.close()}catch(DE){is("frame writing exception"),DE.stack&&is(DE.stack),is(DE)}}}static createIFrame_(){const e=document.createElement("iframe");if(e.style.display="none",!document.body)throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";document.body.appendChild(e);try{e.contentWindow.document||is("No IE domain setting required")}catch(DE){const n=document.domain;e.src="javascript:void((function(){document.open();document.domain='"+n+"';document.close();})())"}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((()=>{null!==this.myIFrame&&(document.body.removeChild(this.myIFrame),this.myIFrame=null)}),Math.floor(0)));const e=this.onDisconnect;e&&(this.onDisconnect=null,e())}startLongPoll(e,t){for(this.myID=e,this.myPW=t,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.id=this.myID,e.pw=this.myPW,e.ser=this.currentSerial;let t=this.urlFn(e),n="",r=0;for(;this.pendingSegs.length>0;){if(!(this.pendingSegs[0].d.length+30+n.length<=1870))break;{const e=this.pendingSegs.shift();n=n+"&seg"+r+"="+e.seg+"&ts"+r+"="+e.ts+"&d"+r+"="+e.d,r++}}return t+=n,this.addLongPollTag_(t,this.currentSerial),!0}return!1}enqueueSegment(e,t,n){this.pendingSegs.push({seg:e,ts:t,d:n}),this.alive&&this.newRequest_()}addLongPollTag_(e,t){this.outstandingRequests.add(t);const n=()=>{this.outstandingRequests.delete(t),this.newRequest_()},r=setTimeout(n,Math.floor(25e3));this.addTag(e,(()=>{clearTimeout(r),n()}))}addTag(e,t){Hr()?this.doNodeLongPoll(e,t):setTimeout((()=>{try{if(!this.sendNewPolls)return;const n=this.myIFrame.doc.createElement("script");n.type="text/javascript",n.async=!0,n.src=e,n.onload=n.onreadystatechange=function(){const e=n.readyState;e&&"loaded"!==e&&"complete"!==e||(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),t())},n.onerror=()=>{is("Long-poll script failed to load: "+e),this.sendNewPolls=!1,this.close()},this.myIFrame.doc.body.appendChild(n)}catch(DE){}}),Math.floor(1))}}let zs=null;"undefined"!==typeof MozWebSocket?zs=MozWebSocket:"undefined"!==typeof WebSocket&&(zs=WebSocket);class Bs{constructor(e,t,n,r,i,o,s){this.connId=e,this.applicationId=n,this.appCheckToken=r,this.authToken=i,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=os(this.connId),this.stats_=Ms(t),this.connURL=Bs.connectionURL_(t,o,s,r,n),this.nodeAdmin=t.nodeAdmin}static connectionURL_(e,t,n,r,i){const o={};return o.v=xs,!Hr()&&"undefined"!==typeof location&&location.hostname&&Ts.test(location.hostname)&&(o.r="f"),t&&(o.s=t),n&&(o.ls=n),r&&(o[Is]=r),i&&(o.p=i),Ns(e,Ps,o)}open(e,t){this.onDisconnect=t,this.onMessage=e,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,Yo.set("previous_websocket_failure",!0);try{let e;if(Hr()){const t=this.nodeAdmin?"AdminNode":"Node";e={headers:{"User-Agent":`Firebase/${xs}/${Ho}/${process.platform}/${t}`,"X-Firebase-GMPID":this.applicationId||""}},this.authToken&&(e.headers.Authorization=`Bearer ${this.authToken}`),this.appCheckToken&&(e.headers["X-Firebase-AppCheck"]=this.appCheckToken);const n={NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"},r=0===this.connURL.indexOf("wss://")?n.HTTPS_PROXY||n.https_proxy:n.HTTP_PROXY||n.http_proxy;r&&(e.proxy={origin:r})}this.mySock=new zs(this.connURL,[],e)}catch(DE){this.log_("Error instantiating WebSocket.");const t=DE.message||DE.data;return t&&this.log_(t),void this.onClosed_()}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=e=>{this.handleIncomingFrame(e)},this.mySock.onerror=e=>{this.log_("WebSocket error. Closing connection.");const t=e.message||e.data;t&&this.log_(t),this.onClosed_()}}start(){}static forceDisallow(){Bs.forceDisallow_=!0}static isAvailable(){let e=!1;if("undefined"!==typeof navigator&&navigator.userAgent){const t=/Android ([0-9]{0,}\.[0-9]{0,})/,n=navigator.userAgent.match(t);n&&n.length>1&&parseFloat(n[1])<4.4&&(e=!0)}return!e&&null!==zs&&!Bs.forceDisallow_}static previouslyFailed(){return Yo.isInMemoryStorage||!0===Yo.get("previous_websocket_failure")}markConnectionHealthy(){Yo.remove("previous_websocket_failure")}appendFrame_(e){if(this.frames.push(e),this.frames.length===this.totalFrames){const e=this.frames.join("");this.frames=null;const t=Gr(e);this.onMessage(t)}}handleNewFrameCount_(e){this.totalFrames=e,this.frames=[]}extractFrameCount_(e){if(Er(null===this.frames,"We already have a frame buffer"),e.length<=6){const t=Number(e);if(!isNaN(t))return this.handleNewFrameCount_(t),null}return this.handleNewFrameCount_(1),e}handleIncomingFrame(e){if(null===this.mySock)return;const t=e.data;if(this.bytesReceived+=t.length,this.stats_.incrementCounter("bytes_received",t.length),this.resetKeepAlive(),null!==this.frames)this.appendFrame_(t);else{const e=this.extractFrameCount_(t);null!==e&&this.appendFrame_(e)}}send(e){this.resetKeepAlive();const t=Yr(e);this.bytesSent+=t.length,this.stats_.incrementCounter("bytes_sent",t.length);const n=gs(t,16384);n.length>1&&this.sendString_(String(n.length));for(let r=0;r{this.mySock&&this.sendString_("0"),this.resetKeepAlive()}),Math.floor(45e3))}sendString_(e){try{this.mySock.send(e)}catch(DE){this.log_("Exception thrown from WebSocket.send():",DE.message||DE.data,"Closing connection."),setTimeout(this.onClosed_.bind(this),0)}}}Bs.responsesRequiredToBeHealthy=2,Bs.healthyTimeout=3e4;class Ws{constructor(e){this.initTransports_(e)}static get ALL_TRANSPORTS(){return[Us,Bs]}static get IS_TRANSPORT_INITIALIZED(){return this.globalTransportInitialized_}initTransports_(e){const t=Bs&&Bs.isAvailable();let n=t&&!Bs.previouslyFailed();if(e.webSocketOnly&&(t||ls("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),n=!0),n)this.transports_=[Bs];else{const e=this.transports_=[];for(const t of Ws.ALL_TRANSPORTS)t&&t.isAvailable()&&e.push(t);Ws.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}}Ws.globalTransportInitialized_=!1;class Hs{constructor(e,t,n,r,i,o,s,a,l,c){this.id=e,this.repoInfo_=t,this.applicationId_=n,this.appCheckToken_=r,this.authToken_=i,this.onMessage_=o,this.onReady_=s,this.onDisconnect_=a,this.onKill_=l,this.lastSessionId=c,this.connectionCount=0,this.pendingDataMessages=[],this.state_=0,this.log_=os("c:"+this.id+":"),this.transportManager_=new Ws(t),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 t=this.connReceiver_(this.conn_),n=this.disconnReceiver_(this.conn_);this.tx_=this.conn_,this.rx_=this.conn_,this.secondaryConn_=null,this.isHealthy_=!1,setTimeout((()=>{this.conn_&&this.conn_.open(t,n)}),Math.floor(0));const r=e.healthyTimeout||0;r>0&&(this.healthyTimeout_=Ss((()=>{this.healthyTimeout_=null,this.isHealthy_||(this.conn_&&this.conn_.bytesReceived>102400?(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>10240?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(r)))}nextTransportId_(){return"c:"+this.id+":"+this.connectionCount++}disconnReceiver_(e){return t=>{e===this.conn_?this.onConnectionLost_(t):e===this.secondaryConn_?(this.log_("Secondary connection lost."),this.onSecondaryConnectionLost_()):this.log_("closing an old connection")}}connReceiver_(e){return t=>{2!==this.state_&&(e===this.rx_?this.onPrimaryMessageReceived_(t):e===this.secondaryConn_?this.onSecondaryMessageReceived_(t):this.log_("message on old connection"))}}sendRequest(e){const t={t:"d",d:e};this.sendData_(t)}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("t"in e){const t=e.t;"a"===t?this.upgradeIfSecondaryHealthy_():"r"===t?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),this.tx_!==this.secondaryConn_&&this.rx_!==this.secondaryConn_||this.close()):"o"===t&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}}onSecondaryMessageReceived_(e){const t=fs("t",e),n=fs("d",e);if("c"===t)this.onSecondaryControl_(n);else{if("d"!==t)throw new Error("Unknown protocol layer: "+t);this.pendingDataMessages.push(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:"p",d:{}}}))}proceedWithUpgrade_(){this.secondaryConn_.start(),this.log_("sending client ack on secondary"),this.secondaryConn_.send({t:"c",d:{t:"a",d:{}}}),this.log_("Ending transmission on primary"),this.conn_.send({t:"c",d:{t:"n",d:{}}}),this.tx_=this.secondaryConn_,this.tryCleanupConnection()}onPrimaryMessageReceived_(e){const t=fs("t",e),n=fs("d",e);"c"===t?this.onControl_(n):"d"===t&&this.onDataMessage_(n)}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 t=fs("t",e);if("d"in e){const n=e.d;if("h"===t){const e=Object.assign({},n);this.repoInfo_.isUsingEmulator&&(e.h=this.repoInfo_.host),this.onHandshake_(e)}else if("n"===t){this.log_("recvd end transmission on primary"),this.rx_=this.secondaryConn_;for(let e=0;e{this.secondaryConn_&&(this.log_("Timed out trying to upgrade."),this.secondaryConn_.close())}),Math.floor(6e4))}onReset_(e){this.log_("Reset packet received. New host: "+e),this.repoInfo_.host=e,1===this.state_?this.close():(this.closeConnections_(),this.start_())}onConnectionEstablished_(e,t){this.log_("Realtime connection established."),this.conn_=e,this.state_=1,this.onReady_&&(this.onReady_(t,this.sessionId),this.onReady_=null),0===this.primaryResponsesRequired_?(this.log_("Primary connection is healthy."),this.isHealthy_=!0):Ss((()=>{this.sendPingOnPrimaryIfNecessary_()}),Math.floor(5e3))}sendPingOnPrimaryIfNecessary_(){this.isHealthy_||1!==this.state_||(this.log_("sending ping on primary."),this.sendData_({t:"c",d:{t:"p",d:{}}}))}onSecondaryConnectionLost_(){const e=this.secondaryConn_;this.secondaryConn_=null,this.tx_!==e&&this.rx_!==e||this.close()}onConnectionLost_(e){this.conn_=null,e||0!==this.state_?1===this.state_&&this.log_("Realtime connection lost."):(this.log_("Realtime connection failed."),this.repoInfo_.isCacheableHost()&&(Yo.remove("host:"+this.repoInfo_.host),this.repoInfo_.internalHost=this.repoInfo_.host)),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(1!==this.state_)throw"Connection is not connected";this.tx_.send(e)}close(){2!==this.state_&&(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)}}class Vs{put(e,t,n,r){}merge(e,t,n,r){}refreshAuthToken(e){}refreshAppCheckToken(e){}onDisconnectPut(e,t,n){}onDisconnectMerge(e,t,n){}onDisconnectCancel(e,t){}reportStats(e){}}class qs{constructor(e){this.allowedEvents_=e,this.listeners_={},Er(Array.isArray(e)&&e.length>0,"Requires a non-empty array")}trigger(e){if(Array.isArray(this.listeners_[e])){const i=[...this.listeners_[e]];for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;rt===e)),"Unknown event: "+e)}}class Ks extends qs{constructor(){super(["online"]),this.online_=!0,"undefined"===typeof window||"undefined"===typeof window.addEventListener||Br()||(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 Ks}getInitialEvent(e){return Er("online"===e,"Unknown event type: "+e),[this.online_]}currentlyOnline(){return this.online_}}class Gs{constructor(e,t){if(void 0===t){this.pieces_=e.split("/");let t=0;for(let e=0;e0&&(this.pieces_[t]=this.pieces_[e],t++);this.pieces_.length=t,this.pieceNum_=0}else this.pieces_=e,this.pieceNum_=t}toString(){let e="";for(let t=this.pieceNum_;t=e.pieces_.length?null:e.pieces_[e.pieceNum_]}function Js(e){return e.pieces_.length-e.pieceNum_}function Xs(e){let t=e.pieceNum_;return t1&&void 0!==arguments[1]?arguments[1]:0;return e.pieces_.slice(e.pieceNum_+t)}function ta(e){if(e.pieceNum_>=e.pieces_.length)return null;const t=[];for(let n=e.pieceNum_;n0&&n.push(e[t])}return new Gs(n,0)}function ra(e){return e.pieceNum_>=e.pieces_.length}function ia(e,t){const n=Qs(e),r=Qs(t);if(null===n)return t;if(n===r)return ia(Xs(e),Xs(t));throw new Error("INTERNAL ERROR: innerPath ("+t+") is not within outerPath ("+e+")")}function oa(e,t){const n=ea(e,0),r=ea(t,0);for(let i=0;iJs(t))return!1;for(;n768)throw new Error(e.errorPrefix_+"has a key path longer than 768 bytes ("+e.byteLength_+").");if(e.parts_.length>32)throw new Error(e.errorPrefix_+"path specified exceeds the maximum depth that can be written (32) or object contains a cycle "+ua(e))}function ua(e){return 0===e.parts_.length?"":"in property '"+e.parts_.join(".")+"'"}class da extends qs{constructor(){let e,t;super(["visible"]),"undefined"!==typeof document&&"undefined"!==typeof document.addEventListener&&("undefined"!==typeof document.hidden?(t="visibilitychange",e="hidden"):"undefined"!==typeof document.mozHidden?(t="mozvisibilitychange",e="mozHidden"):"undefined"!==typeof document.msHidden?(t="msvisibilitychange",e="msHidden"):"undefined"!==typeof document.webkitHidden&&(t="webkitvisibilitychange",e="webkitHidden")),this.visible_=!0,t&&document.addEventListener(t,(()=>{const t=!document[e];t!==this.visible_&&(this.visible_=t,this.trigger("visible",t))}),!1)}static getInstance(){return new da}getInitialEvent(e){return Er("visible"===e,"Unknown event type: "+e),[this.visible_]}}const ha=1e3;class pa extends Vs{constructor(e,t,n,r,i,o,s,a){if(super(),this.repoInfo_=e,this.applicationId_=t,this.onDataUpdate_=n,this.onConnectStatus_=r,this.onServerInfoUpdate_=i,this.authTokenProvider_=o,this.appCheckTokenProvider_=s,this.authOverride_=a,this.id=pa.nextPersistentConnectionId_++,this.log_=os("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_=ha,this.maxReconnectDelay_=3e5,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&&!Hr())throw new Error("Auth override specified in options, but not supported on non Node.js platforms");da.getInstance().on("visible",this.onVisible_,this),-1===e.host.indexOf("fblocal")&&Ks.getInstance().on("online",this.onOnline_,this)}sendRequest(e,t,n){const r=++this.requestNumber_,i={r:r,a:e,b:t};this.log_(Yr(i)),Er(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(i),n&&(this.requestCBHash_[r]=n)}get(e){this.initConnection_();const t=new Ur,n={action:"g",request:{p:e._path.toString(),q:e._queryObject},onComplete:e=>{const n=e.d;"ok"===e.s?t.resolve(n):t.reject(n)}};this.outstandingGets_.push(n),this.outstandingGetCount_++;const r=this.outstandingGets_.length-1;return this.connected_&&this.sendGet_(r),t.promise}listen(e,t,n,r){this.initConnection_();const i=e._queryIdentifier,o=e._path.toString();this.log_("Listen called for "+o+" "+i),this.listens.has(o)||this.listens.set(o,new Map),Er(e._queryParams.isDefault()||!e._queryParams.loadsAllData(),"listen() called for non-default but complete query"),Er(!this.listens.get(o).has(i),"listen() called twice for same path/queryId.");const s={onComplete:r,hashFn:t,query:e,tag:n};this.listens.get(o).set(i,s),this.connected_&&this.sendListen_(s)}sendGet_(e){const t=this.outstandingGets_[e];this.sendRequest("g",t.request,(n=>{delete this.outstandingGets_[e],this.outstandingGetCount_--,0===this.outstandingGetCount_&&(this.outstandingGets_=[]),t.onComplete&&t.onComplete(n)}))}sendListen_(e){const t=e.query,n=t._path.toString(),r=t._queryIdentifier;this.log_("Listen on "+n+" for "+r);const i={p:n};e.tag&&(i.q=t._queryObject,i.t=e.tag),i.h=e.hashFn(),this.sendRequest("q",i,(i=>{const o=i.d,s=i.s;pa.warnOnListenWarnings_(o,t);(this.listens.get(n)&&this.listens.get(n).get(r))===e&&(this.log_("listen response",i),"ok"!==s&&this.removeListen_(n,r),e.onComplete&&e.onComplete(s,o))}))}static warnOnListenWarnings_(e,t){if(e&&"object"===typeof e&&Jr(e,"w")){const n=Xr(e,"w");if(Array.isArray(n)&&~n.indexOf("no_index")){const e='".indexOn": "'+t._queryParams.getIndex().toString()+'"',n=t._path.toString();ls(`Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding ${e} at ${n} 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&&40===e.length||function(e){const t=Qr(e).claims;return"object"===typeof t&&!0===t.admin}(e))&&(this.log_("Admin auth credential detected. Reducing max reconnect time."),this.maxReconnectDelay_=3e4)}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_,t=function(e){const t=Qr(e).claims;return!!t&&"object"===typeof t&&t.hasOwnProperty("iat")}(e)?"auth":"gauth",n={cred:e};null===this.authOverride_?n.noauth=!0:"object"===typeof this.authOverride_&&(n.authvar=this.authOverride_),this.sendRequest(t,n,(t=>{const n=t.s,r=t.d||"error";this.authToken_===e&&("ok"===n?this.invalidAuthTokenCount_=0:this.onAuthRevoked_(n,r))}))}}tryAppCheck(){this.connected_&&this.appCheckToken_&&this.sendRequest("appcheck",{token:this.appCheckToken_},(e=>{const t=e.s,n=e.d||"error";"ok"===t?this.invalidAppCheckTokenCount_=0:this.onAppCheckRevoked_(t,n)}))}unlisten(e,t){const n=e._path.toString(),r=e._queryIdentifier;this.log_("Unlisten called for "+n+" "+r),Er(e._queryParams.isDefault()||!e._queryParams.loadsAllData(),"unlisten() called for non-default but complete query");this.removeListen_(n,r)&&this.connected_&&this.sendUnlisten_(n,r,e._queryObject,t)}sendUnlisten_(e,t,n,r){this.log_("Unlisten on "+e+" for "+t);const i={p:e};r&&(i.q=n,i.t=r),this.sendRequest("n",i)}onDisconnectPut(e,t,n){this.initConnection_(),this.connected_?this.sendOnDisconnect_("o",e,t,n):this.onDisconnectRequestQueue_.push({pathString:e,action:"o",data:t,onComplete:n})}onDisconnectMerge(e,t,n){this.initConnection_(),this.connected_?this.sendOnDisconnect_("om",e,t,n):this.onDisconnectRequestQueue_.push({pathString:e,action:"om",data:t,onComplete:n})}onDisconnectCancel(e,t){this.initConnection_(),this.connected_?this.sendOnDisconnect_("oc",e,null,t):this.onDisconnectRequestQueue_.push({pathString:e,action:"oc",data:null,onComplete:t})}sendOnDisconnect_(e,t,n,r){const i={p:t,d:n};this.log_("onDisconnect "+e,i),this.sendRequest(e,i,(e=>{r&&setTimeout((()=>{r(e.s,e.d)}),Math.floor(0))}))}put(e,t,n,r){this.putInternal("p",e,t,n,r)}merge(e,t,n,r){this.putInternal("m",e,t,n,r)}putInternal(e,t,n,r,i){this.initConnection_();const o={p:t,d:n};void 0!==i&&(o.h=i),this.outstandingPuts_.push({action:e,request:o,onComplete:r}),this.outstandingPutCount_++;const s=this.outstandingPuts_.length-1;this.connected_?this.sendPut_(s):this.log_("Buffering put: "+t)}sendPut_(e){const t=this.outstandingPuts_[e].action,n=this.outstandingPuts_[e].request,r=this.outstandingPuts_[e].onComplete;this.outstandingPuts_[e].queued=this.connected_,this.sendRequest(t,n,(n=>{this.log_(t+" response",n),delete this.outstandingPuts_[e],this.outstandingPutCount_--,0===this.outstandingPutCount_&&(this.outstandingPuts_=[]),r&&r(n.s,n.d)}))}reportStats(e){if(this.connected_){const t={c:e};this.log_("reportStats",t),this.sendRequest("s",t,(e=>{if("ok"!==e.s){const t=e.d;this.log_("reportStats","Error sending stats: "+t)}}))}}onDataMessage_(e){if("r"in e){this.log_("from server: "+Yr(e));const t=e.r,n=this.requestCBHash_[t];n&&(delete this.requestCBHash_[t],n(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,t){this.log_("handleServerMessage",e,t),"d"===e?this.onDataUpdate_(t.p,t.d,!1,t.t):"m"===e?this.onDataUpdate_(t.p,t.d,!0,t.t):"c"===e?this.onListenRevoked_(t.p,t.q):"ac"===e?this.onAuthRevoked_(t.s,t.d):"apc"===e?this.onAppCheckRevoked_(t.s,t.d):"sd"===e?this.onSecurityDebugPacket_(t):ss("Unrecognized action received from server: "+Yr(e)+"\nAre you using the latest client?")}onReady_(e,t){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=(new Date).getTime(),this.handleTimestamp_(e),this.lastSessionId=t,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)}scheduleConnect_(e){Er(!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_=ha,this.realtime_||this.scheduleConnect_(0)),this.visible_=e}onOnline_(e){e?(this.log_("Browser went online."),this.reconnectDelay_=ha,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_()){if(this.visible_){if(this.lastConnectionEstablishedTime_){(new Date).getTime()-this.lastConnectionEstablishedTime_>3e4&&(this.reconnectDelay_=ha),this.lastConnectionEstablishedTime_=null}}else 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 t=Math.max(0,this.reconnectDelay_-e);t=Math.random()*t,this.log_("Trying to reconnect in "+t+"ms"),this.scheduleConnect_(t),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,1.3*this.reconnectDelay_)}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),t=this.onReady_.bind(this),n=this.onRealtimeDisconnect_.bind(this),r=this.id+":"+pa.nextConnectionId_++,i=this.lastSessionId;let o=!1,s=null;const a=function(){s?s.close():(o=!0,n())},l=function(e){Er(s,"sendRequest call when we're not connected not allowed."),s.sendRequest(e)};this.realtime_={close:a,sendRequest:l};const c=this.forceTokenRefresh_;this.forceTokenRefresh_=!1;try{const[a,l]=await Promise.all([this.authTokenProvider_.getToken(c),this.appCheckTokenProvider_.getToken(c)]);o?is("getToken() completed but was canceled"):(is("getToken() completed. Creating connection."),this.authToken_=a&&a.accessToken,this.appCheckToken_=l&&l.token,s=new Hs(r,this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,e,t,n,(e=>{ls(e+" ("+this.repoInfo_.toString()+")"),this.interrupt("server_kill")}),i))}catch(ss){this.log_("Failed to get token: "+ss),o||(this.repoInfo_.nodeAdmin&&ls(ss),a())}}}interrupt(e){is("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){is("Resuming connection for reason: "+e),delete this.interruptReasons_[e],Zr(this.interruptReasons_)&&(this.reconnectDelay_=ha,this.realtime_||this.scheduleConnect_(0))}handleTimestamp_(e){const t=e-(new Date).getTime();this.onServerInfoUpdate_({serverTimeOffset:t})}cancelSentTransactions_(){for(let e=0;ems(e))).join("$"):"default";const r=this.removeListen_(e,n);r&&r.onComplete&&r.onComplete("permission_denied")}removeListen_(e,t){const n=new Gs(e).toString();let r;if(this.listens.has(n)){const e=this.listens.get(n);r=e.get(t),e.delete(t),0===e.size&&this.listens.delete(n)}else r=void 0;return r}onAuthRevoked_(e,t){is("Auth token revoked: "+e+"/"+t),this.authToken_=null,this.forceTokenRefresh_=!0,this.realtime_.close(),"invalid_token"!==e&&"permission_denied"!==e||(this.invalidAuthTokenCount_++,this.invalidAuthTokenCount_>=3&&(this.reconnectDelay_=3e4,this.authTokenProvider_.notifyForInvalidToken()))}onAppCheckRevoked_(e,t){is("App check token revoked: "+e+"/"+t),this.appCheckToken_=null,this.forceTokenRefresh_=!0,"invalid_token"!==e&&"permission_denied"!==e||(this.invalidAppCheckTokenCount_++,this.invalidAppCheckTokenCount_>=3&&this.appCheckTokenProvider_.notifyForInvalidToken())}onSecurityDebugPacket_(e){this.securityDebugCallback_?this.securityDebugCallback_(e):"msg"in e&&console.log("FIREBASE: "+e.msg.replace("\n","\nFIREBASE: "))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of this.listens.values())for(const t of e.values())this.sendListen_(t);for(let e=0;e4&&void 0!==arguments[4]?arguments[4]:null;this.isReverse_=r,this.resultGenerator_=i,this.nodeStack_=[];let o=1;for(;!e.isEmpty();)if(o=t?n(e.key,t):1,r&&(o*=-1),o<0)e=this.isReverse_?e.left:e.right;else{if(0===o){this.nodeStack_.push(e);break}this.nodeStack_.push(e),e=this.isReverse_?e.right:e.left}}getNext(){if(0===this.nodeStack_.length)return null;let e,t=this.nodeStack_.pop();if(e=this.resultGenerator_?this.resultGenerator_(t.key,t.value):{key:t.key,value:t.value},this.isReverse_)for(t=t.left;!t.isEmpty();)this.nodeStack_.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.nodeStack_.push(t),t=t.left;return e}hasNext(){return this.nodeStack_.length>0}peek(){if(0===this.nodeStack_.length)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 ba{constructor(e,t,n,r,i){this.key=e,this.value=t,this.color=null!=n?n:ba.RED,this.left=null!=r?r:wa.EMPTY_NODE,this.right=null!=i?i:wa.EMPTY_NODE}copy(e,t,n,r,i){return new ba(null!=e?e:this.key,null!=t?t:this.value,null!=n?n:this.color,null!=r?r:this.left,null!=i?i: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,t,n){let r=this;const i=n(e,r.key);return r=i<0?r.copy(null,null,null,r.left.insert(e,t,n),null):0===i?r.copy(null,t,null,null,null):r.copy(null,null,null,null,r.right.insert(e,t,n)),r.fixUp_()}removeMin_(){if(this.left.isEmpty())return wa.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,t){let n,r;if(n=this,t(e,n.key)<0)n.left.isEmpty()||n.left.isRed_()||n.left.left.isRed_()||(n=n.moveRedLeft_()),n=n.copy(null,null,null,n.left.remove(e,t),null);else{if(n.left.isRed_()&&(n=n.rotateRight_()),n.right.isEmpty()||n.right.isRed_()||n.right.left.isRed_()||(n=n.moveRedRight_()),0===t(e,n.key)){if(n.right.isEmpty())return wa.EMPTY_NODE;r=n.right.min_(),n=n.copy(r.key,r.value,null,null,n.right.removeMin_())}n=n.copy(null,null,null,null,n.right.remove(e,t))}return n.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,ba.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight_(){const e=this.copy(null,null,ba.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),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)}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)}}ba.RED=!0,ba.BLACK=!1;class wa{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:wa.EMPTY_NODE;this.comparator_=e,this.root_=t}insert(e,t){return new wa(this.comparator_,this.root_.insert(e,t,this.comparator_).copy(null,null,ba.BLACK,null,null))}remove(e){return new wa(this.comparator_,this.root_.remove(e,this.comparator_).copy(null,null,ba.BLACK,null,null))}get(e){let t,n=this.root_;for(;!n.isEmpty();){if(t=this.comparator_(e,n.key),0===t)return n.value;t<0?n=n.left:t>0&&(n=n.right)}return null}getPredecessorKey(e){let t,n=this.root_,r=null;for(;!n.isEmpty();){if(t=this.comparator_(e,n.key),0===t){if(n.left.isEmpty())return r?r.key:null;for(n=n.left;!n.right.isEmpty();)n=n.right;return n.key}t<0?n=n.left:t>0&&(r=n,n=n.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 _a(this.root_,null,this.comparator_,!1,e)}getIteratorFrom(e,t){return new _a(this.root_,e,this.comparator_,!1,t)}getReverseIteratorFrom(e,t){return new _a(this.root_,e,this.comparator_,!0,t)}getReverseIterator(e){return new _a(this.root_,null,this.comparator_,!0,e)}}function Sa(e,t){return hs(e.name,t.name)}function Ea(e,t){return hs(e,t)}let Ca;wa.EMPTY_NODE=new class{copy(e,t,n,r,i){return this}insert(e,t,n){return new ba(e,t,null)}remove(e,t){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}};const ka=function(e){return"number"===typeof e?"number:"+vs(e):"string:"+e},xa=function(e){if(e.isLeafNode()){const t=e.val();Er("string"===typeof t||"number"===typeof t||"object"===typeof t&&Jr(t,".sv"),"Priority must be a string or number.")}else Er(e===Ca||e.isEmpty(),"priority of unexpected type.");Er(e===Ca||e.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")};let Ta,Ia,Pa;class Aa{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Aa.__childrenNodeConstructor.EMPTY_NODE;this.value_=e,this.priorityNode_=t,this.lazyHash_=null,Er(void 0!==this.value_&&null!==this.value_,"LeafNode shouldn't be created with null/undefined value."),xa(this.priorityNode_)}static set __childrenNodeConstructor(e){Ta=e}static get __childrenNodeConstructor(){return Ta}isLeafNode(){return!0}getPriority(){return this.priorityNode_}updatePriority(e){return new Aa(this.value_,e)}getImmediateChild(e){return".priority"===e?this.priorityNode_:Aa.__childrenNodeConstructor.EMPTY_NODE}getChild(e){return ra(e)?this:".priority"===Qs(e)?this.priorityNode_:Aa.__childrenNodeConstructor.EMPTY_NODE}hasChild(){return!1}getPredecessorChildName(e,t){return null}updateImmediateChild(e,t){return".priority"===e?this.updatePriority(t):t.isEmpty()&&".priority"!==e?this:Aa.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(e,t).updatePriority(this.priorityNode_)}updateChild(e,t){const n=Qs(e);return null===n?t:t.isEmpty()&&".priority"!==n?this:(Er(".priority"!==n||1===Js(e),".priority must be the last token in a path"),this.updateImmediateChild(n,Aa.__childrenNodeConstructor.EMPTY_NODE.updateChild(Xs(e),t)))}isEmpty(){return!1}numChildren(){return 0}forEachChild(e,t){return!1}val(e){return e&&!this.getPriority().isEmpty()?{".value":this.getValue(),".priority":this.getPriority().val()}:this.getValue()}hash(){if(null===this.lazyHash_){let e="";this.priorityNode_.isEmpty()||(e+="priority:"+ka(this.priorityNode_.val())+":");const t=typeof this.value_;e+=t+":",e+="number"===t?vs(this.value_):this.value_,this.lazyHash_=Zo(e)}return this.lazyHash_}getValue(){return this.value_}compareTo(e){return e===Aa.__childrenNodeConstructor.EMPTY_NODE?1:e instanceof Aa.__childrenNodeConstructor?-1:(Er(e.isLeafNode(),"Unknown node type"),this.compareToLeafNode_(e))}compareToLeafNode_(e){const t=typeof e.value_,n=typeof this.value_,r=Aa.VALUE_TYPE_ORDER.indexOf(t),i=Aa.VALUE_TYPE_ORDER.indexOf(n);return Er(r>=0,"Unknown leaf type: "+t),Er(i>=0,"Unknown leaf type: "+n),r===i?"object"===n?0:this.value_{const i=Xr(this.indexSet_,r);if(Er(i,"Missing index implementation for "+r),n===Ma){if(i.isDefinedOn(e.node)){const n=[],r=t.getIterator(fa.Wrap);let o=r.getNext();for(;o;)o.name!==e.name&&n.push(o),o=r.getNext();return n.push(e),Da(n,i.getCompare())}return Ma}{const r=t.get(e.name);let i=n;return r&&(i=i.remove(new fa(e.name,r))),i.insert(e,e.node)}}));return new Fa(n,this.indexSet_)}removeFromIndexes(e,t){const n=ei(this.indexes_,(n=>{if(n===Ma)return n;{const r=t.get(e.name);return r?n.remove(new fa(e.name,r)):n}}));return new Fa(n,this.indexSet_)}}let ja;class Ua{constructor(e,t,n){this.children_=e,this.priorityNode_=t,this.indexMap_=n,this.lazyHash_=null,this.priorityNode_&&xa(this.priorityNode_),this.children_.isEmpty()&&Er(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}static get EMPTY_NODE(){return ja||(ja=new Ua(new wa(Ea),null,Fa.Default))}isLeafNode(){return!1}getPriority(){return this.priorityNode_||ja}updatePriority(e){return this.children_.isEmpty()?this:new Ua(this.children_,e,this.indexMap_)}getImmediateChild(e){if(".priority"===e)return this.getPriority();{const t=this.children_.get(e);return null===t?ja:t}}getChild(e){const t=Qs(e);return null===t?this:this.getImmediateChild(t).getChild(Xs(e))}hasChild(e){return null!==this.children_.get(e)}updateImmediateChild(e,t){if(Er(t,"We should always be passing snapshot nodes"),".priority"===e)return this.updatePriority(t);{const n=new fa(e,t);let r,i;t.isEmpty()?(r=this.children_.remove(e),i=this.indexMap_.removeFromIndexes(n,this.children_)):(r=this.children_.insert(e,t),i=this.indexMap_.addToIndexes(n,this.children_));const o=r.isEmpty()?ja:this.priorityNode_;return new Ua(r,o,i)}}updateChild(e,t){const n=Qs(e);if(null===n)return t;{Er(".priority"!==Qs(e)||1===Js(e),".priority must be the last token in a path");const r=this.getImmediateChild(n).updateChild(Xs(e),t);return this.updateImmediateChild(n,r)}}isEmpty(){return this.children_.isEmpty()}numChildren(){return this.children_.count()}val(e){if(this.isEmpty())return null;const t={};let n=0,r=0,i=!0;if(this.forEachChild(Ra,((o,s)=>{t[o]=s.val(e),n++,i&&Ua.INTEGER_REGEXP_.test(o)?r=Math.max(r,Number(o)):i=!1})),!e&&i&&r<2*n){const e=[];for(const n in t)e[n]=t[n];return e}return e&&!this.getPriority().isEmpty()&&(t[".priority"]=this.getPriority().val()),t}hash(){if(null===this.lazyHash_){let e="";this.getPriority().isEmpty()||(e+="priority:"+ka(this.getPriority().val())+":"),this.forEachChild(Ra,((t,n)=>{const r=n.hash();""!==r&&(e+=":"+t+":"+r)})),this.lazyHash_=""===e?"":Zo(e)}return this.lazyHash_}getPredecessorChildName(e,t,n){const r=this.resolveIndex_(n);if(r){const n=r.getPredecessorKey(new fa(e,t));return n?n.name:null}return this.children_.getPredecessorKey(e)}getFirstChildName(e){const t=this.resolveIndex_(e);if(t){const e=t.minKey();return e&&e.name}return this.children_.minKey()}getFirstChild(e){const t=this.getFirstChildName(e);return t?new fa(t,this.children_.get(t)):null}getLastChildName(e){const t=this.resolveIndex_(e);if(t){const e=t.maxKey();return e&&e.name}return this.children_.maxKey()}getLastChild(e){const t=this.getLastChildName(e);return t?new fa(t,this.children_.get(t)):null}forEachChild(e,t){const n=this.resolveIndex_(e);return n?n.inorderTraversal((e=>t(e.name,e.node))):this.children_.inorderTraversal(t)}getIterator(e){return this.getIteratorFrom(e.minPost(),e)}getIteratorFrom(e,t){const n=this.resolveIndex_(t);if(n)return n.getIteratorFrom(e,(e=>e));{const n=this.children_.getIteratorFrom(e.name,fa.Wrap);let r=n.peek();for(;null!=r&&t.compare(r,e)<0;)n.getNext(),r=n.peek();return n}}getReverseIterator(e){return this.getReverseIteratorFrom(e.maxPost(),e)}getReverseIteratorFrom(e,t){const n=this.resolveIndex_(t);if(n)return n.getReverseIteratorFrom(e,(e=>e));{const n=this.children_.getReverseIteratorFrom(e.name,fa.Wrap);let r=n.peek();for(;null!=r&&t.compare(r,e)>0;)n.getNext(),r=n.peek();return n}}compareTo(e){return this.isEmpty()?e.isEmpty()?0:-1:e.isLeafNode()||e.isEmpty()?1:e===$a?-1:0}withIndex(e){if(e===va||this.indexMap_.hasIndex(e))return this;{const t=this.indexMap_.addIndex(e,this.children_);return new Ua(this.children_,this.priorityNode_,t)}}isIndexed(e){return e===va||this.indexMap_.hasIndex(e)}equals(e){if(e===this)return!0;if(e.isLeafNode())return!1;{const t=e;if(this.getPriority().equals(t.getPriority())){if(this.children_.count()===t.children_.count()){const e=this.getIterator(Ra),n=t.getIterator(Ra);let r=e.getNext(),i=n.getNext();for(;r&&i;){if(r.name!==i.name||!r.node.equals(i.node))return!1;r=e.getNext(),i=n.getNext()}return null===r&&null===i}return!1}return!1}}resolveIndex_(e){return e===va?null:this.indexMap_.get(e.toString())}}Ua.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/;const $a=new class extends Ua{constructor(){super(new wa(Ea),Ua.EMPTY_NODE,Fa.Default)}compareTo(e){return e===this?0:1}equals(e){return e===this}getPriority(){return this}getImmediateChild(e){return Ua.EMPTY_NODE}isEmpty(){return!1}};Object.defineProperties(fa,{MIN:{value:new fa(us,Ua.EMPTY_NODE)},MAX:{value:new fa(ds,$a)}}),ya.__EMPTY_NODE=Ua.EMPTY_NODE,Aa.__childrenNodeConstructor=Ua,Ca=$a,function(e){Pa=e}($a);function za(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(null===e)return Ua.EMPTY_NODE;if("object"===typeof e&&".priority"in e&&(t=e[".priority"]),Er(null===t||"string"===typeof t||"number"===typeof t||"object"===typeof t&&".sv"in t,"Invalid priority type found: "+typeof t),"object"===typeof e&&".value"in e&&null!==e[".value"]&&(e=e[".value"]),"object"!==typeof e||".sv"in e){return new Aa(e,za(t))}if(e instanceof Array){let n=Ua.EMPTY_NODE;return ys(e,((t,r)=>{if(Jr(e,t)&&"."!==t.substring(0,1)){const e=za(r);!e.isLeafNode()&&e.isEmpty()||(n=n.updateImmediateChild(t,e))}})),n.updatePriority(za(t))}{const n=[];let r=!1;if(ys(e,((e,t)=>{if("."!==e.substring(0,1)){const i=za(t);i.isEmpty()||(r=r||!i.getPriority().isEmpty(),n.push(new fa(e,i)))}})),0===n.length)return Ua.EMPTY_NODE;const i=Da(n,Sa,(e=>e.name),Ea);if(r){const e=Da(n,Ra.getCompare());return new Ua(i,za(t),new Fa({".priority":e},{".priority":Ra}))}return new Ua(i,za(t),Fa.Default)}}!function(e){Ia=e}(za);class Ba extends ma{constructor(e){super(),this.indexPath_=e,Er(!ra(e)&&".priority"!==Qs(e),"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,t){const n=this.extractChild(e.node),r=this.extractChild(t.node),i=n.compareTo(r);return 0===i?hs(e.name,t.name):i}makePost(e,t){const n=za(e),r=Ua.EMPTY_NODE.updateChild(this.indexPath_,n);return new fa(t,r)}maxPost(){const e=Ua.EMPTY_NODE.updateChild(this.indexPath_,$a);return new fa(ds,e)}toString(){return ea(this.indexPath_,0).join("/")}}const Wa=new class extends ma{compare(e,t){const n=e.node.compareTo(t.node);return 0===n?hs(e.name,t.name):n}isDefinedOn(e){return!0}indexedValueChanged(e,t){return!e.equals(t)}minPost(){return fa.MIN}maxPost(){return fa.MAX}makePost(e,t){const n=za(e);return new fa(t,n)}toString(){return".value"}};function Ha(e){return{type:"value",snapshotNode:e}}function Va(e,t){return{type:"child_added",snapshotNode:t,childName:e}}function qa(e,t){return{type:"child_removed",snapshotNode:t,childName:e}}function Ka(e,t,n){return{type:"child_changed",snapshotNode:t,childName:e,oldSnap:n}}class Ga{constructor(e){this.index_=e}updateChild(e,t,n,r,i,o){Er(e.isIndexed(this.index_),"A node must be indexed if only a child is updated");const s=e.getImmediateChild(t);return s.getChild(r).equals(n.getChild(r))&&s.isEmpty()===n.isEmpty()?e:(null!=o&&(n.isEmpty()?e.hasChild(t)?o.trackChildChange(qa(t,s)):Er(e.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):s.isEmpty()?o.trackChildChange(Va(t,n)):o.trackChildChange(Ka(t,n,s))),e.isLeafNode()&&n.isEmpty()?e:e.updateImmediateChild(t,n).withIndex(this.index_))}updateFullNode(e,t,n){return null!=n&&(e.isLeafNode()||e.forEachChild(Ra,((e,r)=>{t.hasChild(e)||n.trackChildChange(qa(e,r))})),t.isLeafNode()||t.forEachChild(Ra,((t,r)=>{if(e.hasChild(t)){const i=e.getImmediateChild(t);i.equals(r)||n.trackChildChange(Ka(t,r,i))}else n.trackChildChange(Va(t,r))}))),t.withIndex(this.index_)}updatePriority(e,t){return e.isEmpty()?Ua.EMPTY_NODE:e.updatePriority(t)}filtersNodes(){return!1}getIndexedFilter(){return this}getIndex(){return this.index_}}class Ya{constructor(e){this.indexedFilter_=new Ga(e.getIndex()),this.index_=e.getIndex(),this.startPost_=Ya.getStartPost_(e),this.endPost_=Ya.getEndPost_(e),this.startIsInclusive_=!e.startAfterSet_,this.endIsInclusive_=!e.endBeforeSet_}getStartPost(){return this.startPost_}getEndPost(){return this.endPost_}matches(e){const t=this.startIsInclusive_?this.index_.compare(this.getStartPost(),e)<=0:this.index_.compare(this.getStartPost(),e)<0,n=this.endIsInclusive_?this.index_.compare(e,this.getEndPost())<=0:this.index_.compare(e,this.getEndPost())<0;return t&&n}updateChild(e,t,n,r,i,o){return this.matches(new fa(t,n))||(n=Ua.EMPTY_NODE),this.indexedFilter_.updateChild(e,t,n,r,i,o)}updateFullNode(e,t,n){t.isLeafNode()&&(t=Ua.EMPTY_NODE);let r=t.withIndex(this.index_);r=r.updatePriority(Ua.EMPTY_NODE);const i=this;return t.forEachChild(Ra,((e,t)=>{i.matches(new fa(e,t))||(r=r.updateImmediateChild(e,Ua.EMPTY_NODE))})),this.indexedFilter_.updateFullNode(e,r,n)}updatePriority(e,t){return e}filtersNodes(){return!0}getIndexedFilter(){return this.indexedFilter_}getIndex(){return this.index_}static getStartPost_(e){if(e.hasStart()){const t=e.getIndexStartName();return e.getIndex().makePost(e.getIndexStartValue(),t)}return e.getIndex().minPost()}static getEndPost_(e){if(e.hasEnd()){const t=e.getIndexEndName();return e.getIndex().makePost(e.getIndexEndValue(),t)}return e.getIndex().maxPost()}}class Qa{constructor(e){this.withinDirectionalStart=e=>this.reverse_?this.withinEndPost(e):this.withinStartPost(e),this.withinDirectionalEnd=e=>this.reverse_?this.withinStartPost(e):this.withinEndPost(e),this.withinStartPost=e=>{const t=this.index_.compare(this.rangedFilter_.getStartPost(),e);return this.startIsInclusive_?t<=0:t<0},this.withinEndPost=e=>{const t=this.index_.compare(e,this.rangedFilter_.getEndPost());return this.endIsInclusive_?t<=0:t<0},this.rangedFilter_=new Ya(e),this.index_=e.getIndex(),this.limit_=e.getLimit(),this.reverse_=!e.isViewFromLeft(),this.startIsInclusive_=!e.startAfterSet_,this.endIsInclusive_=!e.endBeforeSet_}updateChild(e,t,n,r,i,o){return this.rangedFilter_.matches(new fa(t,n))||(n=Ua.EMPTY_NODE),e.getImmediateChild(t).equals(n)?e:e.numChildren()e(n,t)}else o=this.index_.getCompare();const s=e;Er(s.numChildren()===this.limit_,"");const a=new fa(t,n),l=this.reverse_?s.getFirstChild(this.index_):s.getLastChild(this.index_),c=this.rangedFilter_.matches(a);if(s.hasChild(t)){const e=s.getImmediateChild(t);let u=r.getChildAfterChild(this.index_,l,this.reverse_);for(;null!=u&&(u.name===t||s.hasChild(u.name));)u=r.getChildAfterChild(this.index_,u,this.reverse_);const d=null==u?1:o(u,a);if(c&&!n.isEmpty()&&d>=0)return null!=i&&i.trackChildChange(Ka(t,n,e)),s.updateImmediateChild(t,n);{null!=i&&i.trackChildChange(qa(t,e));const n=s.updateImmediateChild(t,Ua.EMPTY_NODE);return null!=u&&this.rangedFilter_.matches(u)?(null!=i&&i.trackChildChange(Va(u.name,u.node)),n.updateImmediateChild(u.name,u.node)):n}}return n.isEmpty()?e:c&&o(l,a)>=0?(null!=i&&(i.trackChildChange(qa(l.name,l.node)),i.trackChildChange(Va(t,n))),s.updateImmediateChild(t,n).updateImmediateChild(l.name,Ua.EMPTY_NODE)):e}}class Ja{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_=Ra}hasStart(){return this.startSet_}isViewFromLeft(){return""===this.viewFrom_?this.startSet_:"l"===this.viewFrom_}getIndexStartValue(){return Er(this.startSet_,"Only valid if start has been set"),this.indexStartValue_}getIndexStartName(){return Er(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:us}hasEnd(){return this.endSet_}getIndexEndValue(){return Er(this.endSet_,"Only valid if end has been set"),this.indexEndValue_}getIndexEndName(){return Er(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:ds}hasLimit(){return this.limitSet_}hasAnchoredLimit(){return this.limitSet_&&""!==this.viewFrom_}getLimit(){return Er(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_===Ra}copy(){const e=new Ja;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 Xa(e){const t={};if(e.isDefault())return t;let n;if(e.index_===Ra?n="$priority":e.index_===Wa?n="$value":e.index_===va?n="$key":(Er(e.index_ instanceof Ba,"Unrecognized index type!"),n=e.index_.toString()),t.orderBy=Yr(n),e.startSet_){const n=e.startAfterSet_?"startAfter":"startAt";t[n]=Yr(e.indexStartValue_),e.startNameSet_&&(t[n]+=","+Yr(e.indexStartName_))}if(e.endSet_){const n=e.endBeforeSet_?"endBefore":"endAt";t[n]=Yr(e.indexEndValue_),e.endNameSet_&&(t[n]+=","+Yr(e.indexEndName_))}return e.limitSet_&&(e.isViewFromLeft()?t.limitToFirst=e.limit_:t.limitToLast=e.limit_),t}function Za(e){const t={};if(e.startSet_&&(t.sp=e.indexStartValue_,e.startNameSet_&&(t.sn=e.indexStartName_),t.sin=!e.startAfterSet_),e.endSet_&&(t.ep=e.indexEndValue_,e.endNameSet_&&(t.en=e.indexEndName_),t.ein=!e.endBeforeSet_),e.limitSet_){t.l=e.limit_;let n=e.viewFrom_;""===n&&(n=e.isViewFromLeft()?"l":"r"),t.vf=n}return e.index_!==Ra&&(t.i=e.index_.toString()),t}class el extends Vs{constructor(e,t,n,r){super(),this.repoInfo_=e,this.onDataUpdate_=t,this.authTokenProvider_=n,this.appCheckTokenProvider_=r,this.log_=os("p:rest:"),this.listens_={}}reportStats(e){throw new Error("Method not implemented.")}static getListenId_(e,t){return void 0!==t?"tag$"+t:(Er(e._queryParams.isDefault(),"should have a tag if it's not a default query."),e._path.toString())}listen(e,t,n,r){const i=e._path.toString();this.log_("Listen called for "+i+" "+e._queryIdentifier);const o=el.getListenId_(e,n),s={};this.listens_[o]=s;const a=Xa(e._queryParams);this.restRequest_(i+".json",a,((e,t)=>{let a=t;if(404===e&&(a=null,e=null),null===e&&this.onDataUpdate_(i,a,!1,n),Xr(this.listens_,o)===s){let t;t=e?401===e?"permission_denied":"rest_error:"+e:"ok",r(t,null)}}))}unlisten(e,t){const n=el.getListenId_(e,t);delete this.listens_[n]}get(e){const t=Xa(e._queryParams),n=e._path.toString(),r=new Ur;return this.restRequest_(n+".json",t,((e,t)=>{let i=t;404===e&&(i=null,e=null),null===e?(this.onDataUpdate_(n,i,!1,null),r.resolve(i)):r.reject(new Error(i))})),r.promise}refreshAuthToken(e){}restRequest_(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return t.format="export",Promise.all([this.authTokenProvider_.getToken(!1),this.appCheckTokenProvider_.getToken(!1)]).then((r=>{let[i,o]=r;i&&i.accessToken&&(t.auth=i.accessToken),o&&o.token&&(t.ac=o.token);const s=(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host+e+"?ns="+this.repoInfo_.namespace+ri(t);this.log_("Sending REST request for "+s);const a=new XMLHttpRequest;a.onreadystatechange=()=>{if(n&&4===a.readyState){this.log_("REST Response for "+s+" received. status:",a.status,"response:",a.responseText);let e=null;if(a.status>=200&&a.status<300){try{e=Gr(a.responseText)}catch(DE){ls("Failed to parse JSON response for "+s+": "+a.responseText)}n(null,e)}else 401!==a.status&&404!==a.status&&ls("Got unsuccessful REST response for "+s+" Status: "+a.status),n(a.status);n=null}},a.open("GET",s,!0),a.send()}))}}class tl{constructor(){this.rootNode_=Ua.EMPTY_NODE}getNode(e){return this.rootNode_.getChild(e)}updateSnapshot(e,t){this.rootNode_=this.rootNode_.updateChild(e,t)}}function nl(){return{value:null,children:new Map}}function rl(e,t,n){if(ra(t))e.value=n,e.children.clear();else if(null!==e.value)e.value=e.value.updateChild(t,n);else{const r=Qs(t);e.children.has(r)||e.children.set(r,nl());rl(e.children.get(r),t=Xs(t),n)}}function il(e,t,n){null!==e.value?n(t,e.value):function(e,t){e.children.forEach(((e,n)=>{t(n,e)}))}(e,((e,r)=>{il(r,new Gs(t.toString()+"/"+e),n)}))}class ol{constructor(e){this.collection_=e,this.last_=null}get(){const e=this.collection_.get(),t=Object.assign({},e);return this.last_&&ys(this.last_,((e,n)=>{t[e]=t[e]-n})),this.last_=e,t}}class sl{constructor(e,t){this.server_=t,this.statsToReport_={},this.statsListener_=new ol(e);const n=1e4+2e4*Math.random();Ss(this.reportStats_.bind(this),Math.floor(n))}reportStats_(){const e=this.statsListener_.get(),t={};let n=!1;ys(e,((e,r)=>{r>0&&Jr(this.statsToReport_,e)&&(t[e]=r,n=!0)})),n&&this.server_.reportStats(t),Ss(this.reportStats_.bind(this),Math.floor(2*Math.random()*3e5))}}var al;function ll(e){return{fromUser:!1,fromServer:!0,queryId:e,tagged:!0}}!function(e){e[e.OVERWRITE=0]="OVERWRITE",e[e.MERGE=1]="MERGE",e[e.ACK_USER_WRITE=2]="ACK_USER_WRITE",e[e.LISTEN_COMPLETE=3]="LISTEN_COMPLETE"}(al||(al={}));class cl{constructor(e,t,n){this.path=e,this.affectedTree=t,this.revert=n,this.type=al.ACK_USER_WRITE,this.source={fromUser:!0,fromServer:!1,queryId:null,tagged:!1}}operationForChild(e){if(ra(this.path)){if(null!=this.affectedTree.value)return Er(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;{const t=this.affectedTree.subtree(new Gs(e));return new cl(Ys(),t,this.revert)}}return Er(Qs(this.path)===e,"operationForChild called for unrelated child."),new cl(Xs(this.path),this.affectedTree,this.revert)}}class ul{constructor(e,t){this.source=e,this.path=t,this.type=al.LISTEN_COMPLETE}operationForChild(e){return ra(this.path)?new ul(this.source,Ys()):new ul(this.source,Xs(this.path))}}class dl{constructor(e,t,n){this.source=e,this.path=t,this.snap=n,this.type=al.OVERWRITE}operationForChild(e){return ra(this.path)?new dl(this.source,Ys(),this.snap.getImmediateChild(e)):new dl(this.source,Xs(this.path),this.snap)}}class hl{constructor(e,t,n){this.source=e,this.path=t,this.children=n,this.type=al.MERGE}operationForChild(e){if(ra(this.path)){const t=this.children.subtree(new Gs(e));return t.isEmpty()?null:t.value?new dl(this.source,Ys(),t.value):new hl(this.source,Ys(),t)}return Er(Qs(this.path)===e,"Can't get a merge for a child not on the path of the operation"),new hl(this.source,Xs(this.path),this.children)}toString(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"}}class pl{constructor(e,t,n){this.node_=e,this.fullyInitialized_=t,this.filtered_=n}isFullyInitialized(){return this.fullyInitialized_}isFiltered(){return this.filtered_}isCompleteForPath(e){if(ra(e))return this.isFullyInitialized()&&!this.filtered_;const t=Qs(e);return this.isCompleteForChild(t)}isCompleteForChild(e){return this.isFullyInitialized()&&!this.filtered_||this.node_.hasChild(e)}getNode(){return this.node_}}class fl{constructor(e){this.query_=e,this.index_=this.query_._queryParams.getIndex()}}function ml(e,t,n,r,i,o){const s=r.filter((e=>e.type===n));s.sort(((t,n)=>function(e,t,n){if(null==t.childName||null==n.childName)throw Cr("Should only compare child_ events.");const r=new fa(t.childName,t.snapshotNode),i=new fa(n.childName,n.snapshotNode);return e.index_.compare(r,i)}(e,t,n))),s.forEach((n=>{const r=function(e,t,n){return"value"===t.type||"child_removed"===t.type||(t.prevName=n.getPredecessorChildName(t.childName,t.snapshotNode,e.index_)),t}(e,n,o);i.forEach((i=>{i.respondsTo(n.type)&&t.push(i.createEvent(r,e.query_))}))}))}function gl(e,t){return{eventCache:e,serverCache:t}}function yl(e,t,n,r){return gl(new pl(t,n,r),e.serverCache)}function vl(e,t,n,r){return gl(e.eventCache,new pl(t,n,r))}function _l(e){return e.eventCache.isFullyInitialized()?e.eventCache.getNode():null}function bl(e){return e.serverCache.isFullyInitialized()?e.serverCache.getNode():null}let wl;class Sl{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(wl||(wl=new wa(ps)),wl);this.value=e,this.children=t}static fromObject(e){let t=new Sl(null);return ys(e,((e,n)=>{t=t.set(new Gs(e),n)})),t}isEmpty(){return null===this.value&&this.children.isEmpty()}findRootMostMatchingPathAndValue(e,t){if(null!=this.value&&t(this.value))return{path:Ys(),value:this.value};if(ra(e))return null;{const n=Qs(e),r=this.children.get(n);if(null!==r){const i=r.findRootMostMatchingPathAndValue(Xs(e),t);if(null!=i){return{path:na(new Gs(n),i.path),value:i.value}}return null}return null}}findRootMostValueAndPath(e){return this.findRootMostMatchingPathAndValue(e,(()=>!0))}subtree(e){if(ra(e))return this;{const t=Qs(e),n=this.children.get(t);return null!==n?n.subtree(Xs(e)):new Sl(null)}}set(e,t){if(ra(e))return new Sl(t,this.children);{const n=Qs(e),r=(this.children.get(n)||new Sl(null)).set(Xs(e),t),i=this.children.insert(n,r);return new Sl(this.value,i)}}remove(e){if(ra(e))return this.children.isEmpty()?new Sl(null):new Sl(null,this.children);{const t=Qs(e),n=this.children.get(t);if(n){const r=n.remove(Xs(e));let i;return i=r.isEmpty()?this.children.remove(t):this.children.insert(t,r),null===this.value&&i.isEmpty()?new Sl(null):new Sl(this.value,i)}return this}}get(e){if(ra(e))return this.value;{const t=Qs(e),n=this.children.get(t);return n?n.get(Xs(e)):null}}setTree(e,t){if(ra(e))return t;{const n=Qs(e),r=(this.children.get(n)||new Sl(null)).setTree(Xs(e),t);let i;return i=r.isEmpty()?this.children.remove(n):this.children.insert(n,r),new Sl(this.value,i)}}fold(e){return this.fold_(Ys(),e)}fold_(e,t){const n={};return this.children.inorderTraversal(((r,i)=>{n[r]=i.fold_(na(e,r),t)})),t(e,this.value,n)}findOnPath(e,t){return this.findOnPath_(e,Ys(),t)}findOnPath_(e,t,n){const r=!!this.value&&n(t,this.value);if(r)return r;if(ra(e))return null;{const r=Qs(e),i=this.children.get(r);return i?i.findOnPath_(Xs(e),na(t,r),n):null}}foreachOnPath(e,t){return this.foreachOnPath_(e,Ys(),t)}foreachOnPath_(e,t,n){if(ra(e))return this;{this.value&&n(t,this.value);const r=Qs(e),i=this.children.get(r);return i?i.foreachOnPath_(Xs(e),na(t,r),n):new Sl(null)}}foreach(e){this.foreach_(Ys(),e)}foreach_(e,t){this.children.inorderTraversal(((n,r)=>{r.foreach_(na(e,n),t)})),this.value&&t(e,this.value)}foreachChild(e){this.children.inorderTraversal(((t,n)=>{n.value&&e(t,n.value)}))}}class El{constructor(e){this.writeTree_=e}static empty(){return new El(new Sl(null))}}function Cl(e,t,n){if(ra(t))return new El(new Sl(n));{const r=e.writeTree_.findRootMostValueAndPath(t);if(null!=r){const i=r.path;let o=r.value;const s=ia(i,t);return o=o.updateChild(s,n),new El(e.writeTree_.set(i,o))}{const r=new Sl(n),i=e.writeTree_.setTree(t,r);return new El(i)}}}function kl(e,t,n){let r=e;return ys(n,((e,n)=>{r=Cl(r,na(t,e),n)})),r}function xl(e,t){if(ra(t))return El.empty();{const n=e.writeTree_.setTree(t,new Sl(null));return new El(n)}}function Tl(e,t){return null!=Il(e,t)}function Il(e,t){const n=e.writeTree_.findRootMostValueAndPath(t);return null!=n?e.writeTree_.get(n.path).getChild(ia(n.path,t)):null}function Pl(e){const t=[],n=e.writeTree_.value;return null!=n?n.isLeafNode()||n.forEachChild(Ra,((e,n)=>{t.push(new fa(e,n))})):e.writeTree_.children.inorderTraversal(((e,n)=>{null!=n.value&&t.push(new fa(e,n.value))})),t}function Al(e,t){if(ra(t))return e;{const n=Il(e,t);return new El(null!=n?new Sl(n):e.writeTree_.subtree(t))}}function Rl(e){return e.writeTree_.isEmpty()}function Nl(e,t){return Ol(Ys(),e.writeTree_,t)}function Ol(e,t,n){if(null!=t.value)return n.updateChild(e,t.value);{let r=null;return t.children.inorderTraversal(((t,i)=>{".priority"===t?(Er(null!==i.value,"Priority writes must always be leaf nodes"),r=i.value):n=Ol(na(e,t),i,n)})),n.getChild(e).isEmpty()||null===r||(n=n.updateChild(na(e,".priority"),r)),n}}function Dl(e,t){return Kl(t,e)}function Ll(e,t){const n=e.allWrites.findIndex((e=>e.writeId===t));Er(n>=0,"removeWrite called with nonexistent writeId.");const r=e.allWrites[n];e.allWrites.splice(n,1);let i=r.visible,o=!1,s=e.allWrites.length-1;for(;i&&s>=0;){const t=e.allWrites[s];t.visible&&(s>=n&&Ml(t,r.path)?i=!1:aa(r.path,t.path)&&(o=!0)),s--}if(i){if(o)return function(e){e.visibleWrites=jl(e.allWrites,Fl,Ys()),e.allWrites.length>0?e.lastWriteId=e.allWrites[e.allWrites.length-1].writeId:e.lastWriteId=-1}(e),!0;if(r.snap)e.visibleWrites=xl(e.visibleWrites,r.path);else{ys(r.children,(t=>{e.visibleWrites=xl(e.visibleWrites,na(r.path,t))}))}return!0}return!1}function Ml(e,t){if(e.snap)return aa(e.path,t);for(const n in e.children)if(e.children.hasOwnProperty(n)&&aa(na(e.path,n),t))return!0;return!1}function Fl(e){return e.visible}function jl(e,t,n){let r=El.empty();for(let i=0;i{r=r.updateImmediateChild(e,t)})),r;if(n){const i=Al(e.visibleWrites,t);return n.forEachChild(Ra,((e,t)=>{const n=Nl(Al(i,new Gs(e)),t);r=r.updateImmediateChild(e,n)})),Pl(i).forEach((e=>{r=r.updateImmediateChild(e.name,e.node)})),r}return Pl(Al(e.visibleWrites,t)).forEach((e=>{r=r.updateImmediateChild(e.name,e.node)})),r}(e.writeTree,e.treePath,t)}function Bl(e,t,n,r){return function(e,t,n,r,i){Er(r||i,"Either existingEventSnap or existingServerSnap must exist");const o=na(t,n);if(Tl(e.visibleWrites,o))return null;{const t=Al(e.visibleWrites,o);return Rl(t)?i.getChild(n):Nl(t,i.getChild(n))}}(e.writeTree,e.treePath,t,n,r)}function Wl(e,t){return function(e,t){return Il(e.visibleWrites,t)}(e.writeTree,na(e.treePath,t))}function Hl(e,t,n,r,i,o){return function(e,t,n,r,i,o,s){let a;const l=Al(e.visibleWrites,t),c=Il(l,Ys());if(null!=c)a=c;else{if(null==n)return[];a=Nl(l,n)}if(a=a.withIndex(s),a.isEmpty()||a.isLeafNode())return[];{const e=[],t=s.getCompare(),n=o?a.getReverseIteratorFrom(r,s):a.getIteratorFrom(r,s);let l=n.getNext();for(;l&&e.length2&&void 0!==arguments[2]?arguments[2]:null;this.writes_=e,this.viewCache_=t,this.optCompleteServerCache_=n}getCompleteChild(e){const t=this.viewCache_.eventCache;if(t.isCompleteForChild(e))return t.getNode().getImmediateChild(e);{const t=null!=this.optCompleteServerCache_?new pl(this.optCompleteServerCache_,!0,!1):this.viewCache_.serverCache;return Vl(this.writes_,e,t)}}getChildAfterChild(e,t,n){const r=null!=this.optCompleteServerCache_?this.optCompleteServerCache_:bl(this.viewCache_),i=Hl(this.writes_,r,t,1,n,e);return 0===i.length?null:i[0]}}function Jl(e,t,n,r,i){const o=new Gl;let s,a;if(n.type===al.OVERWRITE){const l=n;l.source.fromUser?s=ec(e,t,l.path,l.snap,r,i,o):(Er(l.source.fromServer,"Unknown source."),a=l.source.tagged||t.serverCache.isFiltered()&&!ra(l.path),s=Zl(e,t,l.path,l.snap,r,i,a,o))}else if(n.type===al.MERGE){const l=n;l.source.fromUser?s=function(e,t,n,r,i,o,s){let a=t;return r.foreach(((r,l)=>{const c=na(n,r);tc(t,Qs(c))&&(a=ec(e,a,c,l,i,o,s))})),r.foreach(((r,l)=>{const c=na(n,r);tc(t,Qs(c))||(a=ec(e,a,c,l,i,o,s))})),a}(e,t,l.path,l.children,r,i,o):(Er(l.source.fromServer,"Unknown source."),a=l.source.tagged||t.serverCache.isFiltered(),s=rc(e,t,l.path,l.children,r,i,a,o))}else if(n.type===al.ACK_USER_WRITE){const a=n;s=a.revert?function(e,t,n,r,i,o){let s;if(null!=Wl(r,n))return t;{const a=new Ql(r,t,i),l=t.eventCache.getNode();let c;if(ra(n)||".priority"===Qs(n)){let n;if(t.serverCache.isFullyInitialized())n=$l(r,bl(t));else{const e=t.serverCache.getNode();Er(e instanceof Ua,"serverChildren would be complete if leaf node"),n=zl(r,e)}c=e.filter.updateFullNode(l,n,o)}else{const i=Qs(n);let u=Vl(r,i,t.serverCache);null==u&&t.serverCache.isCompleteForChild(i)&&(u=l.getImmediateChild(i)),c=null!=u?e.filter.updateChild(l,i,u,Xs(n),a,o):t.eventCache.getNode().hasChild(i)?e.filter.updateChild(l,i,Ua.EMPTY_NODE,Xs(n),a,o):l,c.isEmpty()&&t.serverCache.isFullyInitialized()&&(s=$l(r,bl(t)),s.isLeafNode()&&(c=e.filter.updateFullNode(c,s,o)))}return s=t.serverCache.isFullyInitialized()||null!=Wl(r,Ys()),yl(t,c,s,e.filter.filtersNodes())}}(e,t,a.path,r,i,o):function(e,t,n,r,i,o,s){if(null!=Wl(i,n))return t;const a=t.serverCache.isFiltered(),l=t.serverCache;if(null!=r.value){if(ra(n)&&l.isFullyInitialized()||l.isCompleteForPath(n))return Zl(e,t,n,l.getNode().getChild(n),i,o,a,s);if(ra(n)){let r=new Sl(null);return l.getNode().forEachChild(va,((e,t)=>{r=r.set(new Gs(e),t)})),rc(e,t,n,r,i,o,a,s)}return t}{let c=new Sl(null);return r.foreach(((e,t)=>{const r=na(n,e);l.isCompleteForPath(r)&&(c=c.set(e,l.getNode().getChild(r)))})),rc(e,t,n,c,i,o,a,s)}}(e,t,a.path,a.affectedTree,r,i,o)}else{if(n.type!==al.LISTEN_COMPLETE)throw Cr("Unknown operation type: "+n.type);s=function(e,t,n,r,i){const o=t.serverCache,s=vl(t,o.getNode(),o.isFullyInitialized()||ra(n),o.isFiltered());return Xl(e,s,n,r,Yl,i)}(e,t,n.path,r,o)}const l=o.getChanges();return function(e,t,n){const r=t.eventCache;if(r.isFullyInitialized()){const i=r.getNode().isLeafNode()||r.getNode().isEmpty(),o=_l(e);(n.length>0||!e.eventCache.isFullyInitialized()||i&&!r.getNode().equals(o)||!r.getNode().getPriority().equals(o.getPriority()))&&n.push(Ha(_l(t)))}}(t,s,l),{viewCache:s,changes:l}}function Xl(e,t,n,r,i,o){const s=t.eventCache;if(null!=Wl(r,n))return t;{let a,l;if(ra(n))if(Er(t.serverCache.isFullyInitialized(),"If change path is empty, we must have complete server data"),t.serverCache.isFiltered()){const n=bl(t),i=zl(r,n instanceof Ua?n:Ua.EMPTY_NODE);a=e.filter.updateFullNode(t.eventCache.getNode(),i,o)}else{const n=$l(r,bl(t));a=e.filter.updateFullNode(t.eventCache.getNode(),n,o)}else{const c=Qs(n);if(".priority"===c){Er(1===Js(n),"Can't have a priority with additional path components");const i=s.getNode();l=t.serverCache.getNode();const o=Bl(r,n,i,l);a=null!=o?e.filter.updatePriority(i,o):s.getNode()}else{const u=Xs(n);let d;if(s.isCompleteForChild(c)){l=t.serverCache.getNode();const e=Bl(r,n,s.getNode(),l);d=null!=e?s.getNode().getImmediateChild(c).updateChild(u,e):s.getNode().getImmediateChild(c)}else d=Vl(r,c,t.serverCache);a=null!=d?e.filter.updateChild(s.getNode(),c,d,u,i,o):s.getNode()}}return yl(t,a,s.isFullyInitialized()||ra(n),e.filter.filtersNodes())}}function Zl(e,t,n,r,i,o,s,a){const l=t.serverCache;let c;const u=s?e.filter:e.filter.getIndexedFilter();if(ra(n))c=u.updateFullNode(l.getNode(),r,null);else if(u.filtersNodes()&&!l.isFiltered()){const e=l.getNode().updateChild(n,r);c=u.updateFullNode(l.getNode(),e,null)}else{const e=Qs(n);if(!l.isCompleteForPath(n)&&Js(n)>1)return t;const i=Xs(n),o=l.getNode().getImmediateChild(e).updateChild(i,r);c=".priority"===e?u.updatePriority(l.getNode(),o):u.updateChild(l.getNode(),e,o,i,Yl,null)}const d=vl(t,c,l.isFullyInitialized()||ra(n),u.filtersNodes());return Xl(e,d,n,i,new Ql(i,d,o),a)}function ec(e,t,n,r,i,o,s){const a=t.eventCache;let l,c;const u=new Ql(i,t,o);if(ra(n))c=e.filter.updateFullNode(t.eventCache.getNode(),r,s),l=yl(t,c,!0,e.filter.filtersNodes());else{const i=Qs(n);if(".priority"===i)c=e.filter.updatePriority(t.eventCache.getNode(),r),l=yl(t,c,a.isFullyInitialized(),a.isFiltered());else{const o=Xs(n),c=a.getNode().getImmediateChild(i);let d;if(ra(o))d=r;else{const e=u.getCompleteChild(i);d=null!=e?".priority"===Zs(o)&&e.getChild(ta(o)).isEmpty()?e:e.updateChild(o,r):Ua.EMPTY_NODE}if(c.equals(d))l=t;else{l=yl(t,e.filter.updateChild(a.getNode(),i,d,o,u,s),a.isFullyInitialized(),e.filter.filtersNodes())}}}return l}function tc(e,t){return e.eventCache.isCompleteForChild(t)}function nc(e,t,n){return n.foreach(((e,n)=>{t=t.updateChild(e,n)})),t}function rc(e,t,n,r,i,o,s,a){if(t.serverCache.getNode().isEmpty()&&!t.serverCache.isFullyInitialized())return t;let l,c=t;l=ra(n)?r:new Sl(null).setTree(n,r);const u=t.serverCache.getNode();return l.children.inorderTraversal(((n,r)=>{if(u.hasChild(n)){const l=nc(0,t.serverCache.getNode().getImmediateChild(n),r);c=Zl(e,c,new Gs(n),l,i,o,s,a)}})),l.children.inorderTraversal(((n,r)=>{const l=!t.serverCache.isCompleteForChild(n)&&null===r.value;if(!u.hasChild(n)&&!l){const l=nc(0,t.serverCache.getNode().getImmediateChild(n),r);c=Zl(e,c,new Gs(n),l,i,o,s,a)}})),c}class ic{constructor(e,t){this.query_=e,this.eventRegistrations_=[];const n=this.query_._queryParams,r=new Ga(n.getIndex()),i=(o=n).loadsAllData()?new Ga(o.getIndex()):o.hasLimit()?new Qa(o):new Ya(o);var o;this.processor_=function(e){return{filter:e}}(i);const s=t.serverCache,a=t.eventCache,l=r.updateFullNode(Ua.EMPTY_NODE,s.getNode(),null),c=i.updateFullNode(Ua.EMPTY_NODE,a.getNode(),null),u=new pl(l,s.isFullyInitialized(),r.filtersNodes()),d=new pl(c,a.isFullyInitialized(),i.filtersNodes());this.viewCache_=gl(d,u),this.eventGenerator_=new fl(this.query_)}get query(){return this.query_}}function oc(e,t){const n=bl(e.viewCache_);return n&&(e.query._queryParams.loadsAllData()||!ra(t)&&!n.getImmediateChild(Qs(t)).isEmpty())?n.getChild(t):null}function sc(e){return 0===e.eventRegistrations_.length}function ac(e,t,n){const r=[];if(n){Er(null==t,"A cancel should cancel all event registrations.");const i=e.query._path;e.eventRegistrations_.forEach((e=>{const t=e.createCancelEvent(n,i);t&&r.push(t)}))}if(t){let n=[];for(let r=0;r{var n;"child_changed"===t.type&&e.index_.indexedValueChanged(t.oldSnap,t.snapshotNode)&&o.push((n=t.childName,{type:"child_moved",snapshotNode:t.snapshotNode,childName:n}))})),ml(e,i,"child_removed",t,r,n),ml(e,i,"child_added",t,r,n),ml(e,i,"child_moved",o,r,n),ml(e,i,"child_changed",t,r,n),ml(e,i,"value",t,r,n),i}(e.eventGenerator_,t,n,i)}let uc,dc;class hc{constructor(){this.views=new Map}}function pc(e,t,n,r){const i=t.source.queryId;if(null!==i){const o=e.views.get(i);return Er(null!=o,"SyncTree gave us an op for an invalid query."),lc(o,t,n,r)}{let i=[];for(const o of e.views.values())i=i.concat(lc(o,t,n,r));return i}}function fc(e,t,n,r,i){const o=t._queryIdentifier,s=e.views.get(o);if(!s){let e=$l(n,i?r:null),o=!1;e?o=!0:r instanceof Ua?(e=zl(n,r),o=!1):(e=Ua.EMPTY_NODE,o=!1);const s=gl(new pl(e,o,!1),new pl(r,i,!1));return new ic(t,s)}return s}function mc(e,t,n,r,i,o){const s=fc(e,t,r,i,o);return e.views.has(t._queryIdentifier)||e.views.set(t._queryIdentifier,s),function(e,t){e.eventRegistrations_.push(t)}(s,n),function(e,t){const n=e.viewCache_.eventCache,r=[];n.getNode().isLeafNode()||n.getNode().forEachChild(Ra,((e,t)=>{r.push(Va(e,t))}));return n.isFullyInitialized()&&r.push(Ha(n.getNode())),cc(e,r,n.getNode(),t)}(s,n)}function gc(e,t,n,r){const i=t._queryIdentifier,o=[];let s=[];const a=wc(e);if("default"===i)for(const[l,c]of e.views.entries())s=s.concat(ac(c,n,r)),sc(c)&&(e.views.delete(l),c.query._queryParams.loadsAllData()||o.push(c.query));else{const t=e.views.get(i);t&&(s=s.concat(ac(t,n,r)),sc(t)&&(e.views.delete(i),t.query._queryParams.loadsAllData()||o.push(t.query)))}return a&&!wc(e)&&o.push(new(Er(uc,"Reference.ts has not been loaded"),uc)(t._repo,t._path)),{removed:o,events:s}}function yc(e){const t=[];for(const n of e.views.values())n.query._queryParams.loadsAllData()||t.push(n);return t}function vc(e,t){let n=null;for(const r of e.views.values())n=n||oc(r,t);return n}function _c(e,t){if(t._queryParams.loadsAllData())return Sc(e);{const n=t._queryIdentifier;return e.views.get(n)}}function bc(e,t){return null!=_c(e,t)}function wc(e){return null!=Sc(e)}function Sc(e){for(const t of e.views.values())if(t.query._queryParams.loadsAllData())return t;return null}let Ec=1;class Cc{constructor(e){this.listenProvider_=e,this.syncPointTree_=new Sl(null),this.pendingWriteTree_={visibleWrites:El.empty(),allWrites:[],lastWriteId:-1},this.tagToQueryMap=new Map,this.queryToTagMap=new Map}}function kc(e,t,n,r,i){return function(e,t,n,r,i){Er(r>e.lastWriteId,"Stacking an older write on top of newer ones"),void 0===i&&(i=!0),e.allWrites.push({path:t,snap:n,writeId:r,visible:i}),i&&(e.visibleWrites=Cl(e.visibleWrites,t,n)),e.lastWriteId=r}(e.pendingWriteTree_,t,n,r,i),i?Dc(e,new dl({fromUser:!0,fromServer:!1,queryId:null,tagged:!1},t,n)):[]}function xc(e,t,n,r){!function(e,t,n,r){Er(r>e.lastWriteId,"Stacking an older merge on top of newer ones"),e.allWrites.push({path:t,children:n,writeId:r,visible:!0}),e.visibleWrites=kl(e.visibleWrites,t,n),e.lastWriteId=r}(e.pendingWriteTree_,t,n,r);const i=Sl.fromObject(n);return Dc(e,new hl({fromUser:!0,fromServer:!1,queryId:null,tagged:!1},t,i))}function Tc(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=function(e,t){for(let n=0;n{t=t.set(new Gs(e),!0)})),Dc(e,new cl(r.path,t,n))}return[]}function Ic(e,t,n){return Dc(e,new dl({fromUser:!1,fromServer:!0,queryId:null,tagged:!1},t,n))}function Pc(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const o=t._path,s=e.syncPointTree_.get(o);let a=[];if(s&&("default"===t._queryIdentifier||bc(s,t))){const l=gc(s,t,n,r);0===s.views.size&&(e.syncPointTree_=e.syncPointTree_.remove(o));const c=l.removed;if(a=l.events,!i){const n=-1!==c.findIndex((e=>e._queryParams.loadsAllData())),i=e.syncPointTree_.findOnPath(o,((e,t)=>wc(t)));if(n&&!i){const t=e.syncPointTree_.subtree(o);if(!t.isEmpty()){const n=function(e){return e.fold(((e,t,n)=>{if(t&&wc(t)){return[Sc(t)]}{let e=[];return t&&(e=yc(t)),ys(n,((t,n)=>{e=e.concat(n)})),e}}))}(t);for(let t=0;t0&&!r)if(n){const n=null;e.listenProvider_.stopListening(Wc(t),n)}else c.forEach((t=>{const n=e.queryToTagMap.get(Uc(t));e.listenProvider_.stopListening(Wc(t),n)}))}!function(e,t){for(let n=0;n3&&void 0!==arguments[3]&&arguments[3];const i=t._path;let o=null,s=!1;e.syncPointTree_.foreachOnPath(i,((e,t)=>{const n=ia(e,i);o=o||vc(t,n),s=s||wc(t)}));let a,l=e.syncPointTree_.get(i);if(l?(s=s||wc(l),o=o||vc(l,Ys())):(l=new hc,e.syncPointTree_=e.syncPointTree_.set(i,l)),null!=o)a=!0;else{a=!1,o=Ua.EMPTY_NODE;e.syncPointTree_.subtree(i).foreachChild(((e,t)=>{const n=vc(t,Ys());n&&(o=o.updateImmediateChild(e,n))}))}const c=bc(l,t);if(!c&&!t._queryParams.loadsAllData()){const n=Uc(t);Er(!e.queryToTagMap.has(n),"View does not exist, but we have a tag");const r=Ec++;e.queryToTagMap.set(n,r),e.tagToQueryMap.set(r,n)}let u=mc(l,t,n,Dl(e.pendingWriteTree_,i),o,a);if(!c&&!s&&!r){const n=_c(l,t);u=u.concat(function(e,t,n){const r=t._path,i=jc(e,t),o=Fc(e,n),s=e.listenProvider_.startListening(Wc(t),i,o.hashFn,o.onComplete),a=e.syncPointTree_.subtree(r);if(i)Er(!wc(a.value),"If we're adding a query, it shouldn't be shadowed");else{const t=a.fold(((e,t,n)=>{if(!ra(e)&&t&&wc(t))return[Sc(t).query];{let e=[];return t&&(e=e.concat(yc(t).map((e=>e.query)))),ys(n,((t,n)=>{e=e.concat(n)})),e}}));for(let n=0;n{const r=vc(n,ia(e,t));if(r)return r}));return Ul(r,t,i,n,!0)}function Oc(e,t){const n=t._path;let r=null;e.syncPointTree_.foreachOnPath(n,((e,t)=>{const i=ia(e,n);r=r||vc(t,i)}));let i=e.syncPointTree_.get(n);i?r=r||vc(i,Ys()):(i=new hc,e.syncPointTree_=e.syncPointTree_.set(n,i));const o=null!=r,s=o?new pl(r,!0,!1):null;return function(e){return _l(e.viewCache_)}(fc(i,t,Dl(e.pendingWriteTree_,t._path),o?s.getNode():Ua.EMPTY_NODE,o))}function Dc(e,t){return Lc(t,e.syncPointTree_,null,Dl(e.pendingWriteTree_,Ys()))}function Lc(e,t,n,r){if(ra(e.path))return Mc(e,t,n,r);{const i=t.get(Ys());null==n&&null!=i&&(n=vc(i,Ys()));let o=[];const s=Qs(e.path),a=e.operationForChild(s),l=t.children.get(s);if(l&&a){const e=n?n.getImmediateChild(s):null,t=ql(r,s);o=o.concat(Lc(a,l,e,t))}return i&&(o=o.concat(pc(i,e,r,n))),o}}function Mc(e,t,n,r){const i=t.get(Ys());null==n&&null!=i&&(n=vc(i,Ys()));let o=[];return t.children.inorderTraversal(((t,i)=>{const s=n?n.getImmediateChild(t):null,a=ql(r,t),l=e.operationForChild(t);l&&(o=o.concat(Mc(l,i,s,a)))})),i&&(o=o.concat(pc(i,e,r,n))),o}function Fc(e,t){const n=t.query,r=jc(e,n);return{hashFn:()=>{const e=function(e){return e.viewCache_.serverCache.getNode()}(t)||Ua.EMPTY_NODE;return e.hash()},onComplete:t=>{if("ok"===t)return r?function(e,t,n){const r=$c(e,n);if(r){const n=zc(r),i=n.path,o=n.queryId,s=ia(i,t);return Bc(e,i,new ul(ll(o),s))}return[]}(e,n._path,r):function(e,t){return Dc(e,new ul({fromUser:!1,fromServer:!0,queryId:null,tagged:!1},t))}(e,n._path);{const r=function(e,t){let n="Unknown Error";"too_big"===e?n="The data requested exceeds the maximum size that can be accessed with a single request.":"permission_denied"===e?n="Client doesn't have permission to access the desired data.":"unavailable"===e&&(n="The service is unavailable");const r=new Error(e+" at "+t._path.toString()+": "+n);return r.code=e.toUpperCase(),r}(t,n);return Pc(e,n,null,r)}}}}function jc(e,t){const n=Uc(t);return e.queryToTagMap.get(n)}function Uc(e){return e._path.toString()+"$"+e._queryIdentifier}function $c(e,t){return e.tagToQueryMap.get(t)}function zc(e){const t=e.indexOf("$");return Er(-1!==t&&t{const i=Jc(r,t.getImmediateChild(e),n);i!==r&&(o=o.updateImmediateChild(e,i))})),o}}class Xc{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{children:{},childCount:0};this.name=e,this.parent=t,this.node=n}}function Zc(e,t){let n=t instanceof Gs?t:new Gs(t),r=e,i=Qs(n);for(;null!==i;){const e=Xr(r.node.children,i)||{children:{},childCount:0};r=new Xc(i,r,e),n=Xs(n),i=Qs(n)}return r}function eu(e){return e.node.value}function tu(e,t){e.node.value=t,su(e)}function nu(e){return e.node.childCount>0}function ru(e,t){ys(e.node.children,((n,r)=>{t(new Xc(n,e,r))}))}function iu(e,t,n,r){n&&!r&&t(e),ru(e,(e=>{iu(e,t,!0,r)})),n&&r&&t(e)}function ou(e){return new Gs(null===e.parent?e.name:ou(e.parent)+"/"+e.name)}function su(e){null!==e.parent&&function(e,t,n){const r=function(e){return void 0===eu(e)&&!nu(e)}(n),i=Jr(e.node.children,t);r&&i?(delete e.node.children[t],e.node.childCount--,su(e)):r||i||(e.node.children[t]=n.node,e.node.childCount++,su(e))}(e.parent,e.name,e)}const au=/[\[\].#$\/\u0000-\u001F\u007F]/,lu=/[\[\].#$\u0000-\u001F\u007F]/,cu=10485760,uu=function(e){return"string"===typeof e&&0!==e.length&&!au.test(e)},du=function(e){return"string"===typeof e&&0!==e.length&&!lu.test(e)},hu=function(e){return null===e||"string"===typeof e||"number"===typeof e&&!cs(e)||e&&"object"===typeof e&&Jr(e,".sv")},pu=function(e,t,n,r){r&&void 0===t||fu(ci(e,"value"),t,n)},fu=function(e,t,n){const r=n instanceof Gs?new la(n,e):n;if(void 0===t)throw new Error(e+"contains undefined "+ua(r));if("function"===typeof t)throw new Error(e+"contains a function "+ua(r)+" with contents = "+t.toString());if(cs(t))throw new Error(e+"contains "+t.toString()+" "+ua(r));if("string"===typeof t&&t.length>cu/3&&ui(t)>cu)throw new Error(e+"contains a string greater than "+cu+" utf8 bytes "+ua(r)+" ('"+t.substring(0,50)+"...')");if(t&&"object"===typeof t){let n=!1,i=!1;if(ys(t,((t,o)=>{if(".value"===t)n=!0;else if(".priority"!==t&&".sv"!==t&&(i=!0,!uu(t)))throw new Error(e+" contains an invalid key ("+t+") "+ua(r)+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');!function(e,t){e.parts_.length>0&&(e.byteLength_+=1),e.parts_.push(t),e.byteLength_+=ui(t),ca(e)}(r,t),fu(e,o,r),function(e){const t=e.parts_.pop();e.byteLength_-=ui(t),e.parts_.length>0&&(e.byteLength_-=1)}(r)})),n&&i)throw new Error(e+' contains ".value" child '+ua(r)+" in addition to actual children.")}},mu=function(e,t,n,r){if(r&&void 0===t)return;const i=ci(e,"values");if(!t||"object"!==typeof t||Array.isArray(t))throw new Error(i+" must be an object containing the children to replace.");const o=[];ys(t,((e,t)=>{const r=new Gs(e);if(fu(i,t,na(n,r)),".priority"===Zs(r)&&!hu(t))throw new Error(i+"contains an invalid value for '"+r.toString()+"', which must be a valid Firebase priority (a string, finite number, server value, or null).");o.push(r)})),function(e,t){let n,r;for(n=0;nsa(e,t)))}function Su(e,t,n){bu(e,n),Eu(e,(e=>aa(e,t)||aa(t,e)))}function Eu(e,t){e.recursionDepth_++;let n=!0;for(let r=0;r=0)e.server_=new el(e.repoInfo_,((t,n,r,i)=>{Au(e,t,n,r,i)}),e.authTokenProvider_,e.appCheckProvider_),setTimeout((()=>Ru(e,!0)),0);else{if("undefined"!==typeof n&&null!==n){if("object"!==typeof n)throw new Error("Only objects are supported for option databaseAuthVariableOverride");try{Yr(n)}catch(DE){throw new Error("Invalid authOverride provided: "+DE)}}e.persistentConnection_=new pa(e.repoInfo_,t,((t,n,r,i)=>{Au(e,t,n,r,i)}),(t=>{Ru(e,t)}),(t=>{!function(e,t){ys(t,((t,n)=>{Nu(e,t,n)}))}(e,t)}),e.authTokenProvider_,e.appCheckProvider_,n),e.server_=e.persistentConnection_}e.authTokenProvider_.addTokenChangeListener((t=>{e.server_.refreshAuthToken(t)})),e.appCheckProvider_.addTokenChangeListener((t=>{e.server_.refreshAppCheckToken(t.token)})),e.statsReporter_=function(e,t){const n=e.toString();return Ls[n]||(Ls[n]=t()),Ls[n]}(e.repoInfo_,(()=>new sl(e.stats_,e.server_))),e.infoData_=new tl,e.infoSyncTree_=new Cc({startListening:(t,n,r,i)=>{let o=[];const s=e.infoData_.getNode(t._path);return s.isEmpty()||(o=Ic(e.infoSyncTree_,t._path,s),setTimeout((()=>{i("ok")}),0)),o},stopListening:()=>{}}),Nu(e,"connected",!1),e.serverSyncTree_=new Cc({startListening:(t,n,r,i)=>(e.server_.listen(t,r,n,((n,r)=>{const o=i(n,r);Su(e.eventQueue_,t._path,o)})),[]),stopListening:(t,n)=>{e.server_.unlisten(t,n)}})}function Iu(e){const t=e.infoData_.getNode(new Gs(".info/serverTimeOffset")).val()||0;return(new Date).getTime()+t}function Pu(e){return function(e){return(e=e||{}).timestamp=e.timestamp||(new Date).getTime(),e}({timestamp:Iu(e)})}function Au(e,t,n,r,i){e.dataUpdateCount++;const o=new Gs(t);n=e.interceptServerDataCallback_?e.interceptServerDataCallback_(t,n):n;let s=[];if(i)if(r){const t=ei(n,(e=>za(e)));s=function(e,t,n,r){const i=$c(e,r);if(i){const r=zc(i),o=r.path,s=r.queryId,a=ia(o,t),l=Sl.fromObject(n);return Bc(e,o,new hl(ll(s),a,l))}return[]}(e.serverSyncTree_,o,t,i)}else{const t=za(n);s=Ac(e.serverSyncTree_,o,t,i)}else if(r){const t=ei(n,(e=>za(e)));s=function(e,t,n){const r=Sl.fromObject(n);return Dc(e,new hl({fromUser:!1,fromServer:!0,queryId:null,tagged:!1},t,r))}(e.serverSyncTree_,o,t)}else{const t=za(n);s=Ic(e.serverSyncTree_,o,t)}let a=o;s.length>0&&(a=zu(e,o)),Su(e.eventQueue_,a,s)}function Ru(e,t){Nu(e,"connected",t),!1===t&&function(e){Fu(e,"onDisconnectEvents");const t=Pu(e),n=nl();il(e.onDisconnect_,Ys(),((r,i)=>{const o=Yc(r,i,e.serverSyncTree_,t);rl(n,r,o)}));let r=[];il(n,Ys(),((t,n)=>{r=r.concat(Ic(e.serverSyncTree_,t,n));const i=qu(e,t);zu(e,i)})),e.onDisconnect_=nl(),Su(e.eventQueue_,Ys(),r)}(e)}function Nu(e,t,n){const r=new Gs("/.info/"+t),i=za(n);e.infoData_.updateSnapshot(r,i);const o=Ic(e.infoSyncTree_,r,i);Su(e.eventQueue_,r,o)}function Ou(e){return e.nextWriteId_++}function Du(e,t,n,r,i){Fu(e,"set",{path:t.toString(),value:n,priority:r});const o=Pu(e),s=za(n,r),a=Nc(e.serverSyncTree_,t),l=Qc(s,a,o),c=Ou(e),u=kc(e.serverSyncTree_,t,l,c,!0);bu(e.eventQueue_,u),e.server_.put(t.toString(),s.val(!0),((n,r)=>{const o="ok"===n;o||ls("set at "+t+" failed: "+n);const s=Tc(e.serverSyncTree_,c,!o);Su(e.eventQueue_,t,s),ju(e,i,n,r)}));const d=qu(e,t);zu(e,d),Su(e.eventQueue_,d,[])}function Lu(e,t,n){let r;r=".info"===Qs(t._path)?Pc(e.infoSyncTree_,t,n):Pc(e.serverSyncTree_,t,n),wu(e.eventQueue_,t._path,r)}function Mu(e){e.persistentConnection_&&e.persistentConnection_.interrupt(ku)}function Fu(e){let t="";e.persistentConnection_&&(t=e.persistentConnection_.id+":");for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{if("ok"===n)t(null);else{const e=(n||"error").toUpperCase();let i=e;r&&(i+=": "+r);const o=new Error(i);o.code=e,t(o)}}))}function Uu(e,t,n){return Nc(e.serverSyncTree_,t,n)||Ua.EMPTY_NODE}function $u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.transactionQueueTree_;if(t||Vu(e,t),eu(t)){const n=Wu(e,t);Er(n.length>0,"Sending zero length transaction queue");n.every((e=>0===e.status))&&function(e,t,n){const r=n.map((e=>e.currentWriteId)),i=Uu(e,t,r);let o=i;const s=i.hash();for(let c=0;c{Fu(e,"transaction put response",{path:l.toString(),status:r});let i=[];if("ok"===r){const r=[];for(let t=0;tn[t].onComplete(null,!0,n[t].currentOutputSnapshotResolved))),n[t].unwatcher();Vu(e,Zc(e.transactionQueueTree_,t)),$u(e,e.transactionQueueTree_),Su(e.eventQueue_,t,i);for(let e=0;e{$u(e,t)}))}function zu(e,t){const n=Bu(e,t),r=ou(n);return function(e,t,n){if(0===t.length)return;const r=[];let i=[];const o=t.filter((e=>0===e.status)),s=o.map((e=>e.currentWriteId));for(let l=0;l=25)d=!0,u="maxretry",i=i.concat(Tc(e.serverSyncTree_,o.currentWriteId,!0));else{const n=Uu(e,o.path,s);o.currentInputSnapshot=n;const r=t[l].update(n.val());if(void 0!==r){fu("transaction failed: Data returned ",r,o.path);let t=za(r);"object"===typeof r&&null!=r&&Jr(r,".priority")||(t=t.updatePriority(n.getPriority()));const a=o.currentWriteId,l=Pu(e),c=Qc(t,n,l);o.currentOutputSnapshotRaw=t,o.currentOutputSnapshotResolved=c,o.currentWriteId=Ou(e),s.splice(s.indexOf(a),1),i=i.concat(kc(e.serverSyncTree_,o.path,c,o.currentWriteId,o.applyLocally)),i=i.concat(Tc(e.serverSyncTree_,a,!0))}else d=!0,u="nodata",i=i.concat(Tc(e.serverSyncTree_,o.currentWriteId,!0))}Su(e.eventQueue_,n,i),i=[],d&&(t[l].status=2,a=t[l].unwatcher,setTimeout(a,Math.floor(0)),t[l].onComplete&&("nodata"===u?r.push((()=>t[l].onComplete(null,!1,t[l].currentInputSnapshot))):r.push((()=>t[l].onComplete(new Error(u),!1,null)))))}var a;Vu(e,e.transactionQueueTree_);for(let l=0;le.order-t.order)),n}function Hu(e,t,n){const r=eu(t);if(r)for(let i=0;i{Hu(e,t,n)}))}function Vu(e,t){const n=eu(t);if(n){let e=0;for(let t=0;t0?n:void 0)}ru(t,(t=>{Vu(e,t)}))}function qu(e,t){const n=ou(Bu(e,t)),r=Zc(e.transactionQueueTree_,t);return function(e,t,n){let r=n?e:e.parent;for(;null!==r;){if(t(r))return!0;r=r.parent}}(r,(t=>{Ku(e,t)})),Ku(e,r),iu(r,(t=>{Ku(e,t)})),n}function Ku(e,t){const n=eu(t);if(n){const r=[];let i=[],o=-1;for(let t=0;t.firebaseio.com instead"),r&&"undefined"!==r||"localhost"===n.domain||as("Cannot parse Firebase url. Please use https://.firebaseio.com"),n.secure||"undefined"!==typeof window&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&ls("Insecure Firebase access from a secure page. Please use https in calls to new Firebase().");const i="ws"===n.scheme||"wss"===n.scheme;return{repoInfo:new Rs(n.host,n.secure,r,i,t,"",r!==n.subdomain),path:new Gs(n.pathString)}},Yu=function(e){let t="",n="",r="",i="",o="",s=!0,a="https",l=443;if("string"===typeof e){let c=e.indexOf("//");c>=0&&(a=e.substring(0,c-1),e=e.substring(c+2));let u=e.indexOf("/");-1===u&&(u=e.length);let d=e.indexOf("?");-1===d&&(d=e.length),t=e.substring(0,Math.min(u,d)),u0){let e=n[r];try{e=decodeURIComponent(e.replace(/\+/g," "))}catch(DE){}t+="/"+e}return t}(e.substring(u,d)));const h=function(e){const t={};"?"===e.charAt(0)&&(e=e.substring(1));for(const n of e.split("&")){if(0===n.length)continue;const r=n.split("=");2===r.length?t[decodeURIComponent(r[0])]=decodeURIComponent(r[1]):ls(`Invalid query segment '${n}' in query '${e}'`)}return t}(e.substring(Math.min(e.length,d)));c=t.indexOf(":"),c>=0?(s="https"===a||"wss"===a,l=parseInt(t.substring(c+1),10)):c=t.length;const p=t.slice(0,c);if("localhost"===p.toLowerCase())n="localhost";else if(p.split(".").length<=2)n=p;else{const e=t.indexOf(".");r=t.substring(0,e).toLowerCase(),n=t.substring(e+1),o=r}"ns"in h&&(o=h.ns)}return{host:t,port:l,domain:n,subdomain:r,secure:s,scheme:a,pathString:i,namespace:o}},Qu="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz";!function(){let e=0;const t=[]}();class Ju{constructor(e,t,n,r){this.eventType=e,this.eventRegistration=t,this.snapshot=n,this.prevName=r}getPath(){const e=this.snapshot.ref;return"value"===this.eventType?e._path:e.parent._path}getEventType(){return this.eventType}getEventRunner(){return this.eventRegistration.getEventRunner(this)}toString(){return this.getPath().toString()+":"+this.eventType+":"+Yr(this.snapshot.exportVal())}}class Xu{constructor(e,t,n){this.eventRegistration=e,this.error=t,this.path=n}getPath(){return this.path}getEventType(){return"cancel"}getEventRunner(){return this.eventRegistration.getEventRunner(this)}toString(){return this.path.toString()+":cancel"}}class Zu{constructor(e,t){this.snapshotCallback=e,this.cancelCallback=t}onValue(e,t){this.snapshotCallback.call(null,e,t)}onCancel(e){return Er(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||void 0!==this.snapshotCallback.userCallback&&this.snapshotCallback.userCallback===e.snapshotCallback.userCallback&&this.snapshotCallback.context===e.snapshotCallback.context}}class ed{constructor(e,t,n,r){this._repo=e,this._path=t,this._queryParams=n,this._orderByCalled=r}get key(){return ra(this._path)?null:Zs(this._path)}get ref(){return new td(this._repo,this._path)}get _queryIdentifier(){const e=Za(this._queryParams),t=ms(e);return"{}"===t?"default":t}get _queryObject(){return Za(this._queryParams)}isEqual(e){if(!((e=di(e))instanceof ed))return!1;const t=this._repo===e._repo,n=sa(this._path,e._path),r=this._queryIdentifier===e._queryIdentifier;return t&&n&&r}toJSON(){return this.toString()}toString(){return this._repo.toString()+function(e){let t="";for(let n=e.pieceNum_;ne(new nd(n,id(this.ref,t),Ra))))}hasChild(e){const t=new Gs(e);return!this._node.getChild(t).isEmpty()}hasChildren(){return!this._node.isLeafNode()&&!this._node.isEmpty()}toJSON(){return this.exportVal()}val(){return this._node.val()}}function rd(e,t){return(e=di(e))._checkNotDeleted("ref"),void 0!==t?id(e._root,t):e._root}function id(e,t){var n,r,i,o;return null===Qs((e=di(e))._path)?(n="child",r="path",o=!1,(i=t)&&(i=i.replace(/^\/*\.info(\/|$)/,"/")),gu(n,r,i,o)):gu("child","path",t,!1),new td(e._repo,na(e._path,t))}function od(e){return yu("remove",e._path),sd(e,null)}function sd(e,t){e=di(e),yu("set",e._path),pu("set",t,e._path,!1);const n=new Ur;return Du(e._repo,e._path,t,null,n.wrapCallback((()=>{}))),n.promise}function ad(e,t){mu("update",t,e._path,!1);const n=new Ur;return function(e,t,n,r){Fu(e,"update",{path:t.toString(),value:n});let i=!0;const o=Pu(e),s={};if(ys(n,((n,r)=>{i=!1,s[n]=Yc(na(t,n),za(r),e.serverSyncTree_,o)})),i)is("update() called with empty data. Don't do anything."),ju(0,r,"ok",void 0);else{const i=Ou(e),o=xc(e.serverSyncTree_,t,s,i);bu(e.eventQueue_,o),e.server_.merge(t.toString(),n,((n,o)=>{const s="ok"===n;s||ls("update at "+t+" failed: "+n);const a=Tc(e.serverSyncTree_,i,!s),l=a.length>0?zu(e,t):t;Su(e.eventQueue_,l,a),ju(0,r,n,o)})),ys(n,(n=>{const r=qu(e,na(t,n));zu(e,r)})),Su(e.eventQueue_,t,[])}}(e._repo,e._path,t,n.wrapCallback((()=>{}))),n.promise}function ld(e){e=di(e);const t=new Zu((()=>{})),n=new cd(t);return function(e,t,n){const r=Oc(e.serverSyncTree_,t);return null!=r?Promise.resolve(r):e.server_.get(t).then((r=>{const i=za(r).withIndex(t._queryParams.getIndex());let o;if(Rc(e.serverSyncTree_,t,n,!0),t._queryParams.loadsAllData())o=Ic(e.serverSyncTree_,t._path,i);else{const n=jc(e.serverSyncTree_,t);o=Ac(e.serverSyncTree_,t._path,i,n)}return Su(e.eventQueue_,t._path,o),Pc(e.serverSyncTree_,t,n,null,!0),i}),(n=>(Fu(e,"get for query "+Yr(t)+" failed: "+n),Promise.reject(new Error(n)))))}(e._repo,e,n).then((t=>new nd(t,new td(e._repo,e._path),e._queryParams.getIndex())))}class cd{constructor(e){this.callbackContext=e}respondsTo(e){return"value"===e}createEvent(e,t){const n=t._queryParams.getIndex();return new Ju("value",this,new nd(e.snapshotNode,new td(t._repo,t._path),n))}getEventRunner(e){return"cancel"===e.getEventType()?()=>this.callbackContext.onCancel(e.error):()=>this.callbackContext.onValue(e.snapshot,null)}createCancelEvent(e,t){return this.callbackContext.hasCancelCallback?new Xu(this,e,t):null}matches(e){return e instanceof cd&&(!e.callbackContext||!this.callbackContext||e.callbackContext.matches(this.callbackContext))}hasAnyCallback(){return null!==this.callbackContext}}class ud{constructor(e,t){this.eventType=e,this.callbackContext=t}respondsTo(e){let t="children_added"===e?"child_added":e;return t="children_removed"===t?"child_removed":t,this.eventType===t}createCancelEvent(e,t){return this.callbackContext.hasCancelCallback?new Xu(this,e,t):null}createEvent(e,t){Er(null!=e.childName,"Child events should have a childName.");const n=id(new td(t._repo,t._path),e.childName),r=t._queryParams.getIndex();return new Ju(e.type,this,new nd(e.snapshotNode,n,r),e.prevName)}getEventRunner(e){return"cancel"===e.getEventType()?()=>this.callbackContext.onCancel(e.error):()=>this.callbackContext.onValue(e.snapshot,e.prevName)}matches(e){return e instanceof ud&&(this.eventType===e.eventType&&(!this.callbackContext||!e.callbackContext||this.callbackContext.matches(e.callbackContext)))}hasAnyCallback(){return!!this.callbackContext}}function dd(e,t,n,r,i){let o;if("object"===typeof r&&(o=void 0,i=r),"function"===typeof r&&(o=r),i&&i.onlyOnce){const t=n,r=(n,r)=>{Lu(e._repo,e,a),t(n,r)};r.userCallback=n.userCallback,r.context=n.context,n=r}const s=new Zu(n,o||void 0),a="value"===t?new cd(s):new ud(t,s);return function(e,t,n){let r;r=".info"===Qs(t._path)?Rc(e.infoSyncTree_,t,n):Rc(e.serverSyncTree_,t,n),wu(e.eventQueue_,t._path,r)}(e._repo,e,a),()=>Lu(e._repo,e,a)}function hd(e,t,n,r){return dd(e,"value",t,n,r)}!function(e){Er(!uc,"__referenceConstructor has already been defined"),uc=e}(td),function(e){Er(!dc,"__referenceConstructor has already been defined"),dc=e}(td);const pd={};let fd=!1;function md(e,t,n,r,i){let o=r||e.options.databaseURL;void 0===o&&(e.options.projectId||as("Can't determine Firebase Database URL. Be sure to include a Project ID when calling firebase.initializeApp()."),is("Using default host for project ",e.options.projectId),o=`${e.options.projectId}-default-rtdb.firebaseio.com`);let s,a,l=Gu(o,i),c=l.repoInfo;"undefined"!==typeof process&&(a={NODE_ENV:"production",PUBLIC_URL:"/MyMind-Portal",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyA0wJUn-FIwetZTfPolNklz0NHV7AKaENE",REACT_APP_FIREBASE_APP_ID:"1:265407310518:web:0893e6f15e60c009229417",REACT_APP_FIREBASE_AUTH_DOMAIN:"my-portfolio-f3107.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"https://my-portfolio-f3107-default-rtdb.firebaseio.com/",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-VQL5ESJ2YT",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"265407310518",REACT_APP_FIREBASE_PROJECT_ID:"my-portfolio-f3107",REACT_APP_FIREBASE_STORAGE_BUCKET:"my-portfolio-f3107.appspot.com",REACT_APP_PASSWORD:"myportal123",REACT_APP_USERNAME:"sibisiddharth8@gmail.com"}.FIREBASE_DATABASE_EMULATOR_HOST),a?(s=!0,o=`http://${a}?ns=${c.namespace}`,l=Gu(o,i),c=l.repoInfo):s=!l.repoInfo.secure;const u=i&&s?new ks(ks.OWNER):new Cs(e.name,e.options,t);vu("Invalid Firebase Database URL",l),ra(l.path)||as("Database URL must point to the root of a Firebase Database (not including a child path).");const d=function(e,t,n,r){let i=pd[t.name];i||(i={},pd[t.name]=i);let o=i[e.toURLString()];o&&as("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call.");return o=new xu(e,fd,n,r),i[e.toURLString()]=o,o}(c,e,u,new Es(e.name,n));return new gd(d,e)}class gd{constructor(e,t){this._repoInternal=e,this.app=t,this.type="database",this._instanceStarted=!1}get _repo(){return this._instanceStarted||(Tu(this._repoInternal,this.app.options.appId,this.app.options.databaseAuthVariableOverride),this._instanceStarted=!0),this._repoInternal}get _root(){return this._rootInternal||(this._rootInternal=new td(this._repo,Ys())),this._rootInternal}_delete(){return null!==this._rootInternal&&(!function(e,t){const n=pd[t];n&&n[e.key]===e||as(`Database ${t}(${e.repoInfo_}) has already been deleted.`),Mu(e),delete n[e.key]}(this._repo,this.app.name),this._repoInternal=null,this._rootInternal=null),Promise.resolve()}_checkNotDeleted(e){null===this._rootInternal&&as("Cannot call "+e+" on a deleted database.")}}pa.prototype.simpleListen=function(e,t){this.sendRequest("q",{p:e},t)},pa.prototype.echo=function(e,t){this.sendRequest("echo",{d:e},t)};!function(e){Vo(Io),Eo(new hi("database",((e,t)=>{let{instanceIdentifier:n}=t;return md(e.getProvider("app").getImmediate(),e.getProvider("auth-internal"),e.getProvider("app-check-internal"),n)}),"PUBLIC").setMultipleInstances(!0)),Ro(Bo,Wo,e),Ro(Bo,Wo,"esm2017")}();const yd="firebasestorage.googleapis.com",vd="storageBucket";class _d extends Vr{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;super(Sd(e),`Firebase Storage: ${t} (${Sd(e)})`),this.status_=n,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,_d.prototype)}get status(){return this.status_}set status(e){this.status_=e}_codeEquals(e){return Sd(e)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message=`${this._baseMessage}\n${this.customData.serverResponse}`:this.message=this._baseMessage}}var bd,wd;function Sd(e){return"storage/"+e}function Ed(){return new _d(bd.UNKNOWN,"An unknown error occurred, please check the error payload for server response.")}function Cd(){return new _d(bd.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function kd(){return new _d(bd.CANCELED,"User canceled the upload/download.")}function xd(){return new _d(bd.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function Td(e){return new _d(bd.INVALID_ARGUMENT,e)}function Id(){return new _d(bd.APP_DELETED,"The Firebase app was deleted.")}function Pd(e,t){return new _d(bd.INVALID_FORMAT,"String does not match format '"+e+"': "+t)}function Ad(e){throw new _d(bd.INTERNAL_ERROR,"Internal error: "+e)}!function(e){e.UNKNOWN="unknown",e.OBJECT_NOT_FOUND="object-not-found",e.BUCKET_NOT_FOUND="bucket-not-found",e.PROJECT_NOT_FOUND="project-not-found",e.QUOTA_EXCEEDED="quota-exceeded",e.UNAUTHENTICATED="unauthenticated",e.UNAUTHORIZED="unauthorized",e.UNAUTHORIZED_APP="unauthorized-app",e.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",e.INVALID_CHECKSUM="invalid-checksum",e.CANCELED="canceled",e.INVALID_EVENT_NAME="invalid-event-name",e.INVALID_URL="invalid-url",e.INVALID_DEFAULT_BUCKET="invalid-default-bucket",e.NO_DEFAULT_BUCKET="no-default-bucket",e.CANNOT_SLICE_BLOB="cannot-slice-blob",e.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",e.NO_DOWNLOAD_URL="no-download-url",e.INVALID_ARGUMENT="invalid-argument",e.INVALID_ARGUMENT_COUNT="invalid-argument-count",e.APP_DELETED="app-deleted",e.INVALID_ROOT_OPERATION="invalid-root-operation",e.INVALID_FORMAT="invalid-format",e.INTERNAL_ERROR="internal-error",e.UNSUPPORTED_ENVIRONMENT="unsupported-environment"}(bd||(bd={}));class Rd{constructor(e,t){this.bucket=e,this.path_=t}get path(){return this.path_}get isRoot(){return 0===this.path.length}fullServerUrl(){const e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(e,t){let n;try{n=Rd.makeFromUrl(e,t)}catch(DE){return new Rd(e,"")}if(""===n.path)return n;throw r=e,new _d(bd.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+r+"'.");var r}static makeFromUrl(e,t){let n=null;const r="([A-Za-z0-9.\\-_]+)";const i=new RegExp("^gs://"+r+"(/(.*))?$","i");function o(e){e.path_=decodeURIComponent(e.path)}const s=t.replace(/[.]/g,"\\."),a=[{regex:i,indices:{bucket:1,path:3},postModify:function(e){"/"===e.path.charAt(e.path.length-1)&&(e.path_=e.path_.slice(0,-1))}},{regex:new RegExp(`^https?://${s}/v[A-Za-z0-9_]+/b/${r}/o(/([^?#]*).*)?$`,"i"),indices:{bucket:1,path:3},postModify:o},{regex:new RegExp(`^https?://${t===yd?"(?:storage.googleapis.com|storage.cloud.google.com)":t}/${r}/([^?#]*)`,"i"),indices:{bucket:1,path:2},postModify:o}];for(let l=0;ln)throw Td(`Invalid value for '${e}'. Expected ${n} or less.`)}function Fd(e,t,n){let r=t;return null==n&&(r=`https://${t}`),`${n}://${r}/v0${e}`}function jd(e){const t=encodeURIComponent;let n="?";for(const r in e)if(e.hasOwnProperty(r)){n=n+(t(r)+"="+t(e[r]))+"&"}return n=n.slice(0,-1),n}function Ud(e,t){const n=e>=500&&e<600,r=-1!==[408,429].indexOf(e),i=-1!==t.indexOf(e);return n||r||i}!function(e){e[e.NO_ERROR=0]="NO_ERROR",e[e.NETWORK_ERROR=1]="NETWORK_ERROR",e[e.ABORT=2]="ABORT"}(wd||(wd={}));class $d{constructor(e,t,n,r,i,o,s,a,l,c,u){let d=!(arguments.length>11&&void 0!==arguments[11])||arguments[11];this.url_=e,this.method_=t,this.headers_=n,this.body_=r,this.successCodes_=i,this.additionalRetryCodes_=o,this.callback_=s,this.errorCallback_=a,this.timeout_=l,this.progressCallback_=c,this.connectionFactory_=u,this.retry=d,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise(((e,t)=>{this.resolve_=e,this.reject_=t,this.start_()}))}start_(){const e=(e,t)=>{if(t)return void e(!1,new zd(!1,null,!0));const n=this.connectionFactory_();this.pendingConnection_=n;const r=e=>{const t=e.loaded,n=e.lengthComputable?e.total:-1;null!==this.progressCallback_&&this.progressCallback_(t,n)};null!==this.progressCallback_&&n.addUploadProgressListener(r),n.send(this.url_,this.method_,this.body_,this.headers_).then((()=>{null!==this.progressCallback_&&n.removeUploadProgressListener(r),this.pendingConnection_=null;const t=n.getErrorCode()===wd.NO_ERROR,i=n.getStatus();if(!t||Ud(i,this.additionalRetryCodes_)&&this.retry){const t=n.getErrorCode()===wd.ABORT;return void e(!1,new zd(!1,null,t))}const o=-1!==this.successCodes_.indexOf(i);e(!0,new zd(o,n))}))},t=(e,t)=>{const n=this.resolve_,r=this.reject_,i=t.connection;if(t.wasSuccessCode)try{const e=this.callback_(i,i.getResponse());void 0!==e?n(e):n()}catch(DE){r(DE)}else if(null!==i){const e=Ed();e.serverResponse=i.getErrorText(),this.errorCallback_?r(this.errorCallback_(i,e)):r(e)}else if(t.canceled){r(this.appDelete_?Id():kd())}else{r(Cd())}};this.canceled_?t(0,new zd(!1,null,!0)):this.backoffId_=function(e,t,n){let r=1,i=null,o=null,s=!1,a=0;function l(){return 2===a}let c=!1;function u(){if(!c){c=!0;for(var e=arguments.length,n=new Array(e),r=0;r{i=null,e(p,l())}),t)}function h(){o&&clearTimeout(o)}function p(e){if(c)return void h();for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i{s=!0,m(!0)}),n),m}(e,t,this.timeout_)}getPromise(){return this.promise_}cancel(e){this.canceled_=!0,this.appDelete_=e||!1,null!==this.backoffId_&&(0,this.backoffId_)(!1),null!==this.pendingConnection_&&this.pendingConnection_.abort()}}class zd{constructor(e,t,n){this.wasSuccessCode=e,this.connection=t,this.canceled=!!n}}function Bd(){return"undefined"!==typeof BlobBuilder?BlobBuilder:"undefined"!==typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0}function Wd(){const e=Bd();for(var t=arguments.length,n=new Array(t),r=0;r>6,128|63&r);else if(55296===(64512&r)){if(n>18,128|r>>12&63,128|r>>6&63,128|63&r)}else t.push(239,191,189)}else 56320===(64512&r)?t.push(239,191,189):t.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(t)}function Xd(e,t){switch(e){case qd:{const n=-1!==t.indexOf("-"),r=-1!==t.indexOf("_");if(n||r){throw Pd(e,"Invalid character '"+(n?"-":"_")+"' found: is it base64url encoded?")}break}case Kd:{const n=-1!==t.indexOf("+"),r=-1!==t.indexOf("/");if(n||r){throw Pd(e,"Invalid character '"+(n?"+":"/")+"' found: is it base64 encoded?")}t=t.replace(/-/g,"+").replace(/_/g,"/");break}}let n;try{n=Hd(t)}catch(DE){if(DE.message.includes("polyfill"))throw DE;throw Pd(e,"Invalid character found")}const r=new Uint8Array(n.length);for(let i=0;i][;base64],");const n=t[1]||null;null!=n&&(this.base64=function(e,t){if(!(e.length>=t.length))return!1;return e.substring(e.length-t.length)===t}(n,";base64"),this.contentType=this.base64?n.substring(0,n.length-7):n),this.rest=e.substring(e.indexOf(",")+1)}}class eh{constructor(e,t){let n=0,r="";Dd(e)?(this.data_=e,n=e.size,r=e.type):e instanceof ArrayBuffer?(t?this.data_=new Uint8Array(e):(this.data_=new Uint8Array(e.byteLength),this.data_.set(new Uint8Array(e))),n=this.data_.length):e instanceof Uint8Array&&(t?this.data_=e:(this.data_=new Uint8Array(e.length),this.data_.set(e)),n=e.length),this.size_=n,this.type_=r}size(){return this.size_}type(){return this.type_}slice(e,t){if(Dd(this.data_)){const n=function(e,t,n){return e.webkitSlice?e.webkitSlice(t,n):e.mozSlice?e.mozSlice(t,n):e.slice?e.slice(t,n):null}(this.data_,e,t);return null===n?null:new eh(n)}{const n=new Uint8Array(this.data_.buffer,e,t-e);return new eh(n,!0)}}static getBlob(){for(var e=arguments.length,t=new Array(e),n=0;ne instanceof eh?e.data_:e));return new eh(Wd.apply(null,e))}{const e=t.map((e=>Od(e)?Qd(Vd,e).data:e.data_));let n=0;e.forEach((e=>{n+=e.byteLength}));const r=new Uint8Array(n);let i=0;return e.forEach((e=>{for(let t=0;t{const i=e.bucket,o=e.fullPath;return Fd("/b/"+s(i)+"/o/"+s(o),n,r)+jd({alt:"media",token:t})}));return a[0]}(i,r,e.host,e._protocol)}}function fh(e){return function(t,n){let r;var i,o;return 401===t.getStatus()?r=t.getErrorText().includes("Firebase App Check token is invalid")?new _d(bd.UNAUTHORIZED_APP,"This app does not have permission to access Firebase Storage on this project."):new _d(bd.UNAUTHENTICATED,"User is not authenticated, please authenticate using Firebase Authentication and try again."):402===t.getStatus()?(o=e.bucket,r=new _d(bd.QUOTA_EXCEEDED,"Quota for bucket '"+o+"' exceeded, please view quota on https://firebase.google.com/pricing/.")):403===t.getStatus()?(i=e.path,r=new _d(bd.UNAUTHORIZED,"User does not have permission to access '"+i+"'.")):r=n,r.status=t.getStatus(),r.serverResponse=n.serverResponse,r}}function mh(e){const t=fh(e);return function(n,r){let i=t(n,r);var o;return 404===n.getStatus()&&(o=e.path,i=new _d(bd.OBJECT_NOT_FOUND,"Object '"+o+"' does not exist.")),i.serverResponse=r.serverResponse,i}}function gh(e,t,n){const r=Object.assign({},n);return r.fullPath=e.path,r.size=t.size(),r.contentType||(r.contentType=function(e,t){return e&&e.contentType||t&&t.type()||"application/octet-stream"}(null,t)),r}function yh(e,t,n,r,i){const o=t.bucketOnlyServerUrl(),s={"X-Goog-Upload-Protocol":"multipart"};const a=function(){let e="";for(let t=0;t<2;t++)e+=Math.random().toString().slice(2);return e}();s["Content-Type"]="multipart/related; boundary="+a;const l=gh(t,r,i),c="--"+a+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+ch(l,n)+"\r\n--"+a+"\r\nContent-Type: "+l.contentType+"\r\n\r\n",u="\r\n--"+a+"--",d=eh.getBlob(c,r,u);if(null===d)throw xd();const h={name:l.fullPath},p=Fd(o,e.host,e._protocol),f=e.maxUploadRetryTime,m=new uh(p,"POST",hh(e,n),f);return m.urlParams=h,m.headers=s,m.body=d.uploadData(),m.errorHandler=fh(t),m}class vh{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=wd.NO_ERROR,this.sendPromise_=new Promise((e=>{this.xhr_.addEventListener("abort",(()=>{this.errorCode_=wd.ABORT,e()})),this.xhr_.addEventListener("error",(()=>{this.errorCode_=wd.NETWORK_ERROR,e()})),this.xhr_.addEventListener("load",(()=>{e()}))}))}send(e,t,n,r){if(this.sent_)throw Ad("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(t,e,!0),void 0!==r)for(const i in r)r.hasOwnProperty(i)&&this.xhr_.setRequestHeader(i,r[i].toString());return void 0!==n?this.xhr_.send(n):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw Ad("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw Ad("cannot .getStatus() before sending");try{return this.xhr_.status}catch(DE){return-1}}getResponse(){if(!this.sent_)throw Ad("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw Ad("cannot .getErrorText() before sending");return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader(e){return this.xhr_.getResponseHeader(e)}addUploadProgressListener(e){null!=this.xhr_.upload&&this.xhr_.upload.addEventListener("progress",e)}removeUploadProgressListener(e){null!=this.xhr_.upload&&this.xhr_.upload.removeEventListener("progress",e)}}class _h extends vh{initXhr(){this.xhr_.responseType="text"}}function bh(){return new _h}class wh{constructor(e,t){this._service=e,this._location=t instanceof Rd?t:Rd.makeFromUrl(t,e.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(e,t){return new wh(e,t)}get root(){const e=new Rd(this._location.bucket,"");return this._newRef(this._service,e)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return nh(this._location.path)}get storage(){return this._service}get parent(){const e=function(e){if(0===e.length)return null;const t=e.lastIndexOf("/");return-1===t?"":e.slice(0,t)}(this._location.path);if(null===e)return null;const t=new Rd(this._location.bucket,e);return new wh(this._service,t)}_throwIfRoot(e){if(""===this._location.path)throw function(e){return new _d(bd.INVALID_ROOT_OPERATION,"The operation '"+e+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}(e)}}function Sh(e,t,n){e._throwIfRoot("uploadBytes");const r=yh(e.storage,e._location,sh(),new eh(t,!0),n);return e.storage.makeRequestWithTokens(r,bh).then((t=>({metadata:t,ref:e})))}function Eh(e){e._throwIfRoot("getDownloadURL");const t=function(e,t,n){const r=Fd(t.fullServerUrl(),e.host,e._protocol),i=e.maxOperationRetryTime,o=new uh(r,"GET",ph(e,n),i);return o.errorHandler=mh(t),o}(e.storage,e._location,sh());return e.storage.makeRequestWithTokens(t,bh).then((e=>{if(null===e)throw new _d(bd.NO_DOWNLOAD_URL,"The given file does not have any download URLs.");return e}))}function Ch(e){e._throwIfRoot("deleteObject");const t=function(e,t){const n=Fd(t.fullServerUrl(),e.host,e._protocol),r=e.maxOperationRetryTime,i=new uh(n,"DELETE",(function(e,t){}),r);return i.successCodes=[200,204],i.errorHandler=mh(t),i}(e.storage,e._location);return e.storage.makeRequestWithTokens(t,bh)}function kh(e,t){const n=function(e,t){const n=t.split("/").filter((e=>e.length>0)).join("/");return 0===e.length?n:e+"/"+n}(e._location.path,t),r=new Rd(e._location.bucket,n);return new wh(e.storage,r)}function xh(e,t){if(e instanceof Ph){const n=e;if(null==n._bucket)throw new _d(bd.NO_DEFAULT_BUCKET,"No default bucket found. Did you set the '"+vd+"' property when initializing the app?");const r=new wh(n,n._bucket);return null!=t?xh(r,t):r}return void 0!==t?kh(e,t):e}function Th(e,t){if(t&&/^[A-Za-z]+:\/\//.test(t)){if(e instanceof Ph)return new wh(e,t);throw Td("To use ref(service, url), the first argument must be a Storage instance.")}return xh(e,t)}function Ih(e,t){const n=null===t||void 0===t?void 0:t[vd];return null==n?null:Rd.makeFromBucketSpec(n,e)}class Ph{constructor(e,t,n,r,i){this.app=e,this._authProvider=t,this._appCheckProvider=n,this._url=r,this._firebaseVersion=i,this._bucket=null,this._host=yd,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,this._bucket=null!=r?Rd.makeFromBucketSpec(r,this._host):Ih(this._host,this.app.options)}get host(){return this._host}set host(e){this._host=e,null!=this._url?this._bucket=Rd.makeFromBucketSpec(this._url,e):this._bucket=Ih(e,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(e){Md("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(e){Md("time",0,Number.POSITIVE_INFINITY,e),this._maxOperationRetryTime=e}async _getAuthToken(){if(this._overrideAuthToken)return this._overrideAuthToken;const e=this._authProvider.getImmediate({optional:!0});if(e){const t=await e.getToken();if(null!==t)return t.accessToken}return null}async _getAppCheckToken(){const e=this._appCheckProvider.getImmediate({optional:!0});if(e){return(await e.getToken()).token}return null}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEach((e=>e.cancel())),this._requests.clear()),Promise.resolve()}_makeStorageReference(e){return new wh(this,e)}_makeRequest(e,t,n,r){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(this._deleted)return new Nd(Id());{const o=function(e,t,n,r,i,o){let s=!(arguments.length>6&&void 0!==arguments[6])||arguments[6];const a=jd(e.urlParams),l=e.url+a,c=Object.assign({},e.headers);return function(e,t){t&&(e["X-Firebase-GMPID"]=t)}(c,t),function(e,t){null!==t&&t.length>0&&(e.Authorization="Firebase "+t)}(c,n),function(e,t){e["X-Firebase-Storage-Version"]="webjs/"+(null!==t&&void 0!==t?t:"AppManager")}(c,o),function(e,t){null!==t&&(e["X-Firebase-AppCheck"]=t)}(c,r),new $d(l,e.method,c,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,i,s)}(e,this._appId,n,r,t,this._firebaseVersion,i);return this._requests.add(o),o.getPromise().then((()=>this._requests.delete(o)),(()=>this._requests.delete(o))),o}}async makeRequestWithTokens(e,t){const[n,r]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(e,t,n,r).getPromise()}}const Ah="@firebase/storage",Rh="0.13.2",Nh="storage";function Oh(e,t,n){return Sh(e=di(e),t,n)}function Dh(e){return Eh(e=di(e))}function Lh(e){return Ch(e=di(e))}function Mh(e,t){return Th(e=di(e),t)}function Fh(e,t){let{instanceIdentifier:n}=t;const r=e.getProvider("app").getImmediate(),i=e.getProvider("auth-internal"),o=e.getProvider("app-check-internal");return new Ph(r,i,o,n,Io)}Eo(new hi(Nh,Fh,"PUBLIC").setMultipleInstances(!0)),Ro(Ah,Rh,""),Ro(Ah,Rh,"esm2017");Ro("firebase","10.14.0","app");function jh(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r2?n-2:0),i=2;i