1/*! For license information please see main.74ecef1f.js.LICENSE.txt */ 2!function(){"use strict";var e={110:function(e,t,n){var r=n(309),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},u={};function s(e){return r.isMemo(e)?o:u[e.$$typeof]||i}u[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u[r.Memo]=o;var c=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var i=d(n);i&&i!==p&&e(t,i,r)}var o=l(n);f&&(o=o.concat(f(n)));for(var u=s(t),v=s(n),m=0;m<o.length;++m){var y=o[m];if(!a[y]&&(!r||!r[y])&&(!v||!v[y])&&(!u||!u[y])){var g=h(n,y);try{c(t,y,g)}catch(b){}}}}return t}},746:function(e,t){var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,u=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,l=n?Symbol.for("react.async_mode"):60111,f=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,d=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,v=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,g=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,k=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 l:case f:case a:case u:case o:case d:return e;default:switch(e=e&&e.$$typeof){case c:case h:case m:case v:case s:return e;default:return t}}case i:return t}}}function _(e){return w(e)===f}t.AsyncMode=l,t.ConcurrentMode=f,t.ContextConsumer=c,t.ContextProvider=s,t.Element=r,t.ForwardRef=h,t.Fragment=a,t.Lazy=m,t.Memo=v,t.Portal=i,t.Profiler=u,t.StrictMode=o,t.Suspense=d,t.isAsyncMode=function(e){return _(e)||w(e)===l},t.isConcurrentMode=_,t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===s},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)===a},t.isLazy=function(e){return w(e)===m},t.isMemo=function(e){return w(e)===v},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===u},t.isStrictMode=function(e){return w(e)===o},t.isSuspense=function(e){return w(e)===d},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===f||e===u||e===o||e===d||e===p||"object"===typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===s||e.$$typeof===c||e.$$typeof===h||e.$$typeof===g||e.$$typeof===b||e.$$typeof===k||e.$$typeof===y)},t.typeOf=w},309:function(e,t,n){e.exports=n(746)},463:function(e,t,n){var r=n(791),i=n(296);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,u={};function s(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(u[e]=t,e=0;e<t.length;e++)o.add(t[e])}var l=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),f=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,d={},p={};function v(e,t,n,r,i,a,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){m[e]=new v(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEac
vendor: 34,480 bytes, line 2
2h((function(e){var t=e[0];m[t]=new v(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){m[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){m[e]=new v(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){m[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){m[e]=new v(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){m[e]=new v(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){m[e]=new v(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){m[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)}));var y=/[\-:]([a-z])/g;function g(e){return e[1].toUpperCase()}function b(e,t,n,r){var i=m.hasOwnProperty(t)?m[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!f.call(p,e)||!f.call(d,e)&&(h.test(e)?p[e]=!0:(d[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,g);m[t]=new v(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,g);m[t]=new v(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,g);m[t]=new v(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){m[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)})),m.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){m[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)}));var k=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),_=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),I=Symbol.for("react.provider"),T=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),P=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var R=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 j,M=Object.assign;function F(e){if(void 0===j)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);j=t&&t[1]||""}return"\n"+j+e}var U=!1;function V(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"),a=r.stack.split("\n"),o=i.length-1,u=a.length-1;1<=o&&0<=u&&i[o]!==a[u];)u--;for(;1<=o&&0<=u;o--,u--)if(i[o]!==a[u]){if(1!==o||1!==u)do{if(o--,0>--u||i[o]!==a[u]){var s="\n"+i[o].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}}while(1<=o&&0<=u);break}}}finally{U=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?F(e):""}function z(e){switch(e.tag){case 5:return F(e.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 2:case 15:return e=V(e.type,!1);case 11:return e=V(e.type.render,!1);case 1:return e=V(e.type,!0);default:return""}}function q(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 x:return"Fragment";case _:return"Portal";case S:return"Profiler";case E:return"StrictMode";case N:return"Suspense";case O:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case T:return(e.displayName||"Context")+".Consumer";case I:return(e._context.displayName||"Context")+".Provider";case C:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case A:return null!==(t=e.displayName||null)?t:q(e.type)||"Memo";case P:t=e._payload,e=e._init;try{return q(e(t))}catch(n){}}return null}function B(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 q(t);case 8:return t===E?"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 K(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function W(e){e._valueTracker||(e._valueTracker=function(e){var t=K(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,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,a.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 Q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=K(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 $(e,t){var n=t.checked;return M({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function X(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 Y(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function J(e,t){Y(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<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+H(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return M({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(te(n)){if(1<n.length)throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:H(n)}}function ae(e,t){var n=H(t.value),r=H(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function oe(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function ue(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function se(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?ue(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,le,fe=(le=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",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 le(e,t)}))}:le);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 de={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 ve(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||de.hasOwnProperty(e)&&de[e]?(""+t).trim():t+"px"}function me(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=ve(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(de).forEach((function(e){pe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),de[t]=de[e]}))}));var ye=M({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 ge(e,t){if(t){if(ye[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(a(62))}}function be(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 ke=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var _e=null,xe=null,Ee=null;function Se(e){if(e=bi(e)){if("function"!==typeof _e)throw Error(a(280));var t=e.stateNode;t&&(t=wi(t),_e(e.stateNode,e.type,t))}}function Ie(e){xe?Ee?Ee.push(e):Ee=[e]:xe=e}function Te(){if(xe){var e=xe,t=Ee;if(Ee=xe=null,Se(e),t)for(e=0;e<t.length;e++)Se(t[e])}}function Ce(e,t){return e(t)}function Ne(){}var Oe=!1;function Ae(e,t,n){if(Oe)return e(t,n);Oe=!0;try{return Ce(e,t,n)}finally{Oe=!1,(null!==xe||null!==Ee)&&(Ne(),Te())}}function Pe(e,t){var n=e.stateNode;if(null===n)return null;var r=wi(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(a(231,t,typeof n));return n}var Re=!1;if(l)try{var De={};Object.defineProperty(De,"passive",{get:function(){Re=!0}}),window.addEventListener("test",De,De),window.removeEventListener("test",De,De)}catch(le){Re=!1}function Le(e,t,n,r,i,a,o,u,s){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(l){this.onError(l)}}var je=!1,Me=null,Fe=!1,Ue=null,Ve={onError:function(e){je=!0,Me=e}};function ze(e,t,n,r,i,a,o,u,s){je=!1,Me=null,Le.apply(Ve,arguments)}function qe(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Be(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function He(e){if(qe(e)!==e)throw Error(a(188))}function Ke(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=qe(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return He(i),e;if(o===r)return He(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var u=!1,s=i.child;s;){if(s===n){u=!0,n=i,r=o;break}if(s===r){u=!0,r=i,n=o;break}s=s.sibling}if(!u){for(s=o.child;s;){if(s===n){u=!0,n=o,r=i;break}if(s===r){u=!0,r=o,n=i;break}s=s.sibling}if(!u)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e))?We(e):null}function We(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=We(e);if(null!==t)return t;e=e.sibling}return null}var Qe=i.unstable_scheduleCallback,Ge=i.unstable_cancelCallback,$e=i.unstable_shouldYield,Xe=i.unstable_requestPaint,Ye=i.unstable_now,Je=i.unstable_getCurrentPriorityLevel,Ze=i.unstable_ImmediatePriority,et=i.unstable_UserBlockingPriority,tt=i.unstable_NormalPriority,nt=i.unstable_LowPriority,rt=i.unstable_IdlePriority,it=null,at=null;var ot=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(ut(e)/st|0)|0},ut=Math.log,st=Math.LN2;var ct=64,lt=4194304;function ft(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,a=e.pingedLanes,o=268435455&n;if(0!==o){var u=o&~i;0!==u?r=ft(u):0!==(a&=o)&&(r=ft(a))}else 0!==(o=n&~i)?r=ft(o):0!==a&&(r=ft(a));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(a=t&-t)||16===i&&0!==(4194240&a)))return t;if(0!==(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-ot(t)),r|=e[n],t&=~i;return r}function dt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function pt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function vt(){var e=ct;return 0===(4194240&(ct<<=1))&&(ct=64),e}function mt(e){for(var t=[],n=0;31>n;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-ot(t)]=n}function gt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ot(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var bt=0;function kt(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var wt,_t,xt,Et,St,It=!1,Tt=[],Ct=null,Nt=null,Ot=null,At=new Map,Pt=new Map,Rt=[],Dt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Lt(e,t){switch(e){case"focusin":case"focusout":Ct=null;break;case"dragenter":case"dragleave":Nt=null;break;case"mouseover":case"mouseout":Ot=null;break;case"pointerover":case"pointerout":At.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pt.delete(t.pointerId)}}function jt(e,t,n,r,i,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},null!==t&&(null!==(t=bi(t))&&_t(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Mt(e){var t=gi(e.target);if(null!==t){var n=qe(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Be(n)))return e.blockedOn=t,void St(e.priority,(function(){xt(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Ft(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=$t(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=bi(n))&&_t(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);ke=r,n.target.dispatchEvent(r),ke=null,t.shift()}return!0}function Ut(e,t,n){Ft(e)&&n.delete(t)}function Vt(){It=!1,null!==Ct&&Ft(Ct)&&(Ct=null),null!==Nt&&Ft(Nt)&&(Nt=null),null!==Ot&&Ft(Ot)&&(Ot=null),At.forEach(Ut),Pt.forEach(Ut)}function zt(e,t){e.blockedOn===t&&(e.blockedOn=null,It||(It=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Vt)))}function qt(e){function t(t){return zt(t,e)}if(0<Tt.length){zt(Tt[0],e);for(var n=1;n<Tt.length;n++){var r=Tt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Ct&&zt(Ct,e),null!==Nt&&zt(Nt,e),null!==Ot&&zt(Ot,e),At.forEach(t),Pt.forEach(t),n=0;n<Rt.length;n++)(r=Rt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Rt.length&&null===(n=Rt[0]).blockedOn;)Mt(n),null===n.blockedOn&&Rt.shift()}var Bt=k.ReactCurrentBatchConfig,Ht=!0;function Kt(e,t,n,r){var i=bt,a=Bt.transition;Bt.transition=null;try{bt=1,Qt(e,t,n,r)}finally{bt=i,Bt.transition=a}}function Wt(e,t,n,r){var i=bt,a=Bt.transition;Bt.transition=null;try{bt=4,Qt(e,t,n,r)}finally{bt=i,Bt.transition=a}}function Qt(e,t,n,r){if(Ht){var i=$t(e,t,n,r);if(null===i)Hr(e,t,r,Gt,n),Lt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Ct=jt(Ct,e,t,n,r,i),!0;case"dragenter":return Nt=jt(Nt,e,t,n,r,i),!0;case"mouseover":return Ot=jt(Ot,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return At.set(a,jt(At.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,Pt.set(a,jt(Pt.get(a)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Lt(e,r),4&t&&-1<Dt.indexOf(e)){for(;null!==i;){var a=bi(i);if(null!==a&&wt(a),null===(a=$t(e,t,n,r))&&Hr(e,t,r,Gt,n),a===i)break;i=a}null!==i&&r.stopPropagation()}else Hr(e,t,r,null,n)}}var Gt=null;function $t(e,t,n,r){if(Gt=null,null!==(e=gi(e=we(r))))if(null===(t=qe(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Be(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Gt=e,null}function Xt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Je()){case Ze:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Yt=null,Jt=null,Zt=null;function en(){if(Zt)return Zt;var e,t,n=Jt,r=n.length,i="value"in Yt?Yt.value:Yt.textContent,a=i.length;for(e=0;e<r&&n[e]===i[e];e++);var o=r-e;for(t=1;t<=o&&n[r-t]===i[a-t];t++);return Zt=i.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function an(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return M(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var on,un,sn,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ln=an(cn),fn=M({},cn,{view:0,detail:0}),hn=an(fn),dn=M({},fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==sn&&(sn&&"mousemove"===e.type?(on=e.screenX-sn.screenX,un=e.screenY-sn.screenY):un=on=0,sn=e),on)},movementY:function(e){return"movementY"in e?e.movementY:un}}),pn=an(dn),vn=an(M({},dn,{dataTransfer:0})),mn=an(M({},fn,{relatedTarget:0})),yn=an(M({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),gn=M({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bn=an(gn),kn=an(M({},cn,{data:0})),wn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_n={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},xn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function En(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=xn[e])&&!!t[e]}function Sn(){return En}var In=M({},fn,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?_n[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sn,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Tn=an(In),Cn=an(M({},dn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Nn=an(M({},fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sn})),On=an(M({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),An=M({},dn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Pn=an(An),Rn=[9,13,27,32],Dn=l&&"CompositionEvent"in window,Ln=null;l&&"documentMode"in document&&(Ln=document.documentMode);var jn=l&&"TextEvent"in window&&!Ln,Mn=l&&(!Dn||Ln&&8<Ln&&11>=Ln),Fn=String.fromCharCode(32),Un=!1;function Vn(e,t){switch(e){case"keyup":return-1!==Rn.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 qn=!1;var Bn={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?!!Bn[e.type]:"textarea"===t}function Kn(e,t,n,r){Ie(r),0<(t=Wr(t,"onChange")).length&&(n=new ln("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Wn=null,Qn=null;function Gn(e){Fr(e,0)}function $n(e){if(Q(ki(e)))return e}function Xn(e,t){if("change"===e)return t}var Yn=!1;if(l){var Jn;if(l){var Zn="oninput"in document;if(!Zn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Zn="function"===typeof er.oninput}Jn=Zn}else Jn=!1;Yn=Jn&&(!document.documentMode||9<document.documentMode)}function tr(){Wn&&(Wn.detachEvent("onpropertychange",nr),Qn=Wn=null)}function nr(e){if("value"===e.propertyName&&$n(Qn)){var t=[];Kn(t,Qn,e,we(e)),Ae(Gn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Qn=n,(Wn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return $n(Qn)}function ar(e,t){if("click"===e)return $n(t)}function or(e,t){if("input"===e||"change"===e)return $n(t)}var ur="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function sr(e,t){if(ur(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!f.call(t,i)||!ur(e[i],t[i]))return!1}return!0}function cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function lr(e,t){var n,r=cr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=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 fr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?fr(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 dr(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&&fr(n.ownerDocument.documentElement,n)){if(null!==r&&dr(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,a=Math.min(r.start,i);r=void 0===r.end?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=lr(n,a);var o=lr(n,r);i&&o&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.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<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var vr=l&&"documentMode"in document&&11>=document.documentMode,mr=null,yr=null,gr=null,br=!1;function kr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==mr||mr!==G(r)||("selectionStart"in(r=mr)&&dr(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},gr&&sr(gr,r)||(gr=r,0<(r=Wr(yr,"onSelect")).length&&(t=new ln("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mr)))}function wr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var _r={animationend:wr("Animation","AnimationEnd"),animationiteration:wr("Animation","AnimationIteration"),animationstart:wr("Animation","AnimationStart"),transitionend:wr("Transition","TransitionEnd")},xr={},Er={};function Sr(e){if(xr[e])return xr[e];if(!_r[e])return e;var t,n=_r[e];for(t in n)if(n.hasOwnProperty(t)&&t in Er)return xr[e]=n[t];return e}l&&(Er=document.createElement("div").style,"AnimationEvent"in window||(delete _r.animationend.animation,delete _r.animationiteration.animation,delete _r.animationstart.animation),"TransitionEvent"in window||delete _r.transitionend.transition);var Ir=Sr("animationend"),Tr=Sr("animationiteration"),Cr=Sr("animationstart"),Nr=Sr("transitionend"),Or=new Map,Ar="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 Pr(e,t){Or.set(e,t),s(t,[e])}for(var Rr=0;Rr<Ar.length;Rr++){var Dr=Ar[Rr];Pr(Dr.toLowerCase(),"on"+(Dr[0].toUpperCase()+Dr.slice(1)))}Pr(Ir,"onAnimationEnd"),Pr(Tr,"onAnimationIteration"),Pr(Cr,"onAnimationStart"),Pr("dblclick","onDoubleClick"),Pr("focusin","onFocus"),Pr("focusout","onBlur"),Pr(Nr,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focu
2sin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Lr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),jr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Lr));function Mr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,u,s,c){if(ze.apply(this,arguments),je){if(!je)throw Error(a(198));var l=Me;je=!1,Me=null,Fe||(Fe=!0,Ue=l)}}(r,t,void 0,e),e.currentTarget=null}function Fr(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var u=r[o],s=u.instance,c=u.currentTarget;if(u=u.listener,s!==a&&i.isPropagationStopped())break e;Mr(i,u,c),a=s}else for(o=0;o<r.length;o++){if(s=(u=r[o]).instance,c=u.currentTarget,u=u.listener,s!==a&&i.isPropagationStopped())break e;Mr(i,u,c),a=s}}}if(Fe)throw e=Ue,Fe=!1,Ue=null,e}function Ur(e,t){var n=t[vi];void 0===n&&(n=t[vi]=new Set);var r=e+"__bubble";n.has(r)||(Br(t,e,2,!1),n.add(r))}function Vr(e,t,n){var r=0;t&&(r|=4),Br(n,e,r,t)}var zr="_reactListening"+Math.random().toString(36).slice(2);function qr(e){if(!e[zr]){e[zr]=!0,o.forEach((function(t){"selectionchange"!==t&&(jr.has(t)||Vr(t,!1,e),Vr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[zr]||(t[zr]=!0,Vr("selectionchange",!1,t))}}function Br(e,t,n,r){switch(Xt(t)){case 1:var i=Kt;break;case 4:i=Wt;break;default:i=Qt}n=i.bind(null,t,n,e),i=void 0,!Re||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Hr(e,t,n,r,i){var a=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var o=r.tag;if(3===o||4===o){var u=r.stateNode.containerInfo;if(u===i||8===u.nodeType&&u.parentNode===i)break;if(4===o)for(o=r.return;null!==o;){var s=o.tag;if((3===s||4===s)&&((s=o.stateNode.containerInfo)===i||8===s.nodeType&&s.parentNode===i))return;o=o.return}for(;null!==u;){if(null===(o=gi(u)))return;if(5===(s=o.tag)||6===s){r=a=o;continue e}u=u.parentNode}}r=r.return}Ae((function(){var r=a,i=we(n),o=[];e:{var u=Or.get(e);if(void 0!==u){var s=ln,c=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":s=Tn;break;case"focusin":c="focus",s=mn;break;case"focusout":c="blur",s=mn;break;case"beforeblur":case"afterblur":s=mn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":s=pn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":s=vn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":s=Nn;break;case Ir:case Tr:case Cr:s=yn;break;case Nr:s=On;break;case"scroll":s=hn;break;case"wheel":s=Pn;break;case"copy":case"cut":case"paste":s=bn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":s=Cn}var l=0!==(4&t),f=!l&&"scroll"===e,h=l?null!==u?u+"Capture":null:u;l=[];for(var d,p=r;null!==p;){var v=(d=p).stateNode;if(5===d.tag&&null!==v&&(d=v,null!==h&&(null!=(v=Pe(p,h))&&l.push(Kr(p,v,d)))),f)break;p=p.return}0<l.length&&(u=new s(u,c,null,n,i),o.push({event:u,listeners:l}))}}if(0===(7&t)){if(s="mouseout"===e||"pointerout"===e,(!(u="mouseover"===e||"pointerover"===e)||n===ke||!(c=n.relatedTarget||n.fromElement)||!gi(c)&&!c[pi])&&(s||u)&&(u=i.window===i?i:(u=i.ownerDocument)?u.defaultView||u.parentWindow:window,s?(s=r,null!==(c=(c=n.relatedTarget||n.toElement)?gi(c):null)&&(c!==(f=qe(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(s=null,c=r),s!==c)){if(l=pn,v="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(l=Cn,v="onPointerLeave",h="onPointerEnter",p="pointer"),f=null==s?u:ki(s),d=null==c?u:ki(c),(u=new l(v,p+"leave",s,n,i)).target=f,u.relatedTarget=d,v=null,gi(i)===r&&((l=new l(h,p+"enter",c,n,i)).target=d,l.relatedTarget=f,v=l),f=v,s&&c)e:{for(h=c,p=0,d=l=s;d;d=Qr(d))p++;for(d=0,v=h;v;v=Qr(v))d++;for(;0<p-d;)l=Qr(l),p--;for(;0<d-p;)h=Qr(h),d--;for(;p--;){if(l===h||null!==h&&l===h.alternate)break e;l=Qr(l),h=Qr(h)}l=null}else l=null;null!==s&&Gr(o,u,s,l,!1),null!==c&&null!==f&&Gr(o,f,c,l,!0)}if("select"===(s=(u=r?ki(r):window).nodeName&&u.nodeName.toLowerCase())||"input"===s&&"file"===u.type)var m=Xn;else if(Hn(u))if(Yn)m=or;else{m=ir;var y=rr}else(s=u.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===u.type||"radio"===u.type)&&(m=ar);switch(m&&(m=m(e,r))?Kn(o,m,n,i):(y&&y(e,u,r),"focusout"===e&&(y=u._wrapperState)&&y.controlled&&"number"===u.type&&ee(u,"number",u.value)),y=r?ki(r):window,e){case"focusin":(Hn(y)||"true"===y.contentEditable)&&(mr=y,yr=r,gr=null);break;case"focusout":gr=yr=mr=null;break;case"mousedown":br=!0;break;case"contextmenu":case"mouseup":case"dragend":br=!1,kr(o,n,i);break;case"selectionchange":if(vr)break;case"keydown":case"keyup":kr(o,n,i)}var g;if(Dn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else qn?Vn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Mn&&"ko"!==n.locale&&(qn||"onCompositionStart"!==b?"onCompositionEnd"===b&&qn&&(g=en()):(Jt="value"in(Yt=i)?Yt.value:Yt.textContent,qn=!0)),0<(y=Wr(r,b)).length&&(b=new kn(b,e,null,n,i),o.push({event:b,listeners:y}),g?b.data=g:null!==(g=zn(n))&&(b.data=g))),(g=jn?function(e,t){switch(e){case"compositionend":return zn(t);case"keypress":return 32!==t.which?null:(Un=!0,Fn);case"textInput":return(e=t.data)===Fn&&Un?null:e;default:return null}}(e,n):function(e,t){if(qn)return"compositionend"===e||!Dn&&Vn(e,t)?(e=en(),Zt=Jt=Yt=null,qn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;
vendor: 98,701 bytes, line 2
2case"compositionend":return Mn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Wr(r,"onBeforeInput")).length&&(i=new kn("onBeforeInput","beforeinput",null,n,i),o.push({event:i,listeners:r}),i.data=g))}Fr(o,t)}))}function Kr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Wr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,a=i.stateNode;5===i.tag&&null!==a&&(i=a,null!=(a=Pe(e,n))&&r.unshift(Kr(e,a,i)),null!=(a=Pe(e,t))&&r.push(Kr(e,a,i))),e=e.return}return r}function Qr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Gr(e,t,n,r,i){for(var a=t._reactName,o=[];null!==n&&n!==r;){var u=n,s=u.alternate,c=u.stateNode;if(null!==s&&s===r)break;5===u.tag&&null!==c&&(u=c,i?null!=(s=Pe(n,a))&&o.unshift(Kr(n,s,u)):i||null!=(s=Pe(n,a))&&o.push(Kr(n,s,u))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}var $r=/\r\n?/g,Xr=/\u0000|\uFFFD/g;function Yr(e){return("string"===typeof e?e:""+e).replace($r,"\n").replace(Xr,"")}function Jr(e,t,n){if(t=Yr(t),Yr(e)!==t&&n)throw Error(a(425))}function Zr(){}var ei=null,ti=null;function ni(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ri="function"===typeof setTimeout?setTimeout:void 0,ii="function"===typeof clearTimeout?clearTimeout:void 0,ai="function"===typeof Promise?Promise:void 0,oi="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof ai?function(e){return ai.resolve(null).then(e).catch(ui)}:ri;function ui(e){setTimeout((function(){throw e}))}function si(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void qt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);qt(t)}function ci(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function li(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var fi=Math.random().toString(36).slice(2),hi="__reactFiber$"+fi,di="__reactProps$"+fi,pi="__reactContainer$"+fi,vi="__reactEvents$"+fi,mi="__reactListeners$"+fi,yi="__reactHandles$"+fi;function gi(e){var t=e[hi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pi]||n[hi]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=li(e);null!==e;){if(n=e[hi])return n;e=li(e)}return t}n=(e=n).parentNode}return null}function bi(e){return!(e=e[hi]||e[pi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ki(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function wi(e){return e[di]||null}var _i=[],xi=-1;function Ei(e){return{current:e}}function Si(e){0>xi||(e.current=_i[xi],_i[xi]=null,xi--)}function Ii(e,t){xi++,_i[xi]=e.current,e.current=t}var Ti={},Ci=Ei(Ti),Ni=Ei(!1),Oi=Ti;function Ai(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,a={};for(i in n)a[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Pi(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Ri(){Si(Ni),Si(Ci)}function Di(e,t,n){if(Ci.current!==Ti)throw Error(a(168));Ii(Ci,t),Ii(Ni,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(a(108,B(e)||"Unknown",i));return M({},n,r)}function ji(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ti,Oi=Ci.current,Ii(Ci,e),Ii(Ni,Ni.current),!0}function Mi(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=Li(e,t,Oi),r.__reactInternalMemoizedMergedChildContext=e,Si(Ni),Si(Ci),Ii(Ci,e)):Si(Ni),Ii(Ni,n)}var Fi=null,Ui=!1,Vi=!1;function zi(e){null===Fi?Fi=[e]:Fi.push(e)}function qi(){if(!Vi&&null!==Fi){Vi=!0;var e=0,t=bt;try{var n=Fi;for(bt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Fi=null,Ui=!1}catch(i){throw null!==Fi&&(Fi=Fi.slice(e+1)),Qe(Ze,qi),i}finally{bt=t,Vi=!1}}return null}var Bi=[],Hi=0,Ki=null,Wi=0,Qi=[],Gi=0,$i=null,Xi=1,Yi="";function Ji(e,t){Bi[Hi++]=Wi,Bi[Hi++]=Ki,Ki=e,Wi=t}function Zi(e,t,n){Qi[Gi++]=Xi,Qi[Gi++]=Yi,Qi[Gi++]=$i,$i=e;var r=Xi;e=Yi;var i=32-ot(r)-1;r&=~(1<<i),n+=1;var a=32-ot(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Xi=1<<32-ot(t)+i|n<<i|r,Yi=a+e}else Xi=1<<a|n<<i|r,Yi=e}function ea(e){null!==e.return&&(Ji(e,1),Zi(e,1,0))}function ta(e){for(;e===Ki;)Ki=Bi[--Hi],Bi[Hi]=null,Wi=Bi[--Hi],Bi[Hi]=null;for(;e===$i;)$i=Qi[--Gi],Qi[Gi]=null,Yi=Qi[--Gi],Qi[Gi]=null,Xi=Qi[--Gi],Qi[Gi]=null}var na=null,ra=null,ia=!1,aa=null;function oa(e,t){var n=Ac(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function ua(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,na=e,ra=ci(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,na=e,ra=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==$i?{id:Xi,overflow:Yi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Ac(18,null,null,0)).stateNode=t,n.return=e,e.child=n,na=e,ra=null,!0);default:return!1}}function sa(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function ca(e){if(ia){var t=ra;if(t){var n=t;if(!ua(e,t)){if(sa(e))throw Error(a(418));t=ci(n.nextSibling);var r=na;t&&ua(e,t)?oa(r,n):(e.flags=-4097&e.flags|2,ia=!1,na=e)}}else{if(sa(e))throw Error(a(418));e.flags=-4097&e.flags|2,ia=!1,na=e}}}function la(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;na=e}function fa(e){if(e!==na)return!1;if(!ia)return la(e),ia=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ni(e.type,e.memoizedProps)),t&&(t=ra)){if(sa(e))throw ha(),Error(a(418));for(;t;)oa(e,t),t=ci(t.nextSibling)}if(la(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ra=ci(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ra=null}}else ra=na?ci(e.stateNode.nextSibling):null;return!0}function ha(){for(var e=ra;e;)e=ci(e.nextSibling)}function da(){ra=na=null,ia=!1}function pa(e){null===aa?aa=[e]:aa.push(e)}var va=k.ReactCurrentBatchConfig;function ma(e,t){if(e&&e.defaultProps){for(var n in t=M({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var ya=Ei(null),ga=null,ba=null,ka=null;function wa(){ka=ba=ga=null}function _a(e){var t=ya.current;Si(ya),e._currentValue=t}function xa(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 Ea(e,t){ga=e,ka=ba=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(ku=!0),e.firstContext=null)}function Sa(e){var t=e._currentValue;if(ka!==e)if(e={context:e,memoizedValue:t,next:null},null===ba){if(null===ga)throw Error(a(308));ba=e,ga.dependencies={lanes:0,firstContext:e}}else ba=ba.next=e;return t}var Ia=null;function Ta(e){null===Ia?Ia=[e]:Ia.push(e)}function Ca(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Ta(t)):(n.next=i.next,i.next=n),t.interleaved=n,Na(e,r)}function Na(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 Oa=!1;function Aa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Pa(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 Ra(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Da(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&Cs)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Na(e,n)}return null===(i=r.interleaved)?(t.next=t,Ta(r)):(t.next=i.next,i.next=t),r.interleaved=t,Na(e,n)}function La(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,gt(e,n)}}function ja(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?i=a=o:a=a.next=o,n=n.next}while(null!==n);null===a?i=a=t:a=a.next=t}else i=a=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ma(e,t,n,r){var i=e.updateQueue;Oa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,u=i.shared.pending;if(null!==u){i.shared.pending=null;var s=u,c=s.next;s.next=null,null===o?a=c:o.next=c,o=s;var l=e.alternate;null!==l&&((u=(l=l.updateQueue).lastBaseUpdate)!==o&&(null===u?l.firstBaseUpdate=c:u.next=c,l.lastBaseUpdate=s))}if(null!==a){var f=i.baseState;for(o=0,l=c=s=null,u=a;;){var h=u.lane,d=u.eventTime;if((r&h)===h){null!==l&&(l=l.next={eventTime:d,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var p=e,v=u;switch(h=t,d=n,v.tag){case 1:if("function"===typeof(p=v.payload)){f=p.call(d,f,h);break e}f=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null===(h="function"===typeof(p=v.payload)?p.call(d,f,h):p)||void 0===h)break e;f=M({},f,h);break e;case 2:Oa=!0}}null!==u.callback&&0!==u.lane&&(e.flags|=64,null===(h=i.effects)?i.effects=[u]:h.push(u))}else d={eventTime:d,lane:h,tag:u.tag,payload:u.payload,callback:u.callback,next:null},null===l?(c=l=d,s=f):l=l.next=d,o|=h;if(null===(u=u.next)){if(null===(u=i.shared.pending))break;u=(h=u).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===l&&(s=f),i.baseState=s,i.firstBaseUpdate=c,i.lastBaseUpdate=l,null!==(t=i.shared.interleaved)){i=t;do{o|=i.lane,i=i.next}while(i!==t)}else null===a&&(i.shared.lanes=0);js|=o,e.lanes=o,e.memoizedState=f}}function Fa(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!==typeof i)throw Error(a(191,i));i.call(r)}}}var Ua=(new r.Component).refs;function Va(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:M({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var za={isMounted:function(e){return!!(e=e._reactInternals)&&qe(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ec(),i=tc(e),a=Ra(r,i);a.payload=t,void 0!==n&&null!==n&&(a.callback=n),null!==(t=Da(e,a,i))&&(nc(t,e,i,r),La(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ec(),i=tc(e),a=Ra(r,i);a.tag=1,a.payload=t,void 0!==n&&null!==n&&(a.callback=n),null!==(t=Da(e,a,i))&&(nc(t,e,i,r),La(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ec(),r=tc(e),i=Ra(n,r);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),null!==(t=Da(e,i,r))&&(nc(t,e,r,n),La(t,e,r))}};function qa(e,t,n,r,i,a,o){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!t.prototype||!t.prototype.isPureReactComponent||(!sr(n,r)||!sr(i,a))}function Ba(e,t,n){var r=!1,i=Ti,a=t.contextType;return"object"===typeof a&&null!==a?a=Sa(a):(i=Pi(t)?Oi:Ci.current,a=(r=null!==(r=t.contextTypes)&&void 0!==r)?Ai(e,i):Ti),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=za,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Ha(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&&za.enqueueReplaceState(t,t.state,null)}function Ka(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Ua,Aa(e);var a=t.contextType;"object"===typeof a&&null!==a?i.context=Sa(a):(a=Pi(t)?Oi:Ci.current,i.context=Ai(e,a)),i.state=e.memoizedState,"function"===typeof(a=t.getDerivedStateFromProps)&&(Va(e,t,a,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&&za.enqueueReplaceState(i,i.state,null),Ma(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4194308)}function Wa(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var i=r,o=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=i.refs;t===Ua&&(t=i.refs={}),null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!==typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Qa(e,t){throw e=Object.prototype.toString.call(t),Error(a(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ga(e){return(0,e._init)(e._payload)}function $a(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Rc(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function u(t){return e&&null===t.alternate&&(t.flags|=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=Mc(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){var a=n.type;return a===x?f(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"===typeof a&&null!==a&&a.$$typeof===P&&Ga(a)===t.type)?((r=i(t,n.props)).ref=Wa(e,t,n),r.return=e,r):((r=Dc(n.type,n.key,n.props,null,e.mode,r)).ref=Wa(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Fc(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function f(e,t,n,r,a){return null===t||7!==t.tag?((t=Lc(n,e.mode,r,a)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t)return(t=Mc(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case w:return(n=Dc(t.type,t.key,t.props,null,e.mode,n)).ref=Wa(e,null,t),n.return=e,n;case _:return(t=Fc(t,e.mode,n)).return=e,t;case P:return h(e,(0,t._init)(t._payload),n)}if(te(t)||L(t))return(t=Lc(t,e.mode,n,null)).return=e,t;Qa(e,t)}return null}function d(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n)return null!==i?null:s(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case w:return n.key===i?c(e,t,n,r):null;case _:return n.key===i?l(e,t,n,r):null;case P:return d(e,t,(i=n._init)(n._payload),r)}if(te(n)||L(n))return null!==i?null:f(e,t,n,r,null);Qa(e,n)}return null}function p(e,t,n,r,i){if("string"===typeof r&&""!==r||"number"===typeof r)return s(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case w:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case _:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i);case P:return p(e,t,n,(0,r._init)(r._payload),i)}if(te(r)||L(r))return f(t,e=e.get(n)||null,r,i,null);Qa(t,r)}return null}function v(i,a,u,s){for(var c=null,l=null,f=a,v=a=0,m=null;null!==f&&v<u.length;v++){f.index>v?(m=f,f=null):m=f.sibling;var y=d(i,f,u[v],s);if(null===y){null===f&&(f=m);break}e&&f&&null===y.alternate&&t(i,f),a=o(y,a,v),null===l?c=y:l.sibling=y,l=y,f=m}if(v===u.length)return n(i,f),ia&&Ji(i,v),c;if(null===f){for(;v<u.length;v++)null!==(f=h(i,u[v],s))&&(a=o(f,a,v),null===l?c=f:l.sibling=f,l=f);return ia&&Ji(i,v),c}for(f=r(i,f);v<u.length;v++)null!==(m=p(f,i,v,u[v],s))&&(e&&null!==m.alternate&&f.delete(null===m.key?v:m.key),a=o(m,a,v),null===l?c=m:l.sibling=m,l=m);return e&&f.forEach((function(e){return t(i,e)})),ia&&Ji(i,v),c}function m(i,u,s,c){var l=L(s);if("function"!==typeof l)throw Error(a(150));if(null==(s=l.call(s)))throw Error(a(151));for(var f=l=null,v=u,m=u=0,y=null,g=s.next();null!==v&&!g.done;m++,g=s.next()){v.index>m?(y=v,v=null):y=v.sibling;var b=d(i,v,g.value,c);if(null===b){null===v&&(v=y);break}e&&v&&null===b.alternate&&t(i,v),u=o(b,u,m),null===f?l=b:f.sibling=b,f=b,v=y}if(g.done)return n(i,v),ia&&Ji(i,m),l;if(null===v){for(;!g.done;m++,g=s.next())null!==(g=h(i,g.value,c))&&(u=o(g,u,m),null===f?l=g:f.sibling=g,f=g);return ia&&Ji(i,m),l}for(v=r(i,v);!g.done;m++,g=s.next())null!==(g=p(v,i,m,g.value,c))&&(e&&null!==g.alternate&&v.delete(null===g.key?m:g.key),u=o(g,u,m),null===f?l=g:f.sibling=g,f=g);return e&&v.forEach((function(e){return t(i,e)})),ia&&Ji(i,m),l}return function e(r,a,o,s){if("object"===typeof o&&null!==o&&o.type===x&&null===o.key&&(o=o.props.children),"object"===typeof o&&null!==o){switch(o.$$typeof){case w:e:{for(var c=o.key,l=a;null!==l;){if(l.key===c){if((c=o.type)===x){if(7===l.tag){n(r,l.sibling),(a=i(l,o.props.children)).return=r,r=a;break e}}else if(l.elementType===c||"object"===typeof c&&null!==c&&c.$$typeof===P&&Ga(c)===l.type){n(r,l.sibling),(a=i(l,o.props)).ref=Wa(r,l,o),a.return=r,r=a;break e}n(r,l);break}t(r,l),l=l.sibling}o.type===x?((a=Lc(o.props.children,r.mode,s,o.key)).return=r,r=a):((s=Dc(o.type,o.key,o.props,null,r.mode,s)).ref=Wa(r,a,o),s.return=r,r=s)}return u(r);case _:e:{for(l=o.key;null!==a;){if(a.key===l){if(4===a.tag&&a.stateNode.containerInfo===o.containerInfo&&a.stateNode.implementation===o.implementation){n(r,a.sibling),(a=i(a,o.children||[])).return=r,r=a;break e}n(r,a);break}t(r,a),a=a.sibling}(a=Fc(o,r.mode,s)).return=r,r=a}return u(r);case P:return e(r,a,(l=o._init)(o._payload),s)}if(te(o))return v(r,a,o,s);if(L(o))return m(r,a,o,s);Qa(r,o)}return"string"===typeof o&&""!==o||"number"===typeof o?(o=""+o,null!==a&&6===a.tag?(n(r,a.sibling),(a=i(a,o)).return=r,r=a):(n(r,a),(a=Mc(o,r.mode,s)).return=r,r=a),u(r)):n(r,a)}}var Xa=$a(!0),Ya=$a(!1),Ja={},Za=Ei(Ja),eo=Ei(Ja),to=Ei(Ja);function no(e){if(e===Ja)throw Error(a(174));return e}function ro(e,t){switch(Ii(to,t),Ii(eo,e),Ii(Za,Ja),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:se(null,"");break;default:t=se(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Si(Za),Ii(Za,t)}function io(){Si(Za),Si(eo),Si(to)}function ao(e){no(to.current);var t=no(Za.current),n=se(t,e.type);t!==n&&(Ii(eo,e),Ii(Za,n))}function oo(e){eo.current===e&&(Si(Za),Si(eo))}var uo=Ei(0);function so(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var co=[];function lo(){for(var e=0;e<co.length;e++)co[e]._workInProgressVersionPrimary=null;co.length=0}var fo=k.ReactCurrentDispatcher,ho=k.ReactCurrentBatchConfig,po=0,vo=null,mo=null,yo=null,go=!1,bo=!1,ko=0,wo=0;function _o(){throw Error(a(321))}function xo(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ur(e[n],t[n]))return!1;return!0}function Eo(e,t,n,r,i,o){if(po=o,vo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,fo.current=null===e||null===e.memoizedState?uu:su,e=n(r,i),bo){o=0;do{if(bo=!1,ko=0,25<=o)throw Error(a(301));o+=1,yo=mo=null,t.updateQueue=null,fo.current=cu,e=n(r,i)}while(bo)}if(fo.current=ou,t=null!==mo&&null!==mo.next,po=0,yo=mo=vo=null,go=!1,t)throw Error(a(300));return e}function So(){var e=0!==ko;return ko=0,e}function Io(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===yo?vo.memoizedState=yo=e:yo=yo.next=e,yo}function To(){if(null===mo){var e=vo.alternate;e=null!==e?e.memoizedState:null}else e=mo.next;var t=null===yo?vo.memoizedState:yo.next;if(null!==t)yo=t,mo=e;else{if(null===e)throw Error(a(310));e={memoizedState:(mo=e).memoizedState,baseState:mo.baseState,baseQueue:mo.baseQueue,queue:mo.queue,next:null},null===yo?vo.memoizedState=yo=e:yo=yo.next=e}return yo}function Co(e,t){return"function"===typeof t?t(e):t}function No(e){var t=To(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=mo,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var u=i.next;i.next=o.next,o.next=u}r.baseQueue=i=o,n.pending=null}if(null!==i){o=i.next,r=r.baseState;var s=u=null,c=null,l=o;do{var f=l.lane;if((po&f)===f)null!==c&&(c=c.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),r=l.hasEagerState?l.eagerState:e(r,l.action);else{var h={lane:f,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null};null===c?(s=c=h,u=r):c=c.next=h,vo.lanes|=f,js|=f}l=l.next}while(null!==l&&l!==o);null===c?u=r:c.next=s,ur(r,t.memoizedState)||(ku=!0),t.memoizedState=r,t.baseState=u,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{o=i.lane,vo.lanes|=o,js|=o,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Oo(e){var t=To(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var u=i=i.next;do{o=e(o,u.action),u=u.next}while(u!==i);ur(o,t.memoizedState)||(ku=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Ao(){}function Po(e,t){var n=vo,r=To(),i=t(),o=!ur(r.memoizedState,i);if(o&&(r.memoizedState=i,ku=!0),r=r.queue,Ho(Lo.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||null!==yo&&1&yo.memoizedState.tag){if(n.flags|=2048,Uo(9,Do.bind(null,n,r,i,t),void 0,null),null===Ns)throw Error(a(349));0!==(30&po)||Ro(n,t,i)}return i}function Ro(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=vo.updateQueue)?(t={lastEffect:null,stores:null},vo.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Do(e,t,n,r){t.value=n,t.getSnapshot=r,jo(t)&&Mo(e)}function Lo(e,t,n){return n((function(){jo(t)&&Mo(e)}))}function jo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ur(e,n)}catch(r){return!0}}function Mo(e){var t=Na(e,1);null!==t&&nc(t,e,1,-1)}function Fo(e){var t=Io();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Co,lastRenderedState:e},t.queue=e,e=e.dispatch=nu.bind(null,vo,e),[t.memoizedState,e]}function Uo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=vo.updateQueue)?(t={lastEffect:null,stores:null},vo.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Vo(){return To().memoizedState}function zo(e,t,n,r){var i=Io();vo.flags|=e,i.memoizedState=Uo(1|t,n,void 0,void 0===r?null:r)}function qo(e,t,n,r){var i=To();r=void 0===r?null:r;var a=void 0;if(null!==mo){var o=mo.memoizedState;if(a=o.destroy,null!==r&&xo(r,o.deps))return void(i.memoizedState=Uo(t,n,a,r))}vo.flags|=e,i.memoizedState=Uo(1|t,n,a,r)}function Bo(e,t){return zo(8390656,8,e,t)}function Ho(e,t){return qo(2048,8,e,t)}function Ko(e,t){return qo(4,2,e,t)}function Wo(e,t){return qo(4,4,e,t)}function Qo(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Go(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,qo(4,4,Qo.bind(null,t,e),n)}function $o(){}function Xo(e,t){var n=To();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&xo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Yo(e,t){var n=To();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&xo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Jo(e,t,n){return 0===(21&po)?(e.baseState&&(e.baseState=!1,ku=!0),e.memoizedState=n):(ur(n,t)||(n=vt(),vo.lanes|=n,js|=n,e.baseState=!0),t)}function Zo(e,t){var n=bt;bt=0!==n&&4>n?n:4,e(!0);var r=ho.transition;ho.transition={};try{e(!1),t()}finally{bt=n,ho.transition=r}}function eu(){return To().memoizedState}function tu(e,t,n){var r=tc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ru(e))iu(t,n);else if(null!==(n=Ca(e,t,n,r))){nc(n,e,r,ec()),au(n,t,r)}}function nu(e,t,n){var r=tc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ru(e))iu(t,i);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var o=t.lastRenderedState,u=a(o,n);if(i.hasEagerState=!0,i.eagerState=u,ur(u,o)){var s=t.interleaved;return null===s?(i.next=i,Ta(t)):(i.next=s.next,s.next=i),void(t.interleaved=i)}}catch(c){}null!==(n=Ca(e,t,i,r))&&(nc(n,e,r,i=ec()),au(n,t,r))}}function ru(e){var t=e.alternate;return e===vo||null!==t&&t===vo}function iu(e,t){bo=go=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function au(e,t,n){if(0!==(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,gt(e,n)}}var ou={readContext:Sa,useCallback:_o,useContext:_o,useEffect:_o,useImperativeHandle:_o,useInsertionEffect:_o,useLayoutEffect:_o,useMemo:_o,useReducer:_o,useRef:_o,useState:_o,useDebugValue:_o,useDeferredValue:_o,useTransition:_o,useMutableSource:_o,useSyncExternalStore:_o,useId:_o,unstable_isNewReconciler:!1},uu={readContext:Sa,useCallback:function(e,t){return Io().memoizedState=[e,void 0===t?null:t],e},useContext:Sa,useEffect:Bo,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,zo(4194308,4,Qo.bind(null,t,e),n)},useLayoutEffect:function(e,t){return zo(4194308,4,e,t)},useInsertionEffect:function(e,t){return zo(4,2,e,t)},useMemo:function(e,t){var n=Io();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Io();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=tu.bind(null,vo,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Io().memoizedState=e},useState:Fo,useDebugValue:$o,useDeferredValue:function(e){return Io().memoizedState=e},useTransition:function(){var e=Fo(!1),t=e[0];return e=Zo.bind(null,e[1]),Io().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=vo,i=Io();if(ia){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===Ns)throw Error(a(349));0!==(30&po)||Ro(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Bo(Lo.bind(null,r,o,e),[e]),r.flags|=2048,Uo(9,Do.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Io(),t=Ns.identifierPrefix;if(ia){var n=Yi;t=":"+t+"R"+(n=(Xi&~(1<<32-ot(Xi)-1)).toString(32)+n),0<(n=ko++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=wo++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},su={readContext:Sa,useCallback:Xo,useContext:Sa,useEffect:Ho,useImperativeHandle:Go,useInsertionEffect:Ko,useLayoutEffect:Wo,useMemo:Yo,useReducer:No,useRef:Vo,useState:function(){return No(Co)},useDebugValue:$o,useDeferredValue:function(e){return Jo(To(),mo.memoizedState,e)},useTransition:function(){return[No(Co)[0],To().memoizedState]},useMutableSource:Ao,useSyncExternalStore:Po,useId:eu,unstable_isNewReconciler:!1},cu={readContext:Sa,useCallback:Xo,useContext:Sa,useEffect:Ho,useImperativeHandle:Go,useInsertionEffect:Ko,useLayoutEffect:Wo,useMemo:Yo,useReducer:Oo,useRef:Vo,useState:function(){return Oo(Co)},useDebugValue:$o,useDeferredValue:function(e){var t=To();return null===mo?t.memoizedState=e:Jo(t,mo.memoizedState,e)},useTransition:function(){return[Oo(Co)[0],To().memoizedState]},useMutableSource:Ao,useSyncExternalStore:Po,useId:eu,unstable_isNewReconciler:!1};function lu(e,t){try{var n="",r=t;do{n+=z(r),r=r.return}while(r);var i=n}catch(a){i="\nError generating stack: "+a.message+"\n"+a.stack}return{value:e,source:t,stack:i,digest:null}}function fu(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function hu(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var du="function"===typeof WeakMap?WeakMap:Map;function pu(e,t,n){(n=Ra(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Hs||(Hs=!0,Ks=r),hu(0,t)},n}function vu(e,t,n){(n=Ra(-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(){hu(0,t)}}var a=e.stateNode;return null!==a&&"function"===typeof a.componentDidCatch&&(n.callback=function(){hu(0,t),"function"!==typeof r&&(null===Ws?Ws=new Set([this]):Ws.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function mu(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new du;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=Sc.bind(null,e,t,n),t.then(e,e))}function yu(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 gu(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=Ra(-1,1)).tag=2,Da(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var bu=k.ReactCurrentOwner,ku=!1;function wu(e,t,n,r){t.child=null===e?Ya(t,null,n,r):Xa(t,e.child,n,r)}function _u(e,t,n,r,i){n=n.render;var a=t.ref;return Ea(t,i),r=Eo(e,t,n,r,a,i),n=So(),null===e||ku?(ia&&n&&ea(t),t.flags|=1,wu(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Hu(e,t,i))}function xu(e,t,n,r,i){if(null===e){var a=n.type;return"function"!==typeof a||Pc(a)||void 0!==a.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=a,Eu(e,t,a,r,i))}if(a=e.child,0===(e.lanes&i)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:sr)(o,r)&&e.ref===t.ref)return Hu(e,t,i)}return t.flags|=1,(e=Rc(a,r)).ref=t.ref,e.return=t,t.child=e}function Eu(e,t,n,r,i){if(null!==e){var a=e.memoizedProps;if(sr(a,r)&&e.ref===t.ref){if(ku=!1,t.pendingProps=r=a,0===(e.lanes&i))return t.lanes=e.lanes,Hu(e,t,i);0!==(131072&e.flags)&&(ku=!0)}}return Tu(e,t,n,r,i)}function Su(e,t,n){var r=t.pendingProps,i=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ii(Rs,Ps),Ps|=n;else{if(0===(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ii(Rs,Ps),Ps|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,Ii(Rs,Ps),Ps|=r}else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,Ii(Rs,Ps),Ps|=r;return wu(e,t,i,n),t.child}function Iu(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Tu(e,t,n,r,i){var a=Pi(n)?Oi:Ci.current;return a=Ai(t,a),Ea(t,i),n=Eo(e,t,n,r,a,i),r=So(),null===e||ku?(ia&&r&&ea(t),t.flags|=1,wu(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Hu(e,t,i))}function Cu(e,t,n,r,i){if(Pi(n)){var a=!0;ji(t)}else a=!1;if(Ea(t,i),null===t.stateNode)Bu(e,t),Ba(t,n,r),Ka(t,n,r,i),r=!0;else if(null===e){var o=t.stateNode,u=t.memoizedProps;o.props=u;var s=o.context,c=n.contextType;"object"===typeof c&&null!==c?c=Sa(c):c=Ai(t,c=Pi(n)?Oi:Ci.current);var l=n.getDerivedStateFromProps,f="function"===typeof l||"function"===typeof o.getSnapshotBeforeUpdate;f||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(u!==r||s!==c)&&Ha(t,o,r,c),Oa=!1;var h=t.memoizedState;o.state=h,Ma(t,r,o,i),s=t.memoizedState,u!==r||h!==s||Ni.current||Oa?("function"===typeof l&&(Va(t,n,l,r),s=t.memoizedState),(u=Oa||qa(t,n,u,r,h,s,c))?(f||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||("function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"===typeof o.componentDidMount&&(t.flags|=4194308)):("function"===typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),o.props=r,o.state=s,o.context=c,r=u):("function"===typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Pa(e,t),u=t.memoizedProps,c=t.type===t.elementType?u:ma(t.type,u),o.props=c,f=t.pendingProps,h=o.context,"object"===typeof(s=n.contextType)&&null!==s?s=Sa(s):s=Ai(t,s=Pi(n)?Oi:Ci.current);var d=n.getDerivedStateFromProps;(l="function"===typeof d||"function"===typeof o.getSnapshotBeforeUpdate)||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(u!==f||h!==s)&&Ha(t,o,r,s),Oa=!1,h=t.memoizedState,o.state=h,Ma(t,r,o,i);var p=t.memoizedState;u!==f||h!==p||Ni.current||Oa?("function"===typeof d&&(Va(t,n,d,r),p=t.memoizedState),(c=Oa||qa(t,n,c,r,h,p,s)||!1)?(l||"function"!==typeof o.UNSAFE_componentWillUpdate&&"function"!==typeof o.componentWillUpdate||("function"===typeof o.componentWillUpdate&&o.componentWillUpdate(r,p,s),"function"===typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,p,s)),"function"===typeof o.componentDidUpdate&&(t.flags|=4),"function"===typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof o.componentDidUpdate||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),o.props=r,o.state=p,o.context=s,r=c):("function"!==typeof o.componentDidUpdate||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Nu(e,t,n,r,a,i)}function Nu(e,t,n,r,i,a){Iu(e,t);var o=0!==(128&t.flags);if(!r&&!o)return i&&Mi(t,n,!1),Hu(e,t,a);r=t.stateNode,bu.current=t;var u=o&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=Xa(t,e.child,null,a),t.child=Xa(t,null,u,a)):wu(e,t,u,a),t.memoizedState=r.state,i&&Mi(t,n,!0),t.child}function Ou(e){var t=e.stateNode;t.pendingContext?Di(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Di(0,t.context,!1),ro(e,t.containerInfo)}function Au(e,t,n,r,i){return da(),pa(i),t.flags|=256,wu(e,t,n,r),t.child}var Pu,Ru,Du,Lu={dehydrated:null,treeContext:null,retryLane:0};function ju(e){return{baseLanes:e,cachePool:null,transitions:null}}function Mu(e,t,n){var r,i=t.pendingProps,o=uo.current,u=!1,s=0!==(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&0!==(2&o)),r?(u=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),Ii(uo,1&o),null===e)return ca(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):(s=i.children,e=i.fallback,u?(i=t.mode,u=t.child,s={mode:"hidden",children:s},0===(1&i)&&null!==u?(u.childLanes=0,u.pendingProps=s):u=jc(s,i,0,null),e=Lc(e,i,n,null),u.return=t,e.return=t,u.sibling=e,t.child=u,t.child.memoizedState=ju(n),t.memoizedState=Lu,e):Fu(t,s));if(null!==(o=e.memoizedState)&&null!==(r=o.dehydrated))return function(e,t,n,r,i,o,u){if(n)return 256&t.flags?(t.flags&=-257,Uu(e,t,u,r=fu(Error(a(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=jc({mode:"visible",children:r.children},i,0,null),(o=Lc(o,i,u,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,0!==(1&t.mode)&&Xa(t,e.child,null,u),t.child.memoizedState=ju(u),t.memoizedState=Lu,o);if(0===(1&t.mode))return Uu(e,t,u,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var s=r.dgst;return r=s,Uu(e,t,u,r=fu(o=Error(a(419)),r,void 0))}if(s=0!==(u&e.childLanes),ku||s){if(null!==(r=Ns)){switch(u&-u){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|u))?0:i)&&i!==o.retryLane&&(o.retryLane=i,Na(e,i),nc(r,e,i,-1))}return vc(),Uu(e,t,u,r=fu(Error(a(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Tc.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,ra=ci(i.nextSibling),na=t,ia=!0,aa=null,null!==e&&(Qi[Gi++]=Xi,Qi[Gi++]=Yi,Qi[Gi++]=$i,Xi=e.id,Yi=e.overflow,$i=t),(t=Fu(t,r.children)).flags|=4096,t)}(e,t,s,i,r,o,n);if(u){u=i.fallback,s=t.mode,r=(o=e.child).sibling;var c={mode:"hidden",children:i.children};return 0===(1&s)&&t.child!==o?((i=t.child).childLanes=0,i.pendingProps=c,t.deletions=null):(i=Rc(o,c)).subtreeFlags=14680064&o.subtreeFlags,null!==r?u=Rc(r,u):(u=Lc(u,s,n,null)).flags|=2,u.return=t,i.return=t,i.sibling=u,t.child=i,i=u,u=t.child,s=null===(s=e.child.memoizedState)?ju(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},u.memoizedState=s,u.childLanes=e.childLanes&~n,t.memoizedState=Lu,i}return e=(u=e.child).sibling,i=Rc(u,{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 Fu(e,t){return(t=jc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Uu(e,t,n,r){return null!==r&&pa(r),Xa(t,e.child,null,n),(e=Fu(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Vu(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),xa(e.return,t,n)}function zu(e,t,n,r,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function qu(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(wu(e,t,r.children,n),0!==(2&(r=uo.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&&Vu(e,n,t);else if(19===e.tag)Vu(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(Ii(uo,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===so(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),zu(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===so(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}zu(t,!0,n,null,a);break;case"together":zu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Bu(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Hu(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),js|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Rc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Rc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Ku(e,t){if(!ia)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 Wu(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 Qu(e,t,n){var r=t.pendingProps;switch(ta(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Wu(t),null;case 1:case 17:return Pi(t.type)&&Ri(),Wu(t),null;case 3:return r=t.stateNode,io(),Si(Ni),Si(Ci),lo(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(fa(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==aa&&(oc(aa),aa=null))),Wu(t),null;case 5:oo(t);var i=no(to.current);if(n=t.type,null!==e&&null!=t.stateNode)Ru(e,t,n,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(a(166));return Wu(t),null}if(e=no(Za.current),fa(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[hi]=t,r[di]=o,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<Lr.length;i++)Ur(Lr[i],r);break;case"source":Ur("error",r);break;case"img":case"image":case"link":Ur("error",r),Ur("load",r);break;case"details":Ur("toggle",r);break;case"input":X(r,o),Ur("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Ur("invalid",r);break;case"textarea":ie(r,o),Ur("invalid",r)}for(var s in ge(n,o),i=null,o)if(o.hasOwnProperty(s)){var c=o[s];"children"===s?"string"===typeof c?r.textContent!==c&&(!0!==o.suppressHydrationWarning&&Jr(r.textContent,c,e),i=["children",c]):"number"===typeof c&&r.textContent!==""+c&&(!0!==o.suppressHydrationWarning&&Jr(r.textContent,c,e),i=["children",""+c]):u.hasOwnProperty(s)&&null!=c&&"onScroll"===s&&Ur("scroll",r)}switch(n){case"input":W(r),Z(r,o,!0);break;case"textarea":W(r),oe(r);break;case"select":case"option":break;default:"function"===typeof o.onClick&&(r.onclick=Zr)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{s=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=ue(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=s.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),"select"===n&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[hi]=t,e[di]=r,Pu(e,t),t.stateNode=e;e:{switch(s=be(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;i<Lr.length;i++)Ur(Lr[i],e);i=r;break;case"source":Ur("error",e),i=r;break;case"img":case"image":case"link":Ur("error",e),Ur("load",e),i=r;break;case"details":Ur("toggle",e),i=r;break;case"input":X(e,r),i=$(e,r),Ur("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=M({},r,{value:void 0}),Ur("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),Ur("invalid",e)}for(o in ge(n,i),c=i)if(c.hasOwnProperty(o)){var l=c[o];"style"===o?me(e,l):"dangerouslySetInnerHTML"===o?null!=(l=l?l.__html:void 0)&&fe(e,l):"children"===o?"string"===typeof l?("textarea"!==n||""!==l)&&he(e,l):"number"===typeof l&&he(e,""+l):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(u.hasOwnProperty(o)?null!=l&&"onScroll"===o&&Ur("scroll",e):null!=l&&b(e,o,l,s))}switch(n){case"input":W(e),Z(e,r,!1);break;case"textarea":W(e),oe(e);break;case"option":null!=r.value&&e.setAttribute("value",""+H(r.value));break;case"select":e.multiple=!!r.multiple,null!=(o=r.value)?ne(e,!!r.multiple,o,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=Zr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Wu(t),null;case 6:if(e&&null!=t.stateNode)Du(0,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(a(166));if(n=no(to.current),no(Za.current),fa(t)){if(r=t.stateNode,n=t.memoizedProps,r[hi]=t,(o=r.nodeValue!==n)&&null!==(e=na))switch(e.tag){case 3:Jr(r.nodeValue,n,0!==(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Jr(r.nodeValue,n,0!==(1&e.mode))}o&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[hi]=t,t.stateNode=r}return Wu(t),null;case 13:if(Si(uo),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ia&&null!==ra&&0!==(1&t.mode)&&0===(128&t.flags))ha(),da(),t.flags|=98560,o=!1;else if(o=fa(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(a(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(a(317));o[hi]=t}else da(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Wu(t),o=!1}else null!==aa&&(oc(aa),aa=null),o=!0;if(!o)return 65536&t.flags?t:null}return 0!==(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!==(1&t.mode)&&(null===e||0!==(1&uo.current)?0===Ds&&(Ds=3):vc())),null!==t.updateQueue&&(t.flags|=4),Wu(t),null);case 4:return io(),null===e&&qr(t.stateNode.containerInfo),Wu(t),null;case 10:return _a(t.type._context),Wu(t),null;case 19:if(Si(uo),null===(o=t.memoizedState))return Wu(t),null;if(r=0!==(128&t.flags),null===(s=o.rendering))if(r)Ku(o,!1);else{if(0!==Ds||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(s=so(e))){for(t.flags|=128,Ku(o,!1),null!==(r=s.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(o=n).flags&=14680066,null===(s=o.alternate)?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,e=s.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ii(uo,1&uo.current|2),t.child}e=e.sibling}null!==o.tail&&Ye()>qs&&(t.flags|=128,r=!0,Ku(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=so(s))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Ku(o,!0),null===o.tail&&"hidden"===o.tailMode&&!s.alternate&&!ia)return Wu(t),null}else 2*Ye()-o.renderingStartTime>qs&&1073741824!==n&&(t.flags|=128,r=!0,Ku(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(null!==(n=o.last)?n.sibling=s:t.child=s,o.last=s)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ye(),t.sibling=null,n=uo.current,Ii(uo,r?1&n|2:1&n),t):(Wu(t),null);case 22:case 23:return fc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(1&t.mode)?0!==(1073741824&Ps)&&(Wu(t),6&t.subtreeFlags&&(t.flags|=8192)):Wu(t),null;case 24:case 25:return null}throw Error(a(156,t.tag))}function Gu(e,t){switch(ta(t),t.tag){case 1:return Pi(t.type)&&Ri(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return io(),Si(Ni),Si(Ci),lo(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return oo(t),null;case 13:if(Si(uo),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));da()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Si(uo),null;case 4:return io(),null;case 10:return _a(t.type._context),null;case 22:case 23:return fc(),null;default:return null}}Pu=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}},Ru=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,no(Za.current);var a,o=null;switch(n){case"input":i=$(e,i),r=$(e,r),o=[];break;case"select":i=M({},i,{value:void 0}),r=M({},r,{value:void 0}),o=[];break;case"textarea":i=re(e,i),r=re(e,r),o=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=Zr)}for(l in ge(n,r),n=null,i)if(!r.hasOwnProperty(l)&&i.hasOwnProperty(l)&&null!=i[l])if("style"===l){var s=i[l];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(u.hasOwnProperty(l)?o||(o=[]):(o=o||[]).push(l,null));for(l in r){var c=r[l];if(s=null!=i?i[l]:void 0,r.hasOwnProperty(l)&&c!==s&&(null!=c||null!=s))if("style"===l)if(s){for(a in s)!s.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&s[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(o||(o=[]),o.push(l,n)),n=c;else"dangerouslySetInnerHTML"===l?(c=c?c.__html:void 0,s=s?s.__html:void 0,null!=c&&s!==c&&(o=o||[]).push(l,c)):"children"===l?"string"!==typeof c&&"number"!==typeof c||(o=o||[]).push(l,""+c):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(u.hasOwnProperty(l)?(null!=c&&"onScroll"===l&&Ur("scroll",e),o||s===c||(o=[])):(o=o||[]).push(l,c))}n&&(o=o||[]).push("style",n);var l=o;(t.updateQueue=l)&&(t.flags|=4)}},Du=function(e,t,n,r){n!==r&&(t.flags|=4)};var $u=!1,Xu=!1,Yu="function"===typeof WeakSet?WeakSet:Set,Ju=null;function Zu(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){Ec(e,t,r)}else n.current=null}function es(e,t,n){try{n()}catch(r){Ec(e,t,r)}}var ts=!1;function ns(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 a=i.destroy;i.destroy=void 0,void 0!==a&&es(t,n,a)}i=i.next}while(i!==r)}}function rs(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 is(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 as(e){var t=e.alternate;null!==t&&(e.alternate=null,as(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[hi],delete t[di],delete t[vi],delete t[mi],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 os(e){return 5===e.tag||3===e.tag||4===e.tag}function us(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||os(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 ss(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(ss(e,t,n),e=e.sibling;null!==e;)ss(e,t,n),e=e.sibling}function cs(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(cs(e,t,n),e=e.sibling;null!==e;)cs(e,t,n),e=e.sibling}var ls=null,fs=!1;function hs(e,t,n){for(n=n.child;null!==n;)ds(e,t,n),n=n.sibling}function ds(e,t,n){if(at&&"function"===typeof at.onCommitFiberUnmount)try{at.onCommitFiberUnmount(it,n)}catch(u){}switch(n.tag){case 5:Xu||Zu(n,t);case 6:var r=ls,i=fs;ls=null,hs(e,t,n),fs=i,null!==(ls=r)&&(fs?(e=ls,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):ls.removeChild(n.stateNode));break;case 18:null!==ls&&(fs?(e=ls,n=n.stateNode,8===e.nodeType?si(e.parentNode,n):1===e.nodeType&&si(e,n),qt(e)):si(ls,n.stateNode));break;case 4:r=ls,i=fs,ls=n.stateNode.containerInfo,fs=!0,hs(e,t,n),ls=r,fs=i;break;case 0:case 11:case 14:case 15:if(!Xu&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,void 0!==o&&(0!==(2&a)||0!==(4&a))&&es(n,t,o),i=i.next}while(i!==r)}hs(e,t,n);break;case 1:if(!Xu&&(Zu(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){Ec(n,t,u)}hs(e,t,n);break;case 21:hs(e,t,n);break;case 22:1&n.mode?(Xu=(r=Xu)||null!==n.memoizedState,hs(e,t,n),Xu=r):hs(e,t,n);break;default:hs(e,t,n)}}function ps(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Yu),t.forEach((function(t){var r=Cc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function vs(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,u=t,s=u;e:for(;null!==s;){switch(s.tag){case 5:ls=s.stateNode,fs=!1;break e;case 3:case 4:ls=s.stateNode.containerInfo,fs=!0;break e}s=s.return}if(null===ls)throw Error(a(160));ds(o,u,i),ls=null,fs=!1;var c=i.alternate;null!==c&&(c.return=null),i.return=null}catch(l){Ec(i,t,l)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)ms(t,e),t=t.sibling}function ms(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(vs(t,e),ys(e),4&r){try{ns(3,e,e.return),rs(3,e)}catch(m){Ec(e,e.return,m)}try{ns(5,e,e.return)}catch(m){Ec(e,e.return,m)}}break;case 1:vs(t,e),ys(e),512&r&&null!==n&&Zu(n,n.return);break;case 5:if(vs(t,e),ys(e),512&r&&null!==n&&Zu(n,n.return),32&e.flags){var i=e.stateNode;try{he(i,"")}catch(m){Ec(e,e.return,m)}}if(4&r&&null!=(i=e.stateNode)){var o=e.memoizedProps,u=null!==n?n.memoizedProps:o,s=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===s&&"radio"===o.type&&null!=o.name&&Y(i,o),be(s,u);var l=be(s,o);for(u=0;u<c.length;u+=2){var f=c[u],h=c[u+1];"style"===f?me(i,h):"dangerouslySetInnerHTML"===f?fe(i,h):"children"===f?he(i,h):b(i,f,h,l)}switch(s){case"input":J(i,o);break;case"textarea":ae(i,o);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var p=o.value;null!=p?ne(i,!!o.multiple,p,!1):d!==!!o.multiple&&(null!=o.defaultValue?ne(i,!!o.multiple,o.defaultValue,!0):ne(i,!!o.multiple,o.multiple?[]:"",!1))}i[di]=o}catch(m){Ec(e,e.return,m)}}break;case 6:if(vs(t,e),ys(e),4&r){if(null===e.stateNode)throw Error(a(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(m){Ec(e,e.return,m)}}break;case 3:if(vs(t,e),ys(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{qt(t.containerInfo)}catch(m){Ec(e,e.return,m)}break;case 4:default:vs(t,e),ys(e);break;case 13:vs(t,e),ys(e),8192&(i=e.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,!o||null!==i.alternate&&null!==i.alternate.memoizedState||(zs=Ye())),4&r&&ps(e);break;case 22:if(f=null!==n&&null!==n.memoizedState,1&e.mode?(Xu=(l=Xu)||f,vs(t,e),Xu=l):vs(t,e),ys(e),8192&r){if(l=null!==e.memoizedState,(e.stateNode.isHidden=l)&&!f&&0!==(1&e.mode))for(Ju=e,f=e.child;null!==f;){for(h=Ju=f;null!==Ju;){switch(p=(d=Ju).child,d.tag){case 0:case 11:case 14:case 15:ns(4,d,d.return);break;case 1:Zu(d,d.return);var v=d.stateNode;if("function"===typeof v.componentWillUnmount){r=d,n=d.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(m){Ec(r,n,m)}}break;case 5:Zu(d,d.return);break;case 22:if(null!==d.memoizedState){ws(h);continue}}null!==p?(p.return=d,Ju=p):ws(h)}f=f.sibling}e:for(f=null,h=e;;){if(5===h.tag){if(null===f){f=h;try{i=h.stateNode,l?"function"===typeof(o=i.style).setProperty?o.setProperty("display","none","important"):o.display="none":(s=h.stateNode,u=void 0!==(c=h.memoizedProps.style)&&null!==c&&c.hasOwnProperty("display")?c.display:null,s.style.display=ve("display",u))}catch(m){Ec(e,e.return,m)}}}else if(6===h.tag){if(null===f)try{h.stateNode.nodeValue=l?"":h.memoizedProps}catch(m){Ec(e,e.return,m)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;f===h&&(f=null),h=h.return}f===h&&(f=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:vs(t,e),ys(e),4&r&&ps(e);case 21:}}function ys(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(os(n)){var r=n;break e}n=n.return}throw Error(a(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(he(i,""),r.flags&=-33),cs(e,us(e),i);break;case 3:case 4:var o=r.stateNode.containerInfo;ss(e,us(e),o);break;default:throw Error(a(161))}}catch(u){Ec(e,e.return,u)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function gs(e,t,n){Ju=e,bs(e,t,n)}function bs(e,t,n){for(var r=0!==(1&e.mode);null!==Ju;){var i=Ju,a=i.child;if(22===i.tag&&r){var o=null!==i.memoizedState||$u;if(!o){var u=i.alternate,s=null!==u&&null!==u.memoizedState||Xu;u=$u;var c=Xu;if($u=o,(Xu=s)&&!c)for(Ju=i;null!==Ju;)s=(o=Ju).child,22===o.tag&&null!==o.memoizedState?_s(i):null!==s?(s.return=o,Ju=s):_s(i);for(;null!==a;)Ju=a,bs(a,t,n),a=a.sibling;Ju=i,$u=u,Xu=c}ks(e)}else 0!==(8772&i.subtreeFlags)&&null!==a?(a.return=i,Ju=a):ks(e)}}function ks(e){for(;null!==Ju;){var t=Ju;if(0!==(8772&t.flags)){var n=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Xu||rs(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Xu)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ma(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&Fa(t,o,r);break;case 3:var u=t.updateQueue;if(null!==u){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Fa(t,u,n)}break;case 5:var s=t.stateNode;if(null===n&&4&t.flags){n=s;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var l=t.alternate;if(null!==l){var f=l.memoizedState;if(null!==f){var h=f.dehydrated;null!==h&&qt(h)}}}break;default:throw Error(a(163))}Xu||512&t.flags&&is(t)}catch(d){Ec(t,t.return,d)}}if(t===e){Ju=null;break}if(null!==(n=t.sibling)){n.return=t.return,Ju=n;break}Ju=t.return}}function ws(e){for(;null!==Ju;){var t=Ju;if(t===e){Ju=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Ju=n;break}Ju=t.return}}function _s(e){for(;null!==Ju;){var t=Ju;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{rs(4,t)}catch(s){Ec(t,n,s)}break;case 1:var r=t.stateNode;if("function"===typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(s){Ec(t,i,s)}}var a=t.return;try{is(t)}catch(s){Ec(t,a,s)}break;case 5:var o=t.return;try{is(t)}catch(s){Ec(t,o,s)}}}catch(s){Ec(t,t.return,s)}if(t===e){Ju=null;break}var u=t.sibling;if(null!==u){u.return=t.return,Ju=u;break}Ju=t.return}}var xs,Es=Math.ceil,Ss=k.ReactCurrentDispatcher,Is=k.ReactCurrentOwner,Ts=k.ReactCurrentBatchConfig,Cs=0,Ns=null,Os=null,As=0,Ps=0,Rs=Ei(0),Ds=0,Ls=null,js=0,Ms=0,Fs=0,Us=null,Vs=null,zs=0,qs=1/0,Bs=null,Hs=!1,Ks=null,Ws=null,Qs=!1,Gs=null,$s=0,Xs=0,Ys=null,Js=-1,Zs=0;function ec(){return 0!==(6&Cs)?Ye():-1!==Js?Js:Js=Ye()}function tc(e){return 0===(1&e.mode)?1:0!==(2&Cs)&&0!==As?As&-As:null!==va.transition?(0===Zs&&(Zs=vt()),Zs):0!==(e=bt)?e:e=void 0===(e=window.event)?16:Xt(e.type)}function nc(e,t,n,r){if(50<Xs)throw Xs=0,Ys=null,Error(a(185));yt(e,n,r),0!==(2&Cs)&&e===Ns||(e===Ns&&(0===(2&Cs)&&(Ms|=n),4===Ds&&uc(e,As)),rc(e,r),1===n&&0===Cs&&0===(1&t.mode)&&(qs=Ye()+500,Ui&&qi()))}function rc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-ot(a),u=1<<o,s=i[o];-1===s?0!==(u&n)&&0===(u&r)||(i[o]=dt(u,t)):s<=t&&(e.expiredLanes|=u),a&=~u}}(e,t);var r=ht(e,e===Ns?As:0);if(0===r)null!==n&&Ge(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ge(n),1===t)0===e.tag?function(e){Ui=!0,zi(e)}(sc.bind(null,e)):zi(sc.bind(null,e)),oi((function(){0===(6&Cs)&&qi()})),n=null;else{switch(kt(r)){case 1:n=Ze;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Nc(n,ic.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ic(e,t){if(Js=-1,Zs=0,0!==(6&Cs))throw Error(a(327));var n=e.callbackNode;if(_c()&&e.callbackNode!==n)return null;var r=ht(e,e===Ns?As:0);if(0===r)return null;if(0!==(30&r)||0!==(r&e.expiredLanes)||t)t=mc(e,r);else{t=r;var i=Cs;Cs|=2;var o=pc();for(Ns===e&&As===t||(Bs=null,qs=Ye()+500,hc(e,t));;)try{gc();break}catch(s){dc(e,s)}wa(),Ss.current=o,Cs=i,null!==Os?t=0:(Ns=null,As=0,t=Ds)}if(0!==t){if(2===t&&(0!==(i=pt(e))&&(r=i,t=ac(e,i))),1===t)throw n=Ls,hc(e,0),uc(e,r),rc(e,Ye()),n;if(6===t)uc(e,r);else{if(i=e.current.alternate,0===(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!ur(a(),i))return!1}catch(u){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=mc(e,r))&&(0!==(o=pt(e))&&(r=o,t=ac(e,o))),1===t))throw n=Ls,hc(e,0),uc(e,r),rc(e,Ye()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(a(345));case 2:case 5:wc(e,Vs,Bs);break;case 3:if(uc(e,r),(130023424&r)===r&&10<(t=zs+500-Ye())){if(0!==ht(e,0))break;if(((i=e.suspendedLanes)&r)!==r){ec(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ri(wc.bind(null,e,Vs,Bs),t);break}wc(e,Vs,Bs);break;case 4:if(uc(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var u=31-ot(r);o=1<<u,(u=t[u])>i&&(i=u),r&=~o}if(r=i,10<(r=(120>(r=Ye()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Es(r/1960))-r)){e.timeoutHandle=ri(wc.bind(null,e,Vs,Bs),r);break}wc(e,Vs,Bs);break;default:throw Error(a(329))}}}return rc(e,Ye()),e.callbackNode===n?ic.bind(null,e):null}function ac(e,t){var n=Us;return e.current.memoizedState.isDehydrated&&(hc(e,t).flags|=256),2!==(e=mc(e,t))&&(t=Vs,Vs=n,null!==t&&oc(t)),e}function oc(e){null===Vs?Vs=e:Vs.push.apply(Vs,e)}function uc(e,t){for(t&=~Fs,t&=~Ms,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ot(t),r=1<<n;e[n]=-1,t&=~r}}function sc(e){if(0!==(6&Cs))throw Error(a(327));_c();var t=ht(e,0);if(0===(1&t))return rc(e,Ye()),null;var n=mc(e,t);if(0!==e.tag&&2===n){var r=pt(e);0!==r&&(t=r,n=ac(e,r))}if(1===n)throw n=Ls,hc(e,0),uc(e,t),rc(e,Ye()),n;if(6===n)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wc(e,Vs,Bs),rc(e,Ye()),null}function cc(e,t){var n=Cs;Cs|=1;try{return e(t)}finally{0===(Cs=n)&&(qs=Ye()+500,Ui&&qi())}}function lc(e){null!==Gs&&0===Gs.tag&&0===(6&Cs)&&_c();var t=Cs;Cs|=1;var n=Ts.transition,r=bt;try{if(Ts.transition=null,bt=1,e)return e()}finally{bt=r,Ts.transition=n,0===(6&(Cs=t))&&qi()}}function fc(){Ps=Rs.current,Si(Rs)}function hc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ii(n)),null!==Os)for(n=Os.return;null!==n;){var r=n;switch(ta(r),r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&Ri();break;case 3:io(),Si(Ni),Si(Ci),lo();break;case 5:oo(r);break;case 4:io();break;case 13:case 19:Si(uo);break;case 10:_a(r.type._context);break;case 22:case 23:fc()}n=n.return}if(Ns=e,Os=e=Rc(e.current,null),As=Ps=t,Ds=0,Ls=null,Fs=Ms=js=0,Vs=Us=null,null!==Ia){for(t=0;t<Ia.length;t++)if(null!==(r=(n=Ia[t]).interleaved)){n.interleaved=null;var i=r.next,a=n.pending;if(null!==a){var o=a.next;a.next=i,r.next=o}n.pending=r}Ia=null}return e}function dc(e,t){for(;;){var n=Os;try{if(wa(),fo.current=ou,go){for(var r=vo.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}go=!1}if(po=0,yo=mo=vo=null,bo=!1,ko=0,Is.current=null,null===n||null===n.return){Ds=1,Ls=t,Os=null;break}e:{var o=e,u=n.return,s=n,c=t;if(t=As,s.flags|=32768,null!==c&&"object"===typeof c&&"function"===typeof c.then){var l=c,f=s,h=f.tag;if(0===(1&f.mode)&&(0===h||11===h||15===h)){var d=f.alternate;d?(f.updateQueue=d.updateQueue,f.memoizedState=d.memoizedState,f.lanes=d.lanes):(f.updateQueue=null,f.memoizedState=null)}var p=yu(u);if(null!==p){p.flags&=-257,gu(p,u,s,0,t),1&p.mode&&mu(o,l,t),c=l;var v=(t=p).updateQueue;if(null===v){var m=new Set;m.add(c),t.updateQueue=m}else v.add(c);break e}if(0===(1&t)){mu(o,l,t),vc();break e}c=Error(a(426))}else if(ia&&1&s.mode){var y=yu(u);if(null!==y){0===(65536&y.flags)&&(y.flags|=256),gu(y,u,s,0,t),pa(lu(c,s));break e}}o=c=lu(c,s),4!==Ds&&(Ds=2),null===Us?Us=[o]:Us.push(o),o=u;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,ja(o,pu(0,c,t));break e;case 1:s=c;var g=o.type,b=o.stateNode;if(0===(128&o.flags)&&("function"===typeof g.getDerivedStateFromError||null!==b&&"function"===typeof b.componentDidCatch&&(null===Ws||!Ws.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t,ja(o,vu(o,s,t));break e}}o=o.return}while(null!==o)}kc(n)}catch(k){t=k,Os===n&&null!==n&&(Os=n=n.return);continue}break}}function pc(){var e=Ss.current;return Ss.current=ou,null===e?ou:e}function vc(){0!==Ds&&3!==Ds&&2!==Ds||(Ds=4),null===Ns||0===(268435455&js)&&0===(268435455&Ms)||uc(Ns,As)}function mc(e,t){var n=Cs;Cs|=2;var r=pc();for(Ns===e&&As===t||(Bs=null,hc(e,t));;)try{yc();break}catch(i){dc(e,i)}if(wa(),Cs=n,Ss.current=r,null!==Os)throw Error(a(261));return Ns=null,As=0,Ds}function yc(){for(;null!==Os;)bc(Os)}function gc(){for(;null!==Os&&!$e();)bc(Os)}function bc(e){var t=xs(e.alternate,e,Ps);e.memoizedProps=e.pendingProps,null===t?kc(e):Os=t,Is.current=null}function kc(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(n=Qu(n,t,Ps)))return void(Os=n)}else{if(null!==(n=Gu(n,t)))return n.flags&=32767,void(Os=n);if(null===e)return Ds=6,void(Os=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Os=t);Os=t=e}while(null!==t);0===Ds&&(Ds=5)}function wc(e,t,n){var r=bt,i=Ts.transition;try{Ts.transition=null,bt=1,function(e,t,n,r){do{_c()}while(null!==Gs);if(0!==(6&Cs))throw Error(a(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-ot(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}(e,o),e===Ns&&(Os=Ns=null,As=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||Qs||(Qs=!0,Nc(tt,(function(){return _c(),null}))),o=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||o){o=Ts.transition,Ts.transition=null;var u=bt;bt=1;var s=Cs;Cs|=4,Is.current=null,function(e,t){if(ei=Ht,dr(e=hr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(w){n=null;break e}var u=0,s=-1,c=-1,l=0,f=0,h=e,d=null;t:for(;;){for(var p;h!==n||0!==i&&3!==h.nodeType||(s=u+i),h!==o||0!==r&&3!==h.nodeType||(c=u+r),3===h.nodeType&&(u+=h.nodeValue.length),null!==(p=h.firstChild);)d=h,h=p;for(;;){if(h===e)break t;if(d===n&&++l===i&&(s=u),d===o&&++f===r&&(c=u),null!==(p=h.nextSibling))break;d=(h=d).parentNode}h=p}n=-1===s||-1===c?null:{start:s,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(ti={focusedElem:e,selectionRange:n},Ht=!1,Ju=t;null!==Ju;)if(e=(t=Ju).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Ju=e;else for(;null!==Ju;){t=Ju;try{var v=t.alternate;if(0!==(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==v){var m=v.memoizedProps,y=v.memoizedState,g=t.stateNode,b=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:ma(t.type,m),y);g.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var k=t.stateNode.containerInfo;1===k.nodeType?k.textContent="":9===k.nodeType&&k.documentElement&&k.removeChild(k.documentElement);break;default:throw Error(a(163))}}catch(w){Ec(t,t.return,w)}if(null!==(e=t.sibling)){e.return=t.return,Ju=e;break}Ju=t.return}v=ts,ts=!1}(e,n),ms(n,e),pr(ti),Ht=!!ei,ti=ei=null,e.current=n,gs(n,e,i),Xe(),Cs=s,bt=u,Ts.transition=o}else e.current=n;if(Qs&&(Qs=!1,Gs=e,$s=i),0===(o=e.pendingLanes)&&(Ws=null),function(e){if(at&&"function"===typeof at.onCommitFiberRoot)try{at.onCommitFiberRoot(it,e,void 0,128===(128&e.current.flags))}catch(t){}}(n.stateNode),rc(e,Ye()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)r((i=t[n]).value,{componentStack:i.stack,digest:i.digest});if(Hs)throw Hs=!1,e=Ks,Ks=null,e;0!==(1&$s)&&0!==e.tag&&_c(),0!==(1&(o=e.pendingLanes))?e===Ys?Xs++:(Xs=0,Ys=e):Xs=0,qi()}(e,t,n,r)}finally{Ts.transition=i,bt=r}return null}function _c(){if(null!==Gs){var e=kt($s),t=Ts.transition,n=bt;try{if(Ts.transition=null,bt=16>e?16:e,null===Gs)var r=!1;else{if(e=Gs,Gs=null,$s=0,0!==(6&Cs))throw Error(a(331));var i=Cs;for(Cs|=4,Ju=e.current;null!==Ju;){var o=Ju,u=o.child;if(0!==(16&Ju.flags)){var s=o.deletions;if(null!==s){for(var c=0;c<s.length;c++){var l=s[c];for(Ju=l;null!==Ju;){var f=Ju;switch(f.tag){case 0:case 11:case 15:ns(8,f,o)}var h=f.child;if(null!==h)h.return=f,Ju=h;else for(;null!==Ju;){var d=(f=Ju).sibling,p=f.return;if(as(f),f===l){Ju=null;break}if(null!==d){d.return=p,Ju=d;break}Ju=p}}}var v=o.alternate;if(null!==v){var m=v.child;if(null!==m){v.child=null;do{var y=m.sibling;m.sibling=null,m=y}while(null!==m)}}Ju=o}}if(0!==(2064&o.subtreeFlags)&&null!==u)u.return=o,Ju=u;else e:for(;null!==Ju;){if(0!==(2048&(o=Ju).flags))switch(o.tag){case 0:case 11:case 15:ns(9,o,o.return)}var g=o.sibling;if(null!==g){g.return=o.return,Ju=g;break e}Ju=o.return}}var b=e.current;for(Ju=b;null!==Ju;){var k=(u=Ju).child;if(0!==(2064&u.subtreeFlags)&&null!==k)k.return=u,Ju=k;else e:for(u=b;null!==Ju;){if(0!==(2048&(s=Ju).flags))try{switch(s.tag){case 0:case 11:case 15:rs(9,s)}}catch(_){Ec(s,s.return,_)}if(s===u){Ju=null;break e}var w=s.sibling;if(null!==w){w.return=s.return,Ju=w;break e}Ju=s.return}}if(Cs=i,qi(),at&&"function"===typeof at.onPostCommitFiberRoot)try{at.onPostCommitFiberRoot(it,e)}catch(_){}r=!0}return r}finally{bt=n,Ts.transition=t}}return!1}function xc(e,t,n){e=Da(e,t=pu(0,t=lu(n,t),1),1),t=ec(),null!==e&&(yt(e,1,t),rc(e,t))}function Ec(e,t,n){if(3===e.tag)xc(e,e,n);else for(;null!==t;){if(3===t.tag){xc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Ws||!Ws.has(r))){t=Da(t,e=vu(t,e=lu(n,e),1),1),e=ec(),null!==t&&(yt(t,1,e),rc(t,e));break}}t=t.return}}function Sc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=ec(),e.pingedLanes|=e.suspendedLanes&n,Ns===e&&(As&n)===n&&(4===Ds||3===Ds&&(130023424&As)===As&&500>Ye()-zs?hc(e,0):Fs|=n),rc(e,t)}function Ic(e,t){0===t&&(0===(1&e.mode)?t=1:(t=lt,0===(130023424&(lt<<=1))&&(lt=4194304)));var n=ec();null!==(e=Na(e,t))&&(yt(e,t,n),rc(e,n))}function Tc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Ic(e,n)}function Cc(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(a(314))}null!==r&&r.delete(t),Ic(e,n)}function Nc(e,t){return Qe(e,t)}function Oc(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 Ac(e,t,n,r){return new Oc(e,t,n,r)}function Pc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Rc(e,t){var n=e.alternate;return null===n?((n=Ac(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,o){var u=2;if(r=e,"function"===typeof e)Pc(e)&&(u=1);else if("string"===typeof e)u=5;else e:switch(e){case x:return Lc(n.children,i,o,t);case E:u=8,i|=8;break;case S:return(e=Ac(12,n,t,2|i)).elementType=S,e.lanes=o,e;case N:return(e=Ac(13,n,t,i)).elementType=N,e.lanes=o,e;case O:return(e=Ac(19,n,t,i)).elementType=O,e.lanes=o,e;case R:return jc(n,i,o,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case I:u=10;break e;case T:u=9;break e;case C:u=11;break e;case A:u=14;break e;case P:u=16,r=null;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Ac(u,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Lc(e,t,n,r){return(e=Ac(7,e,r,t)).lanes=n,e}function jc(e,t,n,r){return(e=Ac(22,e,r,t)).elementType=R,e.lanes=n,e.stateNode={isHidden:!1},e}function Mc(e,t,n){return(e=Ac(6,e,null,t)).lanes=n,e}function Fc(e,t,n){return(t=Ac(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=mt(0),this.expirationTimes=mt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Vc(e,t,n,r,i,a,o,u,s){return e=new Uc(e,t,n,u,s),1===t?(t=1,!0===a&&(t|=8)):t=0,a=Ac(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Aa(a),e}function zc(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:_,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function qc(e){if(!e)return Ti;e:{if(qe(e=e._reactInternals)!==e||1!==e.tag)throw Error(a(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Pi(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(a(171))}if(1===e.tag){var n=e.type;if(Pi(n))return Li(e,n,t)}return t}function Bc(e,t,n,r,i,a,o,u,s){return(e=Vc(n,r,!0,e,0,a,0,u,s)).context=qc(null),n=e.current,(a=Ra(r=ec(),i=tc(n))).callback=void 0!==t&&null!==t?t:null,Da(n,a,i),e.current.lanes=i,yt(e,i,r),rc(e,r),e}function Hc(e,t,n,r){var i=t.current,a=ec(),o=tc(i);return n=qc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Ra(a,o)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Da(i,t,o))&&(nc(e,i,o,a),La(e,i,o)),o}function Kc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Wc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Qc(e,t){Wc(e,t),(e=e.alternate)&&Wc(e,t)}xs=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ni.current)ku=!0;else{if(0===(e.lanes&n)&&0===(128&t.flags))return ku=!1,function(e,t,n){switch(t.tag){case 3:Ou(t),da();break;case 5:ao(t);break;case 1:Pi(t.type)&&ji(t);break;case 4:ro(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ii(ya,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Ii(uo,1&uo.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Mu(e,t,n):(Ii(uo,1&uo.current),null!==(e=Hu(e,t,n))?e.sibling:null);Ii(uo,1&uo.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(128&e.flags)){if(r)return qu(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ii(uo,uo.current),r)break;return null;case 22:case 23:return t.lanes=0,Su(e,t,n)}return Hu(e,t,n)}(e,t,n);ku=0!==(131072&e.flags)}else ku=!1,ia&&0!==(1048576&t.flags)&&Zi(t,Wi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Bu(e,t),e=t.pendingProps;var i=Ai(t,Ci.current);Ea(t,n),i=Eo(null,t,r,e,i,n);var o=So();return t.flags|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Pi(r)?(o=!0,ji(t)):o=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Aa(t),i.updater=za,t.stateNode=i,i._reactInternals=t,Ka(t,r,e,n),t=Nu(null,t,r,!0,o,n)):(t.tag=0,ia&&o&&ea(t),wu(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Bu(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"===typeof e)return Pc(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===C)return 11;if(e===A)return 14}return 2}(r),e=ma(r,e),i){case 0:t=Tu(null,t,r,e,n);break e;case 1:t=Cu(null,t,r,e,n);break e;case 11:t=_u(null,t,r,e,n);break e;case 14:t=xu(null,t,r,ma(r.type,e),n);break e}throw Error(a(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,Tu(e,t,r,i=t.elementType===r?i:ma(r,i),n);case 1:return r=t.type,i=t.pendingProps,Cu(e,t,r,i=t.elementType===r?i:ma(r,i),n);case 3:e:{if(Ou(t),null===e)throw Error(a(387));r=t.pendingProps,i=(o=t.memoizedState).element,Pa(e,t),Ma(t,r,null,n);var u=t.memoizedState;if(r=u.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:u.cache,pendingSuspenseBoundaries:u.pendingSuspenseBoundaries,transitions:u.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Au(e,t,r,n,i=lu(Error(a(423)),t));break e}if(r!==i){t=Au(e,t,r,n,i=lu(Error(a(424)),t));break e}for(ra=ci(t.stateNode.containerInfo.firstChild),na=t,ia=!0,aa=null,n=Ya(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(da(),r===i){t=Hu(e,t,n);break e}wu(e,t,r,n)}t=t.child}return t;case 5:return ao(t),null===e&&ca(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,u=i.children,ni(r,i)?u=null:null!==o&&ni(r,o)&&(t.flags|=32),Iu(e,t),wu(e,t,u,n),t.child;case 6:return null===e&&ca(t),null;case 13:return Mu(e,t,n);case 4:return ro(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Xa(t,null,r,n):wu(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,_u(e,t,r,i=t.elementType===r?i:ma(r,i),n);case 7:return wu(e,t,t.pendingProps,n),t.child;case 8:case 12:return wu(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,u=i.value,Ii(ya,r._currentValue),r._currentValue=u,null!==o)if(ur(o.value,u)){if(o.children===i.children&&!Ni.current){t=Hu(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var s=o.dependencies;if(null!==s){u=o.child;for(var c=s.firstContext;null!==c;){if(c.context===r){if(1===o.tag){(c=Ra(-1,n&-n)).tag=2;var l=o.updateQueue;if(null!==l){var f=(l=l.shared).pending;null===f?c.next=c:(c.next=f.next,f.next=c),l.pending=c}}o.lanes|=n,null!==(c=o.alternate)&&(c.lanes|=n),xa(o.return,n,t),s.lanes|=n;break}c=c.next}}else if(10===o.tag)u=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(u=o.return))throw Error(a(341));u.lanes|=n,null!==(s=u.alternate)&&(s.lanes|=n),xa(u,n,t),u=o.sibling}else u=o.child;if(null!==u)u.return=o;else for(u=o;null!==u;){if(u===t){u=null;break}if(null!==(o=u.sibling)){o.return=u.return,u=o;break}u=u.return}o=u}wu(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ea(t,n),r=r(i=Sa(i)),t.flags|=1,wu(e,t,r,n),t.child;case 14:return i=ma(r=t.type,t.pendingProps),xu(e,t,r,i=ma(r.type,i),n);case 15:return Eu(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ma(r,i),Bu(e,t),t.tag=1,Pi(r)?(e=!0,ji(t)):e=!1,Ea(t,n),Ba(t,r,i),Ka(t,r,i,n),Nu(null,t,r,!0,e,n);case 19:return qu(e,t,n);case 22:return Su(e,t,n)}throw Error(a(156,t.tag))};var Gc="function"===typeof reportError?reportError:function(e){console.error(e)};function $c(e){this._internalRoot=e}function Xc(e){this._internalRoot=e}function Yc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Jc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Zc(){}function el(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if("function"===typeof i){var u=i;i=function(){var e=Kc(o);u.call(e)}}Hc(t,o,e,i)}else o=function(e,t,n,r,i){if(i){if("function"===typeof r){var a=r;r=function(){var e=Kc(o);a.call(e)}}var o=Bc(t,r,e,0,null,!1,0,"",Zc);return e._reactRootContainer=o,e[pi]=o.current,qr(8===e.nodeType?e.parentNode:e),lc(),o}for(;i=e.lastChild;)e.removeChild(i);if("function"===typeof r){var u=r;r=function(){var e=Kc(s);u.call(e)}}var s=Vc(e,0,!1,null,0,!1,0,"",Zc);return e._reactRootContainer=s,e[pi]=s.current,qr(8===e.nodeType?e.parentNode:e),lc((function(){Hc(t,s,n,r)})),s}(n,t,e,i,r);return Kc(o)}Xc.prototype.render=$c.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(a(409));Hc(e,t,null,null)},Xc.prototype.unmount=$c.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;lc((function(){Hc(null,e,null,null)})),t[pi]=null}},Xc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Et();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Rt.length&&0!==t&&t<Rt[n].priority;n++);Rt.splice(n,0,e),0===n&&Mt(e)}},wt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ft(t.pendingLanes);0!==n&&(gt(t,1|n),rc(t,Ye()),0===(6&Cs)&&(qs=Ye()+500,qi()))}break;case 13:lc((function(){var t=Na(e,1);if(null!==t){var n=ec();nc(t,e,1,n)}})),Qc(e,1)}},_t=function(e){if(13===e.tag){var t=Na(e,134217728);if(null!==t)nc(t,e,134217728,ec());Qc(e,134217728)}},xt=function(e){if(13===e.tag){var t=tc(e),n=Na(e,t);if(null!==n)nc(n,e,t,ec());Qc(e,t)}},Et=function(){return bt},St=function(e,t){var n=bt;try{return bt=e,t()}finally{bt=n}},_e=function(e,t,n){switch(t){case"input":if(J(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=wi(r);if(!i)throw Error(a(90));Q(r),J(r,i)}}}break;case"textarea":ae(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Ce=cc,Ne=lc;var tl={usingClientEntryPoint:!1,Events:[bi,ki,wi,Ie,Te,cc]},nl={findFiberByHostInstance:gi,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},rl={bundleType:nl.bundleType,version:nl.version,rendererPackageName:nl.rendererPackageName,rendererConfig:nl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:k.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ke(e))?null:e.stateNode},findFiberByHostInstance:nl.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var il=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!il.isDisabled&&il.supportsFiber)try{it=il.inject(rl),at=il}catch(le){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tl,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Yc(t))throw Error(a(200));return zc(e,t,null,n)},t.createRoot=function(e,t){if(!Yc(e))throw Error(a(299));var n=!1,r="",i=Gc;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Vc(e,1,!1,null,0,n,0,r,i),e[pi]=t.current,qr(8===e.nodeType?e.parentNode:e),new $c(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(a(188));throw e=Object.keys(e).join(","),Error(a(268,e))}return e=null===(e=Ke(t))?null:e.stateNode},t.flushSync=function(e){return lc(e)},t.hydrate=function(e,t,n){if(!Jc(t))throw Error(a(200));return el(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Yc(e))throw Error(a(405));var r=null!=n&&n.hydratedSources||null,i=!1,o="",u=Gc;if(null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(u=n.onRecoverableError)),t=Bc(t,null,e,1,null!=n?n:null,i,0,o,u),e[pi]=t.current,qr(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Xc(t)},t.render=function(e,t,n){if(!Jc(t))throw Error(a(200));return el(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Jc(e))throw Error(a(40));return!!e._reactRootContainer&&(lc((function(){el(null,null,e,!1,(function(){e._reactRootContainer=null,e[pi]=null}))})),!0)},t.unstable_batchedUpdates=cc,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Jc(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return el(e,t,n,!1,r)},t.version="18.2.0-next-9e3b772b8-20220608"},250:function(e,t,n){var r=n(164);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},164:function(e,t,n){!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(463)},459:function(e,t){var n,r=Symbol.for("react.element"),i=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),l=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function y(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case a:case u:case o:case h:case d:return e;default:switch(e=e&&e.$$typeof){case l:case c:case f:case v:case p:case s:return e;default:return t}}case i:return t}}}n=Symbol.for("react.module.reference")},900:function(e,t,n){n(459)},374:function(e,t,n){var r=n(791),i=Symbol.for("react.element"),a=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,u=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,a={},c=null,l=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(l=t.ref),t)o.call(t,r)&&!s.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===a[r]&&(a[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:l,props:a,_owner:u.current}}t.Fragment=a,t.jsx=c,t.jsxs=c},117:function(e,t){var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),d=Symbol.iterator;var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,m={};function y(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||p}function g(){}function b(e,t,n){this.props=e,this.context=t,this.refs=m,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")},g.prototype=y.prototype;var k=b.prototype=new g;k.constructor=b,v(k,y.prototype),k.isPureReactComponent=!0;var w=Array.isArray,_=Object.prototype.hasOwnProperty,x={current:null},E={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,r){var i,a={},o=null,u=null;if(null!=t)for(i in void 0!==t.ref&&(u=t.ref),void 0!==t.key&&(o=""+t.key),t)_.call(t,i)&&!E.hasOwnProperty(i)&&(a[i]=t[i]);var s=arguments.length-2;if(1===s)a.children=r;else if(1<s){for(var c=Array(s),l=0;l<s;l++)c[l]=arguments[l+2];a.children=c}if(e&&e.defaultProps)for(i in s=e.defaultProps)void 0===a[i]&&(a[i]=s[i]);return{$$typeof:n,type:e,key:o,ref:u,props:a,_owner:x.current}}function I(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var T=/\/+/g;function C(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function N(e,t,i,a,o){var u=typeof e;"undefined"!==u&&"boolean"!==u||(e=null);var s=!1;if(null===e)s=!0;else switch(u){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case n:case r:s=!0}}if(s)return o=o(s=e),e=""===a?"."+C(s,0):a,w(o)?(i="",null!=e&&(i=e.replace(T,"$&/")+"/"),N(o,t,i,"",(function(e){return e}))):null!=o&&(I(o)&&(o=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,i+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(T,"$&/")+"/")+e)),t.push(o)),1;if(s=0,a=""===a?".":a+":",w(e))for(var c=0;c<e.length;c++){var l=a+C(u=e[c],c);s+=N(u,t,i,l,o)}else if(l=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e),"function"===typeof l)for(e=l.call(e),c=0;!(u=e.next()).done;)s+=N(u=u.value,t,i,l=a+C(u,c++),o);else if("object"===u)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function O(e,t,n){if(null==e)return e;var r=[],i=0;return N(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function A(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var P={current:null},R={transition:null},D={ReactCurrentDispatcher:P,ReactCurrentBatchConfig:R,ReactCurrentOwner:x};t.Children={map:O,forEach:function(e,t,n){O(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return O(e,(function(){t++})),t},toArray:function(e){return O(e,(function(e){return e}))||[]},only:function(e){if(!I(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=y,t.Fragment=i,t.Profiler=o,t.PureComponent=b,t.StrictMode=a,t.Suspense=l,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=D,t.cloneElement=function(e,t,r){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=v({},e.props),a=e.key,o=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,u=x.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(c in t)_.call(t,c)&&!E.hasOwnProperty(c)&&(i[c]=void 0===t[c]&&void 0!==s?s[c]:t[c])}var c=arguments.length-2;if(1===c)i.children=r;else if(1<c){s=Array(c);for(var l=0;l<c;l++)s[l]=arguments[l+2];i.children=s}return{$$typeof:n,type:e.type,key:a,ref:o,props:i,_owner:u}},t.createContext=function(e){return(e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:u,_context:e},e.Consumer=e},t.createElement=S,t.createFactory=function(e){var t=S.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=I,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:A}},t.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=R.transition;R.transition={};try{e()}finally{R.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return P.current.useCallback(e,t)},t.useContext=function(e){return P.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return P.current.useDeferredValue(e)},t.useEffect=function(e,t){return P.current.useEffect(e,t)},t.useId=function(){return P.current.useId()},t.useImperativeHandle=function(e,t,n){return P.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return P.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return P.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return P.current.useMemo(e,t)},t.useReducer=function(e,t,n){return P.current.useReducer(e,t,n)},t.useRef=function(e){return P.current.useRef(e)},t.useState=function(e){return P.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return P.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return P.current.useTransition()},t.version="18.2.0"},791:function(e,t,n){e.exports=n(117)},184:function(e,t,n){e.exports=n(374)},813:function(e,t){function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<a(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,o=i>>>1;r<o;){var u=2*(r+1)-1,s=e[u],c=u+1,l=e[c];if(0>a(s,n))c<i&&0>a(l,s)?(e[r]=l,e[c]=n,r=c):(e[r]=s,e[u]=n,r=u);else{if(!(c<i&&0>a(l,n)))break e;e[r]=l,e[c]=n,r=c}}}return t}function a(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 o=performance;t.unstable_now=function(){return o.now()}}else{var u=Date,s=u.now();t.unstable_now=function(){return u.now()-s}}var c=[],l=[],f=1,h=null,d=3,p=!1,v=!1,m=!1,y="function"===typeof setTimeout?setTimeout:null,g="function"===typeof clearTimeout?clearTimeout:null,b="undefined"!==typeof setImmediate?setImmediate:null;function k(e){for(var t=r(l);null!==t;){if(null===t.callback)i(l);else{if(!(t.startTime<=e))break;i(l),t.sortIndex=t.expirationTime,n(c,t)}t=r(l)}}function w(e){if(m=!1,k(e),!v)if(null!==r(c))v=!0,R(_);else{var t=r(l);null!==t&&D(w,t.startTime-e)}}function _(e,n){v=!1,m&&(m=!1,g(I),I=-1),p=!0;var a=d;try{for(k(n),h=r(c);null!==h&&(!(h.expirationTime>n)||e&&!N());){var o=h.callback;if("function"===typeof o){h.callback=null,d=h.priorityLevel;var u=o(h.expirationTime<=n);n=t.unstable_now(),"function"===typeof u?h.callback=u:h===r(c)&&i(c),k(n)}else i(c);h=r(c)}if(null!==h)var s=!0;else{var f=r(l);null!==f&&D(w,f.startTime-n),s=!1}return s}finally{h=null,d=a,p=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var x,E=!1,S=null,I=-1,T=5,C=-1;function N(){return!(t.unstable_now()-C<T)}function O(){if(null!==S){var e=t.unstable_now();C=e;var n=!0;try{n=S(!0,e)}finally{n?x():(E=!1,S=null)}}else E=!1}if("function"===typeof b)x=function(){b(O)};else if("undefined"!==typeof MessageChannel){var A=new MessageChannel,P=A.port2;A.port1.onmessage=O,x=function(){P.postMessage(null)}}else x=function(){y(O,0)};function R(e){S=e,E||(E=!0,x())}function D(e,n){I=y((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){v||p||(v=!0,R(_))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return d},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(e){switch(d){case 1:case 2:case 3:var t=3;break;default:t=d}var n=d;d=t;try{return e()}finally{d=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=d;d=e;try{return t()}finally{d=n}},t.unstable_scheduleCallback=function(e,i,a){var o=t.unstable_now();switch("object"===typeof a&&null!==a?a="number"===typeof(a=a.delay)&&0<a?o+a:o:a=o,e){case 1:var u=-1;break;case 2:u=250;break;case 5:u=1073741823;break;case 4:u=1e4;break;default:u=5e3}return e={id:f++,callback:i,priorityLevel:e,startTime:a,expirationTime:u=
2a+u,sortIndex:-1},a>o?(e.sortIndex=a,n(l,e),null===r(c)&&e===r(l)&&(m?(g(I),I=-1):m=!0,D(w,a-o))):(e.sortIndex=u,n(c,e),v||p||(v=!0,R(_))),e},t.unstable_shouldYield=N,t.unstable_wrapCallback=function(e){var t=d;return function(){var n=d;d=t;try{return e.apply(this,arguments)}finally{d=n}}}},296:function(e,t,n){e.exports=n(813)},561:function(e,t,n){var r=n(791);var i="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},a=r.useState,o=r.useEffect,u=r.useLayoutEffect,s=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(r){return!0}}var l="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return u((function(){i.value=n,i.getSnapshot=t,c(i)&&l({inst:i})}),[e,n,t]),o((function(){return c(i)&&l({inst:i}),e((function(){c(i)&&l({inst:i})}))}),[e]),s(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:l},595:function(e,t,n){var r=n(791),i=n(248);var a="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},o=i.useSyncExternalStore,u=r.useRef,s=r.useEffect,c=r.useMemo,l=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var f=u(null);if(null===f.current){var h={hasValue:!1,value:null};f.current=h}else h=f.current;f=c((function(){function e(e){if(!s){if(s=!0,o=e,e=r(e),void 0!==i&&h.hasValue){var t=h.value;if(i(t,e))return u=t}return u=e}if(t=u,a(o,e))return t;var n=r(e);return void 0!==i&&i(t,n)?t:(o=e,u=n)}var o,u,s=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]}),[t,n,r,i]);var d=o(e,f[0],f[1]);return s((function(){h.hasValue=!0,h.value=d}),[d]),l(d),d}},248:function(e,t,n){e.exports=n(561)},327:function(e,t,n){e.exports=n(595)}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}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.p="/",function(){var e,t=n(791),r=n(250);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){if(e){if("string"===typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,u=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(s){u=!0,i=s}finally{try{o||null==n.return||n.return()}finally{if(u)throw i}}return a}}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(e||(e={}));var s=function(e){return e};var c="beforeunload",l="popstate";function f(e){e.preventDefault(),e.returnValue=""}function h(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}function d(){return Math.random().toString(36).substr(2,8)}function p(e){var t=e.pathname,n=void 0===t?"/":t,r=e.search,i=void 0===r?"":r,a=e.hash,o=void 0===a?"":a;return i&&"?"!==i&&(n+="?"===i.charAt(0)?i:"?"+i),o&&"#"!==o&&(n+="#"===o.charAt(0)?o:"#"+o),n}function v(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var m=(0,t.createContext)(null);var y=(0,t.createContext)(null);var g=(0,t.createContext)({outlet:null,matches:[]});function b(e,t){if(!e)throw new Error(t)}
2function k(e,t,n){void 0===n&&(n="/");var r=C(("string"===typeof t?v(t):t).pathname||"/",n);if(null==r)return null;var i=w(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var n=e.length===t.length&&e.slice(0,-1).every((function(e,n){return e===t[n]}));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(i);for(var a=null,o=0;null==a&&o<i.length;++o)a=S(i[o],r);return a}function w(e,t,n,r){return void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r=""),e.forEach((function(e,i){var a={relativePath:e.path||"",caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};a.relativePath.startsWith("/")&&(a.relativePath.startsWith(r)||b(!1),a.relativePath=a.relativePath.slice(r.length));var o=N([r,a.relativePath]),u=n.concat(a);e.children&&e.children.length>0&&(!0===e.index&&b(!1),w(e.children,t,u,o)),(null!=e.path||e.index)&&t.push({path:o,score:E(o,e.index),routesMeta:u})})),t}var _=/^:\w+$/,x=function(e){return"*"===e};function E(e,t){var n=e.split("/"),r=n.length;return n.some(x)&&(r+=-2),t&&(r+=2),n.filter((function(e){return!x(e)})).reduce((function(e,t){return e+(_.test(t)?3:""===t?1:10)}),r)}function S(e,t){for(var n=e.routesMeta,r={},i="/",a=[],o=0;o<n.length;++o){var u=n[o],s=o===n.length-1,c="/"===i?t:t.slice(i.length)||"/",l=I({path:u.relativePath,caseSensitive:u.caseSensitive,end:s},c);if(!l)return null;
2Object.assign(r,l.params);var f=u.route;a.push({params:r,pathname:N([i,l.pathname]),pathnameBase:O(N([i,l.pathnameBase])),route:f}),"/"!==l.pathnameBase&&(i=N([i,l.pathnameBase]))}return a}function I(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});var n=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);var r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/:(\w+)/g,(function(e,t){return r.push(t),"([^\\/]+)"}));e.endsWith("*")?(r.push("*"),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):i+=n?"\\/*$":"(?:(?=[.~-]|%[0-9A-F]{2})|\\b|\\/|$)";return[new RegExp(i,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),r=o(n,2),i=r[0],a=r[1],u=t.match(i);if(!u)return null;var s=u[0],c=s.replace(/(.)\/+$/,"$1"),l=u.slice(1);return{params:a.reduce((function(e,t,n){if("*"===t){var r=l[n]||"";c=s.slice(0,s.length-r.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(n){return e}}(l[n]||""),e}),{}),pathname:s,pathnameBase:c,pattern:e}}function T(e,t,n){var r,i="string"===typeof e?v(e):e,a=""===e||""===i.pathname?"/":i.pathname;if(null==a)r=n;else{var o=t.length-1;if(a.startsWith("..")){for(var u=a.split("/");".."===u[0];)u.shift(),o-=1;i.pathname=u.join("/")}r=o>=0?t[o]:"/"}var s=function(e,t){void 0===t&&(t="/");var n="string"===typeof e?v(e):e,r=n.pathname,i=n.search,a=void 0===i?"":i,o=n.hash,u=void 0===o?"":o,s=r?r.startsWith("/")?r:function(e,t){var n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((function(e){".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(r,t):t;return{pathname:s,search:A(a),hash:P(u)}}(i,r);return a&&"/"!==a&&a.endsWith("/")&&!s.pathname.endsWith("/")&&(s.pathname+="/"),s}function C(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;var n=e.charAt(t.length);return n&&"/"!==n?null:e.slice(t.length)||"/"}var N=function(e){return e.join("/").replace(/\/\/+/g,"/")},O=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},A=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},P=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""};function R(e){D()||b(!1);var n=(0,t.useContext)(m),r=n.basename,i=n.navigator,a=M(e),o=a.hash,u=a.pathname,s=a.search,c=u;if("/"!==r){var l=function(e){return""===e||""===e.pathname?"/":"string"===typeof e?v(e).pathname:e.pathname}(e),f=null!=l&&l.endsWith("/");c="/"===u?r+(f?"/":""):N([r,u])}return i.createHref({pathname:c,search:s,hash:o})}function D(){return null!=(0,t.useContext)(y)}function L(){return D()||b(!1),(0,t.useContext)(y).location}function j(){D()||b(!1);var e=(0,t.useContext)(m),n=e.basename,r=e.navigator,i=(0,t.useContext)(g).matches,a=L().pathname,o=JSON.stringify(i.map((function(e){return e.pathnameBase}))),u=(0,t.useRef)(!1);(0,t.useEffect)((function(){u.current=!0}));var s=(0,t.useCallback)((function(e,t){if(void 0===t&&(t={}),u.current)if("number"!==typeof e){var i=T(e,JSON.parse(o),a);"/"!==n&&(i.pathname=N([n,i.pathname])),(t.replace?r.replace:r.push)(i,t.state)}else r.go(e)}),[n,r,o,a]);return s}function M(e){var n=(0,t.useContext)(g).matches,r=L().pathname,i=JSON.stringify(n.map((function(e){return e.pathnameBase})));return(0,t.useMemo)((function(){return T(e,JSON.parse(i),r)}),[e,i,r])}function F(e,n){return void 0===n&&(n=[]),null==e?null:e.reduceRight((function(r,i,a){return(0,t.createElement)(g.Provider,{children:void 0!==i.route.element?i.route.element:r,value:{outlet:r,matches:n.concat(e.slice(0,a+1))}})}),null)}function U(e){var n=e.to,r=e.replace,i=e.state;D()||b(!1);var a=j();return(0,t.useEffect)((function(){a(n,{replace:r,state:i})})),null}function V(e){b(!1)}function z(n){var r=n.basename,i=void 0===r?"/":r,a=n.children,o=void 0===a?null:a,u=n.location,s=n.navigationType,c=void 0===s?e.Pop:s,l=n.navigator,f=n.static,h=void 0!==f&&f;D()&&b(!1);var d=O(i),p=(0,t.useMemo)((function(){return{basename:d,navigator:l,static:h}}),[d,l,h]);"string"===typeof u&&(u=v(u));var g=u,k=g.pathname,w=void 0===k?"/":k,_=g.search,x=void 0===_?"":_,E=g.hash,S=void 0===E?"":E,I=g.state,T=void 0===I?null:I,N=g.key,A=void 0===N?"default":N,P=(0,t.useMemo)((function(){var e=C(w,d);return null==e?null:{pathname:e,search:x,hash:S,state:T,key:A}}),[d,w,x,S,T,A]);return null==P?null:(0,t.createElement)(m.Provider,{value:p},(0,t.createElement)(y.Provider,{children:o,value:{location:P,navigationType:c}}))}function q(e){var n=e.children,r=e.location;return function(e,n){D()||b(!1);var r,i=(0,t.useContext)(g).matches,a=i[i.length-1],o=a?a.params:{},u=(a&&a.pathname,a?a.pathnameBase:"/"),s=(a&&a.route,L());if(n){var c,l="string"===typeof n?v(n):n;"/"===u||(null==(c=l.pathname)?void 0:c.startsWith(u))||b(!1),r=l}else r=s;var f=r.pathname||"/",h=k(e,{pathname:"/"===u?f:f.slice(u.length)||"/"});return F(h&&h.map((function(e){return Object.assign({},e,{params:Object.assign({},o,e.params),pathname:N([u,e.pathname]),pathnameBase:"/"===e.pathnameBase?u:N([u,e.pathnameBase])})})),i)}(B(n),r)}function B(e){var n=[];
2return t.Children.forEach(e,(function(e){if((0,t.isValidElement)(e))if(e.type!==t.Fragment){e.type!==V&&b(!1);var r={caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path};e.props.children&&(r.children=B(e.props.children)),n.push(r)}else n.push.apply(n,B(e.props.children))})),n}function H(){return H=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},H.apply(this,arguments)}function K(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var W=["onClick","reloadDocument","replace","state","target","to"],Q=["aria-current","caseSensitive","className","end","style","to","children"];function G(n){var r=n.basename,i=n.children,a=n.window,m=(0,t.useRef)();null==m.current&&(m.current=function(t){void 0===t&&(t={});var n=t.window,r=void 0===n?document.defaultView:n,i=r.history;function a(){var e=r.location,t=e.pathname,n=e.search,a=e.hash,o=i.state||{};return[o.idx,s({pathname:t,search:n,hash:a,state:o.usr||null,key:o.key||"default"})]}var o=null;r.addEventListener(l,(function(){if(o)w.call(o),o=null;else{var t=e.Pop,n=a(),r=n[0],i=n[1];if(w.length){if(null!=r){var u=g-r;u&&(o={action:t,location:i,retry:function(){T(-1*u)}},T(u))}}else I(t)}}));var m=e.Pop,y=a(),g=y[0],b=y[1],k=h(),w=h();function _(e){return"string"===typeof e?e:p(e)}function x(e,t){return void 0===t&&(t=null),s(u({pathname:b.pathname,hash:"",search:""},"string"===typeof e?v(e):e,{state:t,key:d()}))}function E(e,t){return[{usr:e.state,key:e.key,idx:t},_(e)]}function S(e,t,n){return!w.length||(w.call({action:e,location:t,retry:n}),!1)}function I(e){m=e;var t=a();g=t[0],b=t[1],k.call({action:m,location:b})}function T(e){i.go(e)}null==g&&(g=0,i.replaceState(u({},i.state,{idx:g}),""));
2var C={get action(){return m},get location(){return b},createHref:_,push:function t(n,a){var o=e.Push,u=x(n,a);if(S(o,u,(function(){t(n,a)}))){var s=E(u,g+1),c=s[0],l=s[1];try{i.pushState(c,"",l)}catch(f){r.location.assign(l)}I(o)}},replace:function t(n,r){var a=e.Replace,o=x(n,r);if(S(a,o,(function(){t(n,r)}))){var u=E(o,g),s=u[0],c=u[1];i.replaceState(s,"",c),I(a)}},go:T,back:function(){T(-1)},forward:function(){T(1)},listen:function(e){return k.push(e)},block:function(e){var t=w.push(e);return 1===w.length&&r.addEventListener(c,f),function(){t(),w.length||r.removeEventListener(c,f)}}};return C}({window:a}));var y=m.current,g=o((0,t.useState)({action:y.action,location:y.location}),2),b=g[0],k=g[1];return(0,t.useLayoutEffect)((function(){return y.listen(k)}),[y]),(0,t.createElement)(z,{basename:r,children:i,location:b.location,navigationType:b.action,navigator:y})}var $=(0,t.forwardRef)((function(e,n){var r=e.onClick,i=e.reloadDocument,a=e.replace,o=void 0!==a&&a,u=e.state,s=e.target,c=e.to,l=K(e,W),f=R(c),h=function(e,n){var r=void 0===n?{}:n,i=r.target,a=r.replace,o=r.state,u=j(),s=L(),c=M(e);return(0,t.useCallback)((function(t){if(0===t.button&&(!i||"_self"===i)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(t)){t.preventDefault();var n=!!a||p(s)===p(c);u(e,{replace:n,state:o})}}),[s,u,c,a,o,i,e])}(c,{replace:o,state:u,target:s});return(0,t.createElement)("a",H({},l,{href:f,onClick:function(e){r&&r(e),e.defaultPrevented||i||h(e)},ref:n,target:s}))}));var X=(0,t.forwardRef)((function(e,n){var r=e["aria-current"],i=void 0===r?"page":r,a=e.caseSensitive,o=void 0!==a&&a,u=e.className,s=void 0===u?"":u,c=e.end,l=void 0!==c&&c,f=e.style,h=e.to,d=e.children,p=K(e,Q),v=L(),m=M(h),y=v.pathname,g=m.pathname;o||(y=y.toLowerCase(),g=g.toLowerCase());var b,k=y===g||!l&&y.startsWith(g)&&"/"===y.charAt(g.length),w=k?i:void 0;b="function"===typeof s?s({isActive:k}):[s,k?"active":null].filter(Boolean).join(" ");var _="function"===typeof f?f({isActive:k}):f;return(0,t.createElement)($,H({},p,{"aria-current":w,className:b,ref:n,style:_,to:h}),"function"===typeof d?d({isActive:k}):d)}));var Y=n(248),J=n(327),Z=n(164);var ee=function(e){e()},te=function(){return ee},ne=t.createContext(null);function re(){return(0,t.useContext)(ne)}var ie=function(){throw new Error("uSES not initialized!")},ae=ie,oe=function(e,t){return e===t};function ue(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ne,n=e===ne?re:function(){return(0,t.useContext)(e)};return function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:oe;var i=n(),a=i.store,o=i.subscription,u=i.getServerState,s=ae(o.addNestedSub,a.getState,u||a.getState,e,r);return(0,t.useDebugValue)(s),s}}var se=ue();n(110),n(900);var ce={notify:function(){},get:function(){return[]}};function le(e,t){var n,r=ce;function i(){o.onStateChange&&o.onStateChange()}function a(){n||(n=t?t.addNestedSub(i):e.subscribe(i),r=function(){var e=te(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,i=n={callback:e,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){r&&null!==t&&(r=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}())}var o={addNestedSub:function(e){return a(),r.subscribe(e)},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:i,isSubscribed:function(){return Boolean(n)},trySubscribe:a,tryUnsubscribe:function(){n&&(n(),n=void 0,r.clear(),r=ce)},getListeners:function(){return r}};return o}var fe=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement)?t.useLayoutEffect:t.useEffect;var he=function(e){var n=e.store,r=e.context,i=e.children,a=e.serverState,o=(0,t.useMemo)((function(){var e=le(n);return{store:n,subscription:e,getServerState:a?function(){return a}:void 0}}),[n,a]),u=(0,t.useMemo)((function(){return n.getState()}),[n]);fe((function(){var e=o.subscription;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),u!==n.get
2State()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=void 0}}),[o,u]);var s=r||ne;return t.createElement(s.Provider,{value:o},i)};function de(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ne,n=e===ne?re:function(){return(0,t.useContext)(e)};return function(){return n().store}}var pe=de();function ve(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ne,t=e===ne?pe:de(e);return function(){return t().dispatch}}var me,ye=ve();function ge(e,t){return e===t?0!==e||0!==t||1/e===1/t:e!==e&&t!==t}function be(e,t){if(ge(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!ge(e[n[i]],t[n[i]]))return!1;return!0}!function(e){ae=e}(J.useSyncExternalStoreWithSelector),function(e){e}(Y.useSyncExternalStore),me=Z.unstable_batchedUpdates,ee=me;var ke="Loading_loading__c-WnS";var we=n.p+"static/media/blocks-wave.6dd8ecd84ac38dd4c2d6914112154b81.svg",_e=n(184),xe=function(){return(0,_e.jsx)("figure",{className:ke,children:(0,_e.jsx)("img",{src:we,alt:"Three animated dots"})})};function Ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(n),!0).forEach((function(t){Ee(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Te={button:"Button_button__9Q+hs",primary:"Button_primary__BzC0C",secondary:"Button_secondary__8IIFK"},Ce=function(e){var t=e.type?e.type:"button",n=!!e.disabled&&e.disabled;return(0,_e.jsx)("button",{className:"".concat(Te.button," ").concat(Te[e.className]),type:t,disabled:n,onClick:function(){e.onClick&&e.onClick()},children:e.children})}
2,Ne="Container_container__aZ6gA",Oe=function(e){return(0,_e.jsx)("div",{className:Ne,children:e.children})},Ae="Navbar_nav__6WD01",Pe="Navbar_nav__group__LWMqb",Re="Navbar_nav__icons__CoE6a",De="Navbar_nav__items__Dk7lf",Le="Navbar_nav__shop__icons__NxNN3",je="Navbar_nav__amount__n5K9M",Me="Navbar_nav__menu__Prfgw",Fe={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Ue=t.createContext&&t.createContext(Fe),Ve=function(){return Ve=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ve.apply(this,arguments)},ze=function(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);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function qe(e){return e&&e.map((function(e,n){return t.createElement(e.tag,Ve({key:n},e.attr),qe(e.child))}))}function Be(e){return function(n){return t.createElement(He,Ve({attr:Ve({},e.attr)},n),qe(e.child))}}function He(e){var n=function(n){var r,i=e.attr,a=e.size,o=e.title,u=ze(e,["attr","size","title"]),s=a||n.size||"1em";return n.className&&(r=n.className),e.className&&(r=(r?r+" ":"")+e.className),t.createElement("svg",Ve({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,i,u,{className:r,style:Ve(Ve({color:e.color||n.color},n.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),o&&t.createElement("title",null,o),e.children)};return void 0!==Ue?t.createElement(Ue.Consumer,null,(function(e){return n(e)})):n(Fe)}function Ke(e){return Be({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]})(e)}function We(e){return Be({tag:"svg",attr:{t:"1551322312294",style:"",viewBox:"0 0 1024 1024",version:"1.1"},child:[{tag:"defs",attr:{},child:[]},{tag:"path",attr:{d:"M474 152m8 0l60 0q8 0 8 8l0 704q0 8-8 8l-60 0q-8 0-8-8l0-704q0-8 8-8Z"}},{tag:"path",attr:{d:"M168 474m8 0l672 0q8 0 8 8l0 60q0 8-8 8l-672 0q-8 0-8-8l0-60q0-8 8-8Z"}}]})(e)}function Qe(e){return Be({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M858.5 763.6a374 374 0 0 0-80.6-119.5 375.63 375.63 0 0 0-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 0 0-80.6 119.5A371.7 371.7 0 0 0 136 901.8a8 8 0 0 0 8 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 0 0 8-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]})(e)}function Ge(e){return Be({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 7h18v2H3v-2zm0 7h18v2H3v-2z"}}]}]})(e)}function $e(e){return Be({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 18.26l-7.053 3.948 1.575-7.928L.587 8.792l8.027-.952L12 .5l3.386 7.34 8.027.952-5.935 5.488 1.575 7.928z"}}]}]})(e)}var Xe="Menu_menu__Q0kgm",Ye="Menu_menu__header__nnSiz",Je="Menu_menu__icons__Noo8p",Ze="Menu_menu__list__ON8BH";function et(e){return Be({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M8 8.707l3.646 3.647.708-.707L8.707 8l3.647-3.646-.707-.708L8 7.293 4.354 3.646l-.707.708L7.293 8l-3.646 3.646.707.708L8 8.707z"}}]})(e)}var tt=function(e){var t=j();return Z.createPortal((0,_e.jsx)("div",{className:Xe,children:(0,_e.jsxs)(Oe,{children:[(0,_e.jsxs)("div",{className:Ye,children:[(0,_e.jsx)("p",{className:"logo",children:"finest&co"}),(0,_e.jsxs)("div",{className:Je,children:[(0,_e.jsx)("span",{onClick:function(){return t("/account")},children:(0,_e.jsx)(Qe,{size:"22",color:"var(--primary)"})}),(0,_e.jsx)("span",{onClick:function(){return e.setIsOpen((function(e){return!e}))},children:(0,_e.jsx)(et,{size:"28",color:"var(--primary)"})})]})]}),(0,_e.jsxs)("ul",{className:Ze,children:[(0,_e.jsx)("li",{children:(0,_e.jsx)($,{to:"/",children:"Home"})}),(0,_e.jsx)("li",{children:(0,_e.jsx)($,{to:"/shop",children:"Shop"})}),(0,_e.jsx)("li",{children:(0,_e.jsx)($,{to:"/cart",children:"Cart"})}),(0,_e.jsx)("li",{children:(0,_e.jsx)($,{to:"/wishlist",children:"Wishlist"})})]})]})}),document.querySelector("#menu"))}
2,nt="NavItems_items__1edYr",rt=function(e){var t=e.color;return(0,_e.jsxs)("ul",{className:nt,children:[(0,_e.jsx)("li",{children:(0,_e.jsx)(X,{to:"/",style:{color:"".concat(t)},children:"Home"})}),(0,_e.jsx)("li",{children:(0,_e.jsx)(X,{to:"/shop",style:{color:"".concat(t)},children:"Shop"})})]})};function it(e){return Be({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"circle",attr:{cx:"176",cy:"416",r:"16",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32"}},{tag:"circle",attr:{cx:"400",cy:"416",r:"16",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32"}},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M48 80h64l48 272h256"}},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M160 288h249.44a8 8 0 007.85-6.43l28.8-144a8 8 0 00-7.85-9.57H128"}}]})(e)}function at(e){return Be({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M400 145.49L366.51 112 256 222.51 145.49 112 112 145.49 222.51 256 112 366.51 145.49 400 256 289.49 366.51 400 400 366.51 289.49 256 400 145.49z"}}]})(e)}function ot(e){return Be({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M12.0122 5.57169L10.9252 4.48469C8.77734 2.33681 5.29493 2.33681 3.14705 4.48469C0.999162 6.63258 0.999162 10.115 3.14705 12.2629L11.9859 21.1017L11.9877 21.0999L12.014 21.1262L20.8528 12.2874C23.0007 10.1395 23.0007 6.65711 20.8528 4.50923C18.705 2.36134 15.2226 2.36134 13.0747 4.50923L12.0122 5.57169ZM11.9877 18.2715L16.9239 13.3352L18.3747 11.9342L18.3762 11.9356L19.4386 10.8732C20.8055 9.50635 20.8055 7.29028 19.4386 5.92344C18.0718 4.55661 15.8557 4.55661 14.4889 5.92344L12.0133 8.39904L12.006 8.3918L12.005 8.39287L9.51101 5.89891C8.14417 4.53207 5.92809 4.53207 4.56126 5.89891C3.19442 7.26574 3.19442 9.48182 4.56126 10.8487L7.10068 13.3881L7.10248 13.3863L11.9877 18.2715Z",fill:"currentColor"}}]})(e)}function ut(e){return ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ut(e)}function st(){st=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",o=r.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(I){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var i=t&&t.prototype instanceof f?t:f,a=Object.create(i.prototype),o=new x(r||[]);return a._invoke=function(e,t,n){var r="suspendedStart";return function(i,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw a;return S()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var u=k(o,n);if(u){if(u===l)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=c(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}(e,n,o),a}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(I){return{type:"throw",arg:I}}}e.wrap=s;var l={};function f(){}function h(){}function d(){}var p={};u(p,i,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(E([])));m&&m!==t&&n.call(m,i)&&(p=m);var y=d.prototype=f.prototype=Object.create(p);function g(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function r(i,a,o,u){var s=c(e[i],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==ut(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,o,u)}),(function(e){r("throw",e,o,u)})):t.resolve(f).then((function(e){l.value=e,o(l)}),(function(e){return r("throw",e,o,u)}))}u(s.arg)}var i;this._invoke=function(e,n){function a(){return new t((function(t,i){r(e,n,t,i)}))}return i=i?i.then(a,a):a()}}function k(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&
vendor: 4,479 bytes, line 2
2(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,l;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function E(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return h.prototype=d,u(y,"constructor",d),u(d,"constructor",h),h.displayName=u(d,o,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,u(e,o,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},g(b.prototype),u(b.prototype,a,(function(){return this})),e.AsyncIterator=b,e.async=function(t,n,r,i,a){void 0===a&&(a=Promise);var o=new b(s(t,n,r,i),a);return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},g(y),u(y,o,"Generator"),u(y,i,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=E,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,l):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;_(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}function ct(e,t,n,r,i,a,o){try{var u=e[a](o),s=u.value}catch(c){return void n(c)}u.done?t(s):Promise.resolve(s).then(r,i)}function lt(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);
2function o(e){ct(a,r,i,o,u,"next",e)}function u(e){ct(a,r,i,o,u,"throw",e)}o(void 0)}))}}var ft="Logout_logout__hzFIp",ht="Logout_close__HfWB7",dt="Logout_logout__icon__6NEGi",pt="Logout_logout__heading__upsSx",vt="Logout_logout__text__5FoGy",mt="Logout_logout__transfer__sl9cd",yt="Logout_logout__btns__iQz5U";function gt(e){return Be({tag:"svg",attr:{viewBox:"0 0 20 20",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M3.172 5.172a4 4 0 015.656 0L10 6.343l1.172-1.171a4 4 0 115.656 5.656L10 17.657l-6.828-6.829a4 4 0 010-5.656z",clipRule:"evenodd"}}]})(e)}function bt(e){return Be({tag:"svg",attr:{viewBox:"0 0 20 20",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M3 3a1 1 0 00-1 1v12a1 1 0 102 0V4a1 1 0 00-1-1zm10.293 9.293a1 1 0 001.414 1.414l3-3a1 1 0 000-1.414l-3-3a1 1 0 10-1.414 1.414L14.586 9H7a1 1 0 100 2h7.586l-1.293 1.293z",clipRule:"evenodd"}}]})(e)}function kt(e){return Be({tag:"svg",attr:{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"}}]})(e)}function wt(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _t(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=a(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return u=e.done,e},e:function(e){s=!0,o=e},f:function(){try{u||null==n.return||n.return()}finally{if(s)throw o}}}}function xt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Et(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function St(e,t,n){return t&&Et(e.prototype,t),n&&Et(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function It(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Tt(e,t){return Tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Tt(e,t)}function Ct(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tt(e,t)}function Nt(e){return Nt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Nt(e)}function Ot(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function At(e,t){if(t&&("object"===ut(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return It(e)}function Pt(e){var t=Ot();return function(){var n,r=Nt(e);if(t){var i=Nt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return At(this,n)}}function Rt(e,t,n){return Rt=Ot()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Tt(i,n.prototype),i},Rt.apply(null,arguments)}function Dt(e){var t="function"===typeof Map?new Map:void 0;return Dt=function(e){if(null===e||!function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return Rt(e,arguments,Nt(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Tt(n,e)},Dt(e)}var Lt=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):55296===(64512&i)&&r+1<e.length&&56320===(64512&e.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>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},jt={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:function(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],i=0;i<e.length;i+=3){var a=e[i],o=i+1<e.length,u=o?e[i+1]:0,s=i+2<e.length,c=s?e[i+2]:0,l=a>>2,f=(3&a)<<4|u>>4,h=(15&u)<<2|c>>6,d=63&c;s||(d=64,o||(h=64)),r.push(n[l],n[f],n[h],n[d])}return r.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(Lt(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){for(var t=[],n=0,r=0;n<e.length;){var i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){var a=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&a)}else if(i>239&&i<365){var 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{var u=e[n++],s=e[n++];
2t[r++]=String.fromCharCode((15&i)<<12|(63&u)<<6|63&s)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.init_();for(var n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],i=0;i<e.length;){var a=n[e.charAt(i++)],o=i<e.length?n[e.charAt(i)]:0,u=++i<e.length?n[e.charAt(i)]:64,s=++i<e.length?n[e.charAt(i)]:64;if(++i,null==a||null==o||null==u||null==s)throw Error();var c=a<<2|o>>4;if(r.push(c),64!==u){var l=o<<4&240|u>>2;if(r.push(l),64!==s){var f=u<<6&192|s;r.push(f)}}}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},Mt=function(e){return function(e){var t=Lt(e);return jt.encodeByteArray(t,!0)}(e).replace(/\./g,"")},Ft=function(e){try{return jt.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};var Ut=function(){function e(){var t=this;xt(this,e),this.reject=function(){},this.resolve=function(){},this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))}return St(e,[{key:"wrapCallback",value:function(e){var t=this;return function(n,r){n?t.reject(n):t.resolve(r),"function"===typeof e&&(t.promise.catch((function(){})),1===e.length?e(n):e(n,r))}}}]),e}();function Vt(){return"undefined"!==typeof navigator&&"string"===typeof navigator.userAgent?navigator.userAgent:""}function zt(){return"undefined"!==typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(Vt())}function qt(){var e="object"===typeof chrome?chrome.runtime:"object"===typeof browser?browser.runtime:void 0;return"object"===typeof e&&void 0!==e.id}function Bt(){return"object"===typeof navigator&&"ReactNative"===navigator.product}function Ht(){var e=Vt();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}var Kt=function(e){Ct(n,e);var t=Pt(n);function n(e,r,i){var a;return xt(this,n),(a=t.call(this,r)).code=e,a.customData=i,a.name="FirebaseError",Object.setPrototypeOf(It(a),n.prototype),Error.captureStackTrace&&Error.captureStackTrace(
2It(a),Wt.prototype.create),a}return St(n)}(Dt(Error)),Wt=function(){function e(t,n,r){xt(this,e),this.service=t,this.serviceName=n,this.errors=r}return St(e,[{key:"create",value:function(e){var t=(arguments.length<=1?void 0:arguments[1])||{},n="".concat(this.service,"/").concat(e),r=this.errors[e],i=r?Qt(r,t):"Error",a="".concat(this.serviceName,": ").concat(i," (").concat(n,")."),o=new Kt(n,a,t);return o}}]),e}();function Qt(e,t){return e.replace(Gt,(function(e,n){var r=t[n];return null!=r?String(r):"<".concat(n,"?>")}))}var Gt=/\{\$([^}]+)}/g;function $t(e,t){if(e===t)return!0;for(var n=Object.keys(e),r=Object.keys(t),i=0,a=n;i<a.length;i++){var o=a[i];if(!r.includes(o))return!1;var u=e[o],s=t[o];if(Xt(u)&&Xt(s)){if(!$t(u,s))return!1}else if(u!==s)return!1}for(var c=0,l=r;c<l.length;c++){var f=l[c];if(!n.includes(f))return!1}return!0}function Xt(e){return null!==e&&"object"===typeof e}function Yt(e){for(var t=[],n=function(){var e=o(i[r],2),n=e[0],a=e[1];Array.isArray(a)?a.forEach((function(e){t.push(encodeURIComponent(n)+"="+encodeURIComponent(e))})):t.push(encodeURIComponent(n)+"="+encodeURIComponent(a))},r=0,i=Object.entries(e);r<i.length;r++)n();return t.length?"&"+t.join("&"):""}function Jt(e){var t={};return e.replace(/^\?/,"").split("&").forEach((function(e){if(e){var n=o(e.split("="),2),r=n[0],i=n[1];t[decodeURIComponent(r)]=decodeURIComponent(i)}})),t}function Zt(e){var t=e.indexOf("?");if(!t)return"";var n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)}var en=function(){function e(t,n){var r=this;xt(this,e),this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then((function(){t(r)})).catch((function(e){r.error(e)}))}return St(e,[{key:"next",value:function(e){this.forEachObserver((function(t){t.next(e)}))}},{key:"error",value:function(e){this.forEachObserver((function(t){t.error(e)})),this.close(e)}},{key:"complete",value:function(){this.forEachObserver((function(e){e.complete()})),this.close()}},{key:"subscribe",value:function(e,t,n){var r,i=this;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");void 0===(r=function(e,t){if("object"!==typeof e||null===e)return!1;var n,r=_t(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i in e&&"function"===typeof e[i])return!0}}catch(a){r.e(a)}finally{r.f()}return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:n}).next&&(r.next=tn),void 0===r.error&&(r.error=tn),void 0===r.complete&&(r.complete=tn);var a=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((function(){try{i.finalError?r.error(i.finalError):r.complete()}catch(e){}})),this.observers.push(r),a}},{key:"unsubscribeOne",value:function(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))}},{key:"forEachObserver",value:function(e){if(!this.finalized)for(var t=0;t<this.observers.length;t++)this.sendOne(t,e)}},{key:"sendOne",value:function(e,t){var n=this;this.task.then((function(){if(void 0!==n.observers&&void 0!==n.observers[e])try{t(n.observers[e])}catch(r){"undefined"!==typeof console&&console.error&&console.error(r)}}))}},{key:"close",value:function(e){var t=this;this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then((function(){t.observers=void 0,t.onNoObservers=void 0})))}}]),e}();function tn(){}function nn(e){return e&&e._delegate?e._delegate:e}var rn=function(){function e(t,n,r){xt(this,e),this.name=t,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}return St(e,[{key:"setInstantiationMode",value:function(e){return this.instantiationMode=e,this}},{key:"setMultipleInstances",value:function(e){return this.multipleInstances=e,this}},{key:"setServiceProps",value:function(e){return this.serviceProps=e,this}},{key:"setInstanceCreatedCallback",value:function(e){return this.onInstanceCreated=e,this}}]),e}(),an="[DEFAULT]",on=function(){function e(t,n){xt(this,e),this.name=t,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}return St(e,[{key:"get",value:function(e){var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){var n=new Ut;if(this.instancesDeferred.set(t,n),this.isInitialized(t)||this.shouldAutoInitialize())try{var r=this.getOrInitializeService({instanceIdentifier:t});r&&n.resolve(r)}catch(i){}}return this.instancesDeferred.get(t).promise}},{key:"getImmediate",value:function(e){var t,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 ".concat(this.name," is not available"))}try{return this.getOrInitializeService({instanceIdentifier:n})}catch(i){if(r)return null;throw i}}},{key:"getComponent",value:function(){return this.component}},{key:"setComponent",value:function(e){if(e.name!==this.name)throw Error("Mismatching Component ".concat(e.name," for Provider ").concat(this.name,"."));if(this.component)throw Error("Component for ".concat(this.name," has already been provided"));if(this.component=e,this.shouldAutoInitialize()){if(function(e){return"EAGER"===e.instantiationMode}(e))try{this.getOrInitializeService({instanceIdentifier:an})}catch(c){}var t,n=_t(this.instancesDeferred.entries());try{for(n.s();!(t=n.n()).done;){var r=o(t.value,2),i=r[0],a=r[1],u=this.normalizeInstanceIdentifier(i);try{var s=this.getOrInitializeService({instanceIdentifier:u});a.resolve(s)}catch(c){}}}catch(l){n.e(l)}finally{n.f()}}}},{key:"clearInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:an;this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}},{key:"delete",value:function(){var e=lt(st().mark((function e(){var t;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Array.from(this.instances.values()),e.next=3,Promise.all([].
2concat(wt(t.filter((function(e){return"INTERNAL"in e})).map((function(e){return e.INTERNAL.delete()}))),wt(t.filter((function(e){return"_delete"in e})).map((function(e){return e._delete()})))));case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"isComponentSet",value:function(){return null!=this.component}},{key:"isInitialized",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:an;return this.instances.has(e)}},{key:"getOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:an;return this.instancesOptions.get(e)||{}}},{key:"initialize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.options,n=void 0===t?{}:t,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error("".concat(this.name,"(").concat(r,") has already been initialized"));if(!this.isComponentSet())throw Error("Component ".concat(this.name," has not been registered yet"));var i,a=this.getOrInitializeService({instanceIdentifier:r,options:n}),u=_t(this.instancesDeferred.entries());try{for(u.s();!(i=u.n()).done;){var s=o(i.value,2),c=s[0],l=s[1],f=this.normalizeInstanceIdentifier(c);r===f&&l.resolve(a)}}catch(h){u.e(h)}finally{u.f()}return a}},{key:"onInit",value:function(e,t){var n,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);var a=this.instances.get(r);return a&&e(a,r),function(){i.delete(e)}}},{key:"invokeOnInitCallbacks",value:function(e,t){var n=this.onInitCallbacks.get(t);if(n){var r,i=_t(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;try{a(e,t)}catch(Pg){}}}catch(o){i.e(o)}finally{i.f()}}}},{key:"getOrInitializeService",value:function(e){var t,n=e.instanceIdentifier,r=e.options,i=void 0===r?{}:r,a=this.instances.get(n);if(!a&&this.component&&(a=this.component.instanceFactory(this.container,{instanceIdentifier:(t=n,t===an?void 0:t),options:i}),this.instances.set(n,a),this.instancesOptions.set(n,i),this.invokeOnInitCallbacks(a,n),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,n,a)}catch(Pg){}return a||null}},{key:"normalizeInstanceIdentifier",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:an;return this.component?this.component.multipleInstances?e:an:e}},{key:"shouldAutoInitialize",value:function(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}]),e}();var un,sn,cn=function(){function e(t){xt(this,e),this.name=t,this.providers=new Map}return St(e,[{key:"addComponent",value:function(e){var t=this.getProvider(e.name);if(t.isComponentSet())throw new Error("Component ".concat(e.name," has already been registered with ").concat(this.name));t.setComponent(e)}},{key:"addOrOverwriteComponent",value:function(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}},{key:"getProvider",value:function(e){if(this.providers.has(e))return this.providers.get(e);var t=new on(e,this);return this.providers.set(e,t),t}},{key:"getProviders",value:function(){return Array.from(this.providers.values())}}]),e}(),ln=[];!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"}(sn||(sn={}));var fn={debug:sn.DEBUG,verbose:sn.VERBOSE,info:sn.INFO,warn:sn.WARN,error:sn.ERROR,silent:sn.SILENT},hn=sn.INFO,dn=(Ee(un={},sn.DEBUG,"log"),Ee(un,sn.VERBOSE,"log"),Ee(un,sn.INFO,"info"),Ee(un,sn.WARN,"warn"),Ee(un,sn.ERROR,"error"),un),pn=function(e,t){if(!(t<e.logLevel)){var n=(new Date).toISOString(),r=dn[t];if(!r)throw new Error("Attempted to log a message with an invalid logType (value: ".concat(t,")"));for(var i,a=arguments.length,o=new Array(a>2?a-2:0),u=2;u<a;u++)o[u-2]=arguments[u];(i=console)[r].apply(i,["[".concat(n,"] ").concat(e.name,":")].concat(o))}},vn=function(){function e(t){xt(this,e),this.name=t,this._logLevel=hn,this._logHandler=pn,this._userLogHandler=null,ln.push(this)}return St(e,[{key:"logLevel",get:function(){return this._logLevel},set:function(e){if(!(e in sn))throw new TypeError('Invalid value "'.concat(e,'" assigned to `logLevel`'));this._logLevel=e}},{key:"setLogLevel",value:function(e){this._logLevel="string"===typeof e?fn[e]:e}},{key:"logHandler",get:function(){return this._logHandler},set:function(e){if("function"!==typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}},{key:"userLogHandler",get:function(){return this._userLogHandler},set:function(e){this._userLogHandler=e}},{key:"debug",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,[this,sn.DEBUG].concat(t)),this._logHandler.apply(this,[this,sn.DEBUG].concat(t))}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,[this,sn.VERBOSE].concat(t)),this._logHandler.apply(this,[this,sn.VERBOSE].concat(t))}},{key:"info",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,[this,sn.INFO].concat(t)),this._logHandler.apply(this,[this,sn.INFO].concat(t))}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,[this,sn.WARN].concat(t)),this._logHandler.apply(this,[this,sn.WARN].concat(t))}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,[this,sn.ERROR].concat(t)),this._logHandler.apply(this,[this,sn.ERROR].concat(t))}}]),e}();var mn,yn;var gn=new WeakMap,bn=new WeakMap,kn=new WeakMap,wn=new WeakMap,_n=new WeakMap;var xn={get:function(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return bn.get(e);if("objectStoreNames"===t)return e.objectStoreNames||kn.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return In(e[t])},set:function(e,t,n){return e[t]=n,!0},has:function(e,t){return e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e}};function En(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(yn||(yn=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(Tn(this),n),In(gn.get(this))}:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];
2return In(e.apply(Tn(this),n))}:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var a=e.call.apply(e,[Tn(this),t].concat(r));return kn.set(a,t.sort?t.sort():[t]),In(a)}}function Sn(e){return"function"===typeof e?En(e):(e instanceof IDBTransaction&&function(e){if(!bn.has(e)){var t=new Promise((function(t,n){var r=function(){e.removeEventListener("complete",i),e.removeEventListener("error",a),e.removeEventListener("abort",a)},i=function(){t(),r()},a=function(){n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",a),e.addEventListener("abort",a)}));bn.set(e,t)}}(e),t=e,(mn||(mn=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some((function(e){return t instanceof e}))?new Proxy(e,xn):e);var t}function In(e){if(e instanceof IDBRequest)return function(e){var t=new Promise((function(t,n){var r=function(){e.removeEventListener("success",i),e.removeEventListener("error",a)},i=function(){t(In(e.result)),r()},a=function(){n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",a)}));return t.then((function(t){t instanceof IDBCursor&&gn.set(t,e)})).catch((function(){})),_n.set(t,e),t}(e);if(wn.has(e))return wn.get(e);var t=Sn(e);return t!==e&&(wn.set(e,t),_n.set(t,e)),t}var Tn=function(e){return _n.get(e)};var Cn,Nn,On=["get","getKey","getAll","getAllKeys","count"],An=["put","add","delete","clear"],Pn=new Map;function Rn(e,t){if(e instanceof IDBDatabase&&!(t in e)&&"string"===typeof t){if(Pn.get(t))return Pn.get(t);var n=t.replace(/FromIndex$/,""),r=t!==n,i=An.includes(n);if(n in(r?IDBIndex:IDBObjectStore).prototype&&(i||On.includes(n))){var a=function(){var e=lt(st().mark((function e(t){var a,o,u,s,c,l,f=arguments;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(o=this.transaction(t,i?"readwrite":"readonly"),u=o.store,s=f.length,c=new Array(s>1?s-1:0),l=1;l<s;l++)c[l-1]=f[l];return r&&(u=u.index(c.shift())),e.next=6,Promise.all([(a=u)[n].apply(a,c),i&&o.done]);case 6:return e.abrupt("return",e.sent[0]);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}();return Pn.set(t,a),a}}}xn=function(e){return Ie(Ie({},e),{},{get:function(t,n,r){return Rn(t,n)||e.get(t,n,r)},has:function(t,n){return!!Rn(t,n)||e.has(t,n)}})}(xn);var Dn=function(){function e(t){xt(this,e),this.container=t}return St(e,[{key:"getPlatformInfoString",value:function(){return this.container.getProviders().map((function(e){if(function(e){var t=e.getComponent();return"VERSION"===(null===t||void 0===t?void 0:t.type)}(e)){var t=e.getImmediate();return"".concat(t.library,"/").concat(t.version)}return null})).filter((function(e){return e})).join(" ")}}]),e}();var Ln="@firebase/app",jn="0.7.29",Mn=new vn("@firebase/app"),Fn="[DEFAULT]",Un=(Ee(Cn={},Ln,"fire-core"),Ee(Cn,"@firebase/app-compat","fire-core-compat"),Ee(Cn,"@firebase/analytics","fire-analytics"),Ee(Cn,"@firebase/analytics-compat","fire-analytics-compat"),Ee(Cn,"@firebase/app-check","fire-app-check"),Ee(Cn,"@firebase/app-check-compat","fire-app-check-compat"),Ee(Cn,"@firebase/auth","fire-auth"),Ee(Cn,"@firebase/auth-compat","fire-auth-compat"),Ee(Cn,"@firebase/database","fire-rtdb"),Ee(Cn,"@firebase/database-compat","fire-rtdb-compat"),Ee(Cn,"@firebase/functions","fire-fn"),Ee(Cn,"@firebase/functions-compat","fire-fn-compat"),Ee(Cn,"@firebase/installations","fire-iid"),Ee(Cn,"@firebase/installations-compat","fire-iid-compat"),Ee(Cn,"@firebase/messaging","fire-fcm"),Ee(Cn,"@firebase/messaging-compat","fire-fcm-compat"),Ee(Cn,"@firebase/performance","fire-perf"),Ee(Cn,"@firebase/performance-compat","fire-perf-compat"),Ee(Cn,"@firebase/remote-config","fire-rc"),Ee(Cn,"@firebase/remote-config-compat","fire-rc-compat"),Ee(Cn,"@firebase/storage","fire-gcs"),Ee(Cn,"@firebase/storage-compat","fire-gcs-compat"),Ee(Cn,"@firebase/firestore","fire-fst"),Ee(Cn,"@firebase/firestore-compat","fire-fst-compat"),Ee(Cn,"fire-js","fire-js"),Ee(Cn,"firebase","fire-js-all"),Cn),Vn=new Map,zn=new Map;function qn(e,t){try{e.container.addComponent(t)}catch(n){Mn.debug("Component ".concat(t.name," failed to register with FirebaseApp ").concat(e.name),n)}}function Bn(e){var t=e.name;if(zn.has(t))return Mn.debug("There were multiple attempts to register component ".concat(t,".")),!1;zn.set(t,e);var n,r=_t(Vn.values());try{for(r.s();!(n=r.n()).done;){qn(n.value,e)}}catch(i){r.e(i)}finally{r.f()}return!0}function Hn(e,t){var n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}var Kn=(Ee(Nn={},"no-app","No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()"),Ee(Nn,"bad-app-name","Illegal App name: '{$appName}"),Ee(Nn,"duplicate-app","Firebase App named '{$appName}' already exists with different options or config"),Ee(Nn,"app-deleted","Firebase App named '{$appName}' already deleted"),Ee(Nn,"invalid-app-argument","firebase.{$appName}() takes either no argument or a Firebase App instance."),Ee(Nn,"invalid-log-argument","First argument to `onLog` must be null or a function."),Ee(Nn,"storage-open","Error thrown when opening storage. Original error: {$originalErrorMessage}."),Ee(Nn,"storage-get","Error thrown when reading from storage. Original error: {$originalErrorMessage}."),Ee(Nn,"storage-set","Error thrown when writing to storage. Original error: {$originalErrorMessage}."),Ee(Nn,"storage-delete","Error thrown when deleting from storage. Original error: {$originalErrorMessage}
2."),Nn),Wn=new Wt("app","Firebase",Kn),Qn=function(){function e(t,n,r){var i=this;xt(this,e),this._isDeleted=!1,this._options=Object.assign({},t),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new rn("app",(function(){return i}),"PUBLIC"))}return St(e,[{key:"automaticDataCollectionEnabled",get:function(){return this.checkDestroyed(),this._automaticDataCollectionEnabled},set:function(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}},{key:"name",get:function(){return this.checkDestroyed(),this._name}},{key:"options",get:function(){return this.checkDestroyed(),this._options}},{key:"config",get:function(){return this.checkDestroyed(),this._config}},{key:"container",get:function(){return this._container}},{key:"isDeleted",get:function(){return this._isDeleted},set:function(e){this._isDeleted=e}},{key:"checkDestroyed",value:function(){if(this.isDeleted)throw Wn.create("app-deleted",{appName:this._name})}}]),e}(),Gn="9.9.1";function $n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Fn,t=Vn.get(e);if(!t)throw Wn.create("no-app",{appName:e});return t}function Xn(e,t,n){var r,i=null!==(r=Un[e])&&void 0!==r?r:e;n&&(i+="-".concat(n));var a=i.match(/\s|\//),o=t.match(/\s|\//);if(a||o){var u=['Unable to register library "'.concat(i,'" with version "').concat(t,'":')];return a&&u.push('library name "'.concat(i,'" contains illegal characters (whitespace or "/")')),a&&o&&u.push("and"),o&&u.push('version name "'.concat(t,'" contains illegal characters (whitespace or "/")')),void Mn.warn(u.join(" "))}Bn(new rn("".concat(i,"-version"),(function(){return{library:i,version:t}}),"VERSION"))}var Yn="firebase-heartbeat-store",Jn=null;function Zn(){return Jn||(Jn=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.blocked,i=n.upgrade,a=n.blocking,o=n.terminated,u=indexedDB.open(e,t),s=In(u);return i&&u.addEventListener("upgradeneeded",(function(e){i(In(u.result),e.oldVersion,e.newVersion,In(u.transaction))})),r&&u.addEventListener("blocked",(function(){return r()})),s.then((function(e){o&&e.addEventListener("close",(function(){return o()})),a&&e.addEventListener("versionchange",(function(){return a()}))})).catch((function(){})),s}("firebase-heartbeat-database",1,{upgrade:function(e,t){if(0===t)e.createObjectStore(Yn)}}).catch((function(e){throw Wn.create("storage-open",{originalErrorMessage:e.message})}))),Jn}function er(e){return tr.apply(this,arguments)}function tr(){return tr=lt(st().mark((function e(t){var n,r;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Zn();case 3:return r=e.sent,e.abrupt("return",r.transaction(Yn).objectStore(Yn).get(ir(t)));case 7:throw e.prev=7,e.t0=e.catch(0),Wn.create("storage-get",{originalErrorMessage:null===(n=e.t0)||void 0===n?void 0:n.message});case 10:case"end":return e.stop()}}),e,null,[[0,7]])}))),tr.apply(this,arguments)}function nr(e,t){return rr.apply(this,arguments)}function rr(){return rr=lt(st().mark((function e(t,n){var r,i,a,o;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Zn();case 3:return i=e.sent,a=i.transaction(Yn,"readwrite"),o=a.objectStore(Yn),e.next=8,o.put(n,ir(t));case 8:return e.abrupt("return",a.done);case 11:throw e.prev=11,e.t0=e.catch(0),Wn.create("storage-set",{originalErrorMessage:null===(r=e.t0)||void 0===r?void 0:r.message});case 14:case"end":return e.stop()}}),e,null,[[0,11]])}))),rr.apply(this,arguments)}function ir(e){return"".concat(e.name,"!").concat(e.options.appId)}var ar=function(){function e(t){var n=this;xt(this,e),this.container=t,this._heartbeatsCache=null;var r=this.container.getProvider("app").getImmediate();this._storage=new cr(r),this._heartbeatsCachePromise=this._storage.read().then((function(e){return n._heartbeatsCache=e,e}))}return St(e,[{key:"triggerHeartbeat",value:function(){var e=lt(st().mark((function e(){var t,n,r;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.container.getProvider("platform-logger").getImmediate(),n=t.getPlatformInfoString(),r=or(),null!==this._heartbeatsCache){e.next=7;break}return e.next=6,this._heartbeatsCachePromise;case 6:this._heartbeatsCache=e.sent;case 7:if(this._heartbeatsCache.lastSentHeartbeatDate!==r&&!this._heartbeatsCache.heartbeats.some((function(e){return e.date===r}))){e.next=11;break}return e.abrupt("return");case 11:this._heartbeatsCache.heartbeats.push({date:r,agent:n});case 12:return this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter((function(e){var t=new Date(e.date).valueOf();return Date.now()-t<=2592e6})),e.abrupt("return",this._storage.overwrite(this._heartbeatsCache));case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getHeartbeatsHeader",value:function(){var e=lt(st().mark((function e(){var t,n,r,i,a;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==this._heartbeatsCache){e.next=3;break}return e.next=3,this._heartbeatsCachePromise;case 3:if(null!==this._heartbeatsCache&&0!==this._heartbeatsCache.heartbeats.length){e.next=5;break}return e.abrupt("return","");case 5:if(t=or(),n=ur(this._heartbeatsCache.heartbeats),r=n.heartbeatsToSend,i=n.unsentEntries,a=Mt(JSON.stringify({version:2,heartbeats:r})),this._heartbeatsCache.lastSentHeartbeatDate=t,!(i.length>0)){e.next=15;break}return this._heartbeatsCache.heartbeats=i,e.next=13,this._storage.overwrite(this._heartbeatsCache);case 13:e.next=17;break;case 15:this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache);case 17:return e.abrupt("return",a);case 18:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}();function or(){return(new Date).toISOString().substring(0,10)}function ur(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1024,r=[],i=e.slice(),a=_t(e);try{var o=function(){var e=t.value,a=r.find((function(t){return t.agent===e.agent}));if(a){if(a.dates.push(e.date),lr(r)>n)return a.dates.pop(),"break"}else if(r.push({agent:e.agent,dates:[e.date]}),lr(r)>n)return r.pop(),"break";i=i.slice(1)};for(a.s();!(t=a.n()).done;){var u=o();if("break"===u)break}}catch(s){a.e(s)}finally{a.f()}return{heartbeatsToSend:r,unsentEntries:i}}var sr,cr=function(){function e(t){xt(this,e),this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}return St(e,[{key:"runIndexedDBEnvironmentCheck",value:function(){var e=lt(st().mark((function e(){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("object"===typeof indexedDB){e.next=4;break}return e.abrupt("return",!1);case 4:return e.abrupt("return",new Promise((function(e,t){try{var n=!0,r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=function(){i.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},i.onupgradeneeded=function(){n=!1},i.onerror=function(){var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(a){t(a)}})).then((function(){return!0})).catch((function(){return!1})));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"read",value:function(){var e=lt(st().mark((function e(){var t;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._canUseIndexedDBPromise;case 2:if(e.sent){e.next=7;break}return e.abrupt("return",{heartbeats:[]});case 7:return e.next=9,er(this.app);case 9:return t=e.sent,e.abrupt("return",t||{heartbeats:[]});case 11:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}
2,{key:"overwrite",value:function(){var e=lt(st().mark((function e(t){var n,r;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._canUseIndexedDBPromise;case 2:if(e.sent){e.next=7;break}return e.abrupt("return");case 7:return e.next=9,this.read();case 9:return r=e.sent,e.abrupt("return",nr(this.app,{lastSentHeartbeatDate:null!==(n=t.lastSentHeartbeatDate)&&void 0!==n?n:r.lastSentHeartbeatDate,heartbeats:t.heartbeats}));case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"add",value:function(){var e=lt(st().mark((function e(t){var n,r;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._canUseIndexedDBPromise;case 2:if(e.sent){e.next=7;break}return e.abrupt("return");case 7:return e.next=9,this.read();case 9:return r=e.sent,e.abrupt("return",nr(this.app,{lastSentHeartbeatDate:null!==(n=t.lastSentHeartbeatDate)&&void 0!==n?n:r.lastSentHeartbeatDate,heartbeats:[].concat(wt(r.heartbeats),wt(t.heartbeats))}));case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();function lr(e){return Mt(JSON.stringify({version:2,heartbeats:e})).length}sr="",Bn(new rn("platform-logger",(function(e){return new Dn(e)}),"PRIVATE")),Bn(new rn("heartbeat",(function(e){return new ar(e)}),"PRIVATE")),Xn(Ln,jn,sr),Xn(Ln,jn,"esm2017"),Xn("fire-js","");function fr(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Nt(e)););return e}function hr(){return hr="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=fr(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},hr.apply(this,arguments)}Xn("firebase","9.9.1","app");function dr(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);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}Object.create;var pr;Object.create;function vr(){return Ee({},"dependent-sdk-initialized-before-auth","Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK.")}var mr=vr,yr=new Wt("auth","Firebase",vr()),gr=new vn("@firebase/auth");function br(e){if(gr.logLevel<=sn.ERROR){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];gr.error.apply(gr,["Auth (".concat(Gn,"): ").concat(e)].concat(n))}}function kr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw xr.apply(void 0,[e].concat(n))}function wr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return xr.apply(void 0,[e].concat(n))}function _r(e,t,n){var r=Object.assign(Object.assign({},mr()),Ee({},t,n));return new Wt("auth","Firebase",r).create(t,{appName:e.name})}function xr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if("string"!==typeof e){var i,a=n[0],o=wt(n.slice(1));return o[0]&&(o[0].appName=e.name),(i=e._errorFactory).create.apply(i,[a].concat(wt(o)))}return yr.create.apply(yr,[e].concat(n))}function Er(e,t){if(!e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];throw xr.apply(void 0,[t].concat(r))}}function Sr(e){var t="INTERNAL ASSERTION FAILED: "+e;throw br(t),new Error(t)}function Ir(e,t){e||Sr(t)}var Tr=new Map;function Cr(e){Ir(e instanceof Function,"Expected a class definition");var t=Tr.get(e);return t?(Ir(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,Tr.set(e,t),t)}function Nr(e,t){var n=Hn(e,"auth");if(n.isInitialized()){var r=n.getImmediate();if($t(n.getOptions(),null!==t&&void 0!==t?t:{}))return r;kr(r,"already-initialized")}return n.initialize({options:t})}function Or(){var e;return"undefined"!==typeof self&&(null===(e=self.location)||void 0===e?void 0:e.href)||""}function Ar(){return"http:"===Pr()||"https:"===Pr()}function Pr(){var e;return"undefined"!==typeof self&&(null===(e=self.location)||void 0===e?void 0:e.protocol)||null}var Rr=function(){function e(t,n){xt(this,e),this.shortDelay=t,this.longDelay=n,Ir(n>
2t,"Short delay should be less than long delay!"),this.isMobile=zt()||Bt()}return St(e,[{key:"get",value:function(){return"undefined"!==typeof navigator&&navigator&&"onLine"in navigator&&"boolean"===typeof navigator.onLine&&(Ar()||qt()||"connection"in navigator)&&!navigator.onLine?Math.min(5e3,this.shortDelay):this.isMobile?this.longDelay:this.shortDelay}}]),e}();function Dr(e,t){Ir(e.emulator,"Emulator should always be set here");var n=e.emulator.url;return t?"".concat(n).concat(t.startsWith("/")?t.slice(1):t):n}var Lr=function(){function e(){xt(this,e)}return St(e,null,[{key:"initialize",value:function(e,t,n){this.fetchImpl=e,t&&(this.headersImpl=t),n&&(this.responseImpl=n)}},{key:"fetch",value:function(){return this.fetchImpl?this.fetchImpl:"undefined"!==typeof self&&"fetch"in self?self.fetch:void Sr("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}},{key:"headers",value:function(){return this.headersImpl?this.headersImpl:"undefined"!==typeof self&&"Headers"in self?self.Headers:void Sr("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}},{key:"response",value:function(){return this.responseImpl?this.responseImpl:"undefined"!==typeof self&&"Response"in self?self.Response:void Sr("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}]),e}(),jr=(Ee(pr={},"CREDENTIAL_MISMATCH","custom-token-mismatch"),Ee(pr,"MISSING_CUSTOM_TOKEN","internal-error"),Ee(pr,"INVALID_IDENTIFIER","invalid-email"),Ee(pr,"MISSING_CONTINUE_URI","internal-error"),Ee(pr,"INVALID_PASSWORD","wrong-password"),Ee(pr,"MISSING_PASSWORD","internal-error"),Ee(pr,"EMAIL_EXISTS","email-already-in-use"),Ee(pr,"PASSWORD_LOGIN_DISABLED","operation-not-allowed"),Ee(pr,"INVALID_IDP_RESPONSE","invalid-credential"),Ee(pr,"INVALID_PENDING_TOKEN","invalid-credential"),Ee(pr,"FEDERATED_USER_ID_ALREADY_LINKED","credential-already-in-use"),Ee(pr,"MISSING_REQ_TYPE","internal-error"),Ee(pr,"EMAIL_NOT_FOUND","user-not-found"),Ee(pr,"RESET_PASSWORD_EXCEED_LIMIT","too-many-requests"),Ee(pr,"EXPIRED_OOB_CODE","expired-action-code"),Ee(pr,"INVALID_OOB_CODE","invalid-action-code"),Ee(pr,"MISSING_OOB_CODE","internal-error"),Ee(pr,"CREDENTIAL_TOO_OLD_LOGIN_AGAIN","requires-recent-login"),Ee(pr,"INVALID_ID_TOKEN","invalid-user-token"),Ee(pr,"TOKEN_EXPIRED","user-token-expired"),Ee(pr,"USER_NOT_FOUND","user-token-expired"),Ee(pr,"TOO_MANY_ATTEMPTS_TRY_LATER","too-many-requests"),Ee(pr,"INVALID_CODE","invalid-verification-code"),Ee(pr,"INVALID_SESSION_INFO","invalid-verification-id"),Ee(pr,"INVALID_TEMPORARY_PROOF","invalid-credential"),Ee(pr,"MISSING_SESSION_INFO","missing-verification-id"),Ee(pr,"SESSION_EXPIRED","code-expired"),Ee(pr,"MISSING_ANDROID_PACKAGE_NAME","missing-android-pkg-name"),Ee(pr,"UNAUTHORIZED_DOMAIN","unauthorized-continue-uri"),Ee(pr,"INVALID_OAUTH_CLIENT_ID","invalid-oauth-client-id"),Ee(pr,"ADMIN_ONLY_OPERATION","admin-restricted-operation"),Ee(pr,"INVALID_MFA_PENDING_CREDENTIAL","invalid-multi-factor-session"),Ee(pr,"MFA_ENROLLMENT_NOT_FOUND","multi-factor-info-not-found"),Ee(pr,"MISSING_MFA_ENROLLMENT_ID","missing-multi-factor-info"),Ee(pr,"MISSING_MFA_PENDING_CREDENTIAL","missing-multi-factor-session"),Ee(pr,"SECOND_FACTOR_EXISTS","second-factor-already-in-use"),Ee(pr,"SECOND_FACTOR_LIMIT_EXCEEDED","maximum-second-factor-count-exceeded"),Ee(pr,"BLOCKING_FUNCTION_ERROR_RESPONSE","internal-error"),pr),Mr=new Rr(3e4,6e4);function Fr(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}function Ur(e,t,n,r){return Vr.apply(this,arguments)}function Vr(){return Vr=lt(st().mark((function e(t,n,r,i){var a,o=arguments;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=o.length>4&&void 0!==o[4]?o[4]:{},e.abrupt("return",zr(t,a,lt(st().mark((function e(){var a,o,u,s;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a={},o={},i&&("GET"===n?o=i:a={body:JSON.stringify(i)}),u=Yt(Object.assign({key:t.config.apiKey},o)).slice(1),e.next=6,t._getAdditionalHeaders();case 6:return(s=e.sent)["Content-Type"]="application/json",t.languageCode&&(s["X-Firebase-Locale"]=t.languageCode),e.abrupt("return",Lr.fetch()(Kr(t,t.config.apiHost,r,u),Object.assign({method:n,headers:s,referrerPolicy:"no-referrer"},a)));case 10:case"end":return e.stop()}}),e)})))));case 2:case"end":return e.stop()}}),e)}))),Vr.apply(this,arguments)}function zr(e,t,n){return qr.apply(this,arguments)}function qr(){return qr=lt(st().mark((function e(t,n,r){var i,a,u,s,c,l,f,h,d,p;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t._canInitEmulator=!1,i=Object.assign(Object.assign({},jr),n),e.prev=2,a=new Wr(t),e.next=6,Promise.race([r(),a.promise]);case 6:return u=e.sent,a.clearNetworkTimeout(),e.next=10,u.json();
2case 10:if(!("needConfirmation"in(s=e.sent))){e.next=13;break}throw Qr(t,"account-exists-with-different-credential",s);case 13:if(!u.ok||"errorMessage"in s){e.next=17;break}return e.abrupt("return",s);case 17:if(c=u.ok?s.errorMessage:s.error.message,l=c.split(" : "),f=o(l,2),h=f[0],d=f[1],"FEDERATED_USER_ID_ALREADY_LINKED"!==h){e.next=23;break}throw Qr(t,"credential-already-in-use",s);case 23:if("EMAIL_EXISTS"!==h){e.next=27;break}throw Qr(t,"email-already-in-use",s);case 27:if("USER_DISABLED"!==h){e.next=29;break}throw Qr(t,"user-disabled",s);case 29:if(p=i[h]||h.toLowerCase().replace(/[_\s]+/g,"-"),!d){e.next=34;break}throw _r(t,p,d);case 34:kr(t,p);case 35:e.next=42;break;case 37:if(e.prev=37,e.t0=e.catch(2),!(e.t0 instanceof Kt)){e.next=41;break}throw e.t0;case 41:kr(t,"network-request-failed");case 42:case"end":return e.stop()}}),e,null,[[2,37]])}))),qr.apply(this,arguments)}function Br(e,t,n,r){return Hr.apply(this,arguments)}function Hr(){return Hr=lt(st().mark((function e(t,n,r,i){var a,o,u=arguments;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=u.length>4&&void 0!==u[4]?u[4]:{},e.next=3,Ur(t,n,r,i,a);case 3:return"mfaPendingCredential"in(o=e.sent)&&kr(t,"multi-factor-auth-required",{_serverResponse:o}),e.abrupt("return",o);case 6:case"end":return e.stop()}}),e)}))),Hr.apply(this,arguments)}function Kr(e,t,n,r){var i="".concat(t).concat(n,"?").concat(r);return e.config.emulator?Dr(e.config,i):"".concat(e.config.apiScheme,"://").concat(i)}var Wr=function(){function e(t){var n=this;xt(this,e),this.auth=t,this.timer=null,this.promise=new Promise((function(e,t){n.timer=setTimeout((function(){return t(wr(n.auth,"network-request-failed"))}),Mr.get())}))}return St(e,[{key:"clearNetworkTimeout",value:function(){clearTimeout(this.timer)}}]),e}();function Qr(e,t,n){var r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);var i=wr(e,t,r);return i.customData._tokenResponse=n,i}function Gr(e,t){return $r.apply(this,arguments)}function $r(){return $r=lt(st().mark((function e(t,n){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Ur(t,"POST","/v1/accounts:delete",n));case 1:case"end":return e.stop()}}),e)}))),$r.apply(this,arguments)}function Xr(e,t){return Yr.apply(this,arguments)}function Yr(){return Yr=lt(st().mark((function e(t,n){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Ur(t,"POST","/v1/accounts:lookup",n));case 1:case"end":return e.stop()}}),e)}))),Yr.apply(this,arguments)}function Jr(e){if(e)try{var t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(n){}}function Zr(){return Zr=lt(st().mark((function e(t){var n,r,i,a,o,u,s=arguments;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=s.length>1&&void 0!==s[1]&&s[1],r=nn(t),e.next=4,r.getIdToken(n);case 4:return i=e.sent,Er((a=ti(i))&&a.exp&&a.auth_time&&a.iat,r.auth,"internal-error"),o="object"===typeof a.firebase?a.firebase:void 0,u=null===o||void 0===o?void 0:o.sign_in_provider,e.abrupt("return",{claims:a,token:i,authTime:Jr(ei(a.auth_time)),issuedAtTime:Jr(ei(a.iat)),expirationTime:Jr(ei(a.exp)),signInProvider:u||null,signInSecondFactor:(null===o||void 0===o?void 0:o.sign_in_second_factor)||null});case 10:case"end":return e.stop()}}),e)}))),Zr.apply(this,arguments)}function ei(e){return 1e3*Number(e)}function ti(e){var t,n=o(e.split("."),3),r=n[0],i=n[1],a=n[2];if(void 0===r||void 0===i||void 0===a)return br("JWT malformed, contained fewer than 3 sections"),null;try{var u=Ft(i);return u?JSON.parse(u):(br("Failed to decode base64 JWT payload"),null)}catch(s){return br("Caught error parsing JWT payload as JSON",null===(t=s)||void 0===t?void 0:t.toString()),null}}function ni(e,t){return ri.apply(this,arguments)}function ri(){return ri=lt(st().mark((function e(t,n){var r=arguments;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r.length>2&&void 0!==r[2]&&r[2])){e.next=3;break}return e.abrupt("return",n);case 3:return e.prev=3,e.next=6,n;case 6:return e.abrupt("return",e.sent);case 9:if(e.prev=9,e.t0=e.catch(3),!(e.t0 instanceof Kt&&ii(e.t0))){e.next=15;break}if(t.auth.currentUser!==t){e.next=15;break}return e.next=15,t.auth.signOut();case 15:throw e.t0;case 16:case"end":return e.stop()}}),e,null,[[3,9]])}))),ri.apply(this,arguments)}function ii(e){var t=e.code;return t==="auth/".concat("user-disabled")||t==="auth/".concat("user-token-expired")}var ai=function(){function e(t){xt(this,e),this.user=t,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}return St(e,[{key:"_start",value:function(){this.isRunning||(this.isRunning=!0,this.schedule())}},{key:"_stop",value:function(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}},{key:"getInterval",value:function(e){var t;if(e){var n=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),n}this.errorBackoff=3e4;var r=(null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t:0)-Date.now()-3e5;return Math.max(0,r)}},{key:"schedule",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isRunning){var n=this.getInterval(t);this.timerId=setTimeout(lt(st().mark((function t(){return st().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.iteration();case 2:case"end":return t.stop()}}),t)}))),n)}}},{key:"iteration",value:function(){var e=lt(st().mark((function e(){var t;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.user.getIdToken(!0);case 3:e.next=9;break;case 5:return e.prev=5,e.t0=e.catch(0),(null===(t=e.t0)||void 0===t?void 0:t.code)==="auth/".concat("network-request-failed")&&this.schedule(!0),e.abrupt("return");case 9:this.schedule();case 10:case"end":return e.stop()}}),e,this,[[0,5]])})));return function(){return e.apply(this,arguments)}}()}]),e}(),oi=function(){function e(t,n){xt(this,e),this.createdAt=t,this.lastLoginAt=n,this._initializeTime()}return St(e,[{key:"_initializeTime",value:function(){this.lastSignInTime=Jr(this.lastLoginAt),this.creationTime=Jr(this.createdAt)}},{key:"_copy",value:function(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}},{key:"toJSON",value:function(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}]),e}();function ui(e){return si.apply(this,arguments)}function si(){return si=lt(st().mark((function e(t){var n,r,i,a,o,u,s,c,l,f,h;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.auth,e.next=3,t.getIdToken();case 3:return i=e.sent,e.next=6,ni(t,Xr(r,{idToken:i}));case 6:Er(null===(a=e.sent)||void 0===a?void 0:a.users.length,r,"internal-error"),o=a.users[0],t._notifyReloadListener(o),u=(null===(n=o.providerUserInfo)||void 0===n?void 0:n.length)?fi(o.providerUserInfo):[],s=li(t.providerData,u),c=t.isAnonymous,l=!(t.email&&o.passwordHash)&&!(null===s||void 0===s?void 0:s.length),f=!!c&&l,h={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:s,metadata:new oi(o.createdAt,o.lastLoginAt),isAnonymous:f},Object.assign(t,h);case 17:case"end":return e.stop()}}),e)}))),si.apply(this,arguments)}function ci(){return(ci=lt(st().mark((function e(t){var n;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=nn(t),e.next=3,ui(n);case 3:return e.next=5,n.auth._persistUserIfCurrent(n);case 5:n.auth._notifyListenersIfCurrent(n);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function li(e,t){var n=e.filter((function(e){return!t.some((function(t){return t.providerId===e.providerId}))}));return[].concat(wt(n),wt(t))}function fi(e){return e.map((function(e){var t=e.providerId,n=dr(e,["providerId"]);
2return{providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}}))}function hi(e,t){return di.apply(this,arguments)}function di(){return di=lt(st().mark((function e(t,n){var r;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,zr(t,{},lt(st().mark((function e(){var r,i,a,o,u,s;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Yt({grant_type:"refresh_token",refresh_token:n}).slice(1),i=t.config,a=i.tokenApiHost,o=i.apiKey,u=Kr(t,a,"/v1/token","key=".concat(o)),e.next=5,t._getAdditionalHeaders();case 5:return(s=e.sent)["Content-Type"]="application/x-www-form-urlencoded",e.abrupt("return",Lr.fetch()(u,{method:"POST",headers:s,body:r}));case 8:case"end":return e.stop()}}),e)}))));case 2:return r=e.sent,e.abrupt("return",{accessToken:r.access_token,expiresIn:r.expires_in,refreshToken:r.refresh_token});case 4:case"end":return e.stop()}}),e)}))),di.apply(this,arguments)}var pi=function(){function e(){xt(this,e),this.refreshToken=null,this.accessToken=null,this.expirationTime=null}return St(e,[{key:"isExpired",get:function(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}},{key:"updateFromServerResponse",value:function(e){Er(e.idToken,"internal-error"),Er("undefined"!==typeof e.idToken,"internal-error"),Er("undefined"!==typeof e.refreshToken,"internal-error");var t="expiresIn"in e&&"undefined"!==typeof e.expiresIn?Number(e.expiresIn):function(e){var t=ti(e);return Er(t,"internal-error"),Er("undefined"!==typeof t.exp,"internal-error"),Er("undefined"!==typeof t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}},{key:"getToken",value:function(){var e=lt(st().mark((function e(t){var n,r=arguments;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.length>1&&void 0!==r[1]&&r[1],Er(!this.accessToken||this.refreshToken,t,"user-token-expired"),n||!this.accessToken||this.isExpired){e.next=4;break}return e.abrupt("return",this.accessToken);case 4:if(!this.refreshToken){e.next=8;break}return e.next=7,this.refresh(t,this.refreshToken);case 7:return e.abrupt("return",this.accessToken);case 8:return e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"clearRefreshToken",value:function(){this.refreshToken=null}},{key:"refresh",value:function(){var e=lt(st().mark((function e(t,n){var r,i,a,o;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,hi(t,n);case 2:r=e.sent,i=r.accessToken,a=r.refreshToken,o=r.expiresIn,this.updateTokensAndExpiration(i,a,Number(o));case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"updateTokensAndExpiration",value:function(e,t,n){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*n}},{key:"toJSON",value:function(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}},{key:"_assign",value:function(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}},{key:"_clone",value:function(){return Object.assign(new e,this.toJSON())}},{key:"_performRefresh",value:function(){return Sr("not implemented")}}],[{key:"fromJSON",value:function(t,n){var r=n.refreshToken,i=n.accessToken,a=n.expirationTime,o=new e;return r&&(Er("string"===typeof r,"internal-error",{appName:t}),o.refreshToken=r),i&&(Er("string"===typeof i,"internal-error",{appName:t}),o.accessToken=i),a&&(Er("number"===typeof a,"internal-error",{appName:t}),o.expirationTime=a),o}}]),e}();function vi(e,t){Er("string"===typeof e||"undefined"===typeof e,"internal-error",{appName:t})}var mi=function(){function e(t){xt(this,e);var n=t.uid,r=t.auth,i=t.stsTokenManager,a=dr(t,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new ai(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=n,this.auth=r,this.stsTokenManager=i,this.accessToken=i.accessToken,this.displayName=a.displayName||null,this.email=a.email||null,this.emailVerified=a.emailVerified||!1,this.phoneNumber=a.phoneNumber||null,this.photoURL=a.photoURL||null,this.isAnonymous=a.isAnonymous||!1,this.tenantId=a.tenantId||null,this.providerData=a.providerData?wt(a.providerData):[],this.metadata=new oi(a.createdAt||void 0,a.lastLoginAt||void 0)}return St(e,[{key:"getIdToken",value:function(){var e=lt(st().mark((function e(t){var n;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ni(this,this.stsTokenManager.getToken(this.auth,t));case 2:if(Er(n=e.sent,this.auth,"internal-error"),this.accessToken===n){e.next=9;break}return this.accessToken=n,e.next=8,this.auth._persistUserIfCurrent(this);case 8:this.auth._notifyListenersIfCurrent(this);case 9:return e.abrupt("return",n);case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getIdTokenResult",value:function(e){return function(e){return Zr.apply(this,arguments)}(this,e)}},{key:"reload",value:function(){return function(e){return ci.apply(this,arguments)}(this)}},{key:"_assign",value:function(e){this!==e&&(Er(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.ph
2otoURL,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((function(e){return Object.assign({},e)})),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}},{key:"_clone",value:function(t){return new e(Object.assign(Object.assign({},this),{auth:t,stsTokenManager:this.stsTokenManager._clone()}))}},{key:"_onReload",value:function(e){Er(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}},{key:"_notifyReloadListener",value:function(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}},{key:"_startProactiveRefresh",value:function(){this.proactiveRefresh._start()}},{key:"_stopProactiveRefresh",value:function(){this.proactiveRefresh._stop()}},{key:"_updateTokensIfNecessary",value:function(){var e=lt(st().mark((function e(t){var n,r,i=arguments;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=i.length>1&&void 0!==i[1]&&i[1],r=!1,t.idToken&&t.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(t),r=!0),!n){e.next=6;break}return e.next=6,ui(this);case 6:return e.next=8,this.auth._persistUserIfCurrent(this);case 8:r&&this.auth._notifyListenersIfCurrent(this);case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"delete",value:function(){var e=lt(st().mark((function e(){var t;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getIdToken();case 2:return t=e.sent,e.next=5,ni(this,Gr(this.auth,{idToken:t}));case 5:return this.stsTokenManager.clearRefreshToken(),e.abrupt("return",this.auth.signOut());case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"toJSON",value:function(){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((function(e){return Object.assign({},e)})),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}},{key:"refreshToken",get:function(){return this.stsTokenManager.refreshToken||""}}],[{key:"_fromJSON",value:function(t,n){var r,i,a,o,u,s,c,l,f=null!==(r=n.displayName)&&void 0!==r?r:void 0,h=null!==(i=n.email)&&void 0!==i?i:void 0,d=null!==(a=n.phoneNumber)&&void 0!==a?a:void 0,p=null!==(o=n.photoURL)&&void 0!==o?o:void 0,v=null!==(u=n.tenantId)&&void 0!==u?u:void 0,m=null!==(s=n._redirectEventId)&&void 0!==s?s:void 0,y=null!==(c=n.createdAt)&&void 0!==c?c:void 0,g=null!==(l=n.lastLoginAt)&&void 0!==l?l:void 0,b=n.uid,k=n.emailVerified,w=n.isAnonymous,_=n.providerData,x=n.stsTokenManager;Er(b&&x,t,"internal-error");var E=pi.fromJSON(this.name,x);Er("string"===typeof b,t,"internal-error"),vi(f,t.name),vi(h,t.name),Er("boolean"===typeof k,t,"internal-error"),Er("boolean"===typeof w,t,"internal-error"),vi(d,t.name),vi(p,t.name),vi(v,t.name),vi(m,t.name),vi(y,t.name),vi(g,t.name);var S=new e({uid:b,auth:t,email:h,emailVerified:k,displayName:f,isAnonymous:w,photoURL:p,phoneNumber:d,tenantId:v,stsTokenManager:E,createdAt:y,lastLoginAt:g});return _&&Array.isArray(_)&&(S.providerData=_.map((function(e){return Object.assign({},e)}))),m&&(S._redirectEventId=m),S}},{key:"_fromIdTokenResponse",value:function(){var t=lt(st().mark((function t(n,r){var i,a,o,u=arguments;return st().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=u.length>2&&void 0!==u[2]&&u[2],(a=new pi).updateFromServerResponse(r),o=new e({uid:r.localId,auth:n,stsTokenManager:a,isAnonymous:i}),t.next=6,ui(o);case 6:return t.abrupt("return",o);case 7:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()}]),e}(),yi=function(){function e(){xt(this,e),this.type="NONE",this.storage={}}return St(e,[{key:"_isAvailable",value:function(){var e=lt(st().mark((function e(){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!0);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"_set",value:function(){var e=lt(st().mark((function e(t,n){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.storage[t]=n;case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_get",value:function(){var e=lt(st().mark((function e(t){var n;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.storage[t],e.abrupt("return",void 0===n?null:n);case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_remove",value:function(){var e=lt(st().mark((function e(t){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:delete this.storage[t];case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_addListener",value:function(e,t){}},{key:"_removeListener",value:function(e,t){}}]),e}();yi.type="NONE";var gi=yi;function bi(e,t,n){return"firebase".concat(":",e,":").concat(t,":").concat(n)}var ki=function(){function e(t,n,r){xt(this,e),this.persistence=t,this.auth=n,this.userKey=r;var i=this.auth,a=i.config,o=i.name;this.fullUserKey=bi(this.userKey,a.apiKey,o),this.fullPersistenceKey=bi("persistence",a.apiKey,o),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}return St(e,[{key:"setCurrentUser",value:function(e){return this.persistence._set(this.fullUserKey,e.toJSON())}},{key:"getCurrentUser",value:function(){var e=lt(st().mark((function e(){var t;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.persistence._get(this.fullUserKey);case 2:return t=e.sent,e.abrupt("return",t?mi._fromJSON(this.auth,t):null);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"removeCurrentUser",value:function(){return this.persistence._remove(this.fullUserKey)}},{key:"savePersistenceForRedirect",value:function(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}},{key:"setPersistence",value:function(){var e=lt(st().mark((function e(t){var n;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.persistence!==t){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.getCurrentUser();case 4:return n=e.sent,e.next=7,this.removeCurrentUser();case 7:if(this.persistence=t,!n){e.next=10;break}return e.abrupt("return",this.setCurrentUser(n));case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"delete",value:function(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}}],[{key:"create",value:function(){var t=lt(st().mark((function t(n,r){var i,a,o,u,s,c,l,f,h,d,p,v=arguments;return st().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=v.length>2&&void 0!==v[2]?v[2]:"authUser",r.length){t.next=3;break}return t.abrupt("return",new e(Cr(gi),n,i));case 3:return t.next=5,Promise.all(r.map(function(){var e=lt(st().mark((function e(t){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t._isAvailable();case 2:if(!e.sent){e.next=4;break}return e.abrupt("return",t);case 4:return e.abrupt("return",void 0);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 5:a=t.sent.filter((function(e){return e})),o=a[0]||Cr(gi),u=bi(i,n.config.apiKey,n.name),s=null,c=_t(r),t.prev=10,
2c.s();case 12:if((l=c.n()).done){t.next=29;break}return f=l.value,t.prev=14,t.next=17,f._get(u);case 17:if(!(h=t.sent)){t.next=23;break}return d=mi._fromJSON(n,h),f!==o&&(s=d),o=f,t.abrupt("break",29);case 23:t.next=27;break;case 25:t.prev=25,t.t0=t.catch(14);case 27:t.next=12;break;case 29:t.next=34;break;case 31:t.prev=31,t.t1=t.catch(10),c.e(t.t1);case 34:return t.prev=34,c.f(),t.finish(34);case 37:if(p=a.filter((function(e){return e._shouldAllowMigration})),o._shouldAllowMigration&&p.length){t.next=40;break}return t.abrupt("return",new e(o,n,i));case 40:if(o=p[0],!s){t.next=44;break}return t.next=44,o._set(u,s.toJSON());case 44:return t.next=46,Promise.all(r.map(function(){var e=lt(st().mark((function e(t){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t===o){e.next=8;break}return e.prev=1,e.next=4,t._remove(u);case 4:e.next=8;break;case 6:e.prev=6,e.t0=e.catch(1);case 8:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(t){return e.apply(this,arguments)}}()));case 46:return t.abrupt("return",new e(o,n,i));case 47:case"end":return t.stop()}}),t,null,[[10,31,34,37],[14,25]])})));return function(e,n){return t.apply(this,arguments)}}()}]),e}();function wi(e){var t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(Si(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(_i(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(Ti(t))return"Blackberry";if(Ci(t))return"Webos";if(xi(t))return"Safari";if((t.includes("chrome/")||Ei(t))&&!t.includes("edge/"))return"Chrome";if(Ii(t))return"Android";var n=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/);return 2===(null===n||void 0===n?void 0:n.length)?n[1]:"Other"}function _i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Vt();return/firefox\//i.test(e)}function xi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Vt(),t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function Ei(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Vt();return/crios\//i.test(e)}function Si(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Vt();return/iemobile/i.test(e)}function Ii(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Vt();return/android/i.test(e)}function Ti(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Vt();return/blackberry/i.test(e)}function Ci(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Vt();return/webos/i.test(e)}function Ni(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Vt();return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function Oi(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Vt();return Ni(t)&&!!(null===(e=window.navigator)||void 0===e?void 0:e.standalone)}function Ai(){return Ht()&&10===document.documentMode}function Pi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Vt();return Ni(e)||Ii(e)||Ci(e)||Ti(e)||/windows phone/i.test(e)||Si(e)}function Ri(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];switch(e){case"Browser":t=wi(Vt());break;case"Worker":t="".concat(wi(Vt()),"-").concat(e);break;default:t=e}var r=n.length?n.join(","):"FirebaseCore-web";return"".concat(t,"/","JsCore","/").concat(Gn,"/").concat(r)}var Di=function(){function e(t){xt(this,e),this.auth=t,this.queue=[]}return St(e,[{key:"pushCallback",value:function(e,t){var n=this,r=function(t){return new Promise((function(n,r){try{n(e(t))}catch(i){r(i)}}))};r.onAbort=t,this.queue.push(r);var i=this.queue.length-1;return function(){n.queue[i]=function(){return Promise.resolve()}}}},{key:"runMiddleware",value:function(){var e=lt(st().mark((function e(t){var n,r,i,a,o,u,s,c;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.auth.currentUser!==t){e.next=2;break}return e.abrupt("return");case 2:r=[],e.prev=3,i=_t(this.queue),e.prev=5,i.s();case 7:if((a=i.n()).done){e.next=14;break}return o=a.value,e.next=11,o(t);case 11:o.onAbort&&r.push(o.onAbort);case 12:e.next=7;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(5),i.e(e.t0);case 19:return e.prev=19,i.f(),e.finish(19);case 22:e.next=30;break;case 24:e.prev=24,e.t1=e.catch(3),r.reverse(),u=_t(r);try{for(u.s();!(s=u.n()).done;){c=s.value;try{c()}catch(fk){}}}catch(l){u.e(l)}finally{u.f()}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null===(n=e.t1)||void 0===n?void 0:n.message});case 30:case"end":return e.stop()}}),e,this,[[3,24],[5,16,19,22]])})));return function(t){return e.apply(this,arguments)}}()}]),e}(),Li=function(){function e(t,n,r){xt(this,e),this.app=t,this.heartbeatServiceProvider=n,this.config=r,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Mi(this),this.idTokenSubscription=new Mi(this),this.beforeStateQueue=new Di(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=yr,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=t.name,this.clientVersion=r.sdkClientVersion}return St(e,[{key:"_initializeWithPersistence",value:function(e,t){var n=this;return t&&(this._popupRedirectResolver=Cr(t)),this._initializationPromise=this.queue(lt(st().mark((function r(){var i,a;return st().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!n._deleted){r.next=2;break}return r.abrupt("return");case 2:return r.next=4,ki.create(n,e);case 4:if(n.persistenceManager=r.sent,!n._deleted){r.next=7;break}return r.abrupt("return");case 7:if(!(null===(i=n._popupRedirectResolver)||void 0===i?void 0:i._shouldInitProactively)){r.next=15;break}return r.prev=8,r.next=11,n._popupRedirectResolver._initialize(n);case 11:r.next=15;break;case 13:r.prev=13,r.t0=r.catch(8);case 15:return r.next=17,n.initializeCurrentUser(t);case 17:if(n.lastNotifiedUid=(null===(a=n.currentUser)||void 0===a?void 0:a.uid)||null,!n._deleted){r.next=20;break}return r.abrupt("return");case 20:n._isInitialized=!0;case 21:case"end":return r.stop()}}),r,null,[[8,13]])})))),this._initializationPromise}},{key:"_onStorageEvent",value:function(){var e=lt(st().mark((function e(){var t;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._deleted){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.assertedPersistence.getCurrentUser();case 4:if(t=e.sent,this.currentUser||t){e.next=7;break}return e.abrupt("return");case 7:if(!this.currentUser||!t||this.currentUser.uid!==t.uid){e.next=12;break}return this._currentUser._assign(t),e.next=11,this.currentUser.getIdToken();case 11:return e.abrupt("return");case 12:return e.next=14,this._updateCurrentUser(t,!0);case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"initializeCurrentUser",value:function(){var e=lt(st().mark((function e(t){var n,r,i,a,o,u,s;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.assertedPersistence.getCurrentUser();case 2:if(r=e.sent,i=r,a=!1,!t||!this.config.authDomain){e.next=14;break}return e.next=8,this.getOrInitRedirectPersistenceManager();case 8:return o=null===(n=this.redirectUser)||void 0===n?void 0:n._redirectEventId,u=null===i||void 0===i?void 0:i._redirectEventId,e.next=12,this.tryRedirectSignIn(t);case 12:s=e.sent,o&&o!==u||!(null===s||void 0===s?void 0:s.user)||(i=s.user,a=!0);case 14:if(i){e.next=16;break}return e.abrupt("return",this.directlySetCurrentUser(null));
2case 16:if(i._redirectEventId){e.next=32;break}if(!a){e.next=27;break}return e.prev=18,e.next=21,this.beforeStateQueue.runMiddleware(i);case 21:e.next=27;break;case 23:e.prev=23,e.t0=e.catch(18),i=r,this._popupRedirectResolver._overrideRedirectResult(this,(function(){return Promise.reject(e.t0)}));case 27:if(!i){e.next=31;break}return e.abrupt("return",this.reloadAndSetCurrentUserOrClear(i));case 31:return e.abrupt("return",this.directlySetCurrentUser(null));case 32:return Er(this._popupRedirectResolver,this,"argument-error"),e.next=35,this.getOrInitRedirectPersistenceManager();case 35:if(!this.redirectUser||this.redirectUser._redirectEventId!==i._redirectEventId){e.next=37;break}return e.abrupt("return",this.directlySetCurrentUser(i));case 37:return e.abrupt("return",this.reloadAndSetCurrentUserOrClear(i));case 38:case"end":return e.stop()}}),e,this,[[18,23]])})));return function(t){return e.apply(this,arguments)}}()},{key:"tryRedirectSignIn",value:function(){var e=lt(st().mark((function e(t){var n;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=null,e.prev=1,e.next=4,this._popupRedirectResolver._completeRedirectFn(this,t,!0);case 4:n=e.sent,e.next=11;break;case 7:return e.prev=7,e.t0=e.catch(1),e.next=11,this._setRedirectUser(null);case 11:return e.abrupt("return",n);case 12:case"end":return e.stop()}}),e,this,[[1,7]])})));return function(t){return e.apply(this,arguments)}}()},{key:"reloadAndSetCurrentUserOrClear",value:function(){var e=lt(st().mark((function e(t){var n;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,ui(t);case 3:e.next=9;break;case 5:if(e.prev=5,e.t0=e.catch(0),(null===(n=e.t0)||void 0===n?void 0:n.code)==="auth/".concat("network-request-failed")){e.next=9;break}return e.abrupt("return",this.directlySetCurrentUser(null));case 9:return e.abrupt("return",this.directlySetCurrentUser(t));case 10:case"end":return e.stop()}}),e,this,[[0,5]])})));return function(t){return e.apply(this,arguments)}}()},{key:"useDeviceLanguage",value:function(){this.languageCode=function(){if("undefined"===typeof navigator)return null;var e=navigator;return e.languages&&e.languages[0]||e.language||null}()}},{key:"_delete",value:function(){var e=lt(st().mark((function e(){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._deleted=!0;case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"updateCurrentUser",value:function(){var e=lt(st().mark((function e(t){var n;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=t?nn(t):null)&&Er(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),e.abrupt("return",this._updateCurrentUser(n&&n._clone(this)));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_updateCurrentUser",value:function(){var e=lt(st().mark((function e(t){var n,r=this,i=arguments;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=i.length>1&&void 0!==i[1]&&i[1],!this._deleted){e.next=3;break}return e.abrupt("return");case 3:if(t&&Er(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),n){e.next=7;break}return e.next=7,this.beforeStateQueue.runMiddleware(t);case 7:return e.abrupt("return",this.queue(lt(st().mark((function e(){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.directlySetCurrentUser(t);case 2:r.notifyAuthListeners();case 3:case"end":return e.stop()}}),e)})))));case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"signOut",value:function(){var e=lt(st().mark((function e(){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.beforeStateQueue.runMiddleware(null);case 2:if(!this.redirectPersistenceManager&&!this._popupRedirectResolver){e.next=5;break}return e.next=5,this._setRedirectUser(null);case 5:return e.abrupt("return",this._updateCurrentUser(null,!0));case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"setPersistence",value:function(e){var t=this;return this.queue(lt(st().mark((function n(){return st().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.assertedPersistence.setPersistence(Cr(e));case 2:case"end":return n.stop()}}),n)}))))}},{key:"_getPersistence",value:function(){return this.assertedPersistence.persistence.type}},{key:"_updateErrorMap",value:function(e){this._errorFactory=new Wt("auth","Firebase",e())}},{key:"onAuthStateChanged",value:function(e,t,n){return this.registerStateListener(this.authStateSubscription,e,t,n)}},{key:"beforeAuthStateChanged",value:function(e,t){return this.beforeStateQueue.pushCallback(e,t)}},{key:"onIdTokenChanged",value:function(e,t,n){return this.registerStateListener(this.idTokenSubscription,e,t,n)}},{key:"toJSON",value:function(){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()}}},{key:"_setRedirectUser",value:function(){var e=lt(st().mark((function e(t,n){var r;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getOrInitRedirectPersistenceManager(n);case 2:return r=e.sent,e.abrupt("return",null===t?r.removeCurrentUser():r.setCurrentUser(t));case 4:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getOrInitRedirectPersistenceManager",value:function(){var e=lt(st().mark((function e(t){var n;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.redirectPersistenceManager){e.next=9;break}return Er(n=t&&Cr(t)||this._popupRedirectResolver,this,"argument-error"),e.next=5,ki.create(this,[Cr(n._redirectPersistence)],"redirectUser");case 5:return this.redirectPersistenceManager=e.sent,e.next=8,this.redirectPersistenceManager.getCurrentUser();case 8:this.redirectUser=e.sent;case 9:return e.abrupt("return",this.redirectPersistenceManager);case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_redirectUserForId",value:function(){var e=lt(st().mark((function e(t){var n,r;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isInitialized){e.next=3;break}return e.next=3,this.queue(lt(st().mark((function e(){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))));case 3:if((null===(n=this._currentUser)||void 0===n?void 0:n._redirectEventId)!==t){e.next=5;break}return e.abrupt("return",this._currentUser);case 5:if((null===(r=this.redirectUser)||void 0===r?void 0:r._redirectEventId)!==t){e.next=7;break}return e.abrupt("return",this.redirectUser);case 7:return e.abrupt("return",null);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_persistUserIfCurrent",value:function(){var e=lt(st().mark((function e(t){var n=this;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==this.currentUser){e.next=2;break}return e.abrupt("return",this.queue(lt(st().mark((function e(){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.directlySetCurrentUser(t));case 1:case"end":return e.stop()}}),e)})))));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_notifyListenersIfCurrent",value:function(e){e===this.currentUser&&this.notifyAuthListeners()}},{key:"_key",value:function(){return"".concat(this.config.authDomain,":").concat(this.config.apiKey,":").concat(this.name)}},{key:"_startProactiveRefresh",value:function(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}},{key:"_stopProactiveRefresh",value:function(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}},{key:"_currentUser",get:function(){return this.currentUser}},{key:"notifyAuthListeners",value:function(){var e,t;if(this._isInitialized){this.idTokenSubscription.next(this.currentUser);var 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))}}},{key:"registerStateListener",value:function(e,t,n,r){var i=this;if(this._deleted)return function(){};var a="function"===typeof t?t:t.next.bind(t),o=this._isInitialized?Promise.resolve():this._initializationPromise;return Er(o,this,"internal-error"),o.then((function(){return a(i.currentUser)})),"function"===typeof t?e.addObserver(t,n,r):e.addObserver(t)}},{key:"directlySetCurrentUser",value:function(){var e=lt(st().mark((function e(t){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.currentUser&&this.currentUser!==t&&(this._currentUser._stopProactiveRefresh(),t&&this.isProactiveRefreshEnabled&&t._startProactiveRefresh()),this.currentUser=t,!t){e.next=7;break}return e.next=5,this.assertedPersistence.setCurrentUser(t);case 5:e.next=9;break;case 7:return e.next=9,this.assertedPersistence.removeCurrentUser();case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"queue",value:function(e){return this.operations=this.operations.then(e,e),this.operations}},{key:"assertedPersistence",get:function(){return Er(this.persistenceManager,this,"internal-error"),this.persistenceManager}},{key:"_logFramework",value:function(e){e&&!this.frameworks.includes(e)&&(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=Ri(this.config.clientPlatform,this._getFrameworks()))}},{key:"_getFrameworks",value:function(){return this.frameworks}},{key:"_getAdditionalHeaders",value:function(){var e=lt(st().mark((function e(){var t,n,r;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Ee({},"X-Client-Version",this.clientVersion),this.app.options.appId&&(n["X-Firebase-gmpid"]=this.app.options.appId),e.next=4,null===(t=this.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===t?void 0:t.getHeartbeatsHeader();case 4:return(r=e.sent)&&(n["X-Firebase-Client"]=r),e.abrupt("return",n);case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}();function ji(e){return nn(e)}var Mi=function(){function e(t){var n=this;xt(this,e),this.auth=t,this.observer=null,this.addObserver=function(e,t){var n=new en(e,t);return n.subscribe.bind(n)}((function(e){return n.observer=e}))}return St(e,[{key:"next",get:function(){return Er(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}]),e}();var Fi=function(){function e(t,n){xt(this,e),this.providerId=t,this.signInMethod=n}return St(e,[{key:"toJSON",value:function(){return Sr("not implemented")}},{key:"_getIdTokenResponse",value:function(e){return Sr("not implemented")}},{key:"_linkToIdToken",value:function(e,t){return Sr("not implemented")}},{key:"_getReauthenticationResolver",value:function(e){return Sr("not implemented")}}]),e}();function Ui(e,t){return Vi.apply(this,arguments)}function Vi(){return Vi=lt(st().mark((function e(t,n){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Ur(t,"POST","/v1/accounts:update",n));case 1:case"end":return e.stop()}}),e)}))),Vi.apply(this,arguments)}function zi(e,t){return qi.apply(this,arguments)}function qi(){return qi=lt(st().mark((function e(t,n){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Br(t,"POST","/v1/accounts:signInWithPassword",Fr(t,n)));case 1:case"end":return e.stop()}}),e)}))),qi.apply(this,arguments)}function Bi(e,t){return Hi.apply(this,arguments)}function Hi(){return Hi=lt(st().mark((function e(t,n){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Br(t,"POST","/v1/accounts:signInWithEmailLink",Fr(t,n)));case 1:case"end":return e.stop()}}),e)}))),Hi.apply(this,arguments)}function Ki(e,t){return Wi.apply(this,arguments)}function Wi(){return Wi=lt(st().mark((function e(t,n){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Br(t,"POST","/v1/accounts:signInWithEmailLink",Fr(t,n)));case 1:case"end":return e.stop()}}),e)}))),Wi.apply(this,arguments)}var Qi=function(e){Ct(n,e);var t=Pt(n);
2function n(e,r,i){var a,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return xt(this,n),(a=t.call(this,"password",i))._email=e,a._password=r,a._tenantId=o,a}return St(n,[{key:"toJSON",value:function(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}},{key:"_getIdTokenResponse",value:function(){var e=lt(st().mark((function e(t){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=this.signInMethod,e.next="password"===e.t0?3:"emailLink"===e.t0?4:5;break;case 3:return e.abrupt("return",zi(t,{returnSecureToken:!0,email:this._email,password:this._password}));case 4:return e.abrupt("return",Bi(t,{email:this._email,oobCode:this._password}));case 5:kr(t,"internal-error");case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_linkToIdToken",value:function(){var e=lt(st().mark((function e(t,n){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=this.signInMethod,e.next="password"===e.t0?3:"emailLink"===e.t0?4:5;break;case 3:return e.abrupt("return",Ui(t,{idToken:n,returnSecureToken:!0,email:this._email,password:this._password}));case 4:return e.abrupt("return",Ki(t,{idToken:n,email:this._email,oobCode:this._password}));case 5:kr(t,"internal-error");case 6:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_getReauthenticationResolver",value:function(e){return this._getIdTokenResponse(e)}}],[{key:"_fromEmailAndPassword",value:function(e,t){return new n(e,t,"password")}},{key:"_fromEmailAndCode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return new n(e,t,"emailLink",r)}},{key:"fromJSON",value:function(e){var 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}}]),n}(Fi);function Gi(e,t){return $i.apply(this,arguments)}function $i(){return $i=lt(st().mark((function e(t,n){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Br(t,"POST","/v1/accounts:signInWithIdp",Fr(t,n)));case 1:case"end":return e.stop()}}),e)}))),$i.apply(this,arguments)}var Xi=function(e){Ct(n,e);var t=Pt(n);function n(){var e;return xt(this,n),(e=t.apply(this,arguments)).pendingToken=null,e}return St(n,[{key:"toJSON",value:function(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,n
2once:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}},{key:"_getIdTokenResponse",value:function(e){return Gi(e,this.buildRequest())}},{key:"_linkToIdToken",value:function(e,t){var n=this.buildRequest();return n.idToken=t,Gi(e,n)}},{key:"_getReauthenticationResolver",value:function(e){var t=this.buildRequest();return t.autoCreate=!1,Gi(e,t)}},{key:"buildRequest",value:function(){var e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{var 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=Yt(t)}return e}}],[{key:"_fromParams",value:function(e){var t=new n(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):kr("argument-error"),t}},{key:"fromJSON",value:function(e){var t="string"===typeof e?JSON.parse(e):e,r=t.providerId,i=t.signInMethod,a=dr(t,["providerId","signInMethod"]);if(!r||!i)return null;var o=new n(r,i);return o.idToken=a.idToken||void 0,o.accessToken=a.accessToken||void 0,o.secret=a.secret,o.nonce=a.nonce,o.pendingToken=a.pendingToken||null,o}}]),n}(Fi);function Yi(e,t){return Ji.apply(this,arguments)}function Ji(){return Ji=lt(st().mark((function e(t,n){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Ur(t,"POST","/v1/accounts:sendVerificationCode",Fr(t,n)));case 1:case"end":return e.stop()}}),e)}))),Ji.apply(this,arguments)}function Zi(){return Zi=lt(st().mark((function e(t,n){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Br(t,"POST","/v1/accounts:signInWithPhoneNumber",Fr(t,n)));case 1:case"end":return e.stop()}}),e)}))),Zi.apply(this,arguments)}function ea(){return ea=lt(st().mark((function e(t,n){var r;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Br(t,"POST","/v1/accounts:signInWithPhoneNumber",Fr(t,n));case 2:if(!(r=e.sent).temporaryProof){e.next=5;break}throw Qr(t,"account-exists-with-different-credential",r);case 5:return e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)}))),ea.apply(this,arguments)}var ta=Ee({},"USER_NOT_FOUND","user-not-found");function na(){return na=lt(st().mark((function e(t,n){var r;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object.assign(Object.assign({},n),{operation:"REAUTH"}),e.abrupt("return",Br(t,"POST","/v1/accounts:signInWithPhoneNumber",Fr(t,r),ta));case 2:case"end":return e.stop()}}),e)}))),na.apply(this,arguments)}var ra=function(e){Ct(n,e);var t=Pt(n);function n(e){var r;return xt(this,n),(r=t.call(this,"phone","phone")).params=e,r}return St(n,[{key:"_getIdTokenResponse",value:function(e){return function(e,t){return Zi.apply(this,arguments)}(e,this._makeVerificationRequest())}},{key:"_linkToIdToken",value:function(e,t){return function(e,t){return ea.apply(this,arguments)}(e,Object.assign({idToken:t},this._makeVerificationRequest()))}},{key:"_getReauthenticationResolver",value:function(e){return function(e,t){return na.apply(this,arguments)}(e,this._makeVerificationRequest())}},{key:"_makeVerificationRequest",value:function(){var e=this.params,t=e.temporaryProof,n=e.phoneNumber,r=e.verificationId,i=e.verificationCode;return t&&n?{temporaryProof:t,phoneNumber:n}:{sessionInfo:r,code:i}}},{key:"toJSON",value:function(){var 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}}],[{key:"_fromVerification",value:function(e,t){return new n({verificationId:e,verificationCode:t})}}
2,{key:"_fromTokenResponse",value:function(e,t){return new n({phoneNumber:e,temporaryProof:t})}},{key:"fromJSON",value:function(e){"string"===typeof e&&(e=JSON.parse(e));var t=e,r=t.verificationId,i=t.verificationCode,a=t.phoneNumber,o=t.temporaryProof;return i||r||a||o?new n({verificationId:r,verificationCode:i,phoneNumber:a,temporaryProof:o}):null}}]),n}(Fi);var ia=function(){function e(t){var n,r,i,a,o,u;xt(this,e);var s=Jt(Zt(t)),c=null!==(n=s.apiKey)&&void 0!==n?n:null,l=null!==(r=s.oobCode)&&void 0!==r?r:null,f=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!==(i=s.mode)&&void 0!==i?i:null);Er(c&&l&&f,"argument-error"),this.apiKey=c,this.operation=f,this.code=l,this.continueUrl=null!==(a=s.continueUrl)&&void 0!==a?a:null,this.languageCode=null!==(o=s.languageCode)&&void 0!==o?o:null,this.tenantId=null!==(u=s.tenantId)&&void 0!==u?u:null}return St(e,null,[{key:"parseLink",value:function(t){var n=function(e){var t=Jt(Zt(e)).link,n=t?Jt(Zt(t)).deep_link_id:null,r=Jt(Zt(e)).deep_link_id;return(r?Jt(Zt(r)).link:null)||r||n||t||e}(t);try{return new e(n)}catch(Pg){return null}}}]),e}();var aa=function(){function e(){xt(this,e),this.providerId=e.PROVIDER_ID}return St(e,null,[{key:"credential",value:function(e,t){return Qi._fromEmailAndPassword(e,t)}},{key:"credentialWithLink",value:function(e,t){var n=ia.parseLink(t);return Er(n,"argument-error"),Qi._fromEmailAndCode(e,n.code,n.tenantId)}}]),e}();aa.PROVIDER_ID="password",aa.EMAIL_PASSWORD_SIGN_IN_METHOD="password",aa.EMAIL_LINK_SIGN_IN_METHOD="emailLink";var oa=function(){function e(t){xt(this,e),this.providerId=t,this.defaultLanguageCode=null,this.customParameters={}}return St(e,[{key:"setDefaultLanguage",value:function(e){this.defaultLanguageCode=e}},{key:"setCustomParameters",value:function(e){return this.customParameters=e,this}},{key:"getCustomParameters",value:function(){return this.customParameters}}]),e}(),ua=function(e){Ct(n,e);var t=Pt(n);function n(){var e;return xt(this,n),(e=t.apply(this,arguments)).scopes=[],e}return St(n,[{key:"addScope",value:function(e){return this.scopes.includes(e)||this.scopes.push(e),this}},{key:"getScopes",value:function(){return wt(this.scopes)}}]),n}(oa),sa=function(e){Ct(n,e);var t=Pt(n);function n(){return xt(this,n),t.call(this,"facebook.com")}return St(n,null,[{key:"credential",value:function(e){return Xi._fromParams({providerId:n.PROVIDER_ID,signInMethod:n.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}},{key:"credentialFromResult",value:function(e){return n.credentialFromTaggedObject(e)}},{key:"credentialFromError",value:function(e){return n.credentialFromTaggedObject(e.customData||{})}},{key:"credentialFromTaggedObject",value:function(e){var t=e._tokenResponse;if(!t||!("oauthAccessToken"in t))return null;if(!t.oauthAccessToken)return null;try{return n.credential(t.oauthAccessToken)}catch(Pg){return null}}}]),n}(ua);sa.FACEBOOK_SIGN_IN_METHOD="facebook.com",sa.PROVIDER_ID="facebook.com";var ca=function(e){Ct(n,e);var t=Pt(n);function n(){var e;return xt(this,n),(e=t.call(this,"google.com")).addScope("profile"),e}return St(n,null,[{key:"credential",value:function(e,t){return Xi._fromParams({providerId:n.PROVIDER_ID,signInMethod:n.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}},{key:"credentialFromResult",value:function(e){return n.credentialFromTaggedObject(e)}},{key:"credentialFromError",value:function(e){return n.credentialFromTaggedObject(e.customData||{})}},{key:"credentialFromTaggedObject",value:function(e){var t=e._tokenResponse;if(!t)return null;var r=t.oauthIdToken,i=t.oauthAccessToken;if(!r&&!i)return null;try{return n.credential(r,i)}catch(Pg){return null}}}]),n}(ua);ca.GOOGLE_SIGN_IN_METHOD="google.com",ca.PROVIDER_ID="google.com";var la=function(e){Ct(n,e);var t=Pt(n);function n(){return xt(this,n),t.call(this,"github.com")}return St(n,null,[{key:"credential",value:function(e){return Xi._fromParams({providerId:n.PROVIDER_ID,signInMethod:n.GITHUB_SIGN_IN_METHOD,accessToken:e})}},{key:"credentialFromResult",value:function(e){return n.credentialFromTaggedObject(e)}},{key:"credentialFromError",value:function(e){return n.credentialFromTaggedObject(e.customData||{})}},{key:"credentialFromTaggedObject",value:function(e){var t=e._tokenResponse;if(!t||!("oauthAccessToken"in t))return null;if(!t.oauthAccessToken)return null;try{return n.credential(t.oauthAccessToken)}catch(Pg){return null}}}]),n}(ua);la.GITHUB_SIGN_IN_METHOD="github.com",la.PROVIDER_ID="github.com";var fa=function(e){Ct(n,e);var t=Pt(n);function n(){return xt(this,n),t.call(this,"twitter.com")}return St(n,null,[{key:"credential",value:function(e,t){return Xi._fromParams({providerId:n.PROVIDER_ID,signInMethod:n.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}},{key:"credentialFromResult",value:function(e){return n.credentialFromTaggedObject(e)}},{key:"credentialFromError",value:function(e){return n.credentialFromTaggedObject(e.customData||{})}},{key:"credentialFromTaggedObject",value:function(e){var t=e._tokenResponse;if(!t)return null;var r=t.oauthAccessToken,i=t.oauthTokenSecret;if(!r||!i)return null;try{return n.credential(r,i)}catch(Pg){return null}}}]),n}(ua);function ha(e,t){return da.apply(this,arguments)}function da(){return da=lt(st().mark((function e(t,n){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Br(t,"POST","/v1/accounts:signUp",Fr(t,n)));case 1:case"end":return e.stop()}}),e)}))),da.apply(this,arguments)}fa.TWITTER_SIGN_IN_METHOD="twitter.com",fa.PROVIDER_ID="twitter.com";var pa=function(){function e(t){xt(this,e),this.user=t.user,this.providerId=t.providerId,this._tokenResponse=t._token
2Response,this.operationType=t.operationType}return St(e,null,[{key:"_fromIdTokenResponse",value:function(){var t=lt(st().mark((function t(n,r,i){var a,o,u,s,c=arguments;return st().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=c.length>3&&void 0!==c[3]&&c[3],t.next=3,mi._fromIdTokenResponse(n,i,a);case 3:return o=t.sent,u=va(i),s=new e({user:o,providerId:u,_tokenResponse:i,operationType:r}),t.abrupt("return",s);case 7:case"end":return t.stop()}}),t)})));return function(e,n,r){return t.apply(this,arguments)}}()},{key:"_forOperation",value:function(){var t=lt(st().mark((function t(n,r,i){var a;return st().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n._updateTokensIfNecessary(i,!0);case 2:return a=va(i),t.abrupt("return",new e({user:n,providerId:a,_tokenResponse:i,operationType:r}));case 4:case"end":return t.stop()}}),t)})));return function(e,n,r){return t.apply(this,arguments)}}()}]),e}();function va(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}function ma(){return ma=lt(st().mark((function e(t){var n,r,i,a;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=ji(t),e.next=3,r._initializationPromise;case 3:if(!(null===(n=r.currentUser)||void 0===n?void 0:n.isAnonymous)){e.next=5;break}return e.abrupt("return",new pa({user:r.currentUser,providerId:null,operationType:"signIn"}));case 5:return e.next=7,ha(r,{returnSecureToken:!0});case 7:return i=e.sent,e.next=10,pa._fromIdTokenResponse(r,"signIn",i,!0);case 10:return a=e.sent,e.next=13,r._updateCurrentUser(a.user);case 13:return e.abrupt("return",a);case 14:case"end":return e.stop()}}),e)}))),ma.apply(this,arguments)}var ya=function(e){Ct(n,e);var t=Pt(n);function n(e,r,i,a){var o,u;return xt(this,n),(o=t.call(this,r.code,r.message)).operationType=i,o.user=a,Object.setPrototypeOf(It(o),n.prototype),o.customData={appName:e.name,tenantId:null!==(u=e.tenantId)&&void 0!==u?u:void 0,_serverResponse:r.customData._serverResponse,operationType:i},o}return St(n,null,[{key:"_fromErrorAndOperation",value:function(e,t,r,i){return new n(e,t,r,i)}}]),n}(Kt);function ga(e,t,n,r){return("reauthenticate"===t?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch((function(n){if(n.code==="auth/".concat("multi-factor-auth-required"))throw ya._fromErrorAndOperation(e,n,t,r);throw n}))}function ba(e){return new Set(e.map((function(e){return e.providerId})).filter((function(e){return!!e})))}function ka(e,t){return wa.apply(this,arguments)}function wa(){return wa=lt(st().mark((function e(t,n){var r,i,a=arguments;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.length>2&&void 0!==a[2]&&a[2],e.t0=ni,e.t1=t,e.t2=n,e.t3=t.auth,e.next=7,t.getIdToken();case 7:return e.t4=e.sent,e.t5=e.t2._linkToIdToken.call(e.t2,e.t3,e.t4),e.t6=r,e.next=12,(0,e.t0)(e.t1,e.t5,e.t6);case 12:return i=e.sent,e.abrupt("return",pa._forOperation(t,"link",i));case 14:case"end":return e.stop()}}),e)}))),wa.apply(this,arguments)}function _a(e,t,n){return xa.apply(this,arguments)}function xa(){return(xa=lt(st().mark((function e(t,n,r){var i,a;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ui(n);case 2:i=ba(n.providerData),a=!1===t?"provider-already-linked":"no-such-provider",Er(i.has(r)===t,n.auth,a);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ea(e,t){return Sa.apply(this,arguments)}function Sa(){return Sa=lt(st().mark((function e(t,n){var r,i,a,o,u,s,c,l=arguments;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=l.length>2&&void 0!==l[2]&&l[2],a=t.auth,o="reauthenticate",e.prev=3,e.next=6,ni(t,ga(a,o,n,t),r);case 6:return Er((u=e.sent).idToken,a,"internal-error"),Er(s=ti(u.idToken),a,"internal-error"),c=s.sub,Er(t.uid===c,a,"user-mismatch"),e.abrupt("return",pa._forOperation(t,o,u));case 15:throw e.prev=15,e.t0=e.catch(3),(null===(i=e.t0)||void 0===i?void 0:i.code)==="auth/".concat("user-not-found")&&kr(a,"user-mismatch"),e.t0;case 19:case"end":return e.stop()}}),e,null,[[3,15]])}))),Sa.apply(this,arguments)}function Ia(e,t){return Ta.apply(this,arguments)}function Ta(){return Ta=lt(st().mark((function e(t,n){var r,i,a,o,u=arguments;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=u.length>2&&void 0!==u[2]&&u[2],i="signIn",e.next=4,ga(t,i,n);case 4:return a=e.sent,e.next=7,pa._fromIdTokenResponse(t,i,a);case 7:if(o=e.sent,r){e.next=11;break}return e.next=11,t._updateCurrentUser(o.user);case 11:return e.abrupt("return",o);case 12:case"end":return e.stop()}}),e)}))),Ta.apply(this,arguments)}function Ca(e,t){return Na.apply(this,arguments)}function Na(){return Na=lt(st().mark((function e(t,n){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Ia(ji(t),n));case 1:case"end":return e.stop()}}),e)}))),Na.apply(this,arguments)}function Oa(e,t){return Aa.apply(this,arguments)}function Aa(){return(Aa=lt(st().mark((function e(t,n){var r;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=nn(t),e.next=3,_a(!1,r,n.providerId);case 3:return e.abrupt("return",ka(r,n));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Pa(){return Pa=lt(st().mark((function e(t,n,r){var i,a,o;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=ji(t),e.next=3,ha(i,{returnSecureToken:!0,email:n,password:r});case 3:return a=e.sent,e.next=6,pa._fromIdTokenResponse(i,"signIn",a);case 6:return o=e.sent,e.next=9,i._updateCurrentUser(o.user);case 9:return e.abrupt("return",o);case 10:case"end":return e.stop()}}),e)}))),Pa.apply(this,arguments)}function Ra(e){return Da.apply(this,arguments)}function Da(){return(Da=lt(st().mark((function e(t){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",nn(t).delete());case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function La(e,t){return Ur(e,"POST","/v2/accounts/mfaEnrollment:start",Fr(e,t))}new WeakMap;var ja="__sak",Ma=function(){function e(t,n){xt(this,e),this.storageRetriever=t,this.type=n}return St(e,[{key:"_isAvailable",value:function(){try{return this.storage?(this.storage.setItem(ja,"1"),this.storage.removeItem(ja),Promise.resolve(!0)):Promise.resolve(!1)}catch(Pg){return Promise.resolve(!1)}}},{key:"_set",value:function(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}},{key:"_get",value:function(e){var t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}},{key:"_remove",value:function(e){return this.storage.removeItem(e),Promise.resolve()}},{key:"storage",get:function(){return this.storageRetriever()}}]),e}();var Fa=function(e){Ct(n,e);var t=Pt(n);function n(){var e;return xt(this,n),(e=t.call(this,(function(){return window.localStorage}),"LOCAL")).boundEventHandler=function(t,n){return e.onStorageEvent(t,n)},e.listeners={},e.localCache={},e.pollTimer=null,e.safariLocalStorageNotSynced=function(){var e=Vt();return xi(e)||Ni(e)}()&&function(){try{return!(!window||window===window.top)}catch(e){return!1}}(),e.fallbackToPolling=Pi(),e._shouldAllowMigration=!0,e}return St(n,[{key:"forAllChangedKeys",value:function(e){for(var t=0,n=Object.keys(this.listeners);t<n.length;t++){var r=n[t],i=this.storage.getItem(r),a=this.localCache[r];i!==a&&e(r,a,i)}}},{key:"onStorageEvent",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.key){var r=e.key;if(n?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){var i=this.storage.getItem(r);if(e.newValue!==i)null!==e.newValue?this.storage.setItem(r,e.newValue):this.storage.removeItem(r);else if(this.localCache[r]===e.newValue&&!n)return}var a=function(){var e=t.storage.getItem(r);(n||t.localCache[r]!==e)&&t.notifyListeners(r,e)},o=this.storage.getItem(r);Ai()&&o!==e.newValue&&e.newValue!==e.oldValue?setTimeout(a,10):a()}else this.forAllChangedKeys((function(e,n,r){t.notifyListeners(e,r)}))}},{key:"notifyListeners",value:function(e,t){this.localCache[e]=t;var n=this.listeners[e];if(n)for(var r=0,i=Array.from(n);r<i.length;r++){(0,i[r])(t?JSON.parse(t):t)}}},{key:"startPolling",value:function(){var e=this;this.stopPolling(),this.pollTimer=setInterval((function(){e.forAllChangedKeys((function(t,n,r){e.onStorageEvent(new StorageEvent("storage",{key:t,oldValue:n,newValue:r}),!0)}))}),1e3)}},{key:"stopPolling",value:function(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}},{key:"attachListener",value:function(){window.addEventListener("storage",this.boundEventHandler)}},{key:"detachListener",value:function(){window.removeEventListener("storage",this.boundEventHandler)}},{key:"_addListener",value:function(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)}},{key:"_removeListener",value:function(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())}},{key:"_set",value:function(){var e=lt(st().mark((function e(t,r){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,hr(Nt(n.prototype),"_set",this).call(this,t,r);case 2:this.localCache[t]=JSON.stringify(r);case 3:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_get",value:function(){var e=lt(st().mark((function e(t){var r;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,hr(Nt(n.prototype),"_get",this).call(this,t);case 2:return r=e.sent,this.localCache[t]=JSON.stringify(r),e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_remove",value:function(){var e=lt(st().mark((function e(t){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,hr(Nt(n.prototype),"_remove",this).call(this,t);case 2:delete this.localCache[t];case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),n}(Ma);Fa.type="LOCAL";var Ua=Fa,Va=function(e){Ct(n,e);var t=Pt(n);function n(){return xt(this,n),t.call(this,(function(){return window.sessionStorage}),"SESSION")}return St(n,[{key:"_addListener",value:function(e,t){}},{key:"_removeListener",value:function(e,t){}}]),n}(Ma);Va.type="SESSION";var za=Va;function qa(e){return Promise.all(e.map(function(){var e=lt(st().mark((function e(t){var n;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t;case 3:return n=e.sent,e.abrupt("return",{fulfilled:!0,value:n});case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",{fulfilled:!1,reason:e.t0});case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}()))}var Ba=function(){function e(t){xt(this,e),this.eventTarget=t,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}return St(e,[{key:"isListeningto",value:function(e){return this.eventTarget===e}},{key:"handleEvent",value:function(){var e=lt(st().mark((function e(t){var n,r,i,a,o,u,s,c;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(n=t).data,i=r.eventId,a=r.eventType,o=r.data,null===(u=this.handlersMap[a])||void 0===u?void 0:u.size){e.next=5;break}return e.abrupt("return");case 5:return n.ports[0].postMessage({status:"ack",eventId:i,eventType:a}),s=Array.from(u).map(function(){var e=lt(st().mark((function e(t){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t(n.origin,o));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=9,qa(s);case 9:c=e.sent,n.ports[0].postMessage({status:"done",eventId:i,eventType:a,response:c});case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_subscribe",value:function(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)}},{key:"_unsubscribe",value:function(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)}}],[{key:"_getInstance",value:function(t){var n=this.receivers.find((function(e){return e.isListeningto(t)}));if(n)return n;var r=new e(t);return this.receivers.push(r),r}}]),e}();function Ha(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n="",r=0;r<t;r++)n+=Math.floor(10*Math.random());return e+n}Ba.receivers=[];var Ka=function(){function e(t){xt(this,e),this.target=t,this.handlers=new Set}return St(e,[{key:"removeMessageHandler",value:function(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}},{key:"_send",value:function(){var e=lt(st().mark((function e(t,n){var r,i,a,o,u=this,s=arguments;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=s.length>2&&void 0!==s[2]?s[2]:50,i="undefined"!==typeof MessageChannel?new MessageChannel:null){e.next=4;break}throw new Error("connection_unavailable");case 4:return e.abrupt("return",new Promise((function(e,s){var c=Ha("",20);i.port1.start();var l=setTimeout((function(){s(new Error("unsupported_event"))}),r);o={messageChannel:i,onMessage:function(t){var n=t;if(n.data.eventId===c)switch(n.data.status){case"ack":clearTimeout(l),a=setTimeout((function(){s(new Error("timeout"))}),3e3);break;case"done":clearTimeout(a),e(n.data.response);break;default:clearTimeout(l),clearTimeout(a),s(new Error("invalid_response"))}}},u.handlers.add(o),i.port1.addEventListener("message",o.onMessage),u.target.postMessage({eventType:t,eventId:c,data:n},[i.port2])})).finally((function(){o&&u.removeMessageHandler(o)})));case 5:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()}]),e}();function Wa(){return window}
2function Qa(){return"undefined"!==typeof Wa().WorkerGlobalScope&&"function"===typeof Wa().importScripts}function Ga(){return $a.apply(this,arguments)}function $a(){return($a=lt(st().mark((function e(){var t;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===navigator||void 0===navigator?void 0:navigator.serviceWorker){e.next=2;break}return e.abrupt("return",null);case 2:return e.prev=2,e.next=5,navigator.serviceWorker.ready;case 5:return t=e.sent,e.abrupt("return",t.active);case 9:return e.prev=9,e.t0=e.catch(2),e.abrupt("return",null);case 12:case"end":return e.stop()}}),e,null,[[2,9]])})))).apply(this,arguments)}function Xa(){var e;return(null===(e=null===navigator||void 0===navigator?void 0:navigator.serviceWorker)||void 0===e?void 0:e.controller)||null}var Ya="firebaseLocalStorageDb",Ja="firebaseLocalStorage",Za="fbase_key",eo=function(){function e(t){xt(this,e),this.request=t}return St(e,[{key:"toPromise",value:function(){var e=this;return new Promise((function(t,n){e.request.addEventListener("success",(function(){t(e.request.result)})),e.request.addEventListener("error",(function(){n(e.request.error)}))}))}}]),e}();function to(e,t){return e.transaction([Ja],t?"readwrite":"readonly").objectStore(Ja)}function no(){var e=indexedDB.deleteDatabase(Ya);return new eo(e).toPromise()}function ro(){var e=indexedDB.open(Ya,1);return new Promise((function(t,n){e.addEventListener("error",(function(){n(e.error)})),e.addEventListener("upgradeneeded",(function(){var t=e.result;try{t.createObjectStore(Ja,{keyPath:Za})}catch(r){n(r)}})),e.addEventListener("success",lt(st().mark((function n(){var r;return st().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if((r=e.result).objectStoreNames.contains(Ja)){n.next=12;break}return r.close(),n.next=5,no();case 5:return n.t0=t,n.next=8,ro();case 8:n.t1=n.sent,(0,n.t0)(n.t1),n.next=13;break;case 12:t(r);case 13:case"end":return n.stop()}}),n)}))))}))}function io(e,t,n){return ao.apply(this,arguments)}function ao(){return ao=lt(st().mark((function e(t,n,r){var i,a;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=to(t,!0).put((Ee(i={},Za,n),Ee(i,"value",r),i)),e.abrupt("return",new eo(a).toPromise());case 2:case"end":return e.stop()}}),e)}))),ao.apply(this,arguments)}function oo(e,t){return uo.apply(this,arguments)}function uo(){return uo=lt(st().mark((function e(t,n){var r,i;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=to(t,!1).get(n),e.next=3,new eo(r).toPromise();case 3:return i=e.sent,e.abrupt("return",void 0===i?null:i.value);case 5:case"end":return e.stop()}}),e)}))),uo.apply(this,arguments)}function so(e,t){var n=to(e,!0).delete(t);return new eo(n).toPromise()}var co=function(){function e(){xt(this,e),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((function(){}),(function(){}))}return St(e,[{key:"_openDb",value:function(){var e=lt(st().mark((function e(){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.db){e.next=2;break}return e.abrupt("return",this.db);case 2:return e.next=4,ro();case 4:return this.db=e.sent,e.abrupt("return",this.db);case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_withRetries",value:function(){var e=lt(st().mark((function e(t){var n,r;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=0;case 1:return e.prev=2,e.next=5,this._openDb();case 5:return r=e.sent,e.next=8,t(r);case 8:return e.abrupt("return",e.sent);case 11:if(e.prev=11,e.t0=e.catch(2),!(n++>3)){e.next=15;break}throw e.t0;case 15:this.db&&(this.db.close(),this.db=void 0);case 16:e.next=1;break;case 18:case"end":return e.stop()}}),e,this,[[2,11]])})));return function(t){return e.apply(this,arguments)}}()},{key:"initializeServiceWorkerMessaging",value:function(){var e=lt(st().mark((function e(){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Qa()?this.initializeReceiver():this.initializeSender());case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"initializeReceiver",value:function(){var e=lt(st().mark((function e(){var t=this;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.receiver=Ba._getInstance(Qa()?self:null),this.receiver._subscribe("keyChanged",function(){var e=lt(st().mark((function e(n,r){var i;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t._poll();case 2:return i=e.sent,e.abrupt("return",{keyProcessed:i.includes(r.key)});case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),this.receiver._subscribe("ping",function(){var e=lt(st().mark((function e(t,n){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",["keyChanged"]);case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}());case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"initializeSender",value:function(){var e=lt(st().mark((function e(){var t,n,r;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ga();case 2:if(this.activeServiceWorker=e.sent,this.activeServiceWorker){e.next=5;break}return e.abrupt("return");case 5:return this.sender=new Ka(this.activeServiceWorker),e.next=8,this.sender._send("ping",{},800);case 8:if(r=e.sent){e.next=11;break}return e.abrupt("return");case 11:(null===(t=r[0])||void 0===t?void 0:t.fulfilled)&&(null===(n=r[0])||void 0===n?void 0:n.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0);case 12:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"notifyServiceWorker",value:function(){var e=lt(st().mark((function e(t){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.sender&&this.activeServiceWorker&&Xa()===this.activeServiceWorker){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,this.sender._send("keyChanged",{key:t},this.serviceWorkerReceiverAvailable?800:50);case 5:e.next=9;break;case 7:e.prev=7,e.t0=e.catch(2);case 9:case"end":return e.stop()}}),e,this,[[2,7]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_isAvailable",value:function(){var e=lt(st().mark((function e(){var t;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,indexedDB){e.next=3;break}return e.abrupt("return",!1);case 3:return e.next=5,ro();case 5:return t=e.sent,e.next=8,io(t,ja,"1");case 8:return e.next=10,so(t,ja);case 10:return e.abrupt("return",!0);case 13:e.prev=13,e.t0=e.catch(0);case 15:return e.abrupt("return",!1);case 16:case"end":return e.stop()}}),e,null,[[0,13]])})));return function(){return e.apply(this,arguments)}}()},{key:"_withPendingWrite",value:function(){var e=lt(st().mark((function e(t){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.pendingWrites++,e.prev=1,e.next=4,t();case 4:return e.prev=4,this.pendingWrites--,e.finish(4);case 7:case"end":return e.stop()}}),e,this,[[1,,4,7]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_set",value:function(){var e=lt(st().mark((function e(t,n){var r=this;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._withPendingWrite(lt(st().mark((function e(){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r._withRetries((function(e){return io(e,t,n)}));case 2:return r.localCache[t]=n,e.abrupt("return",r.notifyServiceWorker(t));case 4:case"end":return e.stop()}}),e)})))));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_get",value:function(){var e=lt(st().mark((function e(t){var n;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._withRetries((function(e){return oo(e,t)}));case 2:return n=e.sent,this.localCache[t]=n,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_remove",value:function(){var e=lt(st().mark((function e(t){var n=this;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._withPendingWrite(lt(st().mark((function e(){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n._withRetries((function(e){return so(e,t)}));case 2:return delete n.localCache[t],e.abrupt("return",n.notifyServiceWorker(t));case 4:case"end":return e.stop()}}),e)})))));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_poll",value:function(){var e=lt(st().mark((function e(){var t,n,r,i,a,o,u,s,c,l,f;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._withRetries((function(e){var t=to(e,!1).getAll();
2return new eo(t).toPromise()}));case 2:if(t=e.sent){e.next=5;break}return e.abrupt("return",[]);case 5:if(0===this.pendingWrites){e.next=7;break}return e.abrupt("return",[]);case 7:n=[],r=new Set,i=_t(t);try{for(i.s();!(a=i.n()).done;)o=a.value,u=o.fbase_key,s=o.value,r.add(u),JSON.stringify(this.localCache[u])!==JSON.stringify(s)&&(this.notifyListeners(u,s),n.push(u))}catch(h){i.e(h)}finally{i.f()}for(c=0,l=Object.keys(this.localCache);c<l.length;c++)f=l[c],this.localCache[f]&&!r.has(f)&&(this.notifyListeners(f,null),n.push(f));return e.abrupt("return",n);case 13:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"notifyListeners",value:function(e,t){this.localCache[e]=t;var n=this.listeners[e];if(n)for(var r=0,i=Array.from(n);r<i.length;r++){(0,i[r])(t)}}},{key:"startPolling",value:function(){var e=this;this.stopPolling(),this.pollTimer=setInterval(lt(st().mark((function t(){return st().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e._poll());case 1:case"end":return t.stop()}}),t)}))),800)}},{key:"stopPolling",value:function(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}},{key:"_addListener",value:function(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)}},{key:"_removeListener",value:function(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()}}]),e}();co.type="LOCAL";var lo=co;function fo(e,t){return Ur(e,"POST","/v2/accounts/mfaSignIn:start",Fr(e,t))}function ho(e){return new Promise((function(t,n){var r=document.createElement("script");r.setAttribute("src",e),r.onload=t,r.onerror=function(e){var t=wr("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)}))}function po(e){return"__".concat(e).concat(Math.floor(1e6*Math.random()))}po("rcb"),new Rr(3e4,6e4);var vo="recaptcha";function mo(e,t,n){return yo.apply(this,arguments)}function yo(){return yo=lt(st().mark((function e(t,n,r){var i,a,o,u,s,c,l,f,h;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.verify();case 2:if(a=e.sent,e.prev=3,Er("string"===typeof a,t,"argument-error"),Er(r.type===vo,t,"argument-error"),!("session"in(o="string"===typeof n?{phoneNumber:n}:n))){e.next=26;break}if(u=o.session,!("phoneNumber"in o)){e.next=17;break}return Er("enroll"===u.type,t,"internal-error"),e.next=13,La(t,{idToken:u.credential,phoneEnrollmentInfo:{phoneNumber:o.phoneNumber,recaptchaToken:a}});case 13:return s=e.sent,e.abrupt("return",s.phoneSessionInfo.sessionInfo);case 17:return Er("signin"===u.type,t,"internal-error"),Er(c=(null===(i=o.multiFactorHint)||void 0===i?void 0:i.uid)||o.multiFactorUid,t,"missing-multi-factor-info"),e.next=22,fo(t,{mfaPendingCredential:u.credential,mfaEnrollmentId:c,phoneSignInInfo:{recaptchaToken:a}});case 22:return l=e.sent,e.abrupt("return",l.phoneResponseInfo.sessionInfo);case 24:e.next=31;break;case 26:return e.next=28,Yi(t,{phoneNumber:o.phoneNumber,recaptchaToken:a});case 28:return f=e.sent,h=f.sessionInfo,e.abrupt("return",h);case 31:return e.prev=31,r._reset(),e.finish(31);case 34:case"end":return e.stop()}}),e,null,[[3,,31,34]])}))),yo.apply(this,arguments)}var go=function(){function e(t){xt(this,e),this.providerId=e.PROVIDER_ID,this.auth=ji(t)}return St(e,[{key:"verifyPhoneNumber",value:function(e,t){return mo(this.auth,e,nn(t))}}],[{key:"credential",value:function(e,t){return ra._fromVerification(e,t)}},{key:"credentialFromResult",value:function(t){var n=t;return e.credentialFromTaggedObject(n)}},{key:"credentialFromError",value:function(t){return e.credentialFromTaggedObject(t.customData||{})}},{key:"credentialFromTaggedObject",value:function(e){var t=e._tokenResponse;if(!t)return null;var n=t.phoneNumber,r=t.temporaryProof;return n&&r?ra._fromTokenResponse(n,r):null}}]),e}();function bo(e,t){return t?Cr(t):(Er(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}
2go.PROVIDER_ID="phone",go.PHONE_SIGN_IN_METHOD="phone";var ko=function(e){Ct(n,e);var t=Pt(n);function n(e){var r;return xt(this,n),(r=t.call(this,"custom","custom")).params=e,r}return St(n,[{key:"_getIdTokenResponse",value:function(e){return Gi(e,this._buildIdpRequest())}},{key:"_linkToIdToken",value:function(e,t){return Gi(e,this._buildIdpRequest(t))}},{key:"_getReauthenticationResolver",value:function(e){return Gi(e,this._buildIdpRequest())}},{key:"_buildIdpRequest",value:function(e){var 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}}]),n}(Fi);function wo(e){return Ia(e.auth,new ko(e),e.bypassAuthState)}function _o(e){var t=e.auth,n=e.user;return Er(n,t,"internal-error"),Ea(n,new ko(e),e.bypassAuthState)}function xo(e){return Eo.apply(this,arguments)}function Eo(){return Eo=lt(st().mark((function e(t){var n,r;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.auth,Er(r=t.user,n,"internal-error"),e.abrupt("return",ka(r,new ko(t),t.bypassAuthState));case 3:case"end":return e.stop()}}),e)}))),Eo.apply(this,arguments)}var So=function(){function e(t,n,r,i){var a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];xt(this,e),this.auth=t,this.resolver=r,this.user=i,this.bypassAuthState=a,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(n)?n:[n]}return St(e,[{key:"execute",value:function(){var e=this;return new Promise(function(){var t=lt(st().mark((function t(n,r){return st().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.pendingPromise={resolve:n,reject:r},t.prev=1,t.next=4,e.resolver._initialize(e.auth);case 4:return e.eventManager=t.sent,t.next=7,e.onExecution();case 7:e.eventManager.registerConsumer(e),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),e.reject(t.t0);case 13:case"end":return t.stop()}}),t,null,[[1,10]])})));return function(e,n){return t.apply(this,arguments)}}())}},{key:"onAuthEvent",value:function(){var e=lt(st().mark((function e(t){var n,r,i,a,o,u,s;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.urlResponse,r=t.sessionId,i=t.postBody,a=t.tenantId,o=t.error,u=t.type,!o){e.next=4;break}return this.reject(o),e.abrupt("return");case 4:return s={auth:this.auth,requestUri:n,sessionId:r,tenantId:a||void 0,postBody:i||void 0,user:this.user,bypassAuthState:this.bypassAuthState},e.prev=5,e.t0=this,e.next=9,this.getIdpTask(u)(s);case 9:e.t1=e.sent,e.t0.resolve.call(e.t0,e.t1),e.next=16;break;case 13:e.prev=13,e.t2=e.catch(5),this.reject(e.t2);case 16:case"end":return e.stop()}}),e,this,[[5,13]])})));return function(t){return e.apply(this,arguments)}}()},{key:"onError",value:function(e){this.reject(e)}},{key:"getIdpTask",value:function(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return wo;case"linkViaPopup":case"linkViaRedirect":return xo;case"reauthViaPopup":case"reauthViaRedirect":return _o;default:kr(this.auth,"internal-error")}}},{key:"resolve",value:function(e){Ir(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}},{key:"reject",value:function(e){Ir(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}},{key:"unregisterAndCleanUp",value:function(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}]),e}(),Io=new Rr(2e3,1e4);var To=function(e){Ct(n,e);var t=Pt(n);function n(e,r,i,a,o){var u;return xt(this,n),(u=t.call(this,e,r,a,o)).provider=i,u.authWindow=null,u.pollId=null,n.currentPopupAction&&n.currentPopupAction.cancel(),n.currentPopupAction=It(u),u}return St(n,[{key:"executeNotNull",value:function(){var e=lt(st().mark((function e(){var t;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.execute();case 2:return Er(t=e.sent,this.auth,"internal-error"),e.abrupt("return",t);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"onExecution",value:function(){var e=lt(st().mark((function e(){var t,n=this;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Ir(1===this.filter.length,"Popup operations only handle one event"),t=Ha(),e.next=4,this.resolver._openPopup(this.auth,this.provider,this.filter[0],t);case 4:this.authWindow=e.sent,this.authWindow.associatedEvent=t,this.resolver._originValidation(this.auth).catch((function(e){n.reject(e)})),this.resolver._isIframeWebStorageSupported(this.auth,(function(e){e||n.reject(wr(n.auth,"web-storage-unsupported"))})),this.pollUserCancellation();case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"eventId",get:function(){var e;return(null===(e=this.authWindow)||void 0===e?void 0:e.associatedEvent)||null}},{key:"cancel",value:function(){this.reject(wr(this.auth,"cancelled-popup-request"))}},{key:"cleanUp",value:function(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,n.currentPopupAction=null}},{key:"pollUserCancellation",value:function(){var e=this;!function t(){var n,r;(null===(r=null===(n=e.authWindow)||void 0===n?void 0:n.window)||void 0===r?void 0:r.closed)?e.pollId=window.setTimeout((function(){e.pollId=null,e.reject(wr(e.auth,"popup-closed-by-user"))}),2e3):e.pollId=window.setTimeout(t,Io.get())}()}}]),n}(So);To.currentPopupAction=null;var Co=new Map,No=function(e){Ct(n,e);var t=Pt(n);function n(e,r){var i,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return xt(this,n),(i=t.call(this,e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],r,void 0,a)).eventId=null,i}return St(n,[{key:"execute",value:function(){var e=lt(st().mark((function e(){var t,r;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Co.get(this.auth._key())){e.next=21;break}return e.prev=2,e.next=5,Oo(this.resolver,this.auth);case 5:if(!e.sent){e.next=12;break}return e.next=9,hr(Nt(n.prototype),"execute",this).call(this);case 9:e.t0=e.sent,e.next=13;break;case 12:e.t0=null;case 13:r=e.t0,t=function(){return Promise.resolve(r)},e.next=20;break;case 17:e.prev=17,e.t1=e.catch(2),t=function(){return Promise.reject(e.t1)};case 20:Co.set(this.auth._key(),t);case 21:return this.bypassAuthState||Co.set(this.auth._key(),(function(){return Promise.resolve(null)})),e.abrupt("return",t());case 23:case"end":return e.stop()}}),e,this,[[2,17]])})));return function(){return e.apply(this,arguments)}}()},{key:"onAuthEvent",value:function(){var e=lt(st().mark((function e(t){var r;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("signInViaRedirect"!==t.type){e.next=4;break}return e.abrupt("return",hr(Nt(n.prototype),"onAuthEvent",this).call(this,t));case 4:if("unknown"!==t.type){e.next=7;break}return this.resolve(null),e.abrupt("return");
2case 7:if(!t.eventId){e.next=17;break}return e.next=10,this.auth._redirectUserForId(t.eventId);case 10:if(!(r=e.sent)){e.next=16;break}return this.user=r,e.abrupt("return",hr(Nt(n.prototype),"onAuthEvent",this).call(this,t));case 16:this.resolve(null);case 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"onExecution",value:function(){var e=lt(st().mark((function e(){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"cleanUp",value:function(){}}]),n}(So);function Oo(e,t){return Ao.apply(this,arguments)}function Ao(){return Ao=lt(st().mark((function e(t,n){var r,i,a;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Do(n),i=Ro(t),e.next=4,i._isAvailable();case 4:if(e.sent){e.next=6;break}return e.abrupt("return",!1);case 6:return e.next=8,i._get(r);case 8:return e.t0=e.sent,a="true"===e.t0,e.next=12,i._remove(r);case 12:return e.abrupt("return",a);case 13:case"end":return e.stop()}}),e)}))),Ao.apply(this,arguments)}function Po(e,t){Co.set(e._key(),t)}function Ro(e){return Cr(e._redirectPersistence)}function Do(e){return bi("pendingRedirect",e.config.apiKey,e.name)}function Lo(e,t){return jo.apply(this,arguments)}function jo(){return jo=lt(st().mark((function e(t,n){var r,i,a,o,u,s=arguments;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=s.length>2&&void 0!==s[2]&&s[2],i=ji(t),a=bo(i,n),o=new No(i,a,r),e.next=6,o.execute();case 6:if(!(u=e.sent)||r){e.next=13;break}return delete u.user._redirectEventId,e.next=11,i._persistUserIfCurrent(u.user);case 11:return e.next=13,i._setRedirectUser(null,n);case 13:return e.abrupt("return",u);case 14:case"end":return e.stop()}}),e)}))),jo.apply(this,arguments)}var Mo=function(){function e(t){xt(this,e),this.auth=t,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}return St(e,[{key:"registerConsumer",value:function(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}},{key:"unregisterConsumer",value:function(e){this.consumers.delete(e)}},{key:"onEvent",value:function(e){var t=this;if(this.hasEventBeenHandled(e))return!1;var n=!1;return this.consumers.forEach((function(r){t.isEventForConsumer(e,r)&&(n=!0,t.sendToConsumer(e,r),t.saveEventToCache(e))})),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return Uo(e);default:return!1}}(e)||(this.hasHandledPotentialRedirect=!0,n||(this.queuedRedirectEvent=e,n=!0)),n}},{key:"sendToConsumer",value:function(e,t){var n;if(e.error&&!Uo(e)){var r=(null===(n=e.error.code)||void 0===n?void 0:n.split("auth/")[1])||"internal-error";t.onError(wr(this.auth,r))}else t.onAuthEvent(e)}},{key:"isEventForConsumer",value:function(e,t){var n=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&n}},{key:"hasEventBeenHandled",value:function(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(Fo(e))}},{key:"saveEventToCache",value:function(e){this.cachedEventUids.add(Fo(e)),this.lastProcessedEventTime=Date.now()}}]),e}();function Fo(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter((function(e){return e})).join("-")}function Uo(e){var t=e.type,n=e.error;return"unknown"===t&&(null===n||void 0===n?void 0:n.code)==="auth/".concat("no-auth-event")}function Vo(e){return zo.apply(this,arguments)}function zo(){return zo=lt(st().mark((function e(t){var n,r=arguments;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:{},e.abrupt("return",Ur(t,"GET","/v1/projects",n));case 2:case"end":return e.stop()}}),e)}))),zo.apply(this,arguments)}var qo=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,Bo=/^https?/;function Ho(){return Ho=lt(st().mark((function e(t){var n,r,i,a,o;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.config.emulator){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,Vo(t);case 4:n=e.sent,r=n.authorizedDomains,i=_t(r),e.prev=7,i.s();case 9:if((a=i.n()).done){e.next=20;break}if(o=a.value,e.prev=11,!Ko(o)){e.next=14;break}return e.abrupt("return");case 14:e.next=18;break;case 16:e.prev=16,e.t0=e.catch(11);case 18:e.next=9;break;case 20:e.next=25;break;case 22:e.prev=22,e.t1=e.catch(7),i.e(e.t1);case 25:return e.prev=25,i.f(),e.finish(25);case 28:kr(t,"unauthorized-domain");case 29:case"end":return e.stop()}}),e,null,[[7,22,25,28],[11,16]])}))),Ho.apply(this,arguments)}function Ko(e){var t=Or(),n=new URL(t),r=n.protocol,i=n.hostname;if(e.startsWith("chrome-extension://")){var a=new URL(e);return""===a.hostname&&""===i?"chrome-extension:"===r&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===r&&a.hostname===i}if(!Bo.test(r))return!1;if(qo.test(e))return i===e;var o=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+o+"|"+o+")$","i").test(i)}var Wo=new Rr(3e4,6e4);function Qo(){var e=Wa().___jsl;if(null===e||void 0===e?void 0:e.H)for(var t=0,n=Object.keys(e.H);t<n.length;t++){var r=n[t];if(e.H[r].r=e.H[r].r||[],e.H[r].L=e.H[r].L||[],e.H[r].r=wt(e.H[r].L),e.CP)for(var i=0;i<e.CP.length;i++)e.CP[i]=null}}var Go=null;function $o(e){return Go=Go||function(e){return new Promise((function(t,n){var r,i,a;function o(){Qo(),gapi.load("gapi.iframes",{callback:function(){t(gapi.iframes.getContext())},ontimeout:function(){Qo(),n(wr(e,"network-request-failed"))},timeout:Wo.get()})}if(null===(i=null===(r=Wa().gapi)||void 0===r?void 0:r.iframes)||void 0===i?void 0:i.Iframe)t(gapi.iframes.getContext());else{if(!(null===(a=Wa().gapi)||void 0===a?void 0:a.load)){var u=po("iframefcb");return Wa()[u]=function(){gapi.load?o():n(wr(e,"network-request-failed"))},ho("https://apis.google.com/js/api.js?onload=".concat(u)).catch((function(e){return n(e)}))}o()}})).catch((function(e){throw Go=null,e}))}(e),Go}var Xo=new Rr(5e3,15e3),Yo={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},Jo=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function Zo(e){var t=e.config;Er(t.authDomain,e,"auth-domain-config-required");var n=t.emulator?Dr(t,"emulator/auth/iframe"):"https://".concat(e.config.authDomain,"/").concat("__/auth/iframe"),r={apiKey:t.apiKey,appName:e.n
2ame,v:Gn},i=Jo.get(e.config.apiHost);i&&(r.eid=i);var a=e._getFrameworks();return a.length&&(r.fw=a.join(",")),"".concat(n,"?").concat(Yt(r).slice(1))}function eu(e){return tu.apply(this,arguments)}function tu(){return tu=lt(st().mark((function e(t){var n,r;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$o(t);case 2:return n=e.sent,Er(r=Wa().gapi,t,"internal-error"),e.abrupt("return",n.open({where:document.body,url:Zo(t),messageHandlersFilter:r.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:Yo,dontclear:!0},(function(e){return new Promise(function(){var n=lt(st().mark((function n(r,i){var a,o,u;return st().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u=function(){Wa().clearTimeout(o),r(e)},n.next=3,e.restyle({setHideOnLeave:!1});case 3:a=wr(t,"network-request-failed"),o=Wa().setTimeout((function(){i(a)}),Xo.get()),e.ping(u).then(u,(function(){i(a)}));case 6:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}())})));case 6:case"end":return e.stop()}}),e)}))),tu.apply(this,arguments)}var nu={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},ru="_blank",iu="http://localhost",au=function(){function e(t){xt(this,e),this.window=t,this.associatedEvent=null}return St(e,[{key:"close",value:function(){if(this.window)try{this.window.close()}catch(e){}}}]),e}();function ou(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:500,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:600,a=Math.max((window.screen.availHeight-i)/2,0).toString(),u=Math.max((window.screen.availWidth-r)/2,0).toString(),s="",c=Object.assign(Object.assign({},nu),{width:r.toString(),height:i.toString(),top:a,left:u}),l=Vt().toLowerCase();n&&(s=Ei(l)?ru:n),_i(l)&&(t=t||iu,c.scrollbars="yes");var f=Object.entries(c).reduce((function(e,t){var n=o(t,2),r=n[0],i=n[1];return"".concat(e).concat(r,"=").concat(i,",")}),"");if(Oi(l)&&"_self"!==s)return uu(t||"",s),new au(null);var h=window.open(t||"",s,f);Er(h,e,"popup-blocked");try{h.focus()}catch(d){}return new au(h)}function uu(e,t){var n=document.createElement("a");n.href=e,n.target=t;var r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}var su="__/auth/handler",cu="emulator/auth/handler";function lu(e,t,n,r,i,a){Er(e.config.authDomain,e,"auth-domain-config-required"),Er(e.config.apiKey,e,"invalid-api-key");var u={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:r,v:Gn,eventId:i};if(t instanceof oa){t.setDefaultLanguage(e.languageCode),u.providerId=t.providerId||"",function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}(t.getCustomParameters())||(u.customParameters=JSON.stringify(t.getCustomParameters()));for(var s=0,c=Object.entries(a||{});s<c.length;s++){var l=o(c[s],2),f=l[0],h=l[1];u[f]=h}}if(t instanceof ua){var d=t.getScopes().filter((function(e){return""!==e}));d.length>0&&(u.scopes=d.join(","))}e.tenantId&&(u.tid=e.tenantId);for(var p=u,v=0,m=Object.keys(p);v<m.length;v++){var y=m[v];void 0===p[y]&&delete p[y]}return"".concat(function(e){var t=e.config;if(!t.emulator)return"https://".concat(t.authDomain,"/").concat(su);return Dr(t,cu)}(e),"?").concat(Yt(p).slice(1))}var fu="webStorageSupport",hu=function(){function e(){xt(this,e),this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=za,this._completeRedirectFn=Lo,this._overrideRedirectResult=Po}return St(e,[{key:"_openPopup",value:function(){var e=lt(st().mark((function e(t,n,r,i){var a,o;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Ir(null===(a=this.eventManagers[t._key()])||void 0===a?void 0:a.manager,"_initialize() not called before _openPopup()"),o=lu(t,n,r,Or(),i),e.abrupt("return",ou(t,o,Ha()));case 3:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i){return e.apply(this,arguments)}}()},{key:"_openRedirect",value:function(){var e=lt(st().mark((function e(t,n,r,i){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._originValidation(t);case 2:return a=lu(t,n,r,Or(),i),Wa().location.href=a,e.abrupt("return",new Promise((function(){})));case 4:case"end":return e.stop()}var a}),e,this)})));return function(t,n,r,i){return e.apply(this,arguments)}}()},{key:"_initialize",value:function(e){var t=this,n=e._key();if(this.eventManagers[n]){var r=this.eventManagers[n],i=r.manager,a=r.promise;return i?Promise.resolve(i):(Ir(a,"If manager is not set, promise should be"),a)}var o=this.initAndGetManager(e);return this.eventManagers[n]={promise:o},o.catch((function(){delete t.eventManagers[n]})),o}},{key:"initAndGetManager",value:function(){var e=lt(st().mark((function e(t){var n,r;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,eu(t);case 2:return n=e.sent,r=new Mo(t),n.register("authEvent",(function(e){return Er(null===e||void 0===e?void 0:e.authEvent,t,"invali
2d-auth-event"),{status:r.onEvent(e.authEvent)?"ACK":"ERROR"}}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[t._key()]={manager:r},this.iframes[t._key()]=n,e.abrupt("return",r);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_isIframeWebStorageSupported",value:function(e,t){this.iframes[e._key()].send(fu,{type:fu},(function(n){var r,i=null===(r=null===n||void 0===n?void 0:n[0])||void 0===r?void 0:r.webStorageSupport;void 0!==i&&t(!!i),kr(e,"internal-error")}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}},{key:"_originValidation",value:function(e){var t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=function(e){return Ho.apply(this,arguments)}(e)),this.originValidationPromises[t]}},{key:"_shouldInitProactively",get:function(){return Pi()||xi()||Ni()}}]),e}(),du=hu,pu=function(){function e(t){xt(this,e),this.factorId=t}return St(e,[{key:"_process",value:function(e,t,n){switch(t.type){case"enroll":return this._finalizeEnroll(e,t.credential,n);case"signin":return this._finalizeSignIn(e,t.credential);default:return Sr("unexpected MultiFactorSessionType")}}}]),e}(),vu=function(e){Ct(n,e);var t=Pt(n);function n(e){var r;return xt(this,n),(r=t.call(this,"phone")).credential=e,r}return St(n,[{key:"_finalizeEnroll",value:function(e,t,n){return function(e,t){return Ur(e,"POST","/v2/accounts/mfaEnrollment:finalize",Fr(e,t))}(e,{idToken:t,displayName:n,phoneVerificationInfo:this.credential._makeVerificationRequest()})}},{key:"_finalizeSignIn",value:function(e,t){return function(e,t){return Ur(e,"POST","/v2/accounts/mfaSignIn:finalize",Fr(e,t))}(e,{mfaPendingCredential:t,phoneVerificationInfo:this.credential._makeVerificationRequest()})}}],[{key:"_fromCredential",value:function(e){return new n(e)}}]),n}(pu);(function(){function e(){xt(this,e)}return St(e,null,[{key:"assertion",value:function(e){return vu._fromCredential(e)}}]),e}()).FACTOR_ID="phone";var mu,yu="@firebase/auth",gu="0.20.5",bu=function(){function e(t){xt(this,e),this.auth=t,this.internalListeners=new Map}return St(e,[{key:"getUid",value:function(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.uid)||null}},{key:"getToken",value:function(){var e=lt(st().mark((function e(t){var n;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.assertAuthConfigured(),e.next=3,this.auth._initializationPromise;case 3:if(this.auth.currentUser){e.next=5;break}return e.abrupt("return",null);case 5:return e.next=7,this.auth.currentUser.getIdToken(t);case 7:return n=e.sent,e.abrupt("return",{accessToken:n});case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"addAuthTokenListener",value:function(e){if(this.assertAuthConfigured(),!this.internalListeners.has(e)){var t=this.auth.onIdTokenChanged((function(t){var n;e((null===(n=t)||void 0===n?void 0:n.stsTokenManager.accessToken)||null)}));this.internalListeners.set(e,t),this.updateProactiveRefresh()}}},{key:"removeAuthTokenListener",value:function(e){this.assertAuthConfigured();var t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}},{key:"assertAuthConfigured",value:function(){Er(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}},{key:"updateProactiveRefresh",value:function(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}]),e}();mu="Browser",Bn(new rn("auth",(function(e,t){var n=t.options,r=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),a=r.options,o=a.apiKey,u=a.authDomain;return function(e,t){Er(o&&!o.includes(":"),"invalid-api-key",{appName:e.name}),Er(!(null===u||void 0===u?void 0:u.includes(":")),"argument-error",{appName:e.name});var r={apiKey:o,authDomain:u,clientPlatform:mu,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Ri(mu)},i=new Li(e,t,r);return function(e,t){var n=(null===t||void 0===t?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(Cr);(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)}(i,n),i}(r,i)}),"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((function(e,t,n){e.getProvider("auth-internal").initialize()}))),Bn(new rn("auth-internal",(function(e){return function(e){return new bu(e)}(ji(e.getProvider("auth").getImmediate()))}),"PRIVATE").setInstantiationMode("EXPLICIT")),Xn(yu,gu,function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";default:return}}(mu)),Xn(yu,gu,"esm2017");var ku,wu="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof n.g?n.g:"undefined"!==typeof self?self:{},_u={},xu=xu||{},Eu=wu||self;function Su(){}function Iu(e){var t=typeof e;return"array"==(t="object"!=t?t:e?Array.isArray(e)?"array":t:"null")||"object"==t&&"number"==typeof e.length}function Tu(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}var Cu="closure_uid_"+(1e9*Math.random()>>>0),Nu=0;function Ou(e,t,n){return e.call.apply(e.bind,arguments)}function Au(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function Pu(e,t,n){return(Pu=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?Ou:Au).apply(null,arguments)}
2function Ru(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var t=n.slice();return t.push.apply(t,arguments),e.apply(this,t)}}function Du(e,t){function n(){}n.prototype=t.prototype,e.Z=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.Vb=function(e,n,r){for(var i=Array(arguments.length-2),a=2;a<arguments.length;a++)i[a-2]=arguments[a];return t.prototype[n].apply(e,i)}}function Lu(){this.s=this.s,this.o=this.o}var ju={};Lu.prototype.s=!1,Lu.prototype.na=function(){if(!this.s&&(this.s=!0,this.M(),0)){var e=function(e){return Object.prototype.hasOwnProperty.call(e,Cu)&&e[Cu]||(e[Cu]=++Nu)}(this);delete ju[e]}},Lu.prototype.M=function(){if(this.o)for(;this.o.length;)this.o.shift()()};var Mu=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if("string"===typeof e)return"string"!==typeof t||1!=t.length?-1:e.indexOf(t,0);for(var n=0;n<e.length;n++)if(n in e&&e[n]===t)return n;return-1},Fu=Array.prototype.forEach?function(e,t,n){Array.prototype.forEach.call(e,t,n)}:function(e,t,n){for(var r=e.length,i="string"===typeof e?e.split(""):e,a=0;a<r;a++)a in i&&t.call(n,i[a],a,e)};function Uu(e){return Array.prototype.concat.apply([],arguments)}function Vu(e){var t=e.length;if(0<t){for(var n=Array(t),r=0;r<t;r++)n[r]=e[r];return n}return[]}function zu(e){return/^[\s\xa0]*$/.test(e)}var qu,Bu=String.prototype.trim?function(e){return e.trim()}:function(e){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]};function Hu(e,t){return-1!=e.indexOf(t)}function Ku(e,t){return e<t?-1:e>t?1:0}e:{var Wu=Eu.navigator;if(Wu){var Qu=Wu.userAgent;if(Qu){qu=Qu;break e}}qu=""}function Gu(e,t,n){for(var r in e)t.call(n,e[r],r,e)}function $u(e){var t={};for(var n in e)t[n]=e[n];return t}var Xu="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Yu(e,t){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])e[n]=r[n];for(var a=0;a<Xu.length;a++)n=Xu[a],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function Ju(e){return Ju[" "](e),e}Ju[" "]=Su;var Zu,es=Hu(qu,"Opera"),ts=Hu(qu,"Trident")||Hu(qu,"MSIE"),ns=Hu(qu,"Edge"),rs=ns||ts,is=Hu(qu,"Gecko")&&!(Hu(qu.toLowerCase(),"webkit")&&!Hu(qu,"Edge"))&&!(Hu(qu,"Trident")||Hu(qu,"MSIE"))&&!Hu(qu,"Edge"),as=Hu(qu.toLowerCase(),"webkit")&&!Hu(qu,"Edge");function os(){var e=Eu.document;return e?e.documentMode:void 0}e:{var us="",ss=function(){var e=qu;return is?/rv:([^\);]+)(\)|;)/.exec(e):ns?/Edge\/([\d\.]+)/.exec(e):ts?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):as?/WebKit\/(\S+)/.exec(e):es?/(?:Version)[ \/]?(\S+)/.exec(e):void 0}();if(ss&&(us=ss?ss[1]:""),ts){var cs=os();if(null!=cs&&cs>parseFloat(us)){Zu=String(cs);break e}}Zu=us}var ls,fs={};function hs(){return function(e){var t=fs;return Object.prototype.hasOwnProperty.call(t,9)?t[9]:t[9]=e(9)}((function(){for(var e=0,t=Bu(String(Zu)).split("."),n=Bu("9").split("."),r=Math.max(t.length,n.length),i=0;0==e&&i<r;i++){var a=t[i]||"",o=n[i]||"";do{if(a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],o=/(\d*)(\D*)(.*)/.exec(o)||["","","",""],0==a[0].length&&0==o[0].length)break;e=Ku(0==a[1].length?0:parseInt(a[1],10),0==o[1].length?0:parseInt(o[1],10))||Ku(0==a[2].length,0==o[2].length)||Ku(a[2],o[2]),a=a[3],o=o[3]}while(0==e)}return 0<=e}))}if(Eu.document&&ts){var ds=os();ls=ds||(parseInt(Zu,10)||void 0)}else ls=void 0;var ps=ls,vs=function(){if(!Eu.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{Eu.addEventListener("test",Su,t),Eu.removeEventListener("test",Su,t)}catch(tk){}return e}();function ms(e,t){this.type=e,this.g=this.target=t,this.defaultPrevented=!1}function ys(e,t){if(ms.call(this,e?e.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,e){var n=this.type=e.type,r=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;if(this.target=e.target||e.srcElement,this.g=t,t=e.relatedTarget){if(is){e:{try{Ju(t.nodeName);var i=!0;break e}catch(ek){}i=!1}i||(t=null)}}
vendor: 28,545 bytes, line 2
2else"mouseover"==n?t=e.fromElement:"mouseout"==n&&(t=e.toElement);this.relatedTarget=t,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType="string"===typeof e.pointerType?e.pointerType:gs[e.pointerType]||"",this.state=e.state,this.i=e,e.defaultPrevented&&ys.Z.h.call(this)}}ms.prototype.h=function(){this.defaultPrevented=!0},Du(ys,ms);var gs={2:"touch",3:"pen",4:"mouse"};ys.prototype.h=function(){ys.Z.h.call(this);var e=this.i;e.preventDefault?e.preventDefault():e.returnValue=!1};var bs="closure_listenable_"+(1e6*Math.random()|0),ks=0;function ws(e,t,n,r,i){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!r,this.ia=i,this.key=++ks,this.ca=this.fa=!1}function _s(e){e.ca=!0,e.listener=null,e.proxy=null,e.src=null,e.ia=null}function xs(e){this.src=e,this.g={},this.h=0}function Es(e,t){var n=t.type;if(n in e.g){var r,i=e.g[n],a=Mu(i,t);(r=0<=a)&&Array.prototype.splice.call(i,a,1),r&&(_s(t),0==e.g[n].length&&(delete e.g[n],e.h--))}}function Ss(e,t,n,r){for(var i=0;i<e.length;++i){var a=e[i];if(!a.ca&&a.listener==t&&a.capture==!!n&&a.ia==r)return i}return-1}xs.prototype.add=function(e,t,n,r,i){var a=e.toString();(e=this.g[a])||(e=this.g[a]=[],this.h++);var o=Ss(e,t,r,i);return-1<o?(t=e[o],n||(t.fa=!1)):((t=new ws(t,this.src,a,!!r,i)).fa=n,e.push(t)),t};var Is="closure_lm_"+(1e6*Math.random()|0),Ts={};function Cs(e,t,n,r,i){if(r&&r.once)return Os(e,t,n,r,i);if(Array.isArray(t)){for(var a=0;a<t.length;a++)Cs(e,t[a],n,r,i);return null}return n=Ms(n),e&&e[bs]?e.N(t,n,Tu(r)?!!r.capture:!!r,i):Ns(e,t,n,!1,r,i)}function Ns(e,t,n,r,i,a){if(!t)throw Error("Invalid event type");var o=Tu(i)?!!i.capture:!!i,u=Ls(e);if(u||(e[Is]=u=new xs(e)),(n=u.add(t,n,r,o,a)).proxy)return n;if(r=function(){function e(n){return t.call(e.src,e.listener,n)}var t=Ds;return e}(),n.proxy=r,r.src=e,r.listener=n,e.addEventListener)vs||(i=o),void 0===i&&(i=!1),e.addEventListener(t.toString(),r,i);else if(e.attachEvent)e.attachEvent(Rs(t.toString()),r);else{if(!e.addListener||!e.removeListener)throw Error("addEventListener and attachEvent are unavailable.");e.addListener(r)}return n}function Os(e,t,n,r,i){if(Array.isArray(t)){for(var a=0;a<t.length;a++)Os(e,t[a],n,r,i);return null}return n=Ms(n),e&&e[bs]?e.O(t,n,Tu(r)?!!r.capture:!!r,i):Ns(e,t,n,!0,r,i)}function As(e,t,n,r,i){if(Array.isArray(t))for(var a=0;a<t.length;a++)As(e,t[a],n,r,i);else r=Tu(r)?!!r.capture:!!r,n=Ms(n),e&&e[bs]?(e=e.i,(t=String(t).toString())in e.g&&(-1<(n=Ss(a=e.g[t],n,r,i))&&(_s(a[n]),Array.prototype.splice.call(a,n,1),0==a.length&&(delete e.g[t],e.h--)))):e&&(e=Ls(e))&&(t=e.g[t.toString()],e=-1,t&&(e=Ss(t,n,r,i)),(n=-1<e?t[e]:null)&&Ps(n))}function Ps(e){if("number"!==typeof e&&e&&!e.ca){var t=e.src;if(t&&t[bs])Es(t.i,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(Rs(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=Ls(t))?(Es(n,e),0==n.h&&(n.src=null,t[Is]=null)):_s(e)}}}function Rs(e){return e in Ts?Ts[e]:Ts[e]="on"+e}function Ds(e,t){if(e.ca)e=!0;else{t=new ys(t,this);var n=e.listener,r=e.ia||e.src;e.fa&&Ps(e),e=n.call(r,t)}return e}function Ls(e){return(e=e[Is])instanceof xs?e:null}var js="__closure_events_fn_"+(1e9*Math.random()>>>0);function Ms(e){return"function"===typeof e?e:(e[js]||(e[js]=function(t){return e.handleEvent(t)}),e[js])}function Fs(){Lu.call(this),this.i=new xs(this),this.P=this,this.I=null}function Us(e,t){var n,r=e.I;if(r)for(n=[];r;r=r.I)n.push(r);if(e=e.P,r=t.type||t,"string"===typeof t)t=new ms(t,e);else if(t instanceof ms)t.target=t.target||e;else{var i=t;Yu(t=new ms(r,e),i)}if(i=!0,n)for(var a=n.length-1;0<=a;a--){var o=t.g=n[a];i=Vs(o,r,!0,t)&&i}if(i=Vs(o=t.g=e,r,!0,t)&&i,i=Vs(o,r,!1,t)&&i,n)for(a=0;a<n.length;a++)i=Vs(o=t.g=n[a],r,!1,t)&&i}function Vs(e,t,n,r){if(!(t=e.i.g[String(t)]))return!0;t=t.concat();for(var i=!0,a=0;a<t.length;++a){var o=t[a];if(o&&!o.ca&&o.capture==n){var u=o.listener,s=o.ia||o.src;o.fa&&Es(e.i,o),i=!1!==u.call(s,r)&&i}}return i&&!r.defaultPrevented}Du(Fs,Lu),Fs.prototype[bs]=!0,Fs.prototype.removeEventListener=function(e,t,n,r){As(this,e,t,n,r)},Fs.prototype.M=function(){if(Fs.Z.M.call(this),this.i){var e,t=this.i;for(e in t.g){for(var n=t.g[e],r=0;r<n.length;r++)_s(n[r]);delete t.g[e],t.h--}}this.I=null},Fs.prototype.N=function(e,t,n,r){return this.i.add(String(e),t,!1,n,r)},Fs.prototype.O=function(e,t,n,r){return this.i.add(String(e),t,!0,n,r)};var zs=Eu.JSON.stringify;function qs(){var e=Xs,t=null;return e.g&&(t=e.g,e.g=e.g.next,e.g||(e.h=null),t.next=null),t}var Bs,Hs=function(){function e(){xt(this,e),this.h=this.g=null}return St(e,[{key:"add",value:function(e,t){var n=Ks.get();n.set(e,t),this.h?this.h.next=n:this.g=n,this.h=n}}]),e}(),Ks=new(function(){function e(t,n){xt(this,e),this.i=t,this.j=n,this.h=0,this.g=null}return St(e,[{key:"get",value:function(){var e;return 0<this.h?(this.h--,e=this.g,this.g=e.next,e.next=null):e=this.i(),e}}]),e}())((function(){return new Ws}),(function(e){return e.reset()})),Ws=function(){function e(){xt(this,e),this.next=this.g=this.h=null}return St(e,[{key:"set",value:function(e,t){this.h=e,this.g=t,this.next=null}},{key:"reset",value:function(){this.next=this.g=this.h=null}}]),e}();function Qs(e){Eu.setTimeout((function(){throw e}),0)}function Gs(e,t){Bs||function(){var e=Eu.Promise.resolve(void 0);Bs=function(){e.then(Ys)}}(),$s||(Bs(),$s=!0),Xs.add(e,t)}var $s=!1,Xs=new Hs;function Ys(){for(var e;e=qs();){try{e.h.call(e.g)}catch(tk){Qs(tk)}var t=Ks;t.j(e),100>t.h&&(t.h++,e.next=t.g,t.g=e)}$s=!1}function Js(e,t){Fs.call(this),this.h=e||1,this.g=t||Eu,this.j=Pu(this.kb,this),this.l=Date.now()}function Zs(e){e.da=!1,e.S&&(e.g.clearTimeout(e.S),e.S=null)}function ec(e,t,n){if("function"===typeof e)n&&(e=Pu(e,n));else{if(!e||"function"!=typeof e.handleEvent)throw Error("Invalid listener argument");e=Pu(e.handleEvent,e)}return 2147483647<Number(t)?-1:Eu.setTimeout(e,t||0)}function tc(e){e.g=ec((function(){e.g=null,e.i&&(e.i=!1,tc(e))}),e.j);var t=e.h;e.h=null,e.m.apply(null,t)}Du(Js,Fs),(ku=Js.prototype).da=!1,ku.S=null,ku.kb=function(){if(this.da){var e=Date.now()-this.l;0<e&&e<.8*this.h?this.S=this.g.setTimeout(this.j,this.h-e):(this.S&&(this.g.clearTimeout(this.S),this.S=null),Us(this,"tick"),this.da&&(Zs(this),this.start()))}},ku.start=function(){this.da=!0,this.S||(this.S=this.g.setTimeout(this.j,this.h),this.l=Date.now())},ku.M=function(){Js.Z.M.call(this),Zs(this),delete this.g};var nc=function(e){Ct(n,e);var t=Pt(n);function n(e,r){var i;return xt(this,n),(i=t.call(this)).m=e,i.j=r,i.h=null,i.i=!1,i.g=null,i}return St(n,[{key:"l",value:function(e){this.h=arguments,this.g?this.i=!0:tc(this)}},{key:"M",value:function(){hr(Nt(n.prototype),"M",this).call(this),this.g&&(Eu.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}]),n}(Lu);function rc(e){Lu.call(this),this.h=e,this.g={}}Du(rc,Lu);var ic=[];function ac(e,t,n,r){Array.isArray(n)||(n&&(ic[0]=n.toString()),n=ic);for(var i=0;i<n.length;i++){var a=Cs(t,n[i],r||e.handleEvent,!1,e.h||e);if(!a)break;e.g[a.key]=a}}function oc(e){Gu(e.g,(function(e,t){this.g.hasOwnProperty(t)&&Ps(e)}),e),e.g={}}function uc(){this.g=!0}function sc(e,t,n,r){e.info((function(){return"XMLHTTP TEXT ("+t+"): "+function(e,t){if(!e.g)return t;if(!t)return null;try{var n=JSON.parse(t);if(n)for(e=0;e<n.length;e++)if(Array.isArray(n[e])){var r=n[e];if(!(2>r.length)){var i=r[1];if(Array.isArray(i)&&!(1>i.length)){var a=i[0];if("noop"!=a&&"stop"!=a&&"close"!=a)for(var o=1;o<i.length;o++)i[o]=""}}}return zs(n)}catch(Qb){return t}}(e,n)+(r?" "+r:"")}))}rc.prototype.M=function(){rc.Z.M.call(this),oc(this)},rc.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},uc.prototype.Aa=function(){this.g=!1},uc.prototype.info=function(){};var cc={},lc=null;function fc(){return lc=lc||new Fs}function hc(e){ms.call(this,cc.Ma,e)}function dc(e){var t=fc();Us(t,new hc(t,e))}function pc(e,t){ms.call(this,cc.STAT_EVENT,e),this.stat=t}function vc(e){var t=fc();Us(t,new pc(t,e))}function mc(e,t){ms.call(this,cc.Na,e),this.size=t}function yc(e,t){if("function"!==typeof e)throw Error("Fn must not be null and must be a function");return Eu.setTimeout((function(){e()}),t)}cc.Ma="serverreachability",Du(hc,ms),cc.STAT_EVENT="statevent",Du(pc,ms),cc.Na="timingevent",Du(mc,ms);var gc={NO_ERROR:0,lb:1,yb:2,xb:3,sb:4,wb:5,zb:6,Ja:7,TIMEOUT:8,Cb:9},bc={qb:"complete",Mb:"success",Ka:"error",Ja:"abort",Eb:"ready",Fb:"readystatechange",TIMEOUT:"timeout",Ab:"incrementaldata",Db:"progress",tb:"downloadprogress",Ub:"uploadprogress"};function kc(){}function wc(e){return e.h||(e.h=e.i())}function _c(){}kc.prototype.h=null;var xc,Ec={OPEN:"a",pb:"b",Ka:"c",Bb:"d"};function Sc(){ms.call(this,"d")}function Ic(){ms.call(this,"c")}function Tc(){}function Cc(e,t,n,r){this.l=e,this.j=t,this.m=n,this.X=r||1,this.V=new rc(this),this.P=Oc,e=rs?125:void 0,this.W=new Js(e),this.H=null,this.i=!1,this.s=this.A=this.v=this.K=this.F=this.Y=this.B=null,this.D=[],this.g=null,this.C=0,this.o=this.u=null,this.N=-1,this.I=!1,this.O=0,this.L=null,this.aa=this.J=this.$=this.U=!1,this.h=new Nc}function Nc(){this.i=null,this.g="",this.h=!1}Du(Sc,ms),Du(Ic,ms),Du(Tc,kc),Tc.prototype.g=function(){return new XMLHttpRequest},Tc.prototype.i=function(){return{}},xc=new Tc;var Oc=45e3,Ac={},Pc={};function Rc(e,t,n){e.K=1,e.v=nl(Xc(t)),e.s=n,e.U=!0,Dc(e,null)}function Dc(e,t){e.F=Date.now(),Fc(e),e.A=Xc(e.v);var n=e.A,r=e.X;Array.isArray(r)||(r=[String(r)]),vl(n.h,"t",r),e.C=0,n=e.l.H,e.h=new Nc,e.g=yf(e.l,n?t:null,!e.s),0<e.O&&(e.L=new nc(Pu(e.Ia,e,e.g),e.O)),ac(e.V,e.g,"readystatechange",e.gb),t=e.H?$u(e.H):{},e.s?(e.u||(e.u="POST"),t["Content-Type"]="application/x-www-form-urlencoded",e.g.ea(e.A,e.u,e.s,t)):(e.u="GET",e.g.ea(e.A,e.u,null,t)),dc(1),function(e,t,n,r,i,a){e.info((function(){if(e.g)if(a)for(var o="",u=a.split("&"),s=0;s<u.length;s++){var c=u[s].split("=");if(1<c.length){var l=c[0];c=c[1];var f=l.split("_");o=2<=f.length&&"type"==f[1]?o+(l+"=")+c+"&":o+(l+"=redacted&")}}else o=null;else o=a;return"XMLHTTP REQ ("+r+") [attempt "+i+"]: "+t+"\n"+n+"\n"+o}))}(e.j,e.u,e.A,e.m,e.X,e.s)}function Lc(e){return!!e.g&&("GET"==e.u&&2!=e.K&&e.l.Ba)}function jc(e,t,n){for(var r,i=!0;!e.I&&e.C<n.length;){if((r=Mc(e,n))==Pc){4==t&&(e.o=4,vc(14),i=!1),sc(e.j,e.m,null,"[Incomplete Response]");break}if(r==Ac){e.o=4,vc(15),sc(e.j,e.m,n,"[Invalid Chunk]"),i=!1;break}sc(e.j,e.m,r,null),Bc(e,r)}Lc(e)&&r!=Pc&&r!=Ac&&(e.h.g="",e.C=0),4!=t||0!=n.length||e.h.h||(e.o=1,vc(16),i=!1),e.i=e.i&&i,i?0<n.length&&!e.aa&&(e.aa=!0,(t=e.l).g==e&&t.$&&!t.L&&(t.h.info("Great, no buffering proxy detected. Bytes received: "+n.length),cf(t),t.L=!0,vc(11))):(sc(e.j,e.m,n,"[Invalid Chunked Response]"),qc(e),zc(e))}function Mc(e,t){var n=e.C,r=t.indexOf("\n",n);return-1==r?Pc:(n=Number(t.substring(n,r)),isNaN(n)?Ac:(r+=1)+n>t.length?Pc:(t=t.substr(r,n),e.C=r+n,t))}function Fc(e){e.Y=Date.now()+e.P,Uc(e,e.P)}function Uc(e,t){if(null!=e.B)throw Error("WatchDog timer not null");e.B=yc(Pu(e.eb,e),t)}function Vc(e){e.B&&(Eu.clearTimeout(e.B),e.B=null)}function zc(e){0==e.l.G||e.I||hf(e.l,e)}function qc(e){Vc(e);var t=e.L;t&&"function"==typeof t.na&&t.na(),e.L=null,Zs(e.W),oc(e.V),e.g&&(t=e.g,e.g=null,t.abort(),t.na())}function Bc(e,t){try{var n=e.l;if(0!=n.G&&(n.g==e||_l(n.i,e)))if(n.I=e.N,!e.J&&_l(n.i,e)&&3==n.G){try{var r=n.Ca.g.parse(t)}catch(a){r=null}if(Array.isArray(r)&&3==r.length){var i=r;if(0==i[0]){e:if(!n.u){if(n.g){if(!(n.g.F+3e3<e.F))break e;ff(n),Zl(n)}sf(n),vc(18)}}else n.ta=i[1],0<n.ta-n.U&&37500>i[2]&&n.N&&0==n.A&&!n.v&&(n.v=yc(Pu(n.ab,n),6e3));if(1>=wl(n.i)&&n.ka){try{n.ka()}catch(a){}n.ka=void 0}}else pf(n,11)}else if((e.J||n.g==e)&&ff(n),!zu(t))for(i=n.Ca.g.parse(t),t=0;t<i.length;t++){var a=i[t];if(n.U=a[0],a=a[1],2==n.G)if("c"==a[0]){n.J=a[1],n.la=a[2];var o=a[3];null!=o&&(n.ma=o,n.h.info("VER="+n.ma));var u=a[4];null!=u&&(n.za=u,n.h.info("SVER="+n.za));var s=a[5];null!=s&&"number"===typeof s&&0<s&&(r=1.5*s,n.K=r,n.h.info("backChannelRequestTimeoutMs_="+r)),r=n;var c=e.g;if(c){var l=c.g?c.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(l){var f=r.i;!f.g&&(Hu(l,"spdy")||Hu(l,"quic")||Hu(l,"h2"))&&(f.j=f.l,f.g=new Set,f.h&&(xl(f,f.h),f.h=null))}if(r.D){var h=c.g?c.g.getResponseHeader("X-HTTP-Session-Id"):null;h&&(r.sa=h,tl(r.F,r.D,h))}}n.G=3,n.j&&n.j.xa(),n.$&&(n.O=Date.now()-e.F,n.h.info("Handshake RTT: "+n.O+"ms"));var d=e;if((r=n).oa=mf(r,r.H?r.la:null,r.W),d.J){El(r.i,d);var p=d,v=r.K;v&&p.setTimeout(v),p.B&&(Vc(p),Fc(p)),r.g=d}else uf(r);0<n.l.length&&nf(n)}else"stop"!=a[0]&&"close"!=a[0]||pf(n,7);else 3==n.G&&("stop"==a[0]||"close"==a[0]?"stop"==a[0]?pf(n,7):Jl(n):"noop"!=a[0]&&n.j&&n.j.wa(a),n.A=0)}dc(4)}catch(a){}}function Hc(e,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(t,void 0);else if(Iu(e)||"string"===typeof e)Fu(e,t,void 0);else{if(e.T&&"function"==typeof e.T)var n=e.T();else if(e.R&&"function"==typeof e.R)n=void 0;else if(Iu(e)||"string"===typeof e){n=[];for(var r=e.length,i=0;i<r;i++)n.push(i)}else for(i in n=[],r=0,e)n[r++]=i;r=function(e){if(e.R&&"function"==typeof e.R)return e.R();if("string"===typeof e)return e.split("");if(Iu(e)){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t}for(r in t=[],n=0,e)t[n++]=e[r];return t}(e),i=r.length;for(var a=0;a<i;a++)t.call(void 0,r[a],n&&n[a],e)}}function Kc(e,t){this.h={},this.g=[],this.i=0;var n=arguments.length;if(1<n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r<n;r+=2)this.set(arguments[r],arguments[r+1])}else if(e)if(e instanceof Kc)for(n=e.T(),r=0;r<n.length;r++)this.set(n[r],e.get(n[r]));else for(r in e)this.set(r,e[r])}function Wc(e){if(e.i!=e.g.length){for(var t=0,n=0;t<e.g.length;){var r=e.g[t];Qc(e.h,r)&&(e.g[n++]=r),t++}e.g.length=n}if(e.i!=e.g.length){var i={};for(n=t=0;t<e.g.length;)Qc(i,r=e.g[t])||(e.g[n++]=r,i[r]=1),t++;e.g.length=n}}function Qc(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(ku=Cc.prototype).setTimeout=function(e){this.P=e},ku.gb=function(e){e=e.target;var t=this.L;t&&3==Ql(e)?t.l():this.Ia(e)},ku.Ia=function(e){try{if(e==this.g)e:{var t=Ql(this.g),n=this.g.Da(),r=this.g.ba();if(!(3>t)&&(3!=t||rs||this.g&&(this.h.h||this.g.ga()||Gl(this.g)))){this.I||4!=t||7==n||dc(8==n||0>=r?3:2),Vc(this);var i=this.g.ba();this.N=i;t:if(Lc(this)){var a=Gl(this.g);e="";var o=a.length,u=4==Ql(this.g);if(!this.h.i){if("undefined"===typeof TextDecoder){qc(this),zc(this);var s="";break t}this.h.i=new Eu.TextDecoder}for(n=0;n<o;n++)this.h.h=!0,e+=this.h.i.decode(a[n],{stream:u&&n==o-1});a.splice(0,o),this.h.g+=e,this.C=0,s=this.h.g}else s=this.g.ga();if(this.i=200==i,function(e,t,n,r,i,a,o){e.info((function(){return"XMLHTTP RESP ("+r+") [ attempt "+i+"]: "+t+"\n"+n+"\n"+a+" "+o}))}(this.j,this.u,this.A,this.m,this.X,t,i),this.i){if(this.$&&!this.J){t:{if(this.g){var c,l=this.g;if((c=l.g?l.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!zu(c)){var f=c;break t}}f=null}if(!(i=f)){this.i=!1,this.o=3,vc(12),qc(this),zc(this);break e}sc(this.j,this.m,i,"Initial handshake response via X-HTTP-Initial-Response"),this.J=!0,Bc(this,i)}this.U?(jc(this,t,s),rs&&this.i&&3==t&&(ac(this.V,this.W,"tick",this.fb),this.W.start())):(sc(this.j,this.m,s,null),Bc(this,s)),4==t&&qc(this),this.i&&!this.I&&(4==t?hf(this.l,this):(this.i=!1,Fc(this)))}else 400==i&&0<s.indexOf("Unknown SID")?(this.o=3,vc(12)):(this.o=0,vc(13)),qc(this),zc(this)}}}catch(t){}},ku.fb=function(){if(this.g){var e=Ql(this.g),t=this.g.ga();this.C<t.length&&(Vc(this),jc(this,e,t),this.i&&4!=e&&Fc(this))}},ku.cancel=function(){this.I=!0,qc(this)},ku.eb=function(){this.B=null;var e=Date.now();0<=e-this.Y?(function(e,t){e.info((function(){return"TIMEOUT: "+t}))}(this.j,this.A),2!=this.K&&(dc(3),vc(17)),qc(this),this.o=2,zc(this)):Uc(this,this.Y-e)},(ku=Kc.prototype).R=function(){Wc(this);for(var e=[],t=0;t<this.g.length;t++)e.push(this.h[this.g[t]]);return e},ku.T=function(){return Wc(this),this.g.concat()},ku.get=function(e,t){return Qc(this.h,e)?this.h[e]:t},ku.set=function(e,t){Qc(this.h,e)||(this.i++,this.g.push(e)),this.h[e]=t},ku.forEach=function(e,t){for(var n=this.T(),r=0;r<n.length;r++){var i=n[r],a=this.get(i);e.call(t,a,i,this)}};var Gc=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function $c(e,t){if(this.i=this.s=this.j="",this.m=null,this.o=this.l="",this.g=!1,e instanceof $c){this.g=void 0!==t?t:e.g,Yc(this,e.j),this.s=e.s,Jc(this,e.i),Zc(this,e.m),this.l=e.l,t=e.h;var n=new fl;n.i=t.i,t.g&&(n.g=new Kc(t.g),n.h=t.h),el(this,n),this.o=e.o}else e&&(n=String(e).match(Gc))?(this.g=!!t,Yc(this,n[1]||"",!0),this.s=rl(n[2]||""),Jc(this,n[3]||"",!0),Zc(this,n[4]),this.l=rl(n[5]||"",!0),el(this,n[6]||"",!0),this.o=rl(n[7]||"")):(this.g=!!t,this.h=new fl(null,this.g))}function Xc(e){return new $c(e)}function Yc(e,t,n){e.j=n?rl(t,!0):t,e.j&&(e.j=e.j.replace(/:$/,""))}function Jc(e,t,n){e.i=n?rl(t,!0):t}function Zc(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.m=t}else e.m=null}function el(e,t,n){t instanceof fl?(e.h=t,function(e,t){t&&!e.j&&(hl(e),e.i=null,e.g.forEach((function(e,t){var n=t.toLowerCase();t!=n&&(dl(this,t),vl(this,n,e))}),e)),e.j=t}(e.h,e.g)):(n||(t=il(t,cl)),e.h=new fl(t,e.g))}function tl(e,t,n){e.h.set(t,n)}function nl(e){return tl(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),e}function rl(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function il(e,t,n){return"string"===typeof e?(e=encodeURI(e).replace(t,al),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function al(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}$c.prototype.toString=function(){var e=[],t=this.j;t&&e.push(il(t,ol,!0),":");var n=this.i;return(n||"file"==t)&&(e.push("//"),(t=this.s)&&e.push(il(t,ol,!0),"@"),e.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.m)&&e.push(":",String(n))),(n=this.l)&&(this.i&&"/"!=n.charAt(0)&&e.push("/"),e.push(il(n,"/"==n.charAt(0)?sl:ul,!0))),(n=this.h.toString())&&e.push("?",n),(n=this.o)&&e.push("#",il(n,ll)),e.join("")};var ol=/[#\/\?@]/g,ul=/[#\?:]/g,sl=/[#\?]/g,cl=/[#\?@]/g,ll=/#/g;function fl(e,t){this.h=this.g=null,this.i=e||null,this.j=!!t}function hl(e){e.g||(e.g=new Kc,e.h=0,e.i&&function(e,t){if(e){e=e.split("&");for(var n=0;n<e.length;n++){var r=e[n].indexOf("="),i=null;if(0<=r){var a=e[n].substring(0,r);i=e[n].substring(r+1)}else a=e[n];t(a,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(e.i,(function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)})))}function dl(e,t){hl(e),t=ml(e,t),Qc(e.g.h,t)&&(e.i=null,e.h-=e.g.get(t).length,Qc((e=e.g).h,t)&&(delete e.h[t],e.i--,e.g.length>2*e.i&&Wc(e)))}function pl(e,t){return hl(e),t=ml(e,t),Qc(e.g.h,t)}function vl(e,t,n){dl(e,t),0<n.length&&(e.i=null,e.g.set(ml(e,t),Vu(n)),e.h+=n.length)}function ml(e,t){return t=String(t),e.j&&(t=t.toLowerCase()),t}(ku=fl.prototype).add=function(e,t){hl(this),this.i=null,e=ml(this,e);var n=this.g.get(e);return n||this.g.set(e,n=[]),n.push(t),this.h+=1,this},ku.forEach=function(e,t){hl(this),this.g.forEach((function(n,r){Fu(n,(function(n){e.call(t,n,r,this)}),this)}),this)},ku.T=function(){hl(this);for(var e=this.g.R(),t=this.g.T(),n=[],r=0;r<t.length;r++)for(var i=e[r],a=0;a<i.length;a++)n.push(t[r]);return n},ku.R=function(e){hl(this);var t=[];if("string"===typeof e)pl(this,e)&&(t=Uu(t,this.g.get(ml(this,e))));else{e=this.g.R();for(var n=0;n<e.length;n++)t=Uu(t,e[n])}return t},ku.set=function(e,t){return hl(this),this.i=null,pl(this,e=ml(this,e))&&(this.h-=this.g.get(e).length),this.g.set(e,[t]),this.h+=1,this},ku.get=function(e,t){return e&&0<(e=this.R(e)).length?String(e[0]):t},ku.toString=function(){if(this.i)return this.i;if(!this.g)return"";for(var e=[],t=this.g.T(),n=0;n<t.length;n++){var r=t[n],i=encodeURIComponent(String(r));r=this.R(r);for(var a=0;a<r.length;a++){var o=i;""!==r[a]&&(o+="="+encodeURIComponent(String(r[a]))),e.push(o)}}return this.i=e.join("&")};var yl=St((function e(t,n){xt(this,e),this.h=t,this.g=n}));function gl(e){this.l=e||bl,Eu.PerformanceNavigationTiming?e=0<(e=Eu.performance.getEntriesByType("navigation")).length&&("hq"==e[0].nextHopProtocol||"h2"==e[0].nextHopProtocol):e=!!(Eu.g&&Eu.g.Ea&&Eu.g.Ea()&&Eu.g.Ea().Zb),this.j=e?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}var bl=10;function kl(e){return!!e.h||!!e.g&&e.g.size>=e.j}function wl(e){return e.h?1:e.g?e.g.size:0}function _l(e,t){return e.h?e.h==t:!!e.g&&e.g.has(t)}function xl(e,t){e.g?e.g.add(t):e.h=t}function El(e,t){e.h&&e.h==t?e.h=null:e.g&&e.g.has(t)&&e.g.delete(t)}function Sl(e){if(null!=e.h)return e.i.concat(e.h.D);if(null!=e.g&&0!==e.g.size){var t,n=e.i,r=_t(e.g.values());try{for(r.s();!(t=r.n()).done;){var i=t.value;n=n.concat(i.D)}}catch(a){r.e(a)}finally{r.f()}return n}return Vu(e.i)}function Il(){}function Tl(){this.g=new Il}function Cl(e,t,n){var r=n||"";try{Hc(e,(function(e,n){var i=e;Tu(e)&&(i=zs(e)),t.push(r+n+"="+encodeURIComponent(i))}))}catch(i){throw t.push(r+"type="+encodeURIComponent("_badmap")),i}}function Nl(e,t,n,r,i){try{t.onload=null,t.onerror=null,t.onabort=null,t.ontimeout=null,i(r)}catch(ek){}}function Ol(e){this.l=e.$b||null,this.j=e.ib||!1}function Al(e,t){Fs.call(this),this.D=e,this.u=t,this.m=void 0,this.readyState=Pl,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.v=new Headers,this.h=null,this.C="GET",this.B="",this.g=!1,this.A=this.j=this.l=null}gl.prototype.cancel=function(){if(this.i=Sl(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){var e,t=_t(this.g.values());try{for(t.s();!(e=t.n()).done;){e.value.cancel()}}catch(n){t.e(n)}finally{t.f()}this.g.clear()}},Il.prototype.stringify=function(e){return Eu.JSON.stringify(e,void 0)},Il.prototype.parse=function(e){return Eu.JSON.parse(e,void 0)},Du(Ol,kc),Ol.prototype.g=function(){return new Al(this.l,this.j)},Ol.prototype.i=function(e){return function(){return e}}({}),Du(Al,Fs);var Pl=0;function Rl(e){e.j.read().then(e.Sa.bind(e)).catch(e.ha.bind(e))}function Dl(e){e.readyState=4,e.l=null,e.j=null,e.A=null,Ll(e)}function Ll(e){e.onreadystatechange&&e.onreadystatechange.call(e)}(ku=Al.prototype).open=function(e,t){if(this.readyState!=Pl)throw this.abort(),Error("Error reopening a connection");this.C=e,this.B=t,this.readyState=1,Ll(this)},ku.send=function(e){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.g=!0;var t={headers:this.v,method:this.C,credentials:this.m,cache:void 0};e&&(t.body=e),(this.D||Eu).fetch(new Request(this.B,t)).then(this.Va.bind(this),this.ha.bind(this))},ku.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted."),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,Dl(this)),this.readyState=Pl},ku.Va=function(e){if(this.g&&(this.l=e,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=e.headers,this.readyState=2,Ll(this)),this.g&&(this.readyState=3,Ll(this),this.g)))if("arraybuffer"===this.responseType)e.arrayBuffer().then(this.Ta.bind(this),this.ha.bind(this));else if("undefined"!==typeof Eu.ReadableStream&&"body"in e){if(this.j=e.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;Rl(this)}else e.text().then(this.Ua.bind(this),this.ha.bind(this))},ku.Sa=function(e){if(this.g){if(this.u&&e.value)this.response.push(e.value);else if(!this.u){var t=e.value?e.value:new Uint8Array(0);(t=this.A.decode(t,{stream:!e.done}))&&(this.response=this.responseText+=t)}e.done?Dl(this):Ll(this),3==this.readyState&&Rl(this)}},ku.Ua=function(e){this.g&&(this.response=this.responseText=e,Dl(this))},ku.Ta=function(e){this.g&&(this.response=e,Dl(this))},ku.ha=function(){this.g&&Dl(this)},ku.setRequestHeader=function(e,t){this.v.append(e,t)},ku.getResponseHeader=function(e){return this.h&&this.h.get(e.toLowerCase())||""},ku.getAllResponseHeaders=function(){if(!this.h)return"";for(var e=[],t=this.h.entries(),n=t.next();!n.done;)n=n.value,e.push(n[0]+": "+n[1]),n=t.next();return e.join("\r\n")},Object.defineProperty(Al.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(e){this.m=e?"include":"same-origin"}});var jl=Eu.JSON.parse;function Ml(e){Fs.call(this),this.headers=new Kc,this.u=e||null,this.h=!1,this.C=this.g=null,this.H="",this.m=0,this.j="",this.l=this.F=this.v=this.D=!1,this.B=0,this.A=null,this.J=Fl,this.K=this.L=!1}Du(Ml,Fs);var Fl="",Ul=/^https?$/i,Vl=["POST","PUT"];function zl(e){return"content-type"==e.toLowerCase()}function ql(e,t){e.h=!1,e.g&&(e.l=!0,e.g.abort(),e.l=!1),e.j=t,e.m=5,Bl(e),Kl(e)}function Bl(e){e.D||(e.D=!0,Us(e,"complete"),Us(e,"error"))}function Hl(e){if(e.h&&"undefined"!=typeof xu&&(!e.C[1]||4!=Ql(e)||2!=e.ba()))if(e.v&&4==Ql(e))ec(e.Fa,0,e);else if(Us(e,"readystatechange"),4==Ql(e)){e.h=!1;try{var t,n=e.ba();e:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r=!0;break e;default:r=!1}if(!(t=r)){var i;if(i=0===n){var a=String(e.H).match(Gc)[1]||null;if(!a&&Eu.self&&Eu.self.location){var o=Eu.self.location.protocol;a=o.substr(0,o.length-1)}i=!Ul.test(a?a.toLowerCase():"")}t=i}if(t)Us(e,"complete"),Us(e,"success");else{e.m=6;try{var u=2<Ql(e)?e.g.statusText:""}catch(Jb){u=""}e.j=u+" ["+e.ba()+"]",Bl(e)}}finally{Kl(e)}}}function Kl(e,t){if(e.g){Wl(e);var n=e.g,r=e.C[0]?Su:null;e.g=null,e.C=null,t||Us(e,"ready");try{n.onreadystatechange=r}catch(i){}}}function Wl(e){e.g&&e.K&&(e.g.ontimeout=null),e.A&&(Eu.clearTimeout(e.A),e.A=null)}function Ql(e){return e.g?e.g.readyState:0}function Gl(e){try{if(!e.g)return null;if("response"in e.g)return e.g.response;switch(e.J){case Fl:case"text":return e.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in e.g)return e.g.mozResponseArrayBuffer}return null}catch(ck){return null}}function $l(e,t,n){e:{for(r in n){var r=!1;break e}r=!0}r||(n=function(e){var t="";return Gu(e,(function(e,n){t+=n,t+=":",t+=e,t+="\r\n"})),t}(n),"string"===typeof e?null!=n&&encodeURIComponent(String(n)):tl(e,t,n))}function Xl(e,t,n){return n&&n.internalChannelParams&&n.internalChannelParams[e]||t}function Yl(e){this.za=0,this.l=[],this.h=new uc,this.la=this.oa=this.F=this.W=this.g=this.sa=this.D=this.aa=this.o=this.P=this.s=null,this.Za=this.V=0,this.Xa=Xl("failFast",!1,e),this.N=this.v=this.u=this.m=this.j=null,this.X=!0,this.I=this.ta=this.U=-1,this.Y=this.A=this.C=0,this.Pa=Xl("baseRetryDelayMs",5e3,e),this.$a=Xl("retryDelaySeedMs",1e4,e),this.Ya=Xl("forwardChannelMaxRetries",2,e),this.ra=Xl("forwardChannelRequestTimeoutMs",2e4,e),this.qa=e&&e.xmlHttpFactory||void 0,this.Ba=e&&e.Yb||!1,this.K=void 0,this.H=e&&e.supportsCrossDomainXhr||!1,this.J="",this.i=new gl(e&&e.concurrentRequestLimit),this.Ca=new Tl,this.ja=e&&e.fastHandshake||!1,this.Ra=e&&e.Wb||!1,e&&e.Aa&&this.h.Aa(),e&&e.forceLongPolling&&(this.X=!1),this.$=!this.ja&&this.X&&e&&e.detectBufferingProxy||!1,this.ka=void 0,this.O=0,this.L=!1,this.B=null,this.Wa=!e||!1!==e.Xb}function Jl(e){if(ef(e),3==e.G){var t=e.V++,n=Xc(e.F);tl(n,"SID",e.J),tl(n,"RID",t),tl(n,"TYPE","terminate"),af(e,n),(t=new Cc(e,e.h,t,void 0)).K=2,t.v=nl(Xc(n)),n=!1,Eu.navigator&&Eu.navigator.sendBeacon&&(n=Eu.navigator.sendBeacon(t.v.toString(),"")),!n&&Eu.Image&&((new Image).src=t.v,n=!0),n||(t.g=yf(t.l,null),t.g.ea(t.v)),t.F=Date.now(),Fc(t)}vf(e)}function Zl(e){e.g&&(cf(e),e.g.cancel(),e.g=null)}function ef(e){Zl(e),e.u&&(Eu.clearTimeout(e.u),e.u=null),ff(e),e.i.cancel(),e.m&&("number"===typeof e.m&&Eu.clearTimeout(e.m),e.m=null)}function tf(e,t){e.l.push(new yl(e.Za++,t)),3==e.G&&nf(e)}function nf(e){kl(e.i)||e.m||(e.m=!0,Gs(e.Ha,e),e.C=0)}function rf(e,t){var n;n=t?t.m:e.V++;var r=Xc(e.F);tl(r,"SID",e.J),tl(r,"RID",n),tl(r,"AID",e.U),af(e,r),e.o&&e.s&&$l(r,e.o,e.s),n=new Cc(e,e.h,n,e.C+1),null===e.o&&(n.H=e.s),t&&(e.l=t.D.concat(e.l)),t=of(e,n,1e3),n.setTimeout(
2Math.round(.5*e.ra)+Math.round(.5*e.ra*Math.random())),xl(e.i,n),Rc(n,r,t)}function af(e,t){e.j&&Hc({},(function(e,n){tl(t,n,e)}))}function of(e,t,n){n=Math.min(e.l.length,n);var r=e.j?Pu(e.j.Oa,e.j,e):null;e:for(var i=e.l,a=-1;;){var o=["count="+n];-1==a?0<n?(a=i[0].h,o.push("ofs="+a)):a=0:o.push("ofs="+a);for(var u=!0,s=0;s<n;s++){var c=i[s].h,l=i[s].g;if(0>(c-=a))a=Math.max(0,i[s].h-100),u=!1;else try{Cl(l,o,"req"+c+"_")}catch(Kf){r&&r(l)}}if(u){r=o.join("&");break e}}return e=e.l.splice(0,n),t.D=e,r}function uf(e){e.g||e.u||(e.Y=1,Gs(e.Ga,e),e.A=0)}function sf(e){return!(e.g||e.u||3<=e.A)&&(e.Y++,e.u=yc(Pu(e.Ga,e),df(e,e.A)),e.A++,!0)}function cf(e){null!=e.B&&(Eu.clearTimeout(e.B),e.B=null)}function lf(e){e.g=new Cc(e,e.h,"rpc",e.Y),null===e.o&&(e.g.H=e.s),e.g.O=0;var t=Xc(e.oa);tl(t,"RID","rpc"),tl(t,"SID",e.J),tl(t,"CI",e.N?"0":"1"),tl(t,"AID",e.U),af(e,t),tl(t,"TYPE","xmlhttp"),e.o&&e.s&&$l(t,e.o,e.s),e.K&&e.g.setTimeout(e.K);var n=e.g;e=e.la,n.K=1,n.v=nl(Xc(t)),n.s=null,n.U=!0,Dc(n,e)}function ff(e){null!=e.v&&(Eu.clearTimeout(e.v),e.v=null)}function hf(e,t){var n=null;if(e.g==t){ff(e),cf(e),e.g=null;var r=2}else{if(!_l(e.i,t))return;n=t.D,El(e.i,t),r=1}if(e.I=t.N,0!=e.G)if(t.i)if(1==r){n=t.s?t.s.length:0,t=Date.now()-t.F;var i=e.C;Us(r=fc(),new mc(r,n,t,i)),nf(e)}else uf(e);else if(3==(i=t.o)||0==i&&0<e.I||!(1==r&&function(e,t){return!(wl(e.i)>=e.i.j-(e.m?1:0))&&(e.m?(e.l=t.D.concat(e.l),!0):!(1==e.G||2==e.G||e.C>=(e.Xa?0:e.Ya))&&(e.m=yc(Pu(e.Ha,e,t),df(e,e.C)),e.C++,!0))}(e,t)||2==r&&sf(e)))switch(n&&0<n.length&&(t=e.i,t.i=t.i.concat(n)),i){case 1:pf(e,5);break;case 4:pf(e,10);break;case 3:pf(e,6);break;default:pf(e,2)}}function df(e,t){var n=e.Pa+Math.floor(Math.random()*e.$a);return e.j||(n*=2),n*t}function pf(e,t){if(e.h.info("Error code "+t),2==t){var n=null;e.j&&(n=null);var r=Pu(e.jb,e);n||(n=new $c("//www.google.com/images/cleardot.gif"),Eu.location&&"http"==Eu.location.protocol||Yc(n,"https"),nl(n)),function(e,t){var n=new uc;if(Eu.Image){var r=new Image;r.onload=Ru(Nl,n,r,"TestLoadImage: loaded",!0,t),r.onerror=Ru(Nl,n,r,"TestLoadImage: error",!1,t),r.onabort=Ru(Nl,n,r,"TestLoadImage: abort",!1,t),r.ontimeout=Ru(Nl,n,r,"TestLoadImage: timeout",!1,t),Eu.setTimeout((function(){r.ontimeout&&r.ontimeout()}),1e4),r.src=e}else t(!1)}(n.toString(),r)}else vc(2);e.G=0,e.j&&e.j.va(t),vf(e),ef(e)}function vf(e){e.G=0,e.I=-1,e.j&&(0==Sl(e.i).length&&0==e.l.length||(e.i.i.length=0,Vu(e.l),e.l.length=0),e.j.ua())}function mf(e,t,n){var r=function(e){return e instanceof $c?Xc(e):new $c(e,void 0)}(n);if(""!=r.i)t&&Jc(r,t+"."+r.i),Zc(r,r.m);else{var i=Eu.location;r=function(e,t,n,r){var i=new $c(null,void 0);return e&&Yc(i,e),t&&Jc(i,t),n&&Zc(i,n),r&&(i.l=r),i}(i.protocol,t?t+"."+i.hostname:i.hostname,+i.port,n)}return e.aa&&Gu(e.aa,(function(e,t){tl(r,t,e)})),t=e.D,n=e.sa,t&&n&&tl(r,t,n),tl(r,"VER",e.ma),af(e,r),r}function yf(e,t,n){if(t&&!e.H)throw Error("Can't create secondary domain capable XhrIo object.");return(t=n&&e.Ba&&!e.qa?new Ml(new Ol({ib:!0})):new Ml(e.qa)).L=e.H,t}function gf(){}function bf(){if(ts&&!(10<=Number(ps)))throw Error("Environmental error: no available transport.")}function kf(e,t){Fs.call(this),this.g=new Yl(t),this.l=e,this.h=t&&t.messageUrlParams||null,e=t&&t.messageHeaders||null,t&&t.clientProtocolHeaderRequired&&(e?e["X-Client-Protocol"]="webchannel":e={"X-Client-Protocol":"webchannel"}),this.g.s=e,e=t&&t.initMessageHeaders||null,t&&t.messageContentType&&(e?e["X-WebChannel-Content-Type"]=t.messageContentType:e={"X-WebChannel-Content-Type":t.messageContentType}),t&&t.ya&&(e?e["X-WebChannel-Client-Profile"]=t.ya:e={"X-WebChannel-Client-Profile":t.ya}),this.g.P=e,(e=t&&t.httpHeadersOverwriteParam)&&!zu(e)&&(this.g.o=e),this.A=t&&t.supportsCrossDomainXhr||!1,this.v=t&&t.sendRawJson||!1,(t=t&&t.httpSessionIdParam)&&!zu(t)&&(this.g.D=t,null!==(e=this.h)&&t in e&&(t in(e=this.h)&&delete e[t])),this.j=new xf(this)}function wf(e){Sc.call(this);var t=e.__sm__;if(t){e:{for(var n in t){e=n;break e}e=void 0}(this.i=e)&&(e=this.i,t=null!==t&&e in t?t[e]:void 0),this.data=t}else this.data=e}function _f(){Ic.call(this),this.status=1}function xf(e){this.g=e}(ku=Ml.prototype).ea=function(e,t,n,r){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.H+"; newUri="+e);t=t?t.toUpperCase():"GET",this.H=e,this.j="",this.m=0,this.D=!1,this.h=!0,this.g=this.u?this.u.g():xc.g(),this.C=this.u?wc(this.u):wc(xc),this.g.onreadystatechange=Pu(this.Fa,this);try{this.F=!0,this.g.open(t,String(e),!0),this.F=!1}catch(ek){return void ql(this,ek)}e=n||"";var i=new Kc(this.headers);r&&Hc(r,(function(e,t){i.set(t,e)})),r=function(e){e:{for(var t=zl,n=e.length,r="string"===typeof e?e.split(""):e,i=0;i<n;i++)if(i in r&&t.call(void 0,r[i],i,e)){t=i;break e}t=-1}return 0>t?null:"string"===typeof e?e.charAt(t):e[t]}(i.T()),n=Eu.FormData&&e instanceof Eu.FormData,!(0<=Mu(Vl,t))||r||n||i.set("Content-Type","application/x-www-form-urlencoded;
2charset=utf-8"),i.forEach((function(e,t){this.g.setRequestHeader(t,e)}),this),this.J&&(this.g.responseType=this.J),"withCredentials"in this.g&&this.g.withCredentials!==this.L&&(this.g.withCredentials=this.L);try{Wl(this),0<this.B&&((this.K=function(e){return ts&&hs()&&"number"===typeof e.timeout&&void 0!==e.ontimeout}(this.g))?(this.g.timeout=this.B,this.g.ontimeout=Pu(this.pa,this)):this.A=ec(this.pa,this.B,this)),this.v=!0,this.g.send(e),this.v=!1}catch(ek){ql(this,ek)}},ku.pa=function(){"undefined"!=typeof xu&&this.g&&(this.j="Timed out after "+this.B+"ms, aborting",this.m=8,Us(this,"timeout"),this.abort(8))},ku.abort=function(e){this.g&&this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1,this.m=e||7,Us(this,"complete"),Us(this,"abort"),Kl(this))},ku.M=function(){this.g&&(this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1),Kl(this,!0)),Ml.Z.M.call(this)},ku.Fa=function(){this.s||(this.F||this.v||this.l?Hl(this):this.cb())},ku.cb=function(){Hl(this)},ku.ba=function(){try{return 2<Ql(this)?this.g.status:-1}catch(Zb){return-1}},ku.ga=function(){try{return this.g?this.g.responseText:""}catch(Zb){return""}},ku.Qa=function(e){if(this.g){var t=this.g.responseText;return e&&0==t.indexOf(e)&&(t=t.substring(e.length)),jl(t)}},ku.Da=function(){return this.m},ku.La=function(){return"string"===typeof this.j?this.j:String(this.j)},(ku=Yl.prototype).ma=8,ku.G=1,ku.hb=function(e){try{this.h.info("Origin Trials invoked: "+e)}catch(ck){}},ku.Ha=function(e){if(this.m)if(this.m=null,1==this.G){if(!e){this.V=Math.floor(1e5*Math.random()),e=this.V++;var t=new Cc(this,this.h,e,void 0),n=this.s;if(this.P&&(n?Yu(n=$u(n),this.P):n=this.P),null===this.o&&(t.H=n),this.ja)e:{for(var r=0,i=0;i<this.l.length;i++){var a=this.l[i];if(void 0===(a="__data__"in a.g&&"string"===typeof(a=a.g.__data__)?a.length:void 0))break;if(4096<(r+=a)){r=i;break e}if(4096===r||i===this.l.length-1){r=i+1;break e}}r=1e3}else r=1e3;r=of(this,t,r),tl(i=Xc(this.F),"RID",e),tl(i,"CVER",22),this.D&&tl(i,"X-HTTP-Session-Id",this.D),af(this,i),this.o&&n&&$l(i,this.o,n),xl(this.i,t),this.Ra&&tl(i,"TYPE","init"),this.ja?(tl(i,"$req",r),tl(i,"SID","null"),t.$=!0,Rc(t,i,null)):Rc(t,i,r),this.G=2}}else 3==this.G&&(e?rf(this,e):0==this.l.length||kl(this.i)||rf(this))},ku.Ga=function(){if(this.u=null,lf(this),this.$&&!(this.L||null==this.g||0>=this.O)){var e=2*this.O;this.h.info("BP detection timer enabled: "+e),this.B=yc(Pu(this.bb,this),e)}},ku.bb=function(){this.B&&(this.B=null,this.h.info("BP detection timeout reached."),this.h.info("Buffering proxy detected and switch to long-polling!"),this.N=!1,this.L=!0,vc(10),Zl(this),lf(this))},ku.ab=function(){null!=this.v&&(this.v=null,Zl(this),sf(this),vc(19))},ku.jb=function(e){e?(this.h.info("Successfully pinged google.com"),vc(2)):(this.h.info("Failed to ping google.com"),vc(1))},(ku=gf.prototype).xa=function(){},ku.wa=function(){},ku.va=function(){},ku.ua=function(){},ku.Oa=function(){},bf.prototype.g=function(e,t){return new kf(e,t)},Du(kf,Fs),kf.prototype.m=function(){this.g.j=this.j,this.A&&(this.g.H=!0);var e=this.g,t=this.l,n=this.h||void 0;e.Wa&&(e.h.info("Origin Trials enabled."),Gs(Pu(e.hb,e,t))),vc(0),e.W=t,e.aa=n||{},e.N=e.X,e.F=mf(e,null,e.W),nf(e)},kf.prototype.close=function(){Jl(this.g)},kf.prototype.u=function(e){if("string"===typeof e){var t={};t.__data__=e,tf(this.g,t)}else this.v?((t={}).__data__=zs(e),tf(this.g,t)):tf(this.g,e)},kf.prototype.M=function(){this.g.j=null,delete this.j,Jl(this.g),delete this.g,kf.Z.M.call(this)},Du(wf,Sc),Du(_f,Ic),Du(xf,gf),xf.prototype.xa=function(){Us(this.g,"a")},xf.prototype.wa=function(e){Us(this.g,new wf(e))},xf.prototype.va=function(e){Us(this.g,new _f(e))},xf.prototype.ua=function(){Us(this.g,"b")},bf.prototype.createWebChannel=bf.prototype.g,kf.prototype.send=kf.prototype.u,kf.prototype.open=kf.prototype.m,kf.prototype.close=kf.prototype.close,gc.NO_ERROR=0,gc.TIMEOUT=8,gc.HTTP_ERROR=6,bc.COMPLETE="complete",_c.EventType=Ec,Ec.OPEN="a",Ec.CLOSE="b",Ec.ERROR="c",Ec.MESSAGE="d",Fs.prototype.listen=Fs.prototype.N,Ml.prototype.listenOnce=Ml.prototype.O,Ml.prototype.getLastError=Ml.prototype.La,Ml.prototype.getLastErrorCode=Ml.prototype.Da,Ml.prototype.getStatus=Ml.prototype.ba,Ml.prototype.getResponseJson=Ml.prototype.Qa,Ml.prototype.getResponseText=Ml.prototype.ga,Ml.prototype.send=Ml.prototype.ea;var Ef=_u.createWebChannelTransport=function(){return new bf},Sf=_u.getStatEventTarget=function(){return fc()},If=_u.ErrorCode=gc,Tf=_u.EventType=bc,Cf=_u.Event=cc,Nf=_u.Stat={rb:0,ub:1,vb:2,Ob:3,Tb:4,Qb:5,Rb:6,Pb:7,Nb:8,Sb:9,PROXY:10,NOPROXY:11,Lb:12,Hb:13,Ib:14,Gb:15,Jb:16,Kb:17,nb:18,mb:19,ob:20},Of=_u.FetchXmlHttpFactory=Ol,Af=_u.WebChannel=_c,Pf=_u.XhrIo=Ml,Rf="@firebase/firestore",Df=function(){function e(t){xt(this,e),this.uid=t}return St(e,[{key:"isAuthenticated",value:function(){return null!=this.uid}},{key:"toKey",value:function(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}},{key:"isEqual",value:function(e){return e.uid===this.uid}}]),e}();Df.UNAUTHENTICATED=new Df(null),Df.GOOGLE_CREDENTIALS=new Df("google-credentials-uid"),Df.FIRST_PARTY=new Df("first-party-uid"),Df.MOCK_USER=new Df("mock-user");var Lf="9.9.1",jf=new vn("@firebase/firestore");function Mf(){return jf.logLevel}function Ff(e){if(jf.logLevel<=sn.DEBUG){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n.map(zf);
2jf.debug.apply(jf,["Firestore (".concat(Lf,"): ").concat(e)].concat(wt(i)))}}function Uf(e){if(jf.logLevel<=sn.ERROR){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n.map(zf);jf.error.apply(jf,["Firestore (".concat(Lf,"): ").concat(e)].concat(wt(i)))}}function Vf(e){if(jf.logLevel<=sn.WARN){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n.map(zf);jf.warn.apply(jf,["Firestore (".concat(Lf,"): ").concat(e)].concat(wt(i)))}}function zf(e){if("string"==typeof e)return e;try{return t=e,JSON.stringify(t)}catch(t){return e}var t}function qf(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Unexpected state",t="FIRESTORE (".concat(Lf,") INTERNAL ASSERTION FAILED: ")+e;throw Uf(t),new Error(t)}function Bf(e,t){e||qf()}function Hf(e,t){return e}var Kf={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},Wf=function(e){Ct(n,e);var t=Pt(n);function n(e,r){var i;return xt(this,n),(i=t.call(this,e,r)).code=e,i.message=r,i.toString=function(){return"".concat(i.name,": [code=").concat(i.code,"]: ").concat(i.message)},i}return St(n)}(Kt),Qf=St((function e(){var t=this;xt(this,e),this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))})),Gf=St((function e(t,n){xt(this,e),this.user=n,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization","Bearer ".concat(t))})),$f=function(){function e(){xt(this,e)}return St(e,[{key:"getToken",value:function(){return Promise.resolve(null)}},{key:"invalidateToken",value:function(){}},{key:"start",value:function(e,t){e.enqueueRetryable((function(){return t(Df.UNAUTHENTICATED)}))}},{key:"shutdown",value:function(){}}]),e}(),Xf=function(){function e(t){xt(this,e),this.t=t,this.currentUser=Df.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}return St(e,[{key:"start",value:function(e,t){var n=this,r=this.i,i=function(e){return n.i!==r?(r=n.i,t(e)):Promise.resolve()},a=new Qf;this.o=function(){n.i++,n.currentUser=n.u(),a.resolve(),a=new Qf,e.enqueueRetryable((function(){return i(n.currentUser)}))};var o=function(){var t=a;e.enqueueRetryable(lt(st().mark((function e(){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.promise;case 2:return e.next=4,i(n.currentUser);case 4:case"end":return e.stop()}}),e)}))))},u=function(e){Ff("FirebaseAuthCredentialsProvider","Auth detected"),n.auth=e,n.auth.addAuthTokenListener(n.o),o()};this.t.onInit((function(e){return u(e)})),setTimeout((function(){if(!n.auth){var e=n.t.getImmediate({optional:!0});e?u(e):(Ff("FirebaseAuthCredentialsProvider","Auth not yet detected"),a.resolve(),a=new Qf)}}),0),o()}},{key:"getToken",value:function(){var e=this,t=this.i,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then((function(n){return e.i!==t?(Ff("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),e.getToken()):n?(Bf("string"==typeof n.accessToken),new Gf(n.accessToken,e.currentUser)):null})):Promise.resolve(null)}},{key:"invalidateToken",value:function(){this.forceRefresh=!0}},{key:"shutdown",value:function(){this.auth&&this.auth.removeAuthTokenListener(this.o)}},{key:"u",value:function(){var e=this.auth&&this.auth.getUid();return Bf(null===e||"string"==typeof e),new Df(e)}}]),e}(),Yf=St((function e(t,n,r){xt(this,e),this.type="FirstParty",this.user=Df.FIRST_PARTY,this.headers=new Map,this.headers.set("X-Goog-AuthUser",n);var i=t.auth.getAuthHeaderValueForFirstParty([]);i&&this.headers.set("Authorization",i),r&&this.headers.set("X-Goog-Iam-Authorization-Token",r)})),Jf=function(){function e(t,n,r){xt(this,e),this.h=t,this.l=n,this.m=r}return St(e,[{key:"getToken",value:function(){return Promise.resolve(new Yf(this.h,this.l,this.m))}},{key:"start",value:function(e,t){e.enqueueRetryable((function(){return t(Df.FIRST_PARTY)}))}},{key:"shutdown",value:function(){}},{key:"invalidateToken",value:function(){}}]),e}(),Zf=St((function e(t){xt(this,e),this.value=t,this.type="AppCheck",this.headers=new Map,t&&t.length>0&&this.headers.set("x-firebase-appcheck",this.value)})),eh=function(){function e(t){xt(this,e),this.g=t,this.forceRefresh=!1,this.appCheck=null,this.p=null}return St(e,[{key:"start",value:function(e,t){var n=this,r=function(e){null!=e.error&&Ff("FirebaseAppCheckTokenProvider","Error getting App Check token; using placeholder token instead. Error: ".concat(e.error.message));var r=e.token!==n.p;return n.p=e.token,Ff("FirebaseAppCheckTokenProvider","Received ".concat(r?"new":"existing"," token.")),r?t(e.token):Promise.resolve()};this.o=function(t){e.enqueueRetryable((function(){return r(t)}))};var i=function(e){Ff("FirebaseAppCheckTokenProvider","AppCheck detected"),n.appCheck=e,n.appCheck.addTokenListener(n.o)};this.g.onInit((function(e){return i(e)})),setTimeout((function(){if(!n.appCheck){var e=n.g.getImmediate({optional:!0});e?i(e):Ff("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}}),0)}},{key:"getToken",value:function(){var e=this,t=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(t).then((function(t){return t?(Bf("string"==typeof t.token),e.p=t.token,new Zf(t.token)):null})):Promise.resolve(null)}},{key:"invalidateToken",value:function(){this.forceRefresh=!0}},{key:"shutdown",value:function(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}]),e}();function th(e){var t="undefined"!=typeof self&&(self.crypto||self.msCrypto),n=new Uint8Array(e);if(t&&"function"==typeof t.getRandomValues)t.getRandomValues(n);else for(var r=0;r<e;
2r++)n[r]=Math.floor(256*Math.random());return n}var nh=function(){function e(){xt(this,e)}return St(e,null,[{key:"I",value:function(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=Math.floor(256/e.length)*e.length,n="";n.length<20;)for(var r=th(40),i=0;i<r.length;++i)n.length<20&&r[i]<t&&(n+=e.charAt(r[i]%e.length));return n}}]),e}();function rh(e,t){return e<t?-1:e>t?1:0}function ih(e,t,n){return e.length===t.length&&e.every((function(e,r){return n(e,t[r])}))}var ah=function(){function e(t,n){if(xt(this,e),this.seconds=t,this.nanoseconds=n,n<0)throw new Wf(Kf.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new Wf(Kf.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(t<-62135596800)throw new Wf(Kf.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new Wf(Kf.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}return St(e,[{key:"toDate",value:function(){return new Date(this.toMillis())}},{key:"toMillis",value:function(){return 1e3*this.seconds+this.nanoseconds/1e6}},{key:"_compareTo",value:function(e){return this.seconds===e.seconds?rh(this.nanoseconds,e.nanoseconds):rh(this.seconds,e.seconds)}},{key:"isEqual",value:function(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}},{key:"toString",value:function(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}},{key:"toJSON",value:function(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}},{key:"valueOf",value:function(){var e=this.seconds- -62135596800;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}],[{key:"now",value:function(){return e.fromMillis(Date.now())}},{key:"fromDate",value:function(t){return e.fromMillis(t.getTime())}},{key:"fromMillis",value:function(t){var n=Math.floor(t/1e3);return new e(n,Math.floor(1e6*(t-1e3*n)))}}]),e}(),oh=function(){function e(t){xt(this,e),this.timestamp=t}return St(e,[{key:"compareTo",value:function(e){return this.timestamp._compareTo(e.timestamp)}},{key:"isEqual",value:function(e){return this.timestamp.isEqual(e.timestamp)}},{key:"toMicroseconds",value:function(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}},{key:"toString",value:function(){return"SnapshotVersion("+this.timestamp.toString()+")"}},{key:"toTimestamp",value:function(){return this.timestamp}}],[{key:"fromTimestamp",value:function(t){return new e(t)}},{key:"min",value:function(){return new e(new ah(0,0))}},{key:"max",value:function(){return new e(new ah(253402300799,999999999))}}]),e}(),uh=function(){function e(t,n,r){xt(this,e),void 0===n?n=0:n>t.length&&qf(),void 0===r?r=t.length-n:r>t.length-n&&qf(),this.segments=t,this.offset=n,this.len=r}return St(e,[{key:"length",get:function(){return this.len}},{key:"isEqual",value:function(t){return 0===e.comparator(this,t)}},{key:"child",value:function(t){var n=this.segments.slice(this.offset,this.limit());return t instanceof e?t.forEach((function(e){n.push(e)})):n.push(t),this.construct(n)}},{key:"limit",value:function(){return this.offset+this.length}},{key:"popFirst",value:function(e){return e=void 0===e?1:e,this.construct(this.segments,this.offset+e,this.length-e)}},{key:"popLast",value:function(){return this.construct(this.segments,this.offset,this.length-1)}},{key:"firstSegment",value:function(){return this.segments[this.offset]}},{key:"lastSegment",value:function(){return this.get(this.length-1)}},{key:"get",value:function(e){return this.segments[this.offset+e]}},{key:"isEmpty",value:function(){return 0===this.length}},{key:"isPrefixOf",value:function(e){if(e.length<this.length)return!1;for(var t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}},{key:"isImmediateParentOf",value:function(e){if(this.length+1!==e.length)return!1;for(var t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}},{key:"forEach",value:function(e){for(var t=this.offset,n=this.limit();t<n;t++)e(this.segments[t])}},{key:"toArray",value:function(){return this.segments.slice(this.offset,this.limit())}}],[{key:"comparator",value:function(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){var i=e.get(r),a=t.get(r);if(i<a)return-1;if(i>a)return 1}return e.length<t.length?-1:e.length>t.length?1:0}}]),e}(),sh=function(e){Ct(n,e);var t=Pt(n);function n(){return xt(this,n),t.apply(this,arguments)}
2return St(n,[{key:"construct",value:function(e,t,r){return new n(e,t,r)}},{key:"canonicalString",value:function(){return this.toArray().join("/")}},{key:"toString",value:function(){return this.canonicalString()}}],[{key:"fromString",value:function(){for(var e=[],t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];for(var a=0,o=r;a<o.length;a++){var u=o[a];if(u.indexOf("//")>=0)throw new Wf(Kf.INVALID_ARGUMENT,"Invalid segment (".concat(u,"). Paths must not contain // in them."));e.push.apply(e,wt(u.split("/").filter((function(e){return e.length>0}))))}return new n(e)}},{key:"emptyPath",value:function(){return new n([])}}]),n}(uh),ch=/^[_a-zA-Z][_a-zA-Z0-9]*$/,lh=function(e){Ct(n,e);var t=Pt(n);function n(){return xt(this,n),t.apply(this,arguments)}return St(n,[{key:"construct",value:function(e,t,r){return new n(e,t,r)}},{key:"canonicalString",value:function(){return this.toArray().map((function(e){return e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),n.isValidIdentifier(e)||(e="`"+e+"`"),e})).join(".")}},{key:"toString",value:function(){return this.canonicalString()}},{key:"isKeyField",value:function(){return 1===this.length&&"__name__"===this.get(0)}}],[{key:"isValidIdentifier",value:function(e){return ch.test(e)}},{key:"keyField",value:function(){return new n(["__name__"])}},{key:"fromServerFormat",value:function(e){for(var t=[],r="",i=0,a=function(){if(0===r.length)throw new Wf(Kf.INVALID_ARGUMENT,"Invalid field path (".concat(e,"). Paths must not be empty, begin with '.', end with '.', or contain '..'"));t.push(r),r=""},o=!1;i<e.length;){var u=e[i];if("\\"===u){if(i+1===e.length)throw new Wf(Kf.INVALID_ARGUMENT,"Path has trailing escape character: "+e);var s=e[i+1];if("\\"!==s&&"."!==s&&"`"!==s)throw new Wf(Kf.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);r+=s,i+=2}else"`"===u?(o=!o,i++):"."!==u||o?(r+=u,i++):(a(),i++)}if(a(),o)throw new Wf(Kf.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new n(t)}},{key:"emptyPath",value:function(){return new n([])}}]),n}(uh),fh=function(){function e(t){xt(this,e),this.path=t}return St(e,[{key:"collectionGroup",get:function(){return this.path.popLast().lastSegment()}},{key:"hasCollectionId",value:function(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}},{key:"getCollectionGroup",value:function(){return this.path.get(this.path.length-2)}},{key:"getCollectionPath",value:function(){return this.path.popLast()}},{key:"isEqual",value:function(e){return null!==e&&0===sh.comparator(this.path,e.path)}},{key:"toString",value:function(){return this.path.toString()}}],[{key:"fromPath",value:function(t){return new e(sh.fromString(t))}},{key:"fromName",value:function(t){return new e(sh.fromString(t).popFirst(5))}},{key:"empty",value:function(){return new e(sh.emptyPath())}},{key:"comparator",value:function(e,t){return sh.comparator(e.path,t.path)}},{key:"isDocumentKey",value:function(e){return e.length%2==0}},{key:"fromSegments",value:function(t){return new e(new sh(t.slice()))}}]),e}(),hh=St((function e(t,n,r,i){xt(this,e),this.indexId=t,this.collectionGroup=n,this.fields=r,this.indexState=i}));hh.UNKNOWN_ID=-1;function dh(e,t){var n=e.toTimestamp().seconds,r=e.toTimestamp().nanoseconds+1,i=oh.fromTimestamp(1e9===r?new ah(n+1,0):new ah(n,r));return new vh(i,fh.empty(),t)}function ph(e){return new vh(e.readTime,e.key,-1)}var vh=function(){function e(t,n,r){xt(this,e),this.readTime=t,this.documentKey=n,this.largestBatchId=r}return St(e,null,[{key:"min",value:function(){return new e(oh.min(),fh.empty(),-1)}},{key:"max",value:function(){return new e(oh.max(),fh.empty(),-1)}}]),e}();function mh(e,t){var n=e.readTime.compareTo(t.readTime);return 0!==n?n:0!==(n=fh.comparator(e.documentKey,t.documentKey))?n:rh(e.largestBatchId,t.largestBatchId)}var yh="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.",gh=function(){function e(){xt(this,e),this.onCommittedListeners=[]}return St(e,[{key:"addOnCommittedListener",value:function(e){this.onCommittedListeners.push(e)}},{key:"raiseOnCommittedEvent",value:function(){this.onCommittedListeners.forEac
2h((function(e){return e()}))}}]),e}();function bh(e){return kh.apply(this,arguments)}function kh(){return kh=lt(st().mark((function e(t){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.code===Kf.FAILED_PRECONDITION&&t.message===yh){e.next=2;break}throw t;case 2:Ff("LocalStore","Unexpectedly lost primary lease");case 3:case"end":return e.stop()}}),e)}))),kh.apply(this,arguments)}var wh=function(){function e(t){var n=this;xt(this,e),this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,t((function(e){n.isDone=!0,n.result=e,n.nextCallback&&n.nextCallback(e)}),(function(e){n.isDone=!0,n.error=e,n.catchCallback&&n.catchCallback(e)}))}return St(e,[{key:"catch",value:function(e){return this.next(void 0,e)}},{key:"next",value:function(t,n){var r=this;return this.callbackAttached&&qf(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(t,this.result):new e((function(e,i){r.nextCallback=function(n){r.wrapSuccess(t,n).next(e,i)},r.catchCallback=function(t){r.wrapFailure(n,t).next(e,i)}}))}},{key:"toPromise",value:function(){var e=this;return new Promise((function(t,n){e.next(t,n)}))}},{key:"wrapUserFunction",value:function(t){try{var n=t();return n instanceof e?n:e.resolve(n)}catch(t){return e.reject(t)}}},{key:"wrapSuccess",value:function(t,n){return t?this.wrapUserFunction((function(){return t(n)})):e.resolve(n)}},{key:"wrapFailure",value:function(t,n){return t?this.wrapUserFunction((function(){return t(n)})):e.reject(n)}}],[{key:"resolve",value:function(t){return new e((function(e,n){e(t)}))}}
2,{key:"reject",value:function(t){return new e((function(e,n){n(t)}))}},{key:"waitFor",value:function(t){return new e((function(e,n){var r=0,i=0,a=!1;t.forEach((function(t){++r,t.next((function(){++i,a&&i===r&&e()}),(function(e){return n(e)}))})),a=!0,i===r&&e()}))}},{key:"or",value:function(t){var n,r=e.resolve(!1),i=_t(t);try{var a=function(){var t=n.value;r=r.next((function(n){return n?e.resolve(n):t()}))};for(i.s();!(n=i.n()).done;)a()}catch(o){i.e(o)}finally{i.f()}return r}},{key:"forEach",value:function(e,t){var n=this,r=[];return e.forEach((function(e,i){r.push(t.call(n,e,i))})),this.waitFor(r)}},{key:"mapArray",value:function(t,n){return new e((function(e,r){for(var i=t.length,a=new Array(i),o=0,u=function(u){var s=u;n(t[s]).next((function(t){a[s]=t,++o===i&&e(a)}),(function(e){return r(e)}))},s=0;s<i;s++)u(s)}))}},{key:"doWhile",value:function(t,n){return new e((function(e,r){!function i(){!0===t()?n().next((function(){i()}),r):e()}()}))}}]),e}();function _h(e){return"IndexedDbTransactionError"===e.name}var xh=function(){function e(t,n){var r=this;xt(this,e),this.previousValue=t,n&&(n.sequenceNumberHandler=function(e){return r.it(e)},this.rt=function(e){return n.writeSequenceNumber(e)})}return St(e,[{key:"it",value:function(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}},{key:"next",value:function(){var e=++this.previousValue;return this.rt&&this.rt(e),e}}]),e}();function Eh(e){var t=0;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function Sh(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])}function Ih(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}xh.ot=-1;var Th=function(){function e(t,n){xt(this,e),this.comparator=t,this.root=n||Nh.EMPTY}return St(e,[{key:"insert",value:function(t,n){return new e(this.comparator,this.root.insert(t,n,this.comparator).copy(null,null,Nh.BLACK,null,null))}},{key:"remove",value:function(t){return new e(this.comparator,this.root.remove(t,this.comparator).copy(null,null,Nh.BLACK,null,null))}},{key:"get",value:function(e){for(var t=this.root;!t.isEmpty();){var n=this.comparator(e,t.key);if(0===n)return t.value;n<0?t=t.left:n>0&&(t=t.right)}return null}},{key:"indexOf",value:function(e){for(var t=0,n=this.root;!n.isEmpty();){var r=this.comparator(e,n.key);if(0===r)return t+n.left.size;r<0?n=n.left:(t+=n.left.size+1,n=n.right)}return-1}},{key:"isEmpty",value:function(){return this.root.isEmpty()}},{key:"size",get:function(){return this.root.size}},{key:"minKey",value:function(){return this.root.minKey()}},{key:"maxKey",value:function(){return this.root.maxKey()}},{key:"inorderTraversal",value:function(e){return this.root.inorderTraversal(e)}},{key:"forEach",value:function(e){this.inorderTraversal((function(t,n){return e(t,n),!1}))}},{key:"toString",value:function(){var e=[];return this.inorderTraversal((function(t,n){return e.push("".concat(t,":").concat(n)),!1})),"{".concat(e.join(", "),"}")}},{key:"reverseTraversal",value:function(e){return this.root.reverseTraversal(e)}},{key:"getIterator",value:function(){return new Ch(this.root,null,this.comparator,!1)}},{key:"getIteratorFrom",value:function(e){return new Ch(this.root,e,this.comparator,!1)}},{key:"getReverseIterator",value:function(){return new Ch(this.root,null,this.comparator,!0)}},{key:"getReverseIteratorFrom",value:function(e){return new Ch(this.root,e,this.comparator,!0)}}]),e}(),Ch=function(){function e(t,n,r,i){xt(this,e),this.isReverse=i,this.nodeStack=[];for(var a=1;!t.isEmpty();)if(a=n?r(t.key,n):1,n&&i&&(a*=-1),a<0)t=this.isReverse?t.left:t.right;else{if(0===a){this.nodeStack.push(t);break}this.nodeStack.push(t),t=this.isReverse?t.right:t.left}}return St(e,[{key:"getNext",value:function(){var e=this.nodeStack.pop(),t={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return t}},{key:"hasNext",value:function(){return this.nodeStack.length>0}},{key:"peek",value:function(){if(0===this.nodeStack.length)return null;var e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}]),e}(),Nh=function(){function e(t,n,r,i,a){xt(this,e),this.key=t,this.value=n,this.color=null!=r?r:e.RED,this.left=null!=i?i:e.EMPTY,this.right=null!=a?a:e.EMPTY,this.size=this.left.size+1+this.right.size}
2return St(e,[{key:"copy",value:function(t,n,r,i,a){return new e(null!=t?t:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=a?a:this.right)}},{key:"isEmpty",value:function(){return!1}},{key:"inorderTraversal",value:function(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}},{key:"reverseTraversal",value:function(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}},{key:"min",value:function(){return this.left.isEmpty()?this:this.left.min()}},{key:"minKey",value:function(){return this.min().key}},{key:"maxKey",value:function(){return this.right.isEmpty()?this.key:this.right.maxKey()}},{key:"insert",value:function(e,t,n){var r=this,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))).fixUp()}},{key:"removeMin",value:function(){if(this.left.isEmpty())return e.EMPTY;var t=this;return t.left.isRed()||t.left.left.isRed()||(t=t.moveRedLeft()),(t=t.copy(null,null,null,t.left.removeMin(),null)).fixUp()}},{key:"remove",value:function(t,n){var r,i=this;if(n(t,i.key)<0)i.left.isEmpty()||i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.remove(t,n),null);else{if(i.left.isRed()&&(i=i.rotateRight()),i.right.isEmpty()||i.right.isRed()||i.right.left.isRed()||(i=i.moveRedRight()),0===n(t,i.key)){if(i.right.isEmpty())return e.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.removeMin())}i=i.copy(null,null,null,null,i.right.remove(t,n))}return i.fixUp()}},{key:"isRed",value:function(){return this.color}},{key:"fixUp",value:function(){var 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}},{key:"moveRedLeft",value:function(){var e=this.colorFlip();return e.right.left.isRed()&&(e=(e=(e=e.copy(null,null,null,null,e.right.rotateRight())).rotateLeft()).colorFlip()),e}},{key:"moveRedRight",value:function(){var e=this.colorFlip();return e.left.left.isRed()&&(e=(e=e.rotateRight()).colorFlip()),e}},{key:"rotateLeft",value:function(){var t=this.copy(null,null,e.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)}},{key:"rotateRight",value:function(){var t=this.copy(null,null,e.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)}},{key:"colorFlip",value:function(){var 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)}},{key:"checkMaxDepth",value:function(){var e=this.check();return Math.pow(2,e)<=this.size+1}},{key:"check",value:function(){if(this.isRed()&&this.left.isRed())throw qf();if(this.right.isRed())throw qf();var e=this.left.check();if(e!==this.right.check())throw qf();return e+(this.isRed()?0:1)}}]),e}();Nh.EMPTY=null,Nh.RED=!0,Nh.BLACK=!1,Nh.EMPTY=new(function(){function e(){xt(this,e),this.size=0}return St(e,[{key:"key",get:function(){throw qf()}},{key:"value",get:function(){throw qf()}},{key:"color",get:function(){throw qf()}},{key:"left",get:function(){throw qf()}},{key:"right",get:function(){throw qf()}},{key:"copy",value:function(e,t,n,r,i){return this}},{key:"insert",value:function(e,t,n){return new Nh(e,t)}},{key:"remove",value:function(e,t){return this}},{key:"isEmpty",value:function(){return!0}},{key:"inorderTraversal",value:function(e){return!1}},{key:"reverseTraversal",value:function(e){return!1}},{key:"minKey",value:function(){return null}},{key:"maxKey",value:function(){return null}},{key:"isRed",value:function(){return!1}},{key:"checkMaxDepth",value:function(){return!0}},{key:"check",value:function(){return 0}}]),e}());var Oh=function(){function e(t){xt(this,e),this.comparator=t,this.data=new Th(this.comparator)}return St(e,[{key:"has",value:function(e){return null!==this.data.get(e)}},{key:"first",value:function(){return this.data.minKey()}},{key:"last",value:function(){return this.data.maxKey()}},{key:"size",get:function(){return this.data.size}},{key:"indexOf",value:function(e){return this.data.indexOf(e)}}
2,{key:"forEach",value:function(e){this.data.inorderTraversal((function(t,n){return e(t),!1}))}},{key:"forEachInRange",value:function(e,t){for(var n=this.data.getIteratorFrom(e[0]);n.hasNext();){var r=n.getNext();if(this.comparator(r.key,e[1])>=0)return;t(r.key)}}},{key:"forEachWhile",value:function(e,t){var n;for(n=void 0!==t?this.data.getIteratorFrom(t):this.data.getIterator();n.hasNext();)if(!e(n.getNext().key))return}},{key:"firstAfterOrEqual",value:function(e){var t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null}},{key:"getIterator",value:function(){return new Ah(this.data.getIterator())}},{key:"getIteratorFrom",value:function(e){return new Ah(this.data.getIteratorFrom(e))}},{key:"add",value:function(e){return this.copy(this.data.remove(e).insert(e,!0))}},{key:"delete",value:function(e){return this.has(e)?this.copy(this.data.remove(e)):this}},{key:"isEmpty",value:function(){return this.data.isEmpty()}},{key:"unionWith",value:function(e){var t=this;return t.size<e.size&&(t=e,e=this),e.forEach((function(e){t=t.add(e)})),t}},{key:"isEqual",value:function(t){if(!(t instanceof e))return!1;if(this.size!==t.size)return!1;for(var n=this.data.getIterator(),r=t.data.getIterator();n.hasNext();){var i=n.getNext().key,a=r.getNext().key;if(0!==this.comparator(i,a))return!1}return!0}},{key:"toArray",value:function(){var e=[];return this.forEach((function(t){e.push(t)})),e}},{key:"toString",value:function(){var e=[];return this.forEach((function(t){return e.push(t)})),"SortedSet("+e.toString()+")"}},{key:"copy",value:function(t){var n=new e(this.comparator);return n.data=t,n}}]),e}(),Ah=function(){function e(t){xt(this,e),this.iter=t}return St(e,[{key:"getNext",value:function(){return this.iter.getNext().key}},{key:"hasNext",value:function(){return this.iter.hasNext()}}]),e}();var Ph=function(){function e(t){xt(this,e),this.fields=t,t.sort(lh.comparator)}return St(e,[{key:"unionWith",value:function(t){var n,r=new Oh(lh.comparator),i=_t(this.fields);try{for(i.s();!(n=i.n()).done;){var a=n.value;r=r.add(a)}}catch(c){i.e(c)}finally{i.f()}var o,u=_t(t);try{for(u.s();!(o=u.n()).done;){var s=o.value;r=r.add(s)}}catch(c){u.e(c)}finally{u.f()}return new e(r.toArray())}},{key:"covers",value:function(e){var t,n=_t(this.fields);try{for(n.s();!(t=n.n()).done;){if(t.value.isPrefixOf(e))return!0}}catch(r){n.e(r)}finally{n.f()}return!1}},{key:"isEqual",value:function(e){return ih(this.fields,e.fields,(function(e,t){return e.isEqual(t)}))}}],[{key:"empty",value:function(){return new e([])}}]),e}();var Rh=function(e){function t(e){xt(this,t),this.binaryString=e}return St(t,[{key:Symbol.iterator,value:function(){var e=this,t=0;return{next:function(){return t<e.binaryString.length?{value:e.binaryString.charCodeAt(t++),done:!1}:{value:void 0,done:!0}}}}},{key:"toBase64",value:function(){return e=this.binaryString,btoa(e);var e}},{key:"toUint8Array",value:function(){return function(e){for(var t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(this.binaryString)}},{key:"approximateByteSize",value:function(){return 2*this.binaryString.length}},{key:"compareTo",value:function(e){return rh(this.binaryString,e.binaryString)}},{key:"isEqual",value:function(e){return this.binaryString===e.binaryString}}],[{key:"fromBase64String",value:function(e){return new t(atob(e))}},{key:"fromUint8Array",value:function(e){var n=function(e){for(var t="",n=0;n<e.length;++n)t+=String.fromCharCode(e[n]);return t}(e);return new t(n)}}]),t}();Rh.EMPTY_BYTE_STRING=new Rh("");var Dh=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Lh(e){if(Bf(!!e),"string"==typeof e){var t=0,n=Dh.exec(e);if(Bf(!!n),n[1]){var r=n[1];r=(r+"000000000").substr(0,9),t=Number(r)}var i=new Date(e);return{seconds:Math.floor(i.getTime()/1e3),nanos:t}}return{seconds:jh(e.seconds),nanos:jh(e.nanos)}}function jh(e){return"number"==typeof e?e:"string"==typeof e?Number(e):0}function Mh(e){return"string"==typeof e?Rh.fromBase64String(e):Rh.fromUint8Array(e)}function Fh(e){var t,n;return"server_timestamp"===(null===(n=((null===(t=null==e?void 0:e.mapValue)||void 0===t?void 0:t.fields)||{}).__type__)||void 0===n?void 0:n.stringValue)}function Uh(e){var t=e.mapValue.fields.__previous_value__;return Fh(t)?Uh(t):t}function Vh(e){var t=Lh(e.mapValue.fields.__local_write_time__.timestampValue);return new ah(t.seconds,t.nanos)}var zh=St((function e(t,n,r,i,a,o,u,s){xt(this,e),this.databaseId=t,this.appId=n,this.persistenceKey=r,this.host=i,this.ssl=a,this.forceLongPolling=o,this.autoDetectLongPolling=u,this.useFetchStreams=s})),qh=function(){function e(t,n){xt(this,e),this.projectId=t,this.database=n||"(default)"}return St(e,[{key:"isDefaultDatabase",get:function(){return"(default)"===this.database}},{key:"isEqual",value:function(t){return t instanceof e&&t.projectId===this.projectId&&t.database===this.database}}],[{key:"empty",value:function(){return new e("","")}}]),e}();function Bh(e){return null==e}function Hh(e){return 0===e&&1/e==-1/0}function Kh(e){return"number"==typeof e&&Number.isInteger(e)&&!Hh(e)&&e<=Number.MAX_SAFE_INTEGER&&e>=Number.MIN_SAFE_INTEGER}var Wh={mapValue:{fields:{__type__:{stringValue:"__max__"}}}};function Qh(e){return"nullValue"in e?0:"booleanValue"in e?1:"integerValue"in e||"doubleValue"in e?2:"timestampValue"in e?3:"stringValue"in e?5:"bytesValue"in e?6:"referenceValue"in e?7:"geoPointValue"in e?8:"arrayValue"in e?9:"mapValue"in e?Fh(e)?4:ud(e)?9007199254740991:10:qf()}function Gh(e,t){if(e===t)return!0;var n=Qh(e);if(n!==Qh(t))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return e.booleanValue===t.booleanValue;case 4:return Vh(e).isEqual(Vh(t));case 3:return function(e,t){if("string"==typeof e.timestampValue&&"string"==typeof t.timestampValue&&e.timestampValue.length===t.timestampValue.length)return e.timestampValue===t.timestampValue;var n=Lh(e.timestampValue),r=Lh(t.timestampValue);return n.seconds===r.seconds&&n.nanos===r.nanos}(e,t);case 5:return e.stringValue===t.stringValue;case 6:return function(e,t){return Mh(e.bytesValue).isEqual(Mh(t.bytesValue))}(e,t);case 7:return e.referenceValue===t.referenceValue;case 8:return function(e,t){return jh(e.geoPointValue.latitude)===jh(t.geoPointValue.latitude)&&jh(e.geoPointValue.longitude)===jh(t.geoPointValue.longitude)}(e,t);case 2:return function(e,t){if("integerValue"in e&&"integerValue"in t)return jh(e.integerValue)===jh(t.integerValue);if("doubleValue"in e&&"doubleValue"in t){var n=jh(e.doubleValue),r=jh(t.doubleValue);return n===r?Hh(n)===Hh(r):isNaN(n)&&isNaN(r)}return!1}(e,t);case 9:return ih(e.arrayValue.values||[],t.arrayValue.values||[],Gh);case 10:return function(e,t){var n=e.mapValue.fields||{},r=t.mapValue.fields||{};if(Eh(n)!==Eh(r))return!1;for(var i in n)if(n.hasOwnProperty(i)&&(void 0===r[i]||!Gh(n[i],r[i])))return!1;return!0}(e,t);default:return qf()}}function $h(e,t){return void 0!==(e.values||[]).find((function(e){return Gh(e,t)}))}function Xh(e,t){if(e===t)return 0;var n=Qh(e),r=Qh(t);if(n!==r)return rh(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return rh(e.booleanValue,t.booleanValue);case 2:return function(e,t){var n=jh(e.integerValue||e.doubleValue),r=jh(t.integerValue||t.doubleValue);return n<r?-1:n>r?1:n===r?0:isNaN(n)?isNaN(r)?0:-1:1}(e,t);case 3:return Yh(e.timestampValue,t.timestampValue);case 4:return Yh(Vh(e),Vh(t));case 5:return rh(e.stringValue,t.stringValue);case 6:return function(e,t){var n=Mh(e),r=Mh(t);return n.compareTo(r)}(e.bytesValue,t.bytesValue);case 7:return function(e,t){for(var n=e.split("/"),r=t.split("/"),i=0;i<n.length&&i<r.length;i++){var a=rh(n[i],r[i]);if(0!==a)return a}return rh(n.length,r.length)}(e.referenceValue,t.referenceValue);case 8:return function(e,t){var n=rh(jh(e.latitude),jh(t.latitude));return 0!==n?n:rh(jh(e.longitude),jh(t.longitude))}(e.geoPointValue,t.geoPointValue);case 9:return function(e,t){for(var n=e.values||[],r=t.values||[],i=0;i<n.length&&i<r.length;++i){var a=Xh(n[i],r[i]);if(a)return a}return rh(n.length,r.length)}(e.arrayValue,t.arrayValue);case 10:return function(e,t){if(e===Wh.mapValue&&t===Wh.mapValue)return 0;if(e===Wh.mapValue)return 1;if(t===Wh.mapValue)return-1;var n=e.fields||{},r=Object.keys(n),i=t.fields||{},a=Object.keys(i);r.sort(),a.sort();for(var o=0;o<r.length&&o<a.length;++o){var u=rh(r[o],a[o]);if(0!==u)return u;var s=Xh(n[r[o]],i[a[o]]);if(0!==s)return s}return rh(r.length,a.length)}(e.mapValue,t.mapValue);default:throw qf()}}function Yh(e,t){if("string"==typeof e&&"string"==typeof t&&e.length===t.length)return rh(e,t);var n=Lh(e),r=Lh(t),i=rh(n.seconds,r.seconds);return 0!==i?i:rh(n.nanos,r.nanos)}function Jh(e){return Zh(e)}function Zh(e){return"nullValue"in e?"null":"booleanValue"in e?""+e.booleanValue:"integerValue"in e?""+e.integerValue:"doubleValue"in e?""+e.doubleValue:"timestampValue"in e?function(e){var t=Lh(e);return"time(".concat(t.seconds,",").concat(t.nanos,")")}(e.timestampValue):"stringValue"in e?e.stringValue:"bytesValue"in e?Mh(e.bytesValue).toBase64():"referenceValue"in e?(n=e.referenceValue,fh.fromName(n).toString()):"geoPointValue"in e?"geo(".concat((t=e.geoPointValue).latitude,",").concat(t.longitude,")"):"arrayValue"in e?function(e){var t,n="[",r=!0,i=_t(e.values||[]);try{for(i.s();!(t=i.n()).done;){var a=t.value;r?r=!1:n+=",",n+=Zh(a)}}catch(o){i.e(o)}finally{i.f()}return n+"]"}(e.arrayValue):"mapValue"in e?function(e){var t,n="{",r=!0,i=_t(Object.keys(e.fields||{}).sort());try{for(i.s();!(t=i.n()).done;){var a=t.value;r?r=!1:n+=",",n+="".concat(a,":").concat(Zh(e.fields[a]))}}catch(o){i.e(o)}finally{i.f()}return n+"}"}(e.mapValue):qf();var t,n}function ed(e,t){return{referenceValue:"projects/".concat(e.projectId,"/databases/").concat(e.database,"/documents/").concat(t.path.canonicalString())}}function td(e){return!!e&&"integerValue"in e}
2function nd(e){return!!e&&"arrayValue"in e}function rd(e){return!!e&&"nullValue"in e}function id(e){return!!e&&"doubleValue"in e&&isNaN(Number(e.doubleValue))}function ad(e){return!!e&&"mapValue"in e}function od(e){if(e.geoPointValue)return{geoPointValue:Object.assign({},e.geoPointValue)};if(e.timestampValue&&"object"==typeof e.timestampValue)return{timestampValue:Object.assign({},e.timestampValue)};if(e.mapValue){var t={mapValue:{fields:{}}};return Sh(e.mapValue.fields,(function(e,n){return t.mapValue.fields[e]=od(n)})),t}if(e.arrayValue){for(var n={arrayValue:{values:[]}},r=0;r<(e.arrayValue.values||[]).length;++r)n.arrayValue.values[r]=od(e.arrayValue.values[r]);return n}return Object.assign({},e)}function ud(e){return"__max__"===(((e.mapValue||{}).fields||{}).__type__||{}).stringValue}var sd=function(){function e(t){xt(this,e),this.value=t}return St(e,[{key:"field",value:function(e){if(e.isEmpty())return this.value;for(var t=this.value,n=0;n<e.length-1;++n)if(!ad(t=(t.mapValue.fields||{})[e.get(n)]))return null;return(t=(t.mapValue.fields||{})[e.lastSegment()])||null}},{key:"set",value:function(e,t){this.getFieldsMap(e.popLast())[e.lastSegment()]=od(t)}},{key:"setAll",value:function(e){var t=this,n=lh.emptyPath(),r={},i=[];e.forEach((function(e,a){if(!n.isImmediateParentOf(a)){var o=t.getFieldsMap(n);t.applyChanges(o,r,i),r={},i=[],n=a.popLast()}e?r[a.lastSegment()]=od(e):i.push(a.lastSegment())}));var a=this.getFieldsMap(n);this.applyChanges(a,r,i)}},{key:"delete",value:function(e){var t=this.field(e.popLast());ad(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]}},{key:"isEqual",value:function(e){return Gh(this.value,e.value)}},{key:"getFieldsMap",value:function(e){var t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(var n=0;n<e.length;++n){var r=t.mapValue.fields[e.get(n)];ad(r)&&r.mapValue.fields||(r={mapValue:{fields:{}}},t.mapValue.fields[e.get(n)]=r),t=r}return t.mapValue.fields}},{key:"applyChanges",value:function(e,t,n){Sh(t,(function(t,n){return e[t]=n}));var r,i=_t(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;delete e[a]}}catch(o){i.e(o)}finally{i.f()}}},{key:"clone",value:function(){return new e(od(this.value))}}],[{key:"empty",value:function(){return new e({mapValue:{}})}}]),e}();function cd(e){var t=[];return Sh(e.fields,(function(e,n){var r=new lh([e]);if(ad(n)){var i=cd(n.mapValue).fields;if(0===i.length)t.push(r);else{var a,o=_t(i);try{for(o.s();!(a=o.n()).done;){var u=a.value;t.push(r.child(u))}}catch(s){o.e(s)}finally{o.f()}}}else t.push(r)})),new Ph(t)}var ld=function(){function e(t,n,r,i,a,o){xt(this,e),this.key=t,this.documentType=n,this.version=r,this.readTime=i,this.data=a,this.documentState=o}return St(e,[{key:"convertToFoundDocument",value:function(e,t){return this.version=e,this.documentType=1,this.data=t,this.documentState=0,this}},{key:"convertToNoDocument",value:function(e){return this.version=e,this.documentType=2,this.data=sd.empty(),this.documentState=0,this}},{key:"convertToUnknownDocument",value:function(e){return this.version=e,this.documentType=3,this.data=sd.empty(),this.documentState=2,this}},{key:"setHasCommittedMutations",value:function(){return this.documentState=2,this}},{key:"setHasLocalMutations",value:function(){return this.documentState=1,this.version=oh.min(),this}},{key:"setReadTime",value:function(e){return this.readTime=e,this}},{key:"hasLocalMutations",get:function(){return 1===this.documentState}},{key:"hasCommittedMutations",get:function(){return 2===this.documentState}},{key:"hasPendingWrites",get:function(){return this.hasLocalMutations||this.hasCommittedMutations}},{key:"isValidDocument",value:function(){return 0!==this.documentType}},{key:"isFoundDocument",value:function(){return 1===this.documentType}},{key:"isNoDocument",value:function(){return 2===this.documentType}},{key:"isUnknownDocument",value:function(){return 3===this.documentType}},{key:"isEqual",value:function(t){return t instanceof e&&this.key.isEqual(t.key)&&this.version.isEqual(t.version)&&this.documentType===t.documentType&&this.documentState===t.documentState&&this.data.isEqual(t.data)}},{key:"mutableCopy",value:function(){return new e(this.key,this.documentType,this.version,this.readTime,this.data.clone(),this.documentState)}},{key:"toString",value:function(){return"Document(".concat(this.key,", ").concat(this.version,", ").concat(JSON.stringify(this.data.value),", {documentType: ").concat(this.documentType,"}), {documentState: ").concat(this.documentState,"})")}}],[{key:"newInvalidDocument",value:function(t){return new e(t,0,oh.min(),oh.min(),sd.empty(),0)}},{key:"newFoundDocument",value:function(t,n,r){return new e(t,1,n,oh.min(),r,0)}},{key:"newNoDocument",value:function(t,n){return new e(t,2,n,oh.min(),sd.empty(),0)}},{key:"newUnknownDocument",value:function(t,n){return new e(t,3,n,oh.min(),sd.empty(),2)}}]),e}(),fd=St((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;xt(this,e),this.path=t,this.collectionGroup=n,this.orderBy=r,this.filters=i,this.limit=a,this.startAt=o,this.endAt=u,this.ut=null}));function hd(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;return new fd(e,t,n,r,i,a,o)}function dd(e){var t=Hf(e);
2if(null===t.ut){var n=t.path.canonicalString();null!==t.collectionGroup&&(n+="|cg:"+t.collectionGroup),n+="|f:",n+=t.filters.map((function(e){return(t=e).field.canonicalString()+t.op.toString()+Jh(t.value);var t})).join(","),n+="|ob:",n+=t.orderBy.map((function(e){return function(e){return e.field.canonicalString()+e.dir}(e)})).join(","),Bh(t.limit)||(n+="|l:",n+=t.limit),t.startAt&&(n+="|lb:",n+=t.startAt.inclusive?"b:":"a:",n+=t.startAt.position.map((function(e){return Jh(e)})).join(",")),t.endAt&&(n+="|ub:",n+=t.endAt.inclusive?"a:":"b:",n+=t.endAt.position.map((function(e){return Jh(e)})).join(",")),t.ut=n}return t.ut}function pd(e,t){if(e.limit!==t.limit)return!1;if(e.orderBy.length!==t.orderBy.length)return!1;for(var n=0;n<e.orderBy.length;n++)if(!Td(e.orderBy[n],t.orderBy[n]))return!1;if(e.filters.length!==t.filters.length)return!1;for(var r=0;r<e.filters.length;r++)if(i=e.filters[r],a=t.filters[r],i.op!==a.op||!i.field.isEqual(a.field)||!Gh(i.value,a.value))return!1;var i,a;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!Nd(e.startAt,t.startAt)&&Nd(e.endAt,t.endAt)}function vd(e){return fh.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}var md=function(e){Ct(n,e);var t=Pt(n);function n(e,r,i){var a;return xt(this,n),(a=t.call(this)).field=e,a.op=r,a.value=i,a}return St(n,[{key:"matches",value:function(e){var t=e.data.field(this.field);return"!="===this.op?null!==t&&this.at(Xh(t,this.value)):null!==t&&Qh(this.value)===Qh(t)&&this.at(Xh(t,this.value))}},{key:"at",value:function(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return 0===e;case"!=":return 0!==e;case">":return e>0;case">=":return e>=0;default:return qf()}}},{key:"ht",value:function(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}}],[{key:"create",value:function(e,t,r){return e.isKeyField()?"in"===t||"not-in"===t?this.ct(e,t,r):new yd(e,t,r):"array-contains"===t?new wd(e,r):"in"===t?new _d(e,r):"not-in"===t?new xd(e,r):"array-contains-any"===t?new Ed(e,r):new n(e,t,r)}},{key:"ct",value:function(e,t,n){return"in"===t?new gd(e,n):new bd(e,n)}}]),n}(function(){return St((function e(){xt(this,e)}))}()),yd=function(e){Ct(n,e);var t=Pt(n);function n(e,r,i){var a;return xt(this,n),(a=t.call(this,e,r,i)).key=fh.fromName(i.referenceValue),a}return St(n,[{key:"matches",value:function(e){var t=fh.comparator(e.key,this.key);return this.at(t)}}]),n}(md),gd=function(e){Ct(n,e);var t=Pt(n);function n(e,r){var i;return xt(this,n),(i=t.call(this,e,"in",r)).keys=kd("in",r),i}return St(n,[{key:"matches",value:function(e){return this.keys.some((function(t){return t.isEqual(e.key)}))}}]),n}(md),bd=function(e){Ct(n,e);var t=Pt(n);function n(e,r){var i;return xt(this,n),(i=t.call(this,e,"not-in",r)).keys=kd("not-in",r),i}return St(n,[{key:"matches",value:function(e){return!this.keys.some((function(t){return t.isEqual(e.key)}))}}]),n}(md);function kd(e,t){var n;return((null===(n=t.arrayValue)||void 0===n?void 0:n.values)||[]).map((function(e){return fh.fromName(e.referenceValue)}))}var wd=function(e){Ct(n,e);var t=Pt(n);function n(e,r){return xt(this,n),t.call(this,e,"array-contains",r)}return St(n,[{key:"matches",value:function(e){var t=e.data.field(this.field);return nd(t)&&$h(t.arrayValue,this.value)}}]),n}(md),_d=function(e){Ct(n,e);var t=Pt(n);function n(e,r){return xt(this,n),t.call(this,e,"in",r)}return St(n,[{key:"matches",value:function(e){var t=e.data.field(this.field);return null!==t&&$h(this.value.arrayValue,t)}}]),n}(md),xd=function(e){Ct(n,e);var t=Pt(n);function n(e,r){return xt(this,n),t.call(this,e,"not-in",r)}return St(n,[{key:"matches",value:function(e){if($h(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;var t=e.data.field(this.field);return null!==t&&!$h(this.value.arrayValue,t)}}]),n}(md),Ed=function(e){Ct(n,e);var t=Pt(n);function n(e,r){return xt(this,n),t.call(this,e,"array-contains-any",r)}return St(n,[{key:"matches",value:function(e){var t=this,n=e.data.field(this.field);return!(!nd(n)||!n.arrayValue.values)&&n.arrayValue.values.some((function(e){return $h(t.value.arrayValue,e)}))}}]),n}(md),Sd=St((function e(t,n){xt(this,e),this.position=t,this.inclusive=n})),Id=St((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc";xt(this,e),this.field=t,this.dir=n}));function Td(e,t){return e.dir===t.dir&&e.field.isEqual(t.field)}function Cd(e,t,n){for(var r=0,i=0;i<e.position.length;i++){var a=t[i],o=e.position[i];
2if(r=a.field.isKeyField()?fh.comparator(fh.fromName(o.referenceValue),n.key):Xh(o,n.data.field(a.field)),"desc"===a.dir&&(r*=-1),0!==r)break}return r}function Nd(e,t){if(null===e)return null===t;if(null===t)return!1;if(e.inclusive!==t.inclusive||e.position.length!==t.position.length)return!1;for(var n=0;n<e.position.length;n++)if(!Gh(e.position[n],t.position[n]))return!1;return!0}var Od=St((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"F",u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;xt(this,e),this.path=t,this.collectionGroup=n,this.explicitOrderBy=r,this.filters=i,this.limit=a,this.limitType=o,this.startAt=u,this.endAt=s,this.lt=null,this.ft=null,this.startAt,this.endAt}));function Ad(e,t,n,r,i,a,o,u){return new Od(e,t,n,r,i,a,o,u)}function Pd(e){return new Od(e)}function Rd(e){return e.explicitOrderBy.length>0?e.explicitOrderBy[0].field:null}function Dd(e){var t,n=_t(e.filters);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.ht())return r.field}}catch(i){n.e(i)}finally{n.f()}return null}function Ld(e){return null!==e.collectionGroup}function jd(e){var t=Hf(e);if(null===t.lt){t.lt=[];var n=Dd(t),r=Rd(t);if(null!==n&&null===r)n.isKeyField()||t.lt.push(new Id(n)),t.lt.push(new Id(lh.keyField(),"asc"));else{var i,a=!1,o=_t(t.explicitOrderBy);try{for(o.s();!(i=o.n()).done;){var u=i.value;t.lt.push(u),u.field.isKeyField()&&(a=!0)}}catch(c){o.e(c)}finally{o.f()}if(!a){var s=t.explicitOrderBy.length>0?t.explicitOrderBy[t.explicitOrderBy.length-1].dir:"asc";t.lt.push(new Id(lh.keyField(),s))}}}return t.lt}function Md(e){var t=Hf(e);if(!t.ft)if("F"===t.limitType)t.ft=hd(t.path,t.collectionGroup,jd(t),t.filters,t.limit,t.startAt,t.endAt);else{var n,r=[],i=_t(jd(t));try{for(i.s();!(n=i.n()).done;){var a=n.value,o="desc"===a.dir?"asc":"desc";r.push(new Id(a.field,o))}}catch(c){i.e(c)}finally{i.f()}var u=t.endAt?new Sd(t.endAt.position,t.endAt.inclusive):null,s=t.startAt?new Sd(t.startAt.position,t.startAt.inclusive):null;t.ft=hd(t.path,t.collectionGroup,r,t.filters,t.limit,u,s)}return t.ft}function Fd(e,t,n){return new Od(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),t,n,e.startAt,e.endAt)}function Ud(e,t){return pd(Md(e),Md(t))&&e.limitType===t.limitType}function Vd(e){return"".concat(dd(Md(e)),"|lt:").concat(e.limitType)}function zd(e){return"Query(target=".concat(function(e){var t=e.path.canonicalString();return null!==e.collectionGroup&&(t+=" collectionGroup="+e.collectionGroup),e.filters.length>0&&(t+=", filters: [".concat(e.filters.map((function(e){return"".concat((t=e).field.canonicalString()," ").concat(t.op," ").concat(Jh(t.value));var t})).join(", "),"]")),Bh(e.limit)||(t+=", limit: "+e.limit),e.orderBy.length>0&&(t+=", orderBy: [".concat(e.orderBy.map((function(e){return function(e){return"".concat(e.field.canonicalString()," (").concat(e.dir,")")}(e)})).join(", "),"]")),e.startAt&&(t+=", startAt: ",t+=e.startAt.inclusive?"b:":"a:",t+=e.startAt.position.map((function(e){return Jh(e)})).join(",")),e.endAt&&(t+=", endAt: ",t+=e.endAt.inclusive?"a:":"b:",t+=e.endAt.position.map((function(e){return Jh(e)})).join(",")),"Target(".concat(t,")")}(Md(e)),"; limitType=").concat(e.limitType,")")}function qd(e,t){return t.isFoundDocument()&&function(e,t){var n=t.key.path;return null!==e.collectionGroup?t.key.hasCollectionId(e.collectionGroup)&&e.path.isPrefixOf(n):fh.isDocumentKey(e.path)?e.path.isEqual(n):e.path.isImmediateParentOf(n)}(e,t)&&function(e,t){var n,r=_t(e.explicitOrderBy);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(!i.field.isKeyField()&&null===t.data.field(i.field))return!1}}catch(a){r.e(a)}finally{r.f()}return!0}(e,t)&&function(e,t){var n,r=_t(e.filters);try{for(r.s();!(n=r.n()).done;){if(!n.value.matches(t))return!1}}catch(i){r.e(i)}finally{r.f()}return!0}(e,t)&&function(e,t){return!(e.startAt&&!function(e,t,n){var r=Cd(e,t,n
2);return e.inclusive?r<=0:r<0}(e.startAt,jd(e),t))&&!(e.endAt&&!function(e,t,n){var r=Cd(e,t,n);return e.inclusive?r>=0:r>0}(e.endAt,jd(e),t))}(e,t)}function Bd(e){return e.collectionGroup||(e.path.length%2==1?e.path.lastSegment():e.path.get(e.path.length-2))}function Hd(e){return function(t,n){var r,i=!1,a=_t(jd(e));try{for(a.s();!(r=a.n()).done;){var o=r.value,u=Kd(o,t,n);if(0!==u)return u;i=i||o.field.isKeyField()}}catch(s){a.e(s)}finally{a.f()}return 0}}function Kd(e,t,n){var r=e.field.isKeyField()?fh.comparator(t.key,n.key):function(e,t,n){var r=t.data.field(e),i=n.data.field(e);return null!==r&&null!==i?Xh(r,i):qf()}(e.field,t,n);switch(e.dir){case"asc":return r;case"desc":return-1*r;default:return qf()}}function Wd(e,t){if(e.dt){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:Hh(t)?"-0":t}}function Qd(e){return{integerValue:""+e}}function Gd(e,t){return Kh(t)?Qd(t):Wd(e,t)}var $d=St((function e(){xt(this,e),this._=void 0}));function Xd(e,t,n){return e instanceof Zd?function(e,t){var n={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:e.seconds,nanos:e.nanoseconds}}}};return t&&(n.fields.__previous_value__=t),{mapValue:n}}(n,t):e instanceof ep?tp(e,t):e instanceof np?rp(e,t):function(e,t){var n=Jd(e,t),r=ap(n)+ap(e._t);return td(n)&&td(e._t)?Qd(r):Wd(e.wt,r)}(e,t)}function Yd(e,t,n){return e instanceof ep?tp(e,t):e instanceof np?rp(e,t):n}function Jd(e,t){return e instanceof ip?td(n=t)||function(e){return!!e&&"doubleValue"in e}(n)?t:{integerValue:0}:null;var n}var Zd=function(e){Ct(n,e);var t=Pt(n);function n(){return xt(this,n),t.apply(this,arguments)}return St(n)}($d),ep=function(e){Ct(n,e);var t=Pt(n);function n(e){var r;return xt(this,n),(r=t.call(this)).elements=e,r}return St(n)}($d);function tp(e,t){var n,r=op(t),i=_t(e.elements);try{var a=function(){var e=n.value;r.some((function(t){return Gh(t,e)}))||r.push(e)};for(i.s();!(n=i.n()).done;)a()}catch(o){i.e(o)}finally{i.f()}return{arrayValue:{values:r}}}var np=function(e){Ct(n,e);var t=Pt(n);function n(e){var r;return xt(this,n),(r=t.call(this)).elements=e,r}return St(n)}($d);function rp(e,t){var n,r=op(t),i=_t(e.elements);try{var a=function(){var e=n.value;r=r.filter((function(t){return!Gh(t,e)}))};for(i.s();!(n=i.n()).done;)a()}catch(o){i.e(o)}finally{i.f()}return{arrayValue:{values:r}}}var ip=function(e){Ct(n,e);var t=Pt(n);function n(e,r){var i;return xt(this,n),(i=t.call(this)).wt=e,i._t=r,i}return St(n)}($d);function ap(e){return jh(e.integerValue||e.doubleValue)}function op(e){return nd(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}var up=St((function e(t,n){xt(this,e),this.version=t,this.transformResults=n})),sp=function(){function e(t,n){xt(this,e),this.updateTime=t,this.exists=n}return St(e,[{key:"isNone",get:function(){return void 0===this.updateTime&&void 0===this.exists}},{key:"isEqual",value:function(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}],[{key:"none",value:function(){return new e}},{key:"exists",value:function(t){return new e(void 0,t)}},{key:"updateTime",value:function(t){return new e(t)}}]),e}();function cp(e,t){return void 0!==e.updateTime?t.isFoundDocument()&&t.version.isEqual(e.updateTime):void 0===e.exists||e.exists===t.isFoundDocument()}var lp=St((function e(){xt(this,e)}));function fp(e,t){if(!e.hasLocalMutations||t&&0===t.fields.length)return null;if(null===t)return e.isNoDocument()?new xp(e.key,sp.none()):new mp(e.key,e.data,sp.none());var n,r=e.data,i=sd.empty(),a=new Oh(lh.comparator),o=_t(t.fields);try{for(o.s();!(n=o.n()).done;){var u=n.value;if(!a.has(u)){var s=r.field(u);null===s&&u.length>1&&(u=u.popLast(),s=r.field(u)),null===s?i.delete(u):i.set(u,s),a=a.add(u)}}}catch(c){o.e(c)}finally{o.f()}return new yp(e.key,i,new Ph(a.toArray()),sp.none())}function hp(e,t,n){e instanceof mp?function(e,t,n){var r=e.value.clone(),i=bp(e.fieldTransforms,t,n.transformResults);r.setAll(i),t.convertToFoundDocument(n.version,r).setHasCommittedMutations()}
2(e,t,n):e instanceof yp?function(e,t,n){if(cp(e.precondition,t)){var r=bp(e.fieldTransforms,t,n.transformResults),i=t.data;i.setAll(gp(e)),i.setAll(r),t.convertToFoundDocument(n.version,i).setHasCommittedMutations()}else t.convertToUnknownDocument(n.version)}(e,t,n):function(e,t,n){t.convertToNoDocument(n.version).setHasCommittedMutations()}(0,t,n)}function dp(e,t,n,r){return e instanceof mp?function(e,t,n,r){if(!cp(e.precondition,t))return n;var i=e.value.clone(),a=kp(e.fieldTransforms,r,t);return i.setAll(a),t.convertToFoundDocument(t.version,i).setHasLocalMutations(),null}(e,t,n,r):e instanceof yp?function(e,t,n,r){if(!cp(e.precondition,t))return n;var i=kp(e.fieldTransforms,r,t),a=t.data;return a.setAll(gp(e)),a.setAll(i),t.convertToFoundDocument(t.version,a).setHasLocalMutations(),null===n?null:n.unionWith(e.fieldMask.fields).unionWith(e.fieldTransforms.map((function(e){return e.field})))}(e,t,n,r):function(e,t,n){return cp(e.precondition,t)?(t.convertToNoDocument(t.version).setHasLocalMutations(),null):n}(e,t,n)}function pp(e,t){var n,r=null,i=_t(e.fieldTransforms);try{for(i.s();!(n=i.n()).done;){var a=n.value,o=t.data.field(a.field),u=Jd(a.transform,o||null);null!=u&&(null===r&&(r=sd.empty()),r.set(a.field,u))}}catch(s){i.e(s)}finally{i.f()}return r||null}function vp(e,t){return e.type===t.type&&!!e.key.isEqual(t.key)&&!!e.precondition.isEqual(t.precondition)&&!!function(e,t){return void 0===e&&void 0===t||!(!e||!t)&&ih(e,t,(function(e,t){return function(e,t){return e.field.isEqual(t.field)&&function(e,t){return e instanceof ep&&t instanceof ep||e instanceof np&&t instanceof np?ih(e.elements,t.elements,Gh):e instanceof ip&&t instanceof ip?Gh(e._t,t._t):e instanceof Zd&&t instanceof Zd}(e.transform,t.transform)}(e,t)}))}(e.fieldTransforms,t.fieldTransforms)&&(0===e.type?e.value.isEqual(t.value):1!==e.type||e.data.isEqual(t.data)&&e.fieldMask.isEqual(t.fieldMask))}var mp=function(e){Ct(n,e);var t=Pt(n);function n(e,r,i){var a,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];
2return xt(this,n),(a=t.call(this)).key=e,a.value=r,a.precondition=i,a.fieldTransforms=o,a.type=0,a}return St(n,[{key:"getFieldMask",value:function(){return null}}]),n}(lp),yp=function(e){Ct(n,e);var t=Pt(n);function n(e,r,i,a){var o,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];return xt(this,n),(o=t.call(this)).key=e,o.data=r,o.fieldMask=i,o.precondition=a,o.fieldTransforms=u,o.type=1,o}return St(n,[{key:"getFieldMask",value:function(){return this.fieldMask}}]),n}(lp);function gp(e){var t=new Map;return e.fieldMask.fields.forEach((function(n){if(!n.isEmpty()){var r=e.data.field(n);t.set(n,r)}})),t}function bp(e,t,n){var r=new Map;Bf(e.length===n.length);for(var i=0;i<n.length;i++){var a=e[i],o=a.transform,u=t.data.field(a.field);r.set(a.field,Yd(o,u,n[i]))}return r}function kp(e,t,n){var r,i=new Map,a=_t(e);try{for(a.s();!(r=a.n()).done;){var o=r.value,u=o.transform,s=n.data.field(o.field);i.set(o.field,Xd(u,s,t))}}catch(c){a.e(c)}finally{a.f()}return i}var wp,_p,xp=function(e){Ct(n,e);var t=Pt(n);function n(e,r){var i;return xt(this,n),(i=t.call(this)).key=e,i.precondition=r,i.type=2,i.fieldTransforms=[],i}return St(n,[{key:"getFieldMask",value:function(){return null}}]),n}(lp),Ep=function(e){Ct(n,e);var t=Pt(n);function n(e,r){var i;return xt(this,n),(i=t.call(this)).key=e,i.precondition=r,i.type=3,i.fieldTransforms=[],i}return St(n,[{key:"getFieldMask",value:function(){return null}}]),n}(lp),Sp=St((function e(t){xt(this,e),this.count=t}));function Ip(e){switch(e){default:return qf();case Kf.CANCELLED:case Kf.UNKNOWN:case Kf.DEADLINE_EXCEEDED:case Kf.RESOURCE_EXHAUSTED:case Kf.INTERNAL:case Kf.UNAVAILABLE:case Kf.UNAUTHENTICATED:return!1;case Kf.INVALID_ARGUMENT:case Kf.NOT_FOUND:case Kf.ALREADY_EXISTS:case Kf.PERMISSION_DENIED:case Kf.FAILED_PRECONDITION:case Kf.ABORTED:case Kf.OUT_OF_RANGE:case Kf.UNIMPLEMENTED:case Kf.DATA_LOSS:return!0}}function Tp(e){if(void 0===e)return Uf("GRPC error has no .code"),Kf.UNKNOWN;switch(e){case wp.OK:return Kf.OK;case wp.CANCELLED:return Kf.CANCELLED;case wp.UNKNOWN:return Kf.UNKNOWN;case wp.DEADLINE_EXCEEDED:return Kf.DEADLINE_EXCEEDED;case wp.RESOURCE_EXHAUSTED:return Kf.RESOURCE_EXHAUSTED;case wp.INTERNAL:return Kf.INTERNAL;case wp.UNAVAILABLE:return Kf.UNAVAILABLE;case wp.UNAUTHENTICATED:return Kf.UNAUTHENTICATED;case wp.INVALID_ARGUMENT:return Kf.INVALID_ARGUMENT;case wp.NOT_FOUND:return Kf.NOT_FOUND;case wp.ALREADY_EXISTS:return Kf.ALREADY_EXISTS;case wp.PERMISSION_DENIED:return Kf.PERMISSION_DENIED;case wp.FAILED_PRECONDITION:return Kf.FAILED_PRECONDITION;case wp.ABORTED:return Kf.ABORTED;case wp.OUT_OF_RANGE:return Kf.OUT_OF_RANGE;case wp.UNIMPLEMENTED:return Kf.UNIMPLEMENTED;case wp.DATA_LOSS:return Kf.DATA_LOSS;default:return qf()}}(_p=wp||(wp={}))[_p.OK=0]="OK",_p[_p.CANCELLED=1]="CANCELLED",_p[_p.UNKNOWN=2]="UNKNOWN",_p[_p.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",_p[_p.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",_p[_p.NOT_FOUND=5]="NOT_FOUND",_p[_p.ALREADY_EXISTS=6]="ALREADY_EXISTS",_p[_p.PERMISSION_DENIED=7]="PERMISSION_DENIED",_p[_p.UNAUTHENTICATED=16]="UNAUTHENTICATED",_p[_p.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",_p[_p.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",_p[_p.ABORTED=10]="ABORTED",_p[_p.OUT_OF_RANGE=11]="OUT_OF_RANGE",_p[_p.UNIMPLEMENTED=12]="UNIMPLEMENTED",_p[_p.INTERNAL=13]="INTERNAL",_p[_p.UNAVAILABLE=14]="UNAVAILABLE",_p[_p.DATA_LOSS=15]="DATA_LOSS";var Cp=function(){function e(t,n){xt(this,e),this.mapKeyFn=t,this.equalsFn=n,this.inner={},this.innerSize=0}return St(e,[{key:"get",value:function(e){var t=this.mapKeyFn(e),n=this.inner[t];if(void 0!==n){var r,i=_t(n);try{for(i.s();!(r=i.n()).done;){var a=o(r.value,2),u=a[0],s=a[1];if(this.equalsFn(u,e))return s}}catch(c){i.e(c)}finally{i.f()}}}},{key:"has",value:function(e){return void 0!==this.get(e)}},{key:"set",value:function(e,t){var n=this.mapKeyFn(e),r=this.inner[n];if(void 0===r)return this.inner[n]=[[e,t]],void this.innerSize++;for(var i=0;i<r.length;i++)if(this.equalsFn(r[i][0],e))return void(r[i]=[e,t]);r.push([e,t]),this.innerSize++}},{key:"delete",value:function(e){var t=this.mapKeyFn(e),n=this.inner[t];if(void 0===n)return!1;for(var r=0;r<n.length;r++)if(this.equalsFn(n[r][0],e))return 1===n.length?delete this.inner[t]:n.splice(r,1),this.innerSize--,!0;return!1}}
2,{key:"forEach",value:function(e){Sh(this.inner,(function(t,n){var r,i=_t(n);try{for(i.s();!(r=i.n()).done;){var a=o(r.value,2),u=a[0],s=a[1];e(u,s)}}catch(c){i.e(c)}finally{i.f()}}))}},{key:"isEmpty",value:function(){return Ih(this.inner)}},{key:"size",value:function(){return this.innerSize}}]),e}(),Np=new Th(fh.comparator);function Op(){return Np}var Ap=new Th(fh.comparator);function Pp(){for(var e=Ap,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=0,a=n;i<a.length;i++){var o=a[i];e=e.insert(o.key,o)}return e}function Rp(e){var t=Ap;return e.forEach((function(e,n){return t=t.insert(e,n.overlayedDocument)})),t}function Dp(){return jp()}function Lp(){return jp()}function jp(){return new Cp((function(e){return e.toString()}),(function(e,t){return e.isEqual(t)}))}var Mp=new Th(fh.comparator),Fp=new Oh(fh.comparator);function Up(){for(var e=Fp,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=0,a=n;i<a.length;i++){var o=a[i];e=e.add(o)}return e}var Vp=new Oh(rh);function zp(){return Vp}var qp=function(){function e(t,n,r,i,a){xt(this,e),this.snapshotVersion=t,this.targetChanges=n,this.targetMismatches=r,this.documentUpdates=i,this.resolvedLimboDocuments=a}return St(e,null,[{key:"createSynthesizedRemoteEventForCurrentChange",value:function(t,n){var r=new Map;return r.set(t,Bp.createSynthesizedTargetChangeForCurrentChange(t,n)),new e(oh.min(),r,zp(),Op(),Up())}}]),e}(),Bp=function(){function e(t,n,r,i,a){xt(this,e),this.resumeToken=t,this.current=n,this.addedDocuments=r,this.modifiedDocuments=i,this.removedDocuments=a}return St(e,null,[{key:"createSynthesizedTargetChangeForCurrentChange",value:function(t,n){return new e(Rh.EMPTY_BYTE_STRING,n,Up(),Up(),Up())}}]),e}(),Hp=St((function e(t,n,r,i){xt(this,e),this.gt=t,this.removedTargetIds=n,this.key=r,this.yt=i})),Kp=St((function e(t,n){xt(this,e),this.targetId=t,this.It=n})),Wp=St((function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Rh.EMPTY_BYTE_STRING,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;xt(this,e),this.state=t,this.targetIds=n,this.resumeToken=r,this.cause=i})),Qp=function(){function e(){xt(this,e),this.Tt=0,this.Et=Xp(),this.At=Rh.EMPTY_BYTE_STRING,this.Rt=!1,this.bt=!0}return St(e,[{key:"current",get:function(){return this.Rt}},{key:"resumeToken",get:function(){return this.At}},{key:"Pt",get:function(){return 0!==this.Tt}},{key:"vt",get:function(){return this.bt}},{key:"Vt",value:function(e){e.approximateByteSize()>0&&(this.bt=!0,this.At=e)}},{key:"St",value:function(){var e=Up(),t=Up(),n=Up();return this.Et.forEach((function(r,i){switch(i){case 0:e=e.add(r);break;case 2:t=t.add(r);break;case 1:n=n.add(r);break;default:qf()}})),new Bp(this.At,this.Rt,e,t,n)}},{key:"Dt",value:function(){this.bt=!1,this.Et=Xp()}},{key:"Ct",value:function(e,t){this.bt=!0,this.Et=this.Et.insert(e,t)}},{key:"xt",value:function(e){this.bt=!0,this.Et=this.Et.remove(e)}},{key:"Nt",value:function(){this.Tt+=1}},{key:"kt",value:function(){this.Tt-=1}},{key:"Ot",value:function(){this.bt=!0,this.Rt=!0}}]),e}(),Gp=function(){function e(t){xt(this,e),this.Mt=t,this.Ft=new Map,this.$t=Op(),this.Bt=$p(),this.Lt=new Oh(rh)}return St(e,[{key:"Ut",value:function(e){var t,n=_t(e.gt);try{for(n.s();!(t=n.n()).done;){var r=t.value;e.yt&&e.yt.isFoundDocument()?this.qt(r,e.yt):this.Kt(r,e.key,e.yt)}}catch(u){n.e(u)}finally{n.f()}var i,a=_t(e.removedTargetIds);try{for(a.s();!(i=a.n()).done;){var o=i.value;this.Kt(o,e.key,e.yt)}}catch(u){a.e(u)}finally{a.f()}}},{key:"Gt",value:function(e){var t=this;this.forEachTarget(e,(function(n){var r=t.Qt(n);switch(e.state){case 0:t.jt(n)&&r.Vt(e.resumeToken);break;case 1:r.kt(),r.Pt||r.Dt(),r.Vt(e.resumeToken);break;case 2:r.kt(),r.Pt||t.removeTarget(n);break;case 3:t.jt(n)&&(r.Ot(),r.Vt(e.resumeToken));break;case 4:t.jt(n)&&(t.Wt(n),r.Vt(e.resumeToken));break;default:qf()}}))}},{key:"forEachTarget",value:function(e,t){var n=this;e.targetIds.length>0?e.targetIds.forEach(t):this.Ft.forEach((function(e,r){n.jt(r)&&t(r)}))}},{key:"zt",value:function(e){var t=e.targetId,n=e.It.count,r=this.Ht(t);if(r){var i=r.target;if(vd(i))if(0===n){var a=new fh(i.path);this.Kt(t,a,ld.newNoDocument(a,oh.min()))}else Bf(1===n);else this.Jt(t)!==n&&(this.Wt(t),this.Lt=this.Lt.add(t))}}},{key:"Yt",value:function(e){var t=this,n=new Map;this.Ft.forEach((function(r,i){var a=t.Ht(i);if(a){if(r.current&&vd(a.target)){var o=new fh(a.target.path);null!==t.$t.get(o)||t.Xt(i,o)||t.Kt(i,o,ld.newNoDocument(o,e))}r.vt&&(n.set(i,r.St()),r.Dt())}}));var r=Up();this.Bt.forEach((function(e,n){var i=!0;
2n.forEachWhile((function(e){var n=t.Ht(e);return!n||2===n.purpose||(i=!1,!1)})),i&&(r=r.add(e))})),this.$t.forEach((function(t,n){return n.setReadTime(e)}));var i=new qp(e,n,this.Lt,this.$t,r);return this.$t=Op(),this.Bt=$p(),this.Lt=new Oh(rh),i}},{key:"qt",value:function(e,t){if(this.jt(e)){var n=this.Xt(e,t.key)?2:0;this.Qt(e).Ct(t.key,n),this.$t=this.$t.insert(t.key,t),this.Bt=this.Bt.insert(t.key,this.Zt(t.key).add(e))}}},{key:"Kt",value:function(e,t,n){if(this.jt(e)){var r=this.Qt(e);this.Xt(e,t)?r.Ct(t,1):r.xt(t),this.Bt=this.Bt.insert(t,this.Zt(t).delete(e)),n&&(this.$t=this.$t.insert(t,n))}}},{key:"removeTarget",value:function(e){this.Ft.delete(e)}},{key:"Jt",value:function(e){var t=this.Qt(e).St();return this.Mt.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size}},{key:"Nt",value:function(e){this.Qt(e).Nt()}},{key:"Qt",value:function(e){var t=this.Ft.get(e);return t||(t=new Qp,this.Ft.set(e,t)),t}},{key:"Zt",value:function(e){var t=this.Bt.get(e);return t||(t=new Oh(rh),this.Bt=this.Bt.insert(e,t)),t}},{key:"jt",value:function(e){var t=null!==this.Ht(e);return t||Ff("WatchChangeAggregator","Detected inactive target",e),t}},{key:"Ht",value:function(e){var t=this.Ft.get(e);return t&&t.Pt?null:this.Mt.te(e)}},{key:"Wt",value:function(e){var t=this;this.Ft.set(e,new Qp),this.Mt.getRemoteKeysForTarget(e).forEach((function(n){t.Kt(e,n,null)}))}},{key:"Xt",value:function(e,t){return this.Mt.getRemoteKeysForTarget(e).has(t)}}]),e}();function $p(){return new Th(fh.comparator)}function Xp(){return new Th(fh.comparator)}var Yp={asc:"ASCENDING",desc:"DESCENDING"},Jp={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},Zp=St((function e(t,n){xt(this,e),this.databaseId=t,this.dt=n}));function ev(e,t){return e.dt?"".concat(new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z",""),".").concat(("000000000"+t.nanoseconds).slice(-9),"Z"):{seconds:""+t.seconds,nanos:t.nanoseconds}}function tv(e,t){return e.dt?t.toBase64():t.toUint8Array()}function nv(e,t){return ev(e,t.toTimestamp())}function rv(e){return Bf(!!e),oh.fromTimestamp(function(e){var t=Lh(e);return new ah(t.seconds,t.nanos)}(e))}function iv(e,t){return function(e){return new sh(["projects",e.projectId,"databases",e.database])}(e).child("documents").child(t).canonicalString()}function av(e){var t=sh.fromString(e);return Bf(Sv(t)),t}function ov(e,t){return iv(e.databaseId,t.path)}function uv(e,t){var n=av(t);if(n.get(1)!==e.databaseId.projectId)throw new Wf(Kf.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+e.databaseId.projectId);if(n.get(3)!==e.databaseId.database)throw new Wf(Kf.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+e.databaseId.database);return new fh(fv(n))}function sv(e,t){return iv(e.databaseId,t)}function cv(e){var t=av(e);return 4===t.length?sh.emptyPath():fv(t)}function lv(e){return new sh(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function fv(e){return Bf(e.length>4&&"documents"===e.get(4)),e.popFirst(5)}function hv(e,t,n){return{name:ov(e,t),fields:n.value.mapValue.fields}}function dv(e,t){var n;if(t instanceof mp)n={update:hv(e,t.key,t.value)};else if(t instanceof xp)n={delete:ov(e,t.key)};else if(t instanceof yp)n={update:hv(e,t.key,t.data),updateMask:Ev(t.fieldMask)};else{if(!(t instanceof Ep))return qf();n={verify:ov(e,t.key)}}return t.fieldTransforms.length>0&&(n.updateTransforms=t.fieldTransforms.map((function(e){return function(e,t){var n=t.transform;if(n instanceof Zd)return{fieldPath:t.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(n instanceof ep)return{fieldPath:t.field.canonicalString(),appendMissingElements:{values:n.elements}};if(n instanceof np)return{fieldPath:t.field.canonicalString(),removeAllFromArray:{values:n.elements}};if(n instanceof ip)return{fieldPath:t.field.canonicalString(),increment:n._t};throw qf()}(0,e)}))),t.precondition.isNone||(n.currentDocument=function(e,t){return void 0!==t.updateTime?{updateTime:nv(e,t.updateTime)}:void 0!==t.exists?{exists:t.exists}:qf()}(e,t.precondition)),n}function pv(e,t){return{documents:[sv(e,t.path)]}}function vv(e,t){var n={structuredQuery:{}},r=t.path;null!==t.collectionGroup?(n.parent=sv(e,r),n.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(n.parent=sv(e,r.popLast()),n.structuredQuery.from=[{collectionId:r.lastSegment()}]);var i=function(e){if(0!==e.length){var t=e.map((function(e){return function(e){if("=="===e.op){if(id(e.value))return{unaryFilter:{field:kv(e.field),op:"IS_NAN"}};if(rd(e.value))return{unaryFilter:{field:kv(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(id(e.value))return{unaryFilter:{field:kv(e.field),op:"IS_NOT_NA
2N"}};if(rd(e.value))return{unaryFilter:{field:kv(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:kv(e.field),op:bv(e.op),value:e.value}}}(e)}));return 1===t.length?t[0]:{compositeFilter:{op:"AND",filters:t}}}}(t.filters);i&&(n.structuredQuery.where=i);var a=function(e){if(0!==e.length)return e.map((function(e){return function(e){return{field:kv(e.field),direction:gv(e.dir)}}(e)}))}(t.orderBy);a&&(n.structuredQuery.orderBy=a);var o,u=function(e,t){return e.dt||Bh(t)?t:{value:t}}(e,t.limit);return null!==u&&(n.structuredQuery.limit=u),t.startAt&&(n.structuredQuery.startAt={before:(o=t.startAt).inclusive,values:o.position}),t.endAt&&(n.structuredQuery.endAt=function(e){return{before:!e.inclusive,values:e.position}}(t.endAt)),n}function mv(e){var t=cv(e.parent),n=e.structuredQuery,r=n.from?n.from.length:0,i=null;if(r>0){Bf(1===r);var a=n.from[0];a.allDescendants?i=a.collectionId:t=t.child(a.collectionId)}var o=[];n.where&&(o=yv(n.where));var u=[];n.orderBy&&(u=n.orderBy.map((function(e){return function(e){return new Id(wv(e.field),function(e){switch(e){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(e.direction))}(e)})));var s=null;n.limit&&(s=function(e){var t;return Bh(t="object"==typeof e?e.value:e)?null:t}(n.limit));var c=null;n.startAt&&(c=function(e){var t=!!e.before,n=e.values||[];return new Sd(n,t)}(n.startAt));var l=null;return n.endAt&&(l=function(e){var t=!e.before,n=e.values||[];return new Sd(n,t)}(n.endAt)),Ad(t,i,u,o,s,"F",c,l)}function yv(e){return e?void 0!==e.unaryFilter?[xv(e)]:void 0!==e.fieldFilter?[_v(e)]:void 0!==e.compositeFilter?e.compositeFilter.filters.map((function(e){return yv(e)})).reduce((function(e,t){return e.concat(t)})):qf():[]}function gv(e){return Yp[e]}function bv(e){return Jp[e]}function kv(e){return{fieldPath:e.canonicalString()}}function wv(e){return lh.fromServerFormat(e.fieldPath)}function _v(e){return md.create(wv(e.fieldFilter.field),function(e){switch(e){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return qf()}}(e.fieldFilter.op),e.fieldFilter.value)}function xv(e){switch(e.unaryFilter.op){case"IS_NAN":var t=wv(e.unaryFilter.field);return md.create(t,"==",{doubleValue:NaN});case"IS_NULL":var n=wv(e.unaryFilter.field);return md.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":var r=wv(e.unaryFilter.field);return md.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":var i=wv(e.unaryFilter.field);return md.create(i,"!=",{nullValue:"NULL_VALUE"});default:return qf()}}function Ev(e){var t=[];return e.fields.forEach((function(e){return t.push(e.canonicalString())})),{fieldPaths:t}}function Sv(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)}var Iv=["mutationQueues","mutations","documentMutations","remoteDocuments","targets","owner","targetGlobal","targetDocuments"].concat(["clientMetadata"]).concat(["remoteDocumentGlobal"]).concat(["collectionParents"]).concat(["bundles","namedQueries"]),Tv=([].concat(wt(Iv),["documentOverlays"]),["mutationQueues","mutations","documentMutations","remoteDocumentsV14","targets","owner","targetGlobal","targetDocuments","clientMetadata","remoteDocumentGlobal","collectionParents","bundles","namedQueries","documentOverlays"]),Cv=Tv;[].concat(Cv,["indexConfiguration","indexState","indexEntries"]);var Nv=function(){function e(t,n,r,i){xt(this,e),this.batchId=t,this.localWriteTime=n,this.baseMutations=r,this.mutations=i}return St(e,[{key:"applyToRemoteDocument",value:function(e,t){for(var n=t.mutationResults,r=0;r<this.mutations.length;r++){var i=this.mutations[r];i.key.isEqual(e.key)&&hp(i,e,n[r])}}},{key:"applyToLocalView",value:function(e,t){var n,r=_t(this.baseMutations);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.key.isEqual(e.key)&&(t=dp(i,e,t,this.localWriteTime))}}catch(s){r.e(s)}finally{r.f()}var a,o=_t(this.mutations);try{for(o.s();!(a=o.n()).done;){var u=a.value;
2u.key.isEqual(e.key)&&(t=dp(u,e,t,this.localWriteTime))}}catch(s){o.e(s)}finally{o.f()}return t}},{key:"applyToLocalDocumentSet",value:function(e,t){var n=this,r=Lp();return this.mutations.forEach((function(i){var a=e.get(i.key),o=a.overlayedDocument,u=n.applyToLocalView(o,a.mutatedFields),s=fp(o,u=t.has(i.key)?null:u);null!==s&&r.set(i.key,s),o.isValidDocument()||o.convertToNoDocument(oh.min())})),r}},{key:"keys",value:function(){return this.mutations.reduce((function(e,t){return e.add(t.key)}),Up())}},{key:"isEqual",value:function(e){return this.batchId===e.batchId&&ih(this.mutations,e.mutations,(function(e,t){return vp(e,t)}))&&ih(this.baseMutations,e.baseMutations,(function(e,t){return vp(e,t)}))}}]),e}(),Ov=function(){function e(t,n,r,i){xt(this,e),this.batch=t,this.commitVersion=n,this.mutationResults=r,this.docVersions=i}return St(e,null,[{key:"from",value:function(t,n,r){Bf(t.mutations.length===r.length);for(var i=Mp,a=t.mutations,o=0;o<a.length;o++)i=i.insert(a[o].key,r[o].version);return new e(t,n,r,i)}}]),e}(),Av=function(){function e(t,n){xt(this,e),this.largestBatchId=t,this.mutation=n}return St(e,[{key:"getKey",value:function(){return this.mutation.key}},{key:"isEqual",value:function(e){return null!==e&&this.mutation===e.mutation}},{key:"toString",value:function(){return"Overlay{\n largestBatchId: ".concat(this.largestBatchId,",\n mutation: ").concat(this.mutation.toString(),"\n }")}}]),e}(),Pv=function(){function e(t,n,r,i){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:oh.min(),o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:oh.min(),u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:Rh.EMPTY_BYTE_STRING;xt(this,e),this.target=t,this.targetId=n,this.purpose=r,this.sequenceNumber=i,this.snapshotVersion=a,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=u}return St(e,[{key:"withSequenceNumber",value:function(t){return new e(this.target,this.targetId,this.purpose,t,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken)}},{key:"withResumeToken",value:function(t,n){return new e(this.target,this.targetId,this.purpose,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,t)}},{key:"withLastLimboFreeSnapshotVersion",value:function(t){return new e(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,t,this.resumeToken)}}]),e}(),Rv=St((function e(t){xt(this,e),this.ne=t}));function Dv(e){var t=mv({parent:e.parent,structuredQuery:e.structuredQuery});return"LAST"===e.limitType?Fd(t,t.limit,"L"):t}var Lv=function(){function e(){xt(this,e)}return St(e,[{key:"re",value:function(e,t){this.oe(e,t),t.ue()}},{key:"oe",value:function(e,t){if("nullValue"in e)this.ce(t,5);else if("booleanValue"in e)this.ce(t,10),t.ae(e.booleanValue?1:0);else if("integerValue"in e)this.ce(t,15),t.ae(jh(e.integerValue));else if("doubleValue"in e){var n=jh(e.doubleValue);isNaN(n)?this.ce(t,13):(this.ce(t,15),Hh(n)?t.ae(0):t.ae(n))}else if("timestampValue"in e){var r=e.timestampValue;this.ce(t,20),"string"==typeof r?t.he(r):(t.he("".concat(r.seconds||"")),t.ae(r.nanos||0))}else if("stringValue"in e)this.le(e.stringValue,t),this.fe(t);else if("bytesValue"in e)this.ce(t,30),t.de(Mh(e.bytesValue)),this.fe(t);else if("referenceValue"in e)this._e(e.referenceValue,t);else if("geoPointValue"in e){var i=e.geoPointValue;this.ce(t,45),t.ae(i.latitude||0),t.ae(i.longitude||0)}else"mapValue"in e?ud(e)?this.ce(t,Number.MAX_SAFE_INTEGER):(this.we(e.mapValue,t),this.fe(t)):"arrayValue"in e?(this.me(e.arrayValue,t),this.fe(t)):qf()}},{key:"le",value:function(e,t){this.ce(t,25),this.ge(e,t)}},{key:"ge",value:function(e,t){t.he(e)}},{key:"we",value:function(e,t){var n=e.fields||{};this.ce(t,55);for(var r=0,i=Object.keys(n);r<i.length;r++){var a=i[r];this.le(a,t),this.oe(n[a],t)}}},{key:"me",value:function(e,t){var n=e.values||[];this.ce(t,50);var r,i=_t(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;this.oe(a,t)}}catch(o){i.e(o)}finally{i.f()}}},{key:"_e",value:function(e,t){var n=this;this.ce(t,37),fh.fromName(e).path.forEach((function(e){n.ce(t,60),n.ge(e,t)}))}},{key:"ce",value:function(e,t){e.ae(t)}},{key:"fe",value:function(e){e.ae(2)}}]),e}();Lv.ye=new Lv;var jv=function(){function e(){xt(this,e),this.ze=new Mv}return St(e,[{key:"addToCollectionParentIndex",value:function(e,t){return this.ze.add(t),wh.resolve()}},{key:"getCollectionParents",value:function(e,t){return wh.resolve(this.ze.getEntries(t))}},{key:"addFieldIndex",value:function(e,t){return wh.resolve()}},{key:"deleteFieldIndex",value:function(e,t){return wh.resolve()}},{key:"getDocumentsMatchingTarget",value:function(e,t){return wh.resolve(null)}},{key:"getIndexType",value:function(e,t){return wh.resolve(0)}},{key:"getFieldIndexes",value:function(e,t){return wh.resolve([])}},{key:"getNextCollectionGroupToUpdate",value:function(e){return wh.resolve(null)}},{key:"getMinOffset",value:function(e,t){return wh.resolve(vh.min())}},{key:"getMinOffsetFromCollectionGroup",value:function(e,t){return wh.resolve(vh.min())}},{key:"updateCollectionGroup",value:function(e,t,n){return wh.resolve()}},{key:"updateIndexEntries",value:function(e,t){return wh.resolve()}}]),e}(),Mv=function(){function e(){xt(this,e),this.index={}}return St(e,[{key:"add",value:function(e){var t=e.lastSegment(),n=e.popLast(),r=this.index[t]||new Oh(sh.comparator),i=!r.has(n);return this.index[t]=r.add(n),i}},{key:"has",value:function(e){var t=e.lastSegment(),n=e.popLast(),r=this.index[t];return r&&r.has(n)}},{key:"getEntries",value:function(e){return(this.index[e]||new Oh(sh.comparator)).toArray()}}]),e}();new Uint8Array(0);var Fv=function(){function e(t,n,r){xt(this,e),this.cacheSizeCollectionThreshold=t,this.percentileToCollect=n,this.maximumSequenceNumbersToCollect=r}return St(e,null,[{key:"withCacheSize",value:function(t){return new e(t,e.DEFAULT_COLLECTION_PE
2RCENTILE,e.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}}]),e}();Fv.DEFAULT_COLLECTION_PERCENTILE=10,Fv.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,Fv.DEFAULT=new Fv(41943040,Fv.DEFAULT_COLLECTION_PERCENTILE,Fv.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),Fv.DISABLED=new Fv(-1,0,0);var Uv=function(){function e(t){xt(this,e),this.En=t}return St(e,[{key:"next",value:function(){return this.En+=2,this.En}}],[{key:"An",value:function(){return new e(0)}},{key:"Rn",value:function(){return new e(-1)}}]),e}();var Vv=function(){function e(){xt(this,e),this.changes=new Cp((function(e){return e.toString()}),(function(e,t){return e.isEqual(t)})),this.changesApplied=!1}return St(e,[{key:"addEntry",value:function(e){this.assertNotApplied(),this.changes.set(e.key,e)}},{key:"removeEntry",value:function(e,t){this.assertNotApplied(),this.changes.set(e,ld.newInvalidDocument(e).setReadTime(t))}},{key:"getEntry",value:function(e,t){this.assertNotApplied();var n=this.changes.get(t);return void 0!==n?wh.resolve(n):this.getFromCache(e,t)}},{key:"getEntries",value:function(e,t){return this.getAllFromCache(e,t)}},{key:"apply",value:function(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}},{key:"assertNotApplied",value:function(){}}]),e}();var zv=St((function e(t,n){xt(this,e),this.overlayedDocument=t,this.mutatedFields=n})),qv=function(){function e(t,n,r,i){xt(this,e),this.remoteDocumentCache=t,this.mutationQueue=n,this.documentOverlayCache=r,this.indexManager=i}return St(e,[{key:"getDocument",value:function(e,t){var n=this,r=null;return this.documentOverlayCache.getOverlay(e,t).next((function(i){return r=i,n.getBaseDocument(e,t,r)})).next((function(e){return null!==r&&dp(r.mutation,e,Ph.empty(),ah.now()),e}))}},{key:"getDocuments",value:function(e,t){var n=this;return this.remoteDocumentCache.getEntries(e,t).next((function(t){return n.getLocalViewOfDocuments(e,t,Up()).next((function(){return t}))}))}},{key:"getLocalViewOfDocuments",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Up(),i=Dp();return this.populateOverlays(e,i,t).next((function(){return n.computeViews(e,t,i,r).next((function(e){var t=Pp();return e.forEach((function(e,n){t=t.insert(e,n.overlayedDocument)})),t}))}))}},{key:"getOverlayedDocuments",value:function(e,t){var n=this,r=Dp();return this.populateOverlays(e,r,t).next((function(){return n.computeViews(e,t,r,Up())}))}},{key:"populateOverlays",value:function(e,t,n){var r=[];return n.forEach((function(e){t.has(e)||r.push(e)})),this.documentOverlayCache.getOverlays(e,r).next((function(e){e.forEach((function(e,n){t.set(e,n)}))}))}},{key:"computeViews",value:function(e,t,n,r){var i=Op(),a=jp(),o=jp();return t.forEach((function(e,t){var o=n.get(t.key);r.has(t.key)&&(void 0===o||o.mutation instanceof yp)?i=i.insert(t.key,t):void 0!==o&&(a.set(t.key,o.mutation.getFieldMask()),dp(o.mutation,t,o.mutation.getFieldMask(),ah.now()))})),this.recalculateAndSaveOverlays(e,i).next((function(e){return e.forEach((function(e,t){return a.set(e,t)})),t.forEach((function(e,t){var n;return o.set(e,new zv(t,null!==(n=a.get(e))&&void 0!==n?n:null))})),o}))}},{key:"recalculateAndSaveOverlays",value:function(e,t){var n=this,r=jp(),i=new Th((function(e,t){return e-t})),a=Up();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,t).next((function(e){var n,a=_t(e);try{var o=function(){var e=n.value;e.keys().forEach((function(n){var a=t.get(n);if(null!==a){var o=r.get(n)||Ph.empty();o=e.applyToLocalView(a,o),r.set(n,o);var u=(i.get(e.batchId)||Up()).add(n);i=i.insert(e.batchId,u)}}))};for(a.s();!(n=a.n()).done;)o()}catch(u){a.e(u)}finally{a.f()}})).next((function(){for(var o=[],u=i.getReverseIterator(),s=function(){var i=u.getNext(),s=i.key,c=i.value,l=Lp();c.forEach((function(e){if(!a.has(e)){var n=fp(t.get(e),r.get(e));null!==n&&l.set(e,n),a=a.add(e)}})),o.push(n.documentOverlayCache.saveOverlays(e,s,l))};u.hasNext();)s();return wh.waitFor(o)})).next((function(){return r}))}},{key:"recalculateAndSaveOverlaysForDocumentKeys",value:function(e,t){var n=this;return this.remoteDocumentCache.getEntries(e,t).next((function(t){return n.recalculateAndSaveOverlays(e,t)}))}},{key:"getDocumentsMatchingQuery",value:function(e,t,n){return function(e){return fh.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}(t)?this.getDocumentsMatchingDocumentQuery(e,t.path):Ld(t)?this.getDocumentsMatchingCollectionGroupQuery(e,t,n):this.getDocumentsMatchingCollectionQuery(e,t,n)}},{key:"getNextDocuments",value:function(e,t,n,r){var i=this;return this.remoteDocumentCache.getAllFromCollectionGroup(e,t,n,r).next((function(a){var o=r-a.size>0?i.documentOverlayCache.getOverlaysForCollectionGroup(e,t,n.largestBatchId,r-a.size):wh.resolve(Dp()),u=-1,s=a;
2return o.next((function(t){return wh.forEach(t,(function(t,n){return u<n.largestBatchId&&(u=n.largestBatchId),a.get(t)?wh.resolve():i.getBaseDocument(e,t,n).next((function(e){s=s.insert(t,e)}))})).next((function(){return i.populateOverlays(e,t,a)})).next((function(){return i.computeViews(e,s,t,Up())})).next((function(e){return{batchId:u,changes:Rp(e)}}))}))}))}},{key:"getDocumentsMatchingDocumentQuery",value:function(e,t){return this.getDocument(e,new fh(t)).next((function(e){var t=Pp();return e.isFoundDocument()&&(t=t.insert(e.key,e)),t}))}},{key:"getDocumentsMatchingCollectionGroupQuery",value:function(e,t,n){var r=this,i=t.collectionGroup,a=Pp();return this.indexManager.getCollectionParents(e,i).next((function(o){return wh.forEach(o,(function(o){var u=function(e,t){return new Od(t,null,e.explicitOrderBy.slice(),e.filters.slice(),e.limit,e.limitType,e.startAt,e.endAt)}(t,o.child(i));return r.getDocumentsMatchingCollectionQuery(e,u,n).next((function(e){e.forEach((function(e,t){a=a.insert(e,t)}))}))})).next((function(){return a}))}))}},{key:"getDocumentsMatchingCollectionQuery",value:function(e,t,n){var r,i=this;return this.remoteDocumentCache.getAllFromCollection(e,t.path,n).next((function(a){return r=a,i.documentOverlayCache.getOverlaysForCollection(e,t.path,n.largestBatchId)})).next((function(e){e.forEach((function(e,t){var n=t.getKey();null===r.get(n)&&(r=r.insert(n,ld.newInvalidDocument(n)))}));var n=Pp();return r.forEach((function(r,i){var a=e.get(r);void 0!==a&&dp(a.mutation,i,Ph.empty(),ah.now()),qd(t,i)&&(n=n.insert(r,i))})),n}))}},{key:"getBaseDocument",value:function(e,t,n){return null===n||1===n.mutation.type?this.remoteDocumentCache.getEntry(e,t):wh.resolve(ld.newInvalidDocument(t))}}]),e}(),Bv=function(){function e(t){xt(this,e),this.wt=t,this.Jn=new Map,this.Yn=new Map}return St(e,[{key:"getBundleMetadata",value:function(e,t){return wh.resolve(this.Jn.get(t))}},{key:"saveBundleMetadata",value:function(e,t){var n;return this.Jn.set(t.id,{id:(n=t).id,version:n.version,createTime:rv(n.createTime)}),wh.resolve()}},{key:"getNamedQuery",value:function(e,t){return wh.resolve(this.Yn.get(t))}},{key:"saveNamedQuery",value:function(e,t){return this.Yn.set(t.name,function(e){return{name:e.name,query:Dv(e.bundledQuery),readTime:rv(e.readTime)}}(t)),wh.resolve()}}]),e}(),Hv=function(){function e(){xt(this,e),this.overlays=new Th(fh.comparator),this.Xn=new Map}return St(e,[{key:"getOverlay",value:function(e,t){return wh.resolve(this.overlays.get(t))}},{key:"getOverlays",value:function(e,t){var n=this,r=Dp();return wh.forEach(t,(function(t){return n.getOverlay(e,t).next((function(e){null!==e&&r.set(t,e)}))})).next((function(){return r}))}},{key:"saveOverlays",value:function(e,t,n){var r=this;return n.forEach((function(n,i){r.ie(e,t,i)})),wh.resolve()}},{key:"removeOverlaysForBatchId",value:function(e,t,n){var r=this,i=this.Xn.get(n);return void 0!==i&&(i.forEach((function(e){return r.overlays=r.overlays.remove(e)})),this.Xn.delete(n)),wh.resolve()}},{key:"getOverlaysForCollection",value:function(e,t,n){for(var r=Dp(),i=t.length+1,a=new fh(t.child("")),o=this.overlays.getIteratorFrom(a);o.hasNext();){var u=o.getNext().value,s=u.getKey();if(!t.isPrefixOf(s.path))break;s.path.length===i&&u.largestBatchId>n&&r.set(u.getKey(),u)}return wh.resolve(r)}},{key:"getOverlaysForCollectionGroup",value:function(e,t,n,r){for(var i=new Th((function(e,t){return e-t})),a=this.overlays.getIterator();a.hasNext();){var o=a.getNext().value;if(o.getKey().getCollectionGroup()===t&&o.largestBatchId>n){var u=i.get(o.largestBatchId);null===u&&(u=Dp(),i=i.insert(o.largestBatchId,u)),u.set(o.getKey(),o)}}for(var s=Dp(),c=i.getIterator();c.hasNext()&&(c.getNext().value.forEach((function(e,t){return s.set(e,t)})),!(s.size()>=r)););return wh.resolve(s)}},{key:"ie",value:function(e,t,n){var r=this.overlays.get(n.key);if(null!==r){var i=this.Xn.get(r.largestBatchId).delete(n.key);this.Xn.set(r.largestBatchId,i)}this.overlays=this.overlays.insert(n.key,new Av(t,n));var a=this.Xn.get(t);void 0===a&&(a=Up(),this.Xn.set(t,a)),this.Xn.set(t,a.add(n.key))}}]),e}(),Kv=function(){function e(){xt(this,e),this.Zn=new Oh(Wv.ts),this.es=new Oh(Wv.ns)}return St(e,[{key:"isEmpty",value:function(){return this.Zn.isEmpty()}},{key:"addReference",value:function(e,t){var n=new Wv(e,t);this.Zn=this.Zn.add(n),this.es=this.es.add(n)}},{key:"ss",value:function(e,t){var n=this;e.forEach((function(e){return n.addReference(e,t)}))}},{key:"removeReference",value:function(e,t){this.rs(new Wv(e,t))}},{key:"os",value:function(e,t){var n=this;e.forEach((function(e){return n.removeReference(e,t)}))}},{key:"us",value:function(e){var t=this,n=new fh(new sh([])),r=new Wv(n,e),i=new Wv(n,e+1),a=[];
2return this.es.forEachInRange([r,i],(function(e){t.rs(e),a.push(e.key)})),a}},{key:"cs",value:function(){var e=this;this.Zn.forEach((function(t){return e.rs(t)}))}},{key:"rs",value:function(e){this.Zn=this.Zn.delete(e),this.es=this.es.delete(e)}},{key:"hs",value:function(e){var t=new fh(new sh([])),n=new Wv(t,e),r=new Wv(t,e+1),i=Up();return this.es.forEachInRange([n,r],(function(e){i=i.add(e.key)})),i}},{key:"containsKey",value:function(e){var t=new Wv(e,0),n=this.Zn.firstAfterOrEqual(t);return null!==n&&e.isEqual(n.key)}}]),e}(),Wv=function(){function e(t,n){xt(this,e),this.key=t,this.ls=n}return St(e,null,[{key:"ts",value:function(e,t){return fh.comparator(e.key,t.key)||rh(e.ls,t.ls)}},{key:"ns",value:function(e,t){return rh(e.ls,t.ls)||fh.comparator(e.key,t.key)}}]),e}(),Qv=function(){function e(t,n){xt(this,e),this.indexManager=t,this.referenceDelegate=n,this.mutationQueue=[],this.fs=1,this.ds=new Oh(Wv.ts)}return St(e,[{key:"checkEmpty",value:function(e){return wh.resolve(0===this.mutationQueue.length)}},{key:"addMutationBatch",value:function(e,t,n,r){var i=this.fs;this.fs++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];var a=new Nv(i,t,n,r);this.mutationQueue.push(a);var o,u=_t(r);try{for(u.s();!(o=u.n()).done;){var s=o.value;this.ds=this.ds.add(new Wv(s.key,i)),this.indexManager.addToCollectionParentIndex(e,s.key.path.popLast())}}catch(c){u.e(c)}finally{u.f()}return wh.resolve(a)}},{key:"lookupMutationBatch",value:function(e,t){return wh.resolve(this._s(t))}},{key:"getNextMutationBatchAfterBatchId",value:function(e,t){var n=t+1,r=this.ws(n),i=r<0?0:r;return wh.resolve(this.mutationQueue.length>i?this.mutationQueue[i]:null)}},{key:"getHighestUnacknowledgedBatchId",value:function(){return wh.resolve(0===this.mutationQueue.length?-1:this.fs-1)}},{key:"getAllMutationBatches",value:function(e){return wh.resolve(this.mutationQueue.slice())}},{key:"getAllMutationBatchesAffectingDocumentKey",value:function(e,t){var n=this,r=new Wv(t,0),i=new Wv(t,Number.POSITIVE_INFINITY),a=[];return this.ds.forEachInRange([r,i],(function(e){var t=n._s(e.ls);a.push(t)})),wh.resolve(a)}},{key:"getAllMutationBatchesAffectingDocumentKeys",value:function(e,t){var n=this,r=new Oh(rh);return t.forEach((function(e){var t=new Wv(e,0),i=new Wv(e,Number.POSITIVE_INFINITY);n.ds.forEachInRange([t,i],(function(e){r=r.add(e.ls)}))})),wh.resolve(this.gs(r))}},{key:"getAllMutationBatchesAffectingQuery",value:function(e,t){var n=t.path,r=n.length+1,i=n;fh.isDocumentKey(i)||(i=i.child(""));var a=new Wv(new fh(i),0),o=new Oh(rh);return this.ds.forEachWhile((function(e){var t=e.key.path;return!!n.isPrefixOf(t)&&(t.length===r&&(o=o.add(e.ls)),!0)}),a),wh.resolve(this.gs(o))}},{key:"gs",value:function(e){var t=this,n=[];return e.forEach((function(e){var r=t._s(e);null!==r&&n.push(r)})),n}},{key:"removeMutationBatch",value:function(e,t){var n=this;Bf(0===this.ys(t.batchId,"removed")),this.mutationQueue.shift();var r=this.ds;return wh.forEach(t.mutations,(function(i){var a=new Wv(i.key,t.batchId);return r=r.delete(a),n.referenceDelegate.markPotentiallyOrphaned(e,i.key)})).next((function(){n.ds=r}))}},{key:"In",value:function(e){}},{key:"containsKey",value:function(e,t){var n=new Wv(t,0),r=this.ds.firstAfterOrEqual(n);return wh.resolve(t.isEqual(r&&r.key))}},{key:"performConsistencyCheck",value:function(e){return this.mutationQueue.length,wh.resolve()}},{key:"ys",value:function(e,t){return this.ws(e)}},{key:"ws",value:function(e){return 0===this.mutationQueue.length?0:e-this.mutationQueue[0].batchId}},{key:"_s",value:function(e){var t=this.ws(e);return t<0||t>=this.mutationQueue.length?null:this.mutationQueue[t]}}]),e}(),Gv=function(){function e(t){xt(this,e),this.ps=t,this.docs=new Th(fh.comparator),this.size=0}return St(e,[{key:"setIndexManager",value:function(e){this.indexManager=e}},{key:"addEntry",value:function(e,t){var n=t.key,r=this.docs.get(n),i=r?r.size:0,a=this.ps(t);return this.docs=this.docs.insert(n,{document:t.mutableCopy(),size:a}),this.size+=a-i,this.indexManager.addToCollectionParentIndex(e,n.path.popLast())}},{key:"removeEntry",value:function(e){var t=this.docs.get(e);t&&(this.docs=this.docs.remove(e),this.size-=t.size)}},{key:"getEntry",value:function(e,t){var n=this.docs.get(t);return wh.resolve(n?n.document.mutableCopy():ld.newInvalidDocument(t))}},{key:"getEntries",value:function(e,t){var n=this,r=Op();return t.forEach((function(e){var t=n.docs.get(e);r=r.insert(e,t?t.document.mutableCopy():ld.newInvalidDocument(e))})),wh.resolve(r)}},{key:"getAllFromCollection",value:function(e,t,n){for(var r=Op(),i=new fh(t.child("")),a=this.docs.getIteratorFrom(i);a.hasNext();){var o=a.getNext(),u=o.key,s=o.value.document;if(!t.isPrefixOf(u.path))break;u.path.length>t.length+1||mh(ph(s),n)<=0||(r=r.insert(s.key,s.mutableCopy()))}return wh.resolve(r)}},{key:"getAllFromCollectionGroup",value:function(e,t,n,r){qf()}}
2,{key:"Is",value:function(e,t){return wh.forEach(this.docs,(function(e){return t(e)}))}},{key:"newChangeBuffer",value:function(e){return new $v(this)}},{key:"getSize",value:function(e){return wh.resolve(this.size)}}]),e}(),$v=function(e){Ct(n,e);var t=Pt(n);function n(e){var r;return xt(this,n),(r=t.call(this)).zn=e,r}return St(n,[{key:"applyChanges",value:function(e){var t=this,n=[];return this.changes.forEach((function(r,i){i.isValidDocument()?n.push(t.zn.addEntry(e,i)):t.zn.removeEntry(r)})),wh.waitFor(n)}},{key:"getFromCache",value:function(e,t){return this.zn.getEntry(e,t)}},{key:"getAllFromCache",value:function(e,t){return this.zn.getEntries(e,t)}}]),n}(Vv),Xv=function(){function e(t){xt(this,e),this.persistence=t,this.Ts=new Cp((function(e){return dd(e)}),pd),this.lastRemoteSnapshotVersion=oh.min(),this.highestTargetId=0,this.Es=0,this.As=new Kv,this.targetCount=0,this.Rs=Uv.An()}return St(e,[{key:"forEachTarget",value:function(e,t){return this.Ts.forEach((function(e,n){return t(n)})),wh.resolve()}},{key:"getLastRemoteSnapshotVersion",value:function(e){return wh.resolve(this.lastRemoteSnapshotVersion)}},{key:"getHighestSequenceNumber",value:function(e){return wh.resolve(this.Es)}},{key:"allocateTargetId",value:function(e){return this.highestTargetId=this.Rs.next(),wh.resolve(this.highestTargetId)}},{key:"setTargetsMetadata",value:function(e,t,n){return n&&(this.lastRemoteSnapshotVersion=n),t>this.Es&&(this.Es=t),wh.resolve()}},{key:"vn",value:function(e){this.Ts.set(e.target,e);var t=e.targetId;t>this.highestTargetId&&(this.Rs=new Uv(t),this.highestTargetId=t),e.sequenceNumber>this.Es&&(this.Es=e.sequenceNumber)}},{key:"addTargetData",value:function(e,t){return this.vn(t),this.targetCount+=1,wh.resolve()}},{key:"updateTargetData",value:function(e,t){return this.vn(t),wh.resolve()}},{key:"removeTargetData",value:function(e,t){return this.Ts.delete(t.target),this.As.us(t.targetId),this.targetCount-=1,wh.resolve()}},{key:"removeTargets",value:function(e,t,n){var r=this,i=0,a=[];return this.Ts.forEach((function(o,u){u.sequenceNumber<=t&&null===n.get(u.targetId)&&(r.Ts.delete(o),a.push(r.removeMatchingKeysForTargetId(e,u.targetId)),i++)})),wh.waitFor(a).next((function(){return i}))}},{key:"getTargetCount",value:function(e){return wh.resolve(this.targetCount)}},{key:"getTargetData",value:function(e,t){var n=this.Ts.get(t)||null;return wh.resolve(n)}},{key:"addMatchingKeys",value:function(e,t,n){return this.As.ss(t,n),wh.resolve()}},{key:"removeMatchingKeys",value:function(e,t,n){this.As.os(t,n);var r=this.persistence.referenceDelegate,i=[];return r&&t.forEach((function(t){i.push(r.markPotentiallyOrphaned(e,t))})),wh.waitFor(i)}},{key:"removeMatchingKeysForTargetId",value:function(e,t){return this.As.us(t),wh.resolve()}},{key:"getMatchingKeysForTargetId",value:function(e,t){var n=this.As.hs(t);return wh.resolve(n)}},{key:"containsKey",value:function(e,t){return wh.resolve(this.As.containsKey(t))}}]),e}(),Yv=function(){function e(t,n){var r=this;xt(this,e),this.bs={},this.overlays={},this.Ps=new xh(0),this.vs=!1,this.vs=!0,this.referenceDelegate=t(this),this.Vs=new Xv(this),this.indexManager=new jv,this.remoteDocumentCache=new Gv((function(e){return r.referenceDelegate.Ss(e)})),this.wt=new Rv(n),this.Ds=new Bv(this.wt)}return St(e,[{key:"start",value:function(){return Promise.resolve()}},{key:"shutdown",value:function(){return this.vs=!1,Promise.resolve()}},{key:"started",get:function(){return this.vs}},{key:"setDatabaseDeletedListener",value:function(){}},{key:"setNetworkEnabled",value:function(){}},{key:"getIndexManager",value:function(e){return this.indexManager}},{key:"getDocumentOverlayCache",value:function(e){var t=this.overlays[e.toKey()];return t||(t=new Hv,this.overlays[e.toKey()]=t),t}},{key:"getMutationQueue",value:function(e,t){var n=this.bs[e.toKey()];return n||(n=new Qv(t,this.referenceDelegate),this.bs[e.toKey()]=n),n}},{key:"getTargetCache",value:function(){return this.Vs}},{key:"getRemoteDocumentCache",value:function(){return this.remoteDocumentCache}},{key:"getBundleCache",value:function(){return this.Ds}},{key:"runTransaction",value:function(e,t,n){var r=this;Ff("MemoryPersistence","Starting transaction:",e);var i=new Jv(this.Ps.next());return this.referenceDelegate.Cs(),n(i).next((function(e){return r.referenceDelegate.xs(i).next((function(){return e}))})).toPromise().then((function(e){return i.raiseOnCommittedEvent(),e}))}},{key:"Ns",value:function(e,t){return wh.or(Object.values(this.bs).map((function(n){return function(){return n.containsKey(e,t)}})))}}]),e}(),Jv=function(e){Ct(n,e);var t=Pt(n);function n(e){var r;return xt(this,n),(r=t.call(this)).currentSequenceNumber=e,r}return St(n)}(gh),Zv=function(){function e(t){xt(this,e),this.persistence=t,this.ks=new Kv,this.Os=null}return St(e,[{key:"Fs",get:function(){if(this.Os)return this.Os;throw qf()}},{key:"addReference",value:function(e,t,n){return this.ks.addReference(n,t),this.Fs.delete(n.toString()),wh.resolve()}},{key:"removeReference",value:function(e,t,n){return this.ks.removeReference(n,t),this.Fs.add(n.toString()),wh.resolve()}},{key:"markPotentiallyOrphaned",value:function(e,t){return this.Fs.add(t.toString()),wh.resolve()}},{key:"removeTarget",value:function(e,t){var n=this;
2this.ks.us(t.targetId).forEach((function(e){return n.Fs.add(e.toString())}));var r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(e,t.targetId).next((function(e){e.forEach((function(e){return n.Fs.add(e.toString())}))})).next((function(){return r.removeTargetData(e,t)}))}},{key:"Cs",value:function(){this.Os=new Set}},{key:"xs",value:function(e){var t=this,n=this.persistence.getRemoteDocumentCache().newChangeBuffer();return wh.forEach(this.Fs,(function(r){var i=fh.fromPath(r);return t.$s(e,i).next((function(e){e||n.removeEntry(i,oh.min())}))})).next((function(){return t.Os=null,n.apply(e)}))}},{key:"updateLimboDocument",value:function(e,t){var n=this;return this.$s(e,t).next((function(e){e?n.Fs.delete(t.toString()):n.Fs.add(t.toString())}))}},{key:"Ss",value:function(e){return 0}},{key:"$s",value:function(e,t){var n=this;return wh.or([function(){return wh.resolve(n.ks.containsKey(t))},function(){return n.persistence.getTargetCache().containsKey(e,t)},function(){return n.persistence.Ns(e,t)}])}}],[{key:"Ms",value:function(t){return new e(t)}}]),e}();var em=function(){function e(t,n,r,i){xt(this,e),this.targetId=t,this.fromCache=n,this.Pi=r,this.vi=i}return St(e,null,[{key:"Vi",value:function(t,n){var r,i=Up(),a=Up(),o=_t(n.docChanges);try{for(o.s();!(r=o.n()).done;){var u=r.value;switch(u.type){case 0:i=i.add(u.doc.key);break;case 1:a=a.add(u.doc.key)}}}catch(s){o.e(s)}finally{o.f()}return new e(t,n.fromCache,i,a)}}]),e}(),tm=function(){function e(){xt(this,e),this.Si=!1}return St(e,[{key:"initialize",value:function(e,t){this.Di=e,this.indexManager=t,this.Si=!0}},{key:"getDocumentsMatchingQuery",value:function(e,t,n,r){var i=this;return this.Ci(e,t).next((function(a){return a||i.xi(e,t,r,n)})).next((function(n){return n||i.Ni(e,t)}))}},{key:"Ci",value:function(e,t){return wh.resolve(null)}},{key:"xi",value:function(e,t,n,r){var i=this;return function(e){return 0===e.filters.length&&null===e.limit&&null==e.startAt&&null==e.endAt&&(0===e.explicitOrderBy.length||1===e.explicitOrderBy.length&&e.explicitOrderBy[0].field.isKeyField())}(t)||r.isEqual(oh.min())?this.Ni(e,t):this.Di.getDocuments(e,n).next((function(a){var o=i.ki(t,a);return i.Oi(t,o,n,r)?i.Ni(e,t):(Mf()<=sn.DEBUG&&Ff("QueryEngine","Re-using previous result from %s to execute query: %s",r.toString(),zd(t)),i.Mi(e,o,t,dh(r,-1)))}))}},{key:"ki",value:function(e,t){var n=new Oh(Hd(e));return t.forEach((function(t,r){qd(e,r)&&(n=n.add(r))})),n}},{key:"Oi",value:function(e,t,n,r){if(null===e.limit)return!1;if(n.size!==t.size)return!0;var i="F"===e.limitType?t.last():t.first();return!!i&&(i.hasPendingWrites||i.version.compareTo(r)>0)}},{key:"Ni",value:function(e,t){return Mf()<=sn.DEBUG&&Ff("QueryEngine","Using full collection scan to execute query:",zd(t)),this.Di.getDocumentsMatchingQuery(e,t,vh.min())}},{key:"Mi",value:function(e,t,n,r){return this.Di.getDocumentsMatchingQuery(e,n,r).next((function(e){return t.forEach((function(t){e=e.insert(t.key,t)})),e}))}}]),e}(),nm=function(){function e(t,n,r,i){xt(this,e),this.persistence=t,this.Fi=n,this.wt=i,this.$i=new Th(rh),this.Bi=new Cp((function(e){return dd(e)}),pd),this.Li=new Map,this.Ui=t.getRemoteDocumentCache(),this.Vs=t.getTargetCache(),this.Ds=t.getBundleCache(),this.qi(r)}return St(e,[{key:"qi",value:function(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new qv(this.Ui,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.Ui.setIndexManager(this.indexManager),this.Fi.initialize(this.localDocuments,this.indexManager)}},{key:"collectGarbage",value:function(e){var t=this;return this.persistence.runTransaction("Collect garbage","readwrite-primary",(function(n){return e.collect(n,t.$i)}
2))}}]),e}();function rm(e,t,n,r){return new nm(e,t,n,r)}function im(e,t){return am.apply(this,arguments)}function am(){return am=lt(st().mark((function e(t,n){var r;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Hf(t),e.next=3,r.persistence.runTransaction("Handle user change","readonly",(function(e){var t;return r.mutationQueue.getAllMutationBatches(e).next((function(i){return t=i,r.qi(n),r.mutationQueue.getAllMutationBatches(e)})).next((function(n){var i,a=[],o=[],u=Up(),s=_t(t);try{for(s.s();!(i=s.n()).done;){var c=i.value;a.push(c.batchId);var l,f=_t(c.mutations);try{for(f.s();!(l=f.n()).done;){var h=l.value;u=u.add(h.key)}}catch(b){f.e(b)}finally{f.f()}}}catch(b){s.e(b)}finally{s.f()}var d,p=_t(n);try{for(p.s();!(d=p.n()).done;){var v=d.value;o.push(v.batchId);var m,y=_t(v.mutations);try{for(y.s();!(m=y.n()).done;){var g=m.value;u=u.add(g.key)}}catch(b){y.e(b)}finally{y.f()}}}catch(b){p.e(b)}finally{p.f()}return r.localDocuments.getDocuments(e,u).next((function(e){return{Ki:e,removedBatchIds:a,addedBatchIds:o}}))}))}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)}))),am.apply(this,arguments)}function om(e,t){var n=Hf(e);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",(function(e){var r=t.batch.keys(),i=n.Ui.newChangeBuffer({trackRemovals:!0});return function(e,t,n,r){var i=n.batch,a=i.keys(),o=wh.resolve();return a.forEach((function(e){o=o.next((function(){return r.getEntry(t,e)})).next((function(t){var a=n.docVersions.get(e);Bf(null!==a),t.version.compareTo(a)<0&&(i.applyToRemoteDocument(t,n),t.isValidDocument()&&(t.setReadTime(n.commitVersion),r.addEntry(t)))}))})),o.next((function(){return e.mutationQueue.removeMutationBatch(t,i)}))}(n,e,t,i).next((function(){return i.apply(e)}
2)).next((function(){return n.mutationQueue.performConsistencyCheck(e)})).next((function(){return n.documentOverlayCache.removeOverlaysForBatchId(e,r,t.batch.batchId)})).next((function(){return n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(e,function(e){for(var t=Up(),n=0;n<e.mutationResults.length;++n)e.mutationResults[n].transformResults.length>0&&(t=t.add(e.batch.mutations[n].key));return t}(t))})).next((function(){return n.localDocuments.getDocuments(e,r)}))}))}function um(e){var t=Hf(e);return t.persistence.runTransaction("Get last remote snapshot version","readonly",(function(e){return t.Vs.getLastRemoteSnapshotVersion(e)}))}function sm(e,t){var n=Hf(e),r=t.snapshotVersion,i=n.$i;return n.persistence.runTransaction("Apply remote event","readwrite-primary",(function(e){var a=n.Ui.newChangeBuffer({trackRemovals:!0});i=n.$i;var o=[];t.targetChanges.forEach((function(a,u){var s=i.get(u);if(s){o.push(n.Vs.removeMatchingKeys(e,a.removedDocuments,u).next((function(){return n.Vs.addMatchingKeys(e,a.addedDocuments,u)})));var c=s.withSequenceNumber(e.currentSequenceNumber);t.targetMismatches.has(u)?c=c.withResumeToken(Rh.EMPTY_BYTE_STRING,oh.min()).withLastLimboFreeSnapshotVersion(oh.min()):a.resumeToken.approximateByteSize()>0&&(c=c.withResumeToken(a.resumeToken,r)),i=i.insert(u,c),function(e,t,n){return 0===e.resumeToken.approximateByteSize()||(t.snapshotVersion.toMicroseconds()-e.snapshotVersion.toMicroseconds()>=3e8||n.addedDocuments.size+n.modifiedDocuments.size+n.removedDocuments.size>0)}(s,c,a)&&o.push(n.Vs.updateTargetData(e,c))}}));var u=Op(),s=Up();if(t.documentUpdates.forEach((function(r){t.resolvedLimboDocuments.has(r)&&o.push(n.persistence.referenceDelegate.updateLimboDocument(e,r))})),o.push(cm(e,a,t.documentUpdates).next((function(e){u=e.Gi,s=e.Qi}))),!r.isEqual(oh.min())){var c=n.Vs.getLastRemoteSnapshotVersion(e).next((function(t){return n.Vs.setTargetsMetadata(e,e.currentSequenceNumber,r)}));o.push(c)}return wh.waitFor(o).next((function(){return a.apply(e)})).next((function(){return n.localDocuments.getLocalViewOfDocuments(e,u,s)})).next((function(){return u}))})).then((function(e){return n.$i=i,e}))}function cm(e,t,n){var r=Up(),i=Up();return n.forEach((function(e){return r=r.add(e)})),t.getEntries(e,r).next((function(e){var r=Op();return n.forEach((function(n,a){var o=e.get(n);a.isFoundDocument()!==o.isFoundDocument()&&(i=i.add(n)),a.isNoDocument()&&a.version.isEqual(oh.min())?(t.removeEntry(n,a.readTime),r=r.insert(n,a)):!o.isValidDocument()||a.version.compareTo(o.version)>0||0===a.version.compareTo(o.version)&&o.hasPendingWrites?(t.addEntry(a),r=r.insert(n,a)):Ff("LocalStore","Ignoring outdated watch update for ",n,". Current version:",o.version," Watch version:",a.version)})),{Gi:r,Qi:i}}))}function lm(e,t){var n=Hf(e);return n.persistence.runTransaction("Get next mutation batch","readonly",(function(e){return void 0===t&&(t=-1),n.mutationQueue.getNextMutationBatchAfterBatchId(e,t)}))}function fm(e,t){var n=Hf(e);return n.persistence.runTransaction("Allocate target","readwrite",(function(e){var r;return n.Vs.getTargetData(e,t).next((function(i){return i?(r=i,wh.resolve(r)):n.Vs.allocateTargetId(e).next((function(i){return r=new Pv(t,i,0,e.currentSequenceNumber),n.Vs.addTargetData(e,r).next((function(){return r}))}))}))})).then((function(e){var r=n.$i.get(e.targetId);return(null===r||e.snapshotVersion.compareTo(r.snapshotVersion)>0)&&(n.$i=n.$i.insert(e.targetId,e),n.Bi.set(t,e.targetId)),e}))}function hm(e,t,n){return dm.apply(this,arguments)}function dm(){return dm=lt(st().mark((function e(t,n,r){var i,a,o;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=Hf(t),a=i.$i.get(n),o=r?"readwrite":"readwrite-primary",e.prev=1,e.t0=r,e.t0){e.next=6;break}return e.next=6,i.persistence.runTransaction("Release target",o,(function(e){return i.persistence.referenceDelegate.removeTarget(e,a)}));case 6:e.next=13;break;case 8:if(e.prev=8,e.t1=e.catch(1),_h(e.t1)){e.next=12;break}throw e.t1;case 12:Ff("LocalStore","Failed to update sequence numbers for target ".concat(n,": ").concat(e.t1));case 13:i.$i=i.$i.remove(n),i.Bi.delete(a.target);case 14:case"end":return e.stop()}}),e,null,[[1,8]])}))),dm.apply(this,arguments)}function pm(e,t,n){var r=Hf(e),i=oh.min(),a=Up();
2return r.persistence.runTransaction("Execute query","readonly",(function(e){return function(e,t,n){var r=Hf(e),i=r.Bi.get(n);return void 0!==i?wh.resolve(r.$i.get(i)):r.Vs.getTargetData(t,n)}(r,e,Md(t)).next((function(t){if(t)return i=t.lastLimboFreeSnapshotVersion,r.Vs.getMatchingKeysForTargetId(e,t.targetId).next((function(e){a=e}))})).next((function(){return r.Fi.getDocumentsMatchingQuery(e,t,n?i:oh.min(),n?a:Up())})).next((function(e){return vm(r,Bd(t),e),{documents:e,ji:a}}))}))}function vm(e,t,n){var r=oh.min();n.forEach((function(e,t){t.readTime.compareTo(r)>0&&(r=t.readTime)})),e.Li.set(t,r)}var mm=function(){function e(){xt(this,e),this.activeTargetIds=zp()}return St(e,[{key:"Xi",value:function(e){this.activeTargetIds=this.activeTargetIds.add(e)}},{key:"Zi",value:function(e){this.activeTargetIds=this.activeTargetIds.delete(e)}},{key:"Yi",value:function(){var e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}]),e}(),ym=function(){function e(){xt(this,e),this.Fr=new mm,this.$r={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}return St(e,[{key:"addPendingMutation",value:function(e){}},{key:"updateMutationState",value:function(e,t,n){}},{key:"addLocalQueryTarget",value:function(e){return this.Fr.Xi(e),this.$r[e]||"not-current"}},{key:"updateQueryState",value:function(e,t,n){this.$r[e]=t}},{key:"removeLocalQueryTarget",value:function(e){this.Fr.Zi(e)}},{key:"isLocalQueryTarget",value:function(e){return this.Fr.activeTargetIds.has(e)}},{key:"clearQueryState",value:function(e){delete this.$r[e]}},{key:"getAllActiveQueryTargets",value:function(){return this.Fr.activeTargetIds}},{key:"isActiveQueryTarget",value:function(e){return this.Fr.activeTargetIds.has(e)}},{key:"start",value:function(){return this.Fr=new mm,Promise.resolve()}},{key:"handleUserChange",value:function(e,t,n){}},{key:"setOnlineState",value:function(e){}},{key:"shutdown",value:function(){}},{key:"writeSequenceNumber",value:function(e){}},{key:"notifyBundleLoaded",value:function(e){}}]),e}(),gm=function(){function e(){xt(this,e)}return St(e,[{key:"Br",value:function(e){}},{key:"shutdown",value:function(){}}]),e}(),bm=function(){function e(){var t=this;xt(this,e),this.Lr=function(){return t.Ur()},this.qr=function(){return t.Kr()},this.Gr=[],this.Qr()}return St(e,[{key:"Br",value:function(e){this.Gr.push(e)}},{key:"shutdown",value:function(){window.removeEventListener("online",this.Lr),window.removeEventListener("offline",this.qr)}},{key:"Qr",value:function(){window.addEventListener("online",this.Lr),window.addEventListener("offline",this.qr)}},{key:"Ur",value:function(){Ff("ConnectivityMonitor","Network connectivity changed: AVAILABLE");var e,t=_t(this.Gr);try{for(t.s();!(e=t.n()).done;){(0,e.value)(0)}}catch(n){t.e(n)}finally{t.f()}}},{key:"Kr",value:function(){Ff("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");var e,t=_t(this.Gr);try{for(t.s();!(e=t.n()).done;){(0,e.value)(1)}}catch(n){t.e(n)}finally{t.f()}}}],[{key:"V",value:function(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}}]),e}(),km={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery"},wm=function(){function e(t){xt(this,e),this.jr=t.jr,this.Wr=t.Wr}return St(e,[{key:"zr",value:function(e){this.Hr=e}},{key:"Jr",value:function(e){this.Yr=e}},{key:"onMessage",value:function(e){this.Xr=e}},{key:"close",value:function(){this.Wr()}},{key:"send",value:function(e){this.jr(e)}},{key:"Zr",value:function(){this.Hr()}},{key:"eo",value:function(e){this.Yr(e)}},{key:"no",value:function(e){this.Xr(e)}}]),e}(),_m=function(e){Ct(n,e);var t=Pt(n);function n(e){var r;return xt(this,n),(r=t.call(this,e)).forceLongPolling=e.forceLongPolling,r.autoDetectLongPolling=e.autoDetectLongPolling,r.useFetchStreams=e.useFetchStreams,r}return St(n,[{key:"co",value:function(e,t,n,r){return new Promise((function(i,a){var o=new Pf;o.listenOnce(Tf.COMPLETE,(function(){try{switch(o.getLastErrorCode()){case If.NO_ERROR:var t=o.getResponseJson();Ff("Connection","XHR received:",JSON.stringify(t)),i(t);break;case If.TIMEOUT:Ff("Connection",'RPC "'+e+'" timed out'),a(new Wf(Kf.DEADLINE_EXCEEDED,"Request time out"));break;case If.HTTP_ERROR:var n=o.getStatus();if(Ff("Connection",'RPC "'+e+'" failed with status:',n,"response text:",o.getResponseText()),n>0){var r=o.getResponseJson().error;if(r&&r.status&&r.message){var u=function(e){var t=e.toLowerCase().replace(/_/g,"-");return Object.values(Kf).indexOf(t)>=0?t:Kf.UNKNOWN}(r.status);a(new Wf(u,r.message))}else a(new Wf(Kf.UNKNOWN,"Server responded with status "+o.getStatus()))}else a(new Wf(Kf.UNAVAILABLE,"Connection failed."));break;default:qf()}}finally{Ff("Connection",'RPC "'+e+'" completed.')}}));var u=JSON.stringify(r);o.send(t,"POST",u,n,15)}))}},{key:"ho",value:function(e,t,n){var r=[this.so,"/","google.firestore.v1.Firestore","/",e,"/channel"],i=Ef(),a=Sf(),o={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:"projects/".concat(this.databaseId.projectId,"/databases/").concat(this.databaseId.database)}
2,sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling};this.useFetchStreams&&(o.xmlHttpFactory=new Of({})),this.uo(o.initMessageHeaders,t,n),zt()||Bt()||Vt().indexOf("Electron/")>=0||Ht()||Vt().indexOf("MSAppHost/")>=0||qt()||(o.httpHeadersOverwriteParam="$httpHeaders");var u=r.join("");Ff("Connection","Creating WebChannel: "+u,o);var s=i.createWebChannel(u,o),c=!1,l=!1,f=new wm({jr:function(e){l?Ff("Connection","Not sending because WebChannel is closed:",e):(c||(Ff("Connection","Opening WebChannel transport."),s.open(),c=!0),Ff("Connection","WebChannel sending:",e),s.send(e))},Wr:function(){return s.close()}}),h=function(e,t,n){e.listen(t,(function(e){try{n(e)}catch(e){setTimeout((function(){throw e}),0)}}))};return h(s,Af.EventType.OPEN,(function(){l||Ff("Connection","WebChannel transport opened.")})),h(s,Af.EventType.CLOSE,(function(){l||(l=!0,Ff("Connection","WebChannel transport closed"),f.eo())})),h(s,Af.EventType.ERROR,(function(e){l||(l=!0,Vf("Connection","WebChannel transport errored:",e),f.eo(new Wf(Kf.UNAVAILABLE,"The operation could not be completed")))})),h(s,Af.EventType.MESSAGE,(function(e){var t;if(!l){var n=e.data[0];Bf(!!n);var r=n,i=r.error||(null===(t=r[0])||void 0===t?void 0:t.error);if(i){Ff("Connection","WebChannel received error:",i);var a=i.status,o=function(e){var t=wp[e];if(void 0!==t)return Tp(t)}(a),u=i.message;void 0===o&&(o=Kf.INTERNAL,u="Unknown error status: "+a+" with message "+i.message),l=!0,f.eo(new Wf(o,u)),s.close()}else Ff("Connection","WebChannel received:",n),f.no(n)}})),h(a,Cf.STAT_EVENT,(function(e){e.stat===Nf.PROXY?Ff("Connection","Detected buffering proxy"):e.stat===Nf.NOPROXY&&Ff("Connection","Detected no buffering proxy")})),setTimeout((function(){f.Zr()}),0),f}}]),n}(function(){function e(t){xt(this,e),this.databaseInfo=t,this.databaseId=t.databaseId;var n=t.ssl?"https":"http";this.so=n+"://"+t.host,this.io="projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database+"/documents"}return St(e,[{key:"ro",value:function(e,t,n,r,i){var a=this.oo(e,t);Ff("RestConnection","Sending: ",a,n);var o={};return this.uo(o,r,i),this.co(e,a,o,n).then((function(e){return Ff("RestConnection","Received: ",e),e}),(function(t){throw Vf("RestConnection","".concat(e," failed with error: "),t,"url: ",a,"request:",n),t}))}},{key:"ao",value:function(e,t,n,r,i,a){return this.ro(e,t,n,r,i)}},{key:"uo",value:function(e,t,n){e["X-Goog-Api-Client"]="gl-js/ fire/"+Lf,e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t&&t.headers.forEach((function(t,n){return e[n]=t})),n&&n.headers.forEach((function(t,n){return e[n]=t}))}},{key:"oo",value:function(e,t){var n=km[e];return"".concat(this.so,"/v1/").concat(t,":").concat(n)}}]),e}());function xm(){return"undefined"!=typeof document?document:null}function Em(e){return new Zp(e,!0)}var Sm=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1.5,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:6e4;xt(this,e),this.js=t,this.timerId=n,this.lo=r,this.fo=i,this._o=a,this.wo=0,this.mo=null,this.yo=Date.now(),this.reset()}return St(e,[{key:"reset",value:function(){this.wo=0}},{key:"po",value:function(){this.wo=this._o}},{key:"Io",value:function(e){var t=this;this.cancel();var n=Math.floor(this.wo+this.To()),r=Math.max(0,Date.now()-this.yo),i=Math.max(0,n-r);i>0&&Ff("ExponentialBackoff","Backing off for ".concat(i," ms (base delay: ").concat(this.wo," ms, delay with jitter: ").concat(n," ms, last attempt: ").concat(r," ms ago)")),this.mo=this.js.enqueueAfterDelay(this.timerId,i,(function(){return t.yo=Date.now(),e()})),this.wo*=this.fo,this.wo<this.lo&&(this.wo=this.lo),this.wo>this._o&&(this.wo=this._o)}},{key:"Eo",value:function(){null!==this.mo&&(this.mo.skipDelay(),this.mo=null)}},{key:"cancel",value:function(){null!==this.mo&&(this.mo.cancel(),this.mo=null)}},{key:"To",value:function(){return(Math.random()-.5)*this.wo}}]),e}(),Im=function(){function e(t,n,r,i,a,o,u,s){xt(this,e),this.js=t,this.Ao=r,this.Ro=i,this.bo=a,this.authCredentialsProvider=o,this.appCheckCredentialsProvider=u,this.listener=s,this.state=0,this.Po=0,this.vo=null,this.Vo=null,this.stream=null,this.So=new Sm(t,n)}return St(e,[{key:"Do",value:function(){return 1===this.state||5===this.state||this.Co()}},{key:"Co",value:function(){return 2===this.state||3===this.state}},{key:"start",value:function(){4!==this.state?this.auth():this.xo()}},{key:"stop",value:function(){var e=lt(st().mark((function e(){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=this.Do(),!e.t0){e.next=4;break}return e.next=4,this.close(0);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"No",value:function(){this.state=0,this.So.reset()}},{key:"ko",value:function(){var e=this;this.Co()&&null===this.vo&&(this.vo=this.js.enqueueAfterDelay(this.Ao,6e4,(function(){return e.Oo()})))}},{key:"Mo",value:function(e){this.Fo(),this.stream.send(e)}},{key:"Oo",value:function(){var e=lt(st().mark((function e(){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.Co()){e.next=2;break}return e.abrupt("return",this.close(0));case 2:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"Fo",value:function(){this.vo&&(this.vo.cancel(),this.vo=null)}},{key:"$o",value:function(){this.Vo&&(this.Vo.cancel(),this.Vo=null)}},{key:"close",value:function(){var e=lt(st().mark((function e(t,n){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.Fo(),this.$o(),this.So.cancel(),this.Po++,4!==t?this.So.reset():n&&n.code===Kf.RESOURCE_EXHAUSTED?(Uf(n.toString()),Uf("Using maximum backoff delay to prevent overloading the backend."),this.So.po()):n&&n.code===Kf.UNAUTHENTICATED&&3!==this.state&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),null!==this.stream&&(this.Bo(),this.stream.close(),this.stream=null),this.state=t,e.next=9,this.listener.Jr(n);case 9:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"Bo",value:function(){}},{key:"auth",value:function(){var e=this;this.state=1;var t=this.Lo(this.Po),n=this.Po;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then((function(t){var r=o(t,2),i=r[0],a=r[1];e.Po===n&&e.Uo(i,a)}),(function(n){t((function(){var t=new Wf(Kf.UNKNOWN,"Fetching auth token failed: "+n.message);return e.qo(t)}))}))}},{key:"Uo",value:function(e,t){var n=this,r=this.Lo(this.Po);this.stream=this.Ko(e,t),this.stream.zr((function(){r((function(){return n.state=2,n.Vo=n.js.enqueueAfterDelay(n.Ro,1e4,(function(){return n.Co()&&(n.state=3),Promise.resolve()})),n.listener.zr()}))})),this.stream.Jr((function(e){r((function(){return n.qo(e)}))})),this.stream.onMessage((function(e){r((function(){return n.onMessage(e)}))}))}},{key:"xo",value:function(){var e=this;this.state=5,this.So.Io(lt(st().mark((function t(){return st().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.state=0,e.start();case 1:case"end":return t.stop()}}),t)}))))}},{key:"qo",value:function(e){return Ff("PersistentStream","close with error: ".concat(e)),this.stream=null,this.close(4,e)}},{key:"Lo",value:function(e){var t=this;return function(n){t.js.enqueueAndForget((function(){return t.Po===e?n():(Ff("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())}))}}}]),e}(),Tm=function(e){Ct(n,e);var t=Pt(n);function n(e,r,i,a,o,u){var s;return xt(this,n),(s=t.call(this,e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",r,i,a,u)).wt=o,s}return St(n,[{key:"Ko",value:function(e,t){return this.bo.ho("Listen",e,t)}},{key:"onMessage",value:function(e){this.So.reset();var t=function(e,t){var n;if("targetChange"in t){t.targetChange;var r=function(e){return"NO_CHANGE"===e?0:"ADD"===e?1:"REMOVE"===e?2:"CURRENT"===e?3:"RESET"===e?4:qf()}(t.targetChange.targetChangeType||"NO_CHANGE"),i=t.targetChange.targetIds||[],a=function(e,t){return e.dt?(Bf(void 0===t||"string"==typeof t),Rh.fromBase64String(t||"")):(Bf(void 0===t||t instanceof Uint8Array),Rh.fromUint8Array(t||new Uint8Array))}(e,t.targetChange.resumeToken),o=t.targetChange.cause,u=o&&function(e){var t=void 0===e.code?Kf.UNKNOWN:Tp(e.code);return new Wf(t,e.message||"")}(o);n=new Wp(r,i,a,u||null)}else if("documentChange"in t){t.documentChange;var s=t.documentChange;s.document,s.document.name,s.document.updateTime;var c=uv(e,s.document.name),l=rv(s.document.updateTime),f=new sd({mapValue:{fields:s.document.fields}}),h=ld.newFoundDocument(c,l,f),d=s.targetIds||[],p=s.removedTargetIds||[];n=new Hp(d,p,h.key,h)}else if("documentDelete"in t){t.documentDelete;var v=t.documentDelete;v.document;var m=uv(e,v.document),y=v.readTime?rv(v.readTime):oh.min(),g=ld.newNoDocument(m,y),b=v.removedTargetIds||[];n=new Hp([],b,g.key,g)}else if("documentRemove"in t){t.documentRemove;var k=t.documentRemove;k.document;var w=uv(e,k.document),_=k.removedTargetIds||[];n=new Hp([],_,w,null)}else{if(!("filter"in t))return qf();t.filter;var x=t.filter;x.targetId;var E=x.count||0,S=new Sp(E),I=x.targetId;n=new Kp(I,S)}return n}(this.wt,e),n=function(e){if(!("targetChange"in e))return oh.min();var t=e.targetChange;return t.targetIds&&t.targetIds.length?oh.min():t.readTime?rv(t.readTime):oh.min()}(e);return this.listener.Go(t,n)}},{key:"Qo",value:function(e){var t={};t.database=lv(this.wt),t.addTarget=function(e,t){var n,r=t.target;return(n=vd(r)?{documents:pv(e,r)}:{query:vv(e,r)}).targetId=t.targetId,t.resumeToken.approximateByteSize()>0?n.resumeToken=tv(e,t.resumeToken):t.snapshotVersion.compareTo(oh.min())>0&&(n.readTime=ev(e,t.snapshotVersion.toTimestamp())),n}(this.wt,e);var n=function(e,t){var n=function(e,t){switch(t){case 0:return null;case 1:return"existence-filter-mismatch";case 2:return"limbo-document";default:return qf()}}(0,t.purpose);return null==n?null:{"goog-listen-tags":n}}(this.wt,e);n&&(t.labels=n),this.Mo(t)}},{key:"jo",value:function(e){var t={};t.database=lv(this.wt),t.removeTarget=e,this.Mo(t)}}]),n}(Im),Cm=function(e){Ct(n,e);var t=Pt(n);function n(e,r,i,a,o,u){var s;return xt(this,n),(s=t.call(this,e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",r,i,a,u)).wt=o,s.Wo=!1,s}return St(n,[{key:"zo",get:function(){return this.Wo}},{key:"start",value:function(){this.Wo=!1,this.lastStreamToken=void 0,hr(Nt(n.prototype),"start",this).call(this)}},{key:"Bo",value:function(){this.Wo&&this.Ho([])}},{key:"Ko",value:function(e,t){return this.bo.ho("Write",e,t)}},{key:"onMessage",value:function(e){if(Bf(!!e.streamToken),this.lastStreamToken=e.streamToken,this.Wo){this.So.reset();var t=function(e,t){return e&&e.length>0?(Bf(void 0!==t),e.map((function(e){return function(e,t){var n=e.updateTime?rv(e.updateTime):rv(t);return n.isEqual(oh.min())&&(n=rv(t)),new up(n,e.transformResults||[])}(e,t)}))):[]}(e.writeResults,e.commitTime),n=rv(e.commitTime);return this.listener.Jo(n,t)}return Bf(!e.writeResults||0===e.writeResults.length),this.Wo=!0,this.listener.Yo()}},{key:"Xo",value:function(){var e={};e.database=lv(this.wt),this.Mo(e)}},{key:"Ho",value:function(e){var t=this,n={streamToken:this.lastStreamToken,writes:e.map((function(e){return dv(t.wt,e)}))};this.Mo(n)}}]),n}(Im),Nm=function(e){Ct(n,e);var t=Pt(n);function n(e,r,i,a){var o;return xt(this,n),(o=t.call(this)).authCredentials=e,o.appCheckCredentials=r,o.bo=i,o.wt=a,o.Zo=!1,o}return St(n,[{key:"tu",value:function(){if(this.Zo)throw new Wf(Kf.FAILED_PRECONDITION,"The client has already been terminated.")}},{key:"ro",value:function(e,t,n){var r=this;return this.tu(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((function(i){var a=o(i,2),u=a[0],s=a[1];return r.bo.ro(e,t,n,u,s)})).catch((function(e){throw"FirebaseError"===e.name?(e.code===Kf.UNAUTHENTICATED&&(r.authCredentials.invalidateToken(),r.appCheckCredentials.invalidateToken()),e):new Wf(Kf.UNKNOWN,e.toString())}))}},{key:"ao",value:function(e,t,n,r){var i=this;return this.tu(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((function(a){var u=o(a,2),s=u[0],c=u[1];return i.bo.ao(e,t,n,s,c,r)})).catch((function(e){throw"FirebaseError"===e.name?(e.code===Kf.UNAUTHENTICATED&&(i.authCredentials.invalidateToken(),i.appCheckCredentials.invalidateToken()),e):new Wf(Kf.UNKNOWN,e.toString())}))}},{key:"terminate",value:function(){this.Zo=!0}}]),n}(function(){return St((function e(){xt(this,e)}))}()),Om=function(){function e(t,n){xt(this,e),this.asyncQueue=t,this.onlineStateHandler=n,this.state="Unknown",this.eu=0,this.nu=null,this.su=!0}return St(e,[{key:"iu",value:function(){var e=this;0===this.eu&&(this.ru("Unknown"),this.nu=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,(function(){return e.nu=null,e.ou("Backend didn't respond within 10 seconds."),e.ru("Offline"),Promise.resolve()})))}},{key:"uu",value:function(e){"Online"===this.state?this.ru("Unknown"):(this.eu++,this.eu>=1&&(this.cu(),this.ou("Connection failed 1 times. Most recent error: ".concat(e.toString())),this.ru("Offline")))}},{key:"set",value:function(e){this.cu(),this.eu=0,"Online"===e&&(this.su=!1),this.ru(e)}},{key:"ru",value:function(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}},{key:"ou",value:function(e){var t="Could not reach Cloud Firestore backend. ".concat(e,"\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.");this.su?(Uf(t),this.su=!1):Ff("OnlineStateTracker",t)}},{key:"cu",value:function(){null!==this.nu&&(this.nu.cancel(),this.nu=null)}}]),e}(),Am=St((function e(t,n,r,i,a){var o=this;xt(this,e),this.localStore=t,this.datastore=n,this.asyncQueue=r,this.remoteSyncer={},this.au=[],this.hu=new Map,this.lu=new Set,this.fu=[],this.du=a,this.du.Br((function(e){r.enqueueAndForget(lt(st().mark((function e(){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=qm(o),!e.t0){e.next=5;break}
2return Ff("RemoteStore","Restarting streams for network reachability change."),e.next=5,function(){var e=lt(st().mark((function e(t){var n;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=Hf(t)).lu.add(4),e.next=4,Dm(n);case 4:return n._u.set("Unknown"),n.lu.delete(4),e.next=8,Pm(n);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()(o);case 5:case"end":return e.stop()}}),e)}))))})),this._u=new Om(r,i)}));function Pm(e){return Rm.apply(this,arguments)}function Rm(){return Rm=lt(st().mark((function e(t){var n,r,i;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!qm(t)){e.next=18;break}n=_t(t.fu),e.prev=2,n.s();case 4:if((r=n.n()).done){e.next=10;break}return i=r.value,e.next=8,i(!0);case 8:e.next=4;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),n.e(e.t0);case 15:return e.prev=15,n.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[2,12,15,18]])}))),Rm.apply(this,arguments)}function Dm(e){return Lm.apply(this,arguments)}function Lm(){return Lm=lt(st().mark((function e(t){var n,r,i;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=_t(t.fu),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=9;break}return i=r.value,e.next=7,i(!1);case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[1,11,14,17]])}))),Lm.apply(this,arguments)}function jm(e,t){var n=Hf(e);n.hu.has(t.targetId)||(n.hu.set(t.targetId,t),zm(n)?Vm(n):yy(n).Co()&&Fm(n,t))}function Mm(e,t){var n=Hf(e),r=yy(n);n.hu.delete(t),r.Co()&&Um(n,t),0===n.hu.size&&(r.Co()?r.ko():qm(n)&&n._u.set("Unknown"))}function Fm(e,t){e.wu.Nt(t.targetId),yy(e).Qo(t)}function Um(e,t){e.wu.Nt(t),yy(e).jo(t)}function Vm(e){e.wu=new Gp({getRemoteKeysForTarget:function(t){return e.remoteSyncer.getRemoteKeysForTarget(t)},te:function(t){return e.hu.get(t)||null}}),yy(e).start(),e._u.iu()}function zm(e){return qm(e)&&!yy(e).Do()&&e.hu.size>0}function qm(e){return 0===Hf(e).lu.size}function Bm(e){e.wu=void 0}function Hm(e){return Km.apply(this,arguments)}function Km(){return Km=lt(st().mark((function e(t){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.hu.forEach((function(e,n){Fm(t,e)}));case 1:case"end":return e.stop()}}),e)}))),Km.apply(this,arguments)}function Wm(e,t){return Qm.apply(this,arguments)}function Qm(){return Qm=lt(st().mark((function e(t,n){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Bm(t),zm(t)?(t._u.uu(n),Vm(t)):t._u.set("Unknown");case 1:case"end":return e.stop()}}),e)}))),Qm.apply(this,arguments)}function Gm(e,t,n){return $m.apply(this,arguments)}function $m(){return $m=lt(st().mark((function e(t,n,r){var i;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t._u.set("Online"),!(n instanceof Wp&&2===n.state&&n.cause)){e.next=13;break}return e.prev=1,e.next=4,function(){var e=lt(st().mark((function e(t,n){var r,i,a,o;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.cause,i=_t(n.targetIds),e.prev=2,i.s();case 4:if((a=i.n()).done){e.next=14;break}if(o=a.value,e.t0=t.hu.has(o),!e.t0){e.next=12;break}return e.next=10,t.remoteSyncer.rejectListen(o,r);case 10:t.hu.delete(o),t.wu.removeTarget(o);case 12:e.next=4;break;case 14:e.next=19;break;case 16:e.prev=16,e.t1=e.catch(2),i.e(e.t1);case 19:return e.prev=19,i.f(),e.finish(19);case 22:case"end":return e.stop()}}),e,null,[[2,16,19,22]])})));return function(t,n){return e.apply(this,arguments)}}()(t,n);case 4:e.next=11;break;case 6:return e.prev=6,e.t0=e.catch(1),Ff("RemoteStore","Failed to remove targets %s: %s ",n.targetIds.join(","),e.t0),e.next=11,Xm(t,e.t0);case 11:case 22:e.next=29;break;case 13:if(n instanceof Hp?t.wu.Ut(n):n instanceof Kp?t.wu.zt(n):t.wu.Gt(n),r.isEqual(oh.min())){e.next=29;break}return e.prev=14,e.next=17,um(t.localStore);case 17:if(i=e.sent,e.t1=r.compareTo(i)>=0,!e.t1){e.next=22;break}return e.next=22,function(e,t){var n=e.wu.Yt(t);
2return n.targetChanges.forEach((function(n,r){if(n.resumeToken.approximateByteSize()>0){var i=e.hu.get(r);i&&e.hu.set(r,i.withResumeToken(n.resumeToken,t))}})),n.targetMismatches.forEach((function(t){var n=e.hu.get(t);if(n){e.hu.set(t,n.withResumeToken(Rh.EMPTY_BYTE_STRING,n.snapshotVersion)),Um(e,t);var r=new Pv(n.target,t,1,n.sequenceNumber);Fm(e,r)}})),e.remoteSyncer.applyRemoteEvent(n)}(t,r);case 24:return e.prev=24,e.t2=e.catch(14),Ff("RemoteStore","Failed to raise snapshot:",e.t2),e.next=29,Xm(t,e.t2);case 29:case"end":return e.stop()}}),e,null,[[1,6],[14,24]])}))),$m.apply(this,arguments)}function Xm(e,t,n){return Ym.apply(this,arguments)}function Ym(){return Ym=lt(st().mark((function e(t,n,r){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(_h(n)){e.next=2;break}throw n;case 2:return t.lu.add(1),e.next=5,Dm(t);case 5:t._u.set("Offline"),r||(r=function(){return um(t.localStore)}),t.asyncQueue.enqueueRetryable(lt(st().mark((function e(){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Ff("RemoteStore","Retrying IndexedDB access"),e.next=3,r();case 3:return t.lu.delete(1),e.next=6,Pm(t);case 6:case"end":return e.stop()}}),e)}))));case 8:case"end":return e.stop()}}),e)}))),Ym.apply(this,arguments)}function Jm(e,t){return t().catch((function(n){return Xm(e,n,t)}))}function Zm(e){return ey.apply(this,arguments)}function ey(){return ey=lt(st().mark((function e(t){var n,r,i,a;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Hf(t),r=gy(n),i=n.au.length>0?n.au[n.au.length-1].batchId:-1;case 2:if(!ty(n)){e.next=19;break}return e.prev=3,e.next=6,lm(n.localStore,i);case 6:if(null!==(a=e.sent)){e.next=10;break}return 0===n.au.length&&r.ko(),e.abrupt("break",19);case 10:i=a.batchId,ny(n,a),e.next=17;break;case 13:return e.prev=13,e.t0=e.catch(3),e.next=17,Xm(n,e.t0);case 17:e.next=2;break;case 19:ry(n)&&iy(n);case 20:case"end":return e.stop()}}),e,null,[[3,13]])}))),ey.apply(this,arguments)}function ty(e){return qm(e)&&e.au.length<10}function ny(e,t){e.au.push(t);var n=gy(e);n.Co()&&n.zo&&n.Ho(t.mutations)}function ry(e){return qm(e)&&!gy(e).Do()&&e.au.length>0}function iy(e){gy(e).start()}function ay(e){return oy.apply(this,arguments)}function oy(){return oy=lt(st().mark((function e(t){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:gy(t).Xo();case 1:case"end":return e.stop()}}),e)}))),oy.apply(this,arguments)}function uy(e){return sy.apply(this,arguments)}function sy(){return sy=lt(st().mark((function e(t){var n,r,i,a;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=gy(t),r=_t(t.au);try{for(r.s();!(i=r.n()).done;)a=i.value,n.Ho(a.mutations)}catch(o){r.e(o)}finally{r.f()}case 3:case"end":return e.stop()}}),e)}))),sy.apply(this,arguments)}function cy(e,t,n){return ly.apply(this,arguments)}function ly(){return ly=lt(st().mark((function e(t,n,r){var i,a;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.au.shift(),a=Ov.from(i,n,r),e.next=3,Jm(t,(function(){return t.remoteSyncer.applySuccessfulWrite(a)}));case 3:return e.next=5,Zm(t);case 5:case"end":return e.stop()}}),e)}))),ly.apply(this,arguments)}function fy(e,t){return hy.apply(this,arguments)}function hy(){return hy=lt(st().mark((function e(t,n){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=n&&gy(t).zo,!e.t0){e.next=4;break}return e.next=4,function(){var e=lt(st().mark((function e(t,n){var r,i;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Ip(i=n.code)||i===Kf.ABORTED){e.next=7;break}return r=t.au.shift(),gy(t).No(),e.next=5,Jm(t,(function(){return t.remoteSyncer.rejectFailedWrite(r.batchId,n)}));case 5:return e.next=7,Zm(t);case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()(t,n);case 4:ry(t)&&iy(t);case 5:case"end":return e.stop()}}),e)}))),hy.apply(this,arguments)}function dy(e,t){return py.apply(this,arguments)}function py(){return py=lt(st().mark((function e(t,n){var r,i;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=Hf(t)).asyncQueue.verifyOperationInProgress(),Ff("RemoteStore","RemoteStore received new credentials"),i=qm(r),r.lu.add(3),e.next=6,Dm(r);case 6:return i&&r._u.set("Unknown"),e.next=9,r.remoteSyncer.handleCredentialChange(n);case 9:return r.lu.delete(3),e.next=12,Pm(r);case 12:case"end":return e.stop()}}),e)}))),py.apply(this,arguments)}function vy(e,t){return my.apply(this,arguments)}function my(){return my=lt(st().mark((function e(t,n){var r;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=Hf(t),!n){e.next=7;break}return r.lu.delete(2),e.next=5,Pm(r);case 5:e.next=13;break;case 7:if(e.t0=n,e.t0){e.next=13;break}return r.lu.add(2),e.next=12,Dm(r);case 12:r._u.set("Unknown");case 13:case"end":return e.stop()}}),e)}))),my.apply(this,arguments)}function yy(e){return e.mu||(e.mu=function(e,t,n){var r=Hf(e);return r.tu(),new Tm(t,r.bo,r.authCredentials,r.appCheckCredentials,r.wt,n)}(e.datastore,e.asyncQueue,{zr:Hm.bind(null,e),Jr:Wm.bind(null,e),Go:Gm.bind(null,e)}),e.fu.push(function(){var t=lt(st().mark((function t(n){return st().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n){t.next=4;break}e.mu.No(),zm(e)?Vm(e):e._u.set("Unknown"),t.next=7;break;case 4:return t.next=6,e.mu.stop();case 6:Bm(e);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())),e.mu}function gy(e){return e.gu||(e.gu=function(e,t,n){var r=Hf(e);return r.tu(),new Cm(t,r.bo,r.authCredentials,r.appCheckCredentials,r.wt,n)}(e.datastore,e.asyncQueue,{zr:ay.bind(null,e),Jr:fy.bind(null,e),Yo:uy.bind(null,e),Jo:cy.bind(null,e)}),e.fu.push(function(){var t=lt(st().mark((function t(n){return st().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n){t.next=6;break}return e.gu.No(),t.next=4,Zm(e);case 4:t.next=9;break;case 6:return t.next=8,e.gu.stop();case 8:e.au.length>0&&(Ff("RemoteStore","Stopping write stream with ".concat(e.au.length," pending writes")),e.au=[]);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())),e.gu}var by=function(){function e(t,n,r,i,a){xt(this,e),this.asyncQueue=t,this.timerId=n,this.targetTimeMs=r,this.op=i,this.removalCallback=a,this.deferred=new Qf,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch((function(e){}))}return St(e,[{key:"start",value:function(e){var t=this;this.timerHandle=setTimeout((function(){return t.handleDelayElapsed()}),e)}},{key:"skipDelay",value:function(){return this.handleDelayElapsed()}},{key:"cancel",value:function(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new Wf(Kf.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}},{key:"handleDelayElapsed",value:function(){var e=this;this.asyncQueue.enqueueAndForget((function(){return null!==e.timerHandle?(e.clearTimeout(),e.op().then((function(t){return e.deferred.resolve(t)}))):Promise.resolve()}))}},{key:"clearTimeout",value:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}))}],[{key:"createAndSchedule",value:function(t,n,r,i,a){var o=new e(t,n,Date.now()+r,i,a);return o.start(r),o}}]),e}();function ky(e,t){if(Uf("AsyncQueue","".concat(t,": ").concat(e)),_h(e))return new Wf(Kf.UNAVAILABLE,"".concat(t,": ").concat(e));throw e}var wy=function(){function e(t){xt(this,e),this.comparator=t?function(e,n){return t(e,n)||fh.comparator(e.key,n.key)}:function(e,t){return fh.comparator(e.key,t.key)},this.keyedMap=Pp(),this.sortedSet=new Th(this.comparator)}return St(e,[{key:"has",value:function(e){return null!=this.keyedMap.get(e)}},{key:"get",value:function(e){return this.keyedMap.get(e)}},{key:"first",value:function(){return this.sortedSet.minKey()}},{key:"last",value:function(){return this.sortedSet.maxKey()}},{key:"isEmpty",value:function(){return this.sortedSet.isEmpty()}},{key:"indexOf",value:function(e){var t=this.keyedMap.get(e);return t?this.sortedSet.indexOf(t):-1}},{key:"size",get:function(){return this.sortedSet.size}}
2,{key:"forEach",value:function(e){this.sortedSet.inorderTraversal((function(t,n){return e(t),!1}))}},{key:"add",value:function(e){var t=this.delete(e.key);return t.copy(t.keyedMap.insert(e.key,e),t.sortedSet.insert(e,null))}},{key:"delete",value:function(e){var t=this.get(e);return t?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(t)):this}},{key:"isEqual",value:function(t){if(!(t instanceof e))return!1;if(this.size!==t.size)return!1;for(var n=this.sortedSet.getIterator(),r=t.sortedSet.getIterator();n.hasNext();){var i=n.getNext().key,a=r.getNext().key;if(!i.isEqual(a))return!1}return!0}},{key:"toString",value:function(){var e=[];return this.forEach((function(t){e.push(t.toString())})),0===e.length?"DocumentSet ()":"DocumentSet (\n "+e.join(" \n")+"\n)"}},{key:"copy",value:function(t,n){var r=new e;return r.comparator=this.comparator,r.keyedMap=t,r.sortedSet=n,r}}],[{key:"emptySet",value:function(t){return new e(t.comparator)}}]),e}(),_y=function(){function e(){xt(this,e),this.yu=new Th(fh.comparator)}return St(e,[{key:"track",value:function(e){var t=e.doc.key,n=this.yu.get(t);n?0!==e.type&&3===n.type?this.yu=this.yu.insert(t,e):3===e.type&&1!==n.type?this.yu=this.yu.insert(t,{type:n.type,doc:e.doc}):2===e.type&&2===n.type?this.yu=this.yu.insert(t,{type:2,doc:e.doc}):2===e.type&&0===n.type?this.yu=this.yu.insert(t,{type:0,doc:e.doc}):1===e.type&&0===n.type?this.yu=this.yu.remove(t):1===e.type&&2===n.type?this.yu=this.yu.insert(t,{type:1,doc:n.doc}):0===e.type&&1===n.type?this.yu=this.yu.insert(t,{type:2,doc:e.doc}):qf():this.yu=this.yu.insert(t,e)}},{key:"pu",value:function(){var e=[];return this.yu.inorderTraversal((function(t,n){e.push(n)})),e}}]),e}(),xy=function(){function e(t,n,r,i,a,o,u,s){xt(this,e),this.query=t,this.docs=n,this.oldDocs=r,this.docChanges=i,this.mutatedKeys=a,this.fromCache=o,this.syncStateChanged=u,this.excludesMetadataChanges=s}return St(e,[{key:"hasPendingWrites",get:function(){return!this.mutatedKeys.isEmpty()}},{key:"isEqual",value:function(e){if(!(this.fromCache===e.fromCache&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&Ud(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;var t=this.docChanges,n=e.docChanges;if(t.length!==n.length)return!1;for(var r=0;r<t.length;r++)if(t[r].type!==n[r].type||!t[r].doc.isEqual(n[r].doc))return!1;return!0}}],[{key:"fromInitialDocuments",value:function(t,n,r,i){var a=[];return n.forEach((function(e){a.push({type:0,doc:e})})),new e(t,n,wy.emptySet(n),a,r,i,!0,!1)}}]),e}(),Ey=St((function e(){xt(this,e),this.Iu=void 0,this.listeners=[]})),Sy=St((function e(){xt(this,e),this.queries=new Cp((function(e){return Vd(e)}),Ud),this.onlineState="Unknown",this.Tu=new Set}));function Iy(e,t){return Ty.apply(this,arguments)}function Ty(){return Ty=lt(st().mark((function e(t,n){var r,i,a,o,u;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=Hf(t),i=n.query,a=!1,(o=r.queries.get(i))||(a=!0,o=new Ey),!a){e.next=13;break}return e.prev=3,e.next=6,r.onListen(i);case 6:o.Iu=e.sent,e.next=13;break;case 9:return e.prev=9,e.t0=e.catch(3),u=ky(e.t0,"Initialization of query '".concat(zd(n.query),"' failed")),e.abrupt("return",void n.onError(u));case 13:r.queries.set(i,o),o.listeners.push(n),n.Eu(r.onlineState),o.Iu&&n.Au(o.Iu)&&Py(r);case 14:case"end":return e.stop()}}),e,null,[[3,9]])}))),Ty.apply(this,arguments)}function Cy(e,t){return Ny.apply(this,arguments)}function Ny(){return Ny=lt(st().mark((function e(t,n){var r,i,a,o,u;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=Hf(t),i=n.query,a=!1,(o=r.queries.get(i))&&(u=o.listeners.indexOf(n))>=0&&(o.listeners.splice(u,1),a=0===o.listeners.length),!a){e.next=6;break}return e.abrupt("return",(r.queries.delete(i),r.onUnlisten(i)));case 6:case"end":return e.stop()}}),e)}))),Ny.apply(this,arguments)}function Oy(e,t){var n,r=Hf(e),i=!1,a=_t(t);try{for(a.s();!(n=a.n()).done;){var o=n.value,u=o.query,s=r.queries.get(u);if(s){var c,l=_t(s.listeners);try{for(l.s();!(c=l.n()).done;){c.value.Au(o)&&(i=!0)}}catch(f){l.e(f)}finally{l.f()}s.Iu=o}}}catch(f){a.e(f)}finally{a.f()}i&&Py(r)}
2function Ay(e,t,n){var r=Hf(e),i=r.queries.get(t);if(i){var a,o=_t(i.listeners);try{for(o.s();!(a=o.n()).done;){a.value.onError(n)}}catch(u){o.e(u)}finally{o.f()}}r.queries.delete(t)}function Py(e){e.Tu.forEach((function(e){e.next()}))}var Ry=function(){function e(t,n,r){xt(this,e),this.query=t,this.Ru=n,this.bu=!1,this.Pu=null,this.onlineState="Unknown",this.options=r||{}}return St(e,[{key:"Au",value:function(e){if(!this.options.includeMetadataChanges){var t,n=[],r=_t(e.docChanges);try{for(r.s();!(t=r.n()).done;){var i=t.value;3!==i.type&&n.push(i)}}catch(o){r.e(o)}finally{r.f()}e=new xy(e.query,e.docs,e.oldDocs,n,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0)}var a=!1;return this.bu?this.vu(e)&&(this.Ru.next(e),a=!0):this.Vu(e,this.onlineState)&&(this.Su(e),a=!0),this.Pu=e,a}},{key:"onError",value:function(e){this.Ru.error(e)}},{key:"Eu",value:function(e){this.onlineState=e;var t=!1;return this.Pu&&!this.bu&&this.Vu(this.Pu,e)&&(this.Su(this.Pu),t=!0),t}},{key:"Vu",value:function(e,t){if(!e.fromCache)return!0;var n="Offline"!==t;return(!this.options.Du||!n)&&(!e.docs.isEmpty()||"Offline"===t)}},{key:"vu",value:function(e){if(e.docChanges.length>0)return!0;var t=this.Pu&&this.Pu.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!t)&&!0===this.options.includeMetadataChanges}},{key:"Su",value:function(e){e=xy.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache),this.bu=!0,this.Ru.next(e)}}]),e}();var Dy=St((function e(t){xt(this,e),this.key=t})),Ly=St((function e(t){xt(this,e),this.key=t})),jy=function(){function e(t,n){xt(this,e),this.query=t,this.Fu=n,this.$u=null,this.current=!1,this.Bu=Up(),this.mutatedKeys=Up(),this.Lu=Hd(t),this.Uu=new wy(this.Lu)}return St(e,[{key:"qu",get:function(){return this.Fu}},{key:"Ku",value:function(e,t){var n=this,r=t?t.Gu:new _y,i=t?t.Uu:this.Uu,a=t?t.mutatedKeys:this.mutatedKeys,o=i,u=!1,s="F"===this.query.limitType&&i.size===this.query.limit?i.last():null,c="L"===this.query.limitType&&i.size===this.query.limit?i.first():null;if(e.inorderTraversal((function(e,t){var l=i.get(e),f=qd(n.query,t)?t:null,h=!!l&&n.mutatedKeys.has(l.key),d=!!f&&(f.hasLocalMutations||n.mutatedKeys.has(f.key)&&f.hasCommittedMutations),p=!1;l&&f?l.data.isEqual(f.data)?h!==d&&(r.track({type:3,doc:f}),p=!0):n.Qu(l,f)||(r.track({type:2,doc:f}),p=!0,(s&&n.Lu(f,s)>0||c&&n.Lu(f,c)<0)&&(u=!0)):!l&&f?(r.track({type:0,doc:f}),p=!0):l&&!f&&(r.track({type:1,doc:l}),p=!0,(s||c)&&(u=!0)),p&&(f?(o=o.add(f),a=d?a.add(e):a.delete(e)):(o=o.delete(e),a=a.delete(e)))})),null!==this.query.limit)for(;o.size>this.query.limit;){var l="F"===this.query.limitType?o.last():o.first();o=o.delete(l.key),a=a.delete(l.key),r.track({type:1,doc:l})}return{Uu:o,Gu:r,Oi:u,mutatedKeys:a}}},{key:"Qu",value:function(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}},{key:"applyChanges",value:function(e,t,n){var r=this,i=this.Uu;this.Uu=e.Uu,this.mutatedKeys=e.mutatedKeys;var a=e.Gu.pu();a.sort((function(e,t){return function(e,t){var n=function(e){switch(e){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return qf()}};return n(e)-n(t)}(e.type,t.type)||r.Lu(e.doc,t.doc)})),this.ju(n);var o=t?this.Wu():[],u=0===this.Bu.size&&this.current?1:0,s=u!==this.$u;return this.$u=u,0!==a.length||s?{snapshot:new xy(this.query,e.Uu,i,a,e.mutatedKeys,0===u,s,!1),zu:o}:{zu:o}}},{key:"Eu",value:function(e){return this.current&&"Offline"===e?(this.current=!1,this.applyChanges({Uu:this.Uu,Gu:new _y,mutatedKeys:this.mutatedKeys,Oi:!1},!1)):{zu:[]}}},{key:"Hu",value:function(e){return!this.Fu.has(e)&&!!this.Uu.has(e)&&!this.Uu.get(e).hasLocalMutations}},{key:"ju",value:function(e){var t=this;e&&(e.addedDocuments.forEach((function(e){return t.Fu=t.Fu.add(e)})),e.modifiedDocuments.forEach((function(e){})),e.removedDocuments.forEach((function(e){return t.Fu=t.Fu.delete(e)})),this.current=e.current)}},{key:"Wu",value:function(){var e=this;if(!this.current)return[];var t=this.Bu;this.Bu=Up(),this.Uu.forEach((function(t){e.Hu(t.key)&&(e.Bu=e.Bu.add(t.key))}));var n=[];return t.forEach((function(t){e.Bu.has(t)||n.push(new Ly(t))})),this.Bu.forEach((function(e){t.has(e)||n.push(new Dy(e))})),n}},{key:"Ju",value:function(e){this.Fu=e.ji,this.Bu=Up();var t=this.Ku(e.documents);return this.applyChanges(t,!0)}},{key:"Yu",value:function(){return xy.fromInitialDocuments(this.query,this.Uu,this.mutatedKeys,0===this.$u)}}]),e}(),My=St((function e(t,n,r){xt(this,e),this.query=t,this.targetId=n,this.view=r})),Fy=St((function e(t){xt(this,e),this.key=t,this.Xu=!1})),Uy=function(){function e(t,n,r,i,a,o){xt(this,e),this.localStore=t,this.remoteStore=n,this.eventManager=r,this.sharedCl
2ientState=i,this.currentUser=a,this.maxConcurrentLimboResolutions=o,this.Zu={},this.tc=new Cp((function(e){return Vd(e)}),Ud),this.ec=new Map,this.nc=new Set,this.sc=new Th(fh.comparator),this.ic=new Map,this.rc=new Kv,this.oc={},this.uc=new Map,this.cc=Uv.Rn(),this.onlineState="Unknown",this.ac=void 0}return St(e,[{key:"isPrimaryClient",get:function(){return!0===this.ac}}]),e}();function Vy(e,t){return zy.apply(this,arguments)}function zy(){return zy=lt(st().mark((function e(t,n){var r,i,a,o,u,s;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=vg(t),!(o=r.tc.get(n))){e.next=6;break}i=o.targetId,r.sharedClientState.addLocalQueryTarget(i),a=o.view.Yu(),e.next=15;break;case 6:return e.next=8,fm(r.localStore,Md(n));case 8:return u=e.sent,r.isPrimaryClient&&jm(r.remoteStore,u),s=r.sharedClientState.addLocalQueryTarget(u.targetId),i=u.targetId,e.next=14,qy(r,n,i,"current"===s);case 14:a=e.sent;case 15:return e.abrupt("return",a);case 16:case"end":return e.stop()}}),e)}))),zy.apply(this,arguments)}function qy(e,t,n,r){return By.apply(this,arguments)}function By(){return By=lt(st().mark((function e(t,n,r,i){var a,o,u,s,c,l;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.hc=function(e,n,r){return function(){var e=lt(st().mark((function e(t,n,r,i){var a,o,u;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=n.view.Ku(r),e.t0=a.Oi,!e.t0){e.next=6;break}return e.next=5,pm(t.localStore,n.query,!1).then((function(e){var t=e.documents;return n.view.Ku(t,a)}));case 5:a=e.sent;case 6:return o=i&&i.targetChanges.get(n.targetId),u=n.view.applyChanges(a,t.isPrimaryClient,o),e.abrupt("return",(ug(t,n.targetId,u.zu),u.snapshot));case 8:case"end":return e.stop()}}),e)})));return function(t,n,r,i){return e.apply(this,arguments)}}()(t,e,n,r)},e.next=3,pm(t.localStore,n,!0);case 3:return a=e.sent,o=new jy(n,a.ji),u=o.Ku(a.documents),s=Bp.createSynthesizedTargetChangeForCurrentChange(r,i&&"Offline"!==t.onlineState),c=o.applyChanges(u,t.isPrimaryClient,s),ug(t,r,c.zu),l=new My(n,r,o),e.abrupt("return",(t.tc.set(n,l),t.ec.has(r)?t.ec.get(r).push(n):t.ec.set(r,[n]),c.snapshot));case 11:case"end":return e.stop()}}),e)}))),By.apply(this,arguments)}function Hy(e,t){return Ky.apply(this,arguments)}function Ky(){return Ky=lt(st().mark((function e(t,n){var r,i,a;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=Hf(t),i=r.tc.get(n),!((a=r.ec.get(i.targetId)).length>1)){e.next=3;break}return e.abrupt("return",(r.ec.set(i.targetId,a.filter((function(e){return!Ud(e,n)}))),void r.tc.delete(n)));case 3:if(!r.isPrimaryClient){e.next=11;break}if(r.sharedClientState.removeLocalQueryTarget(i.targetId),e.t0=r.sharedClientState.isActiveQueryTarget(i.targetId),e.t0){e.next=9;break}return e.next=9,hm(r.localStore,i.targetId,!1).then((function(){r.sharedClientState.clearQueryState(i.targetId),Mm(r.remoteStore,i.targetId),ag(r,i.targetId)})).catch(bh);case 9:e.next=14;break;case 11:return ag(r,i.targetId),e.next=14,hm(r.localStore,i.targetId,!0);case 14:case"end":return e.stop()}}),e)}))),Ky.apply(this,arguments)}function Wy(e,t,n){return Qy.apply(this,arguments)}function Qy(){return Qy=lt(st().mark((function e(t,n,r){var i,a,o;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=mg(t),e.prev=1,e.next=4,function(e,t){var n,r,i=Hf(e),a=ah.now(),o=t.reduce((function(e,t){return e.add(t.key)}),Up());return i.persistence.runTransaction("Locally write mutations","readwrite",(function(e){var u=Op(),s=Up();return i.Ui.getEntries(e,o).next((function(e){(u=e).forEach((function(e,t){t.isValidDocument()||(s=s.add(e))}))})).next((function(){return i.localDocuments.getOverlayedDocuments(e,u)})).next((function(r){n=r;var o,u=[],s=_t(t);try{for(s.s();!(o=s.n()).done;){var c=o.value,l=pp(c,n.get(c.key).overlayedDocument);null!=l&&u.push(new yp(c.key,l,cd(l.value.mapValue),sp.exists(!0)))}}catch(f){s.e(f)}finally{s.f()}
2return i.mutationQueue.addMutationBatch(e,a,u,t)})).next((function(t){r=t;var a=t.applyToLocalDocumentSet(n,s);return i.documentOverlayCache.saveOverlays(e,t.batchId,a)}))})).then((function(){return{batchId:r.batchId,changes:Rp(n)}}))}(i.localStore,n);case 4:return a=e.sent,i.sharedClientState.addPendingMutation(a.batchId),function(e,t,n){var r=e.oc[e.currentUser.toKey()];r||(r=new Th(rh)),r=r.insert(t,n),e.oc[e.currentUser.toKey()]=r}(i,a.batchId,r),e.next=9,lg(i,a.changes);case 9:return e.next=11,Zm(i.remoteStore);case 11:e.next=17;break;case 13:e.prev=13,e.t0=e.catch(1),o=ky(e.t0,"Failed to persist write"),r.reject(o);case 17:case"end":return e.stop()}}),e,null,[[1,13]])}))),Qy.apply(this,arguments)}function Gy(e,t){return $y.apply(this,arguments)}function $y(){return $y=lt(st().mark((function e(t,n){var r,i;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Hf(t),e.prev=1,e.next=4,sm(r.localStore,n);case 4:return i=e.sent,n.targetChanges.forEach((function(e,t){var n=r.ic.get(t);n&&(Bf(e.addedDocuments.size+e.modifiedDocuments.size+e.removedDocuments.size<=1),e.addedDocuments.size>0?n.Xu=!0:e.modifiedDocuments.size>0?Bf(n.Xu):e.removedDocuments.size>0&&(Bf(n.Xu),n.Xu=!1))})),e.next=8,lg(r,i,n);case 8:e.next=14;break;case 10:return e.prev=10,e.t0=e.catch(1),e.next=14,bh(e.t0);case 14:case"end":return e.stop()}}),e,null,[[1,10]])}))),$y.apply(this,arguments)}function Xy(e,t,n){var r=Hf(e);if(r.isPrimaryClient&&0===n||!r.isPrimaryClient&&1===n){var i=[];r.tc.forEach((function(e,n){var r=n.view.Eu(t);r.snapshot&&i.push(r.snapshot)})),function(e,t){var n=Hf(e);n.onlineState=t;var r=!1;n.queries.forEach((function(e,n){var i,a=_t(n.listeners);try{for(a.s();!(i=a.n()).done;){i.value.Eu(t)&&(r=!0)}}catch(o){a.e(o)}finally{a.f()}})),r&&Py(n)}(r.eventManager,t),i.length&&r.Zu.Go(i),r.onlineState=t,r.isPrimaryClient&&r.sharedCl
2ientState.setOnlineState(t)}}function Yy(e,t,n){return Jy.apply(this,arguments)}function Jy(){return Jy=lt(st().mark((function e(t,n,r){var i,a,o,u,s,c;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((i=Hf(t)).sharedClientState.updateQueryState(n,"rejected",r),a=i.ic.get(n),!(o=a&&a.key)){e.next=14;break}return u=(u=new Th(fh.comparator)).insert(o,ld.newNoDocument(o,oh.min())),s=Up().add(o),c=new qp(oh.min(),new Map,new Oh(rh),u,s),e.next=9,Gy(i,c);case 9:i.sc=i.sc.remove(o),i.ic.delete(n),cg(i),e.next=16;break;case 14:return e.next=16,hm(i.localStore,n,!1).then((function(){return ag(i,n,r)})).catch(bh);case 16:case"end":return e.stop()}}),e)}))),Jy.apply(this,arguments)}function Zy(e,t){return eg.apply(this,arguments)}function eg(){return eg=lt(st().mark((function e(t,n){var r,i,a;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Hf(t),i=n.batch.batchId,e.prev=1,e.next=4,om(r.localStore,n);case 4:return a=e.sent,ig(r,i,null),rg(r,i),r.sharedClientState.updateMutationState(i,"acknowledged"),e.next=10,lg(r,a);case 10:e.next=16;break;case 12:return e.prev=12,e.t0=e.catch(1),e.next=16,bh(e.t0);case 16:case"end":return e.stop()}}),e,null,[[1,12]])}))),eg.apply(this,arguments)}function tg(e,t,n){return ng.apply(this,arguments)}function ng(){return ng=lt(st().mark((function e(t,n,r){var i,a;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Hf(t),e.prev=1,e.next=4,function(e,t){var n=Hf(e);return n.persistence.runTransaction("Reject batch","readwrite-primary",(function(e){var r;
2return n.mutationQueue.lookupMutationBatch(e,t).next((function(t){return Bf(null!==t),r=t.keys(),n.mutationQueue.removeMutationBatch(e,t)})).next((function(){return n.mutationQueue.performConsistencyCheck(e)})).next((function(){return n.documentOverlayCache.removeOverlaysForBatchId(e,r,t)})).next((function(){return n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(e,r)})).next((function(){return n.localDocuments.getDocuments(e,r)}))}))}(i.localStore,n);case 4:return a=e.sent,ig(i,n,r),rg(i,n),i.sharedClientState.updateMutationState(n,"rejected",r),e.next=10,lg(i,a);case 10:e.next=16;break;case 12:return e.prev=12,e.t0=e.catch(1),e.next=16,bh(e.t0);case 16:case"end":return e.stop()}}),e,null,[[1,12]])}))),ng.apply(this,arguments)}function rg(e,t){(e.uc.get(t)||[]).forEach((function(e){e.resolve()})),e.uc.delete(t)}function ig(e,t,n){var r=Hf(e),i=r.oc[r.currentUser.toKey()];if(i){var a=i.get(t);a&&(n?a.reject(n):a.resolve(),i=i.remove(t)),r.oc[r.currentUser.toKey()]=i}}function ag(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e.sharedClientState.removeLocalQueryTarget(t);var r,i=_t(e.ec.get(t));try{for(i.s();!(r=i.n()).done;){var a=r.value;e.tc.delete(a),n&&e.Zu.lc(a,n)}}catch(o){i.e(o)}finally{i.f()}e.ec.delete(t),e.isPrimaryClient&&e.rc.us(t).forEach((function(t){e.rc.containsKey(t)||og(e,t)}))}function og(e,t){e.nc.delete(t.path.canonicalString());var n=e.sc.get(t);null!==n&&(Mm(e.remoteStore,n),e.sc=e.sc.remove(t),e.ic.delete(n),cg(e))}function ug(e,t,n){var r,i=_t(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;a instanceof Dy?(e.rc.addReference(a.key,t),sg(e,a)):a instanceof Ly?(Ff("SyncEngine","Document no longer in limbo: "+a.key),e.rc.removeReference(a.key,t),e.rc.containsKey(a.key)||og(e,a.key)):qf()}}catch(o){i.e(o)}finally{i.f()}}function sg(e,t){var n=t.key,r=n.path.canonicalString();e.sc.get(n)||e.nc.has(r)||(Ff("SyncEngine","New document in limbo: "+n),e.nc.add(r),cg(e))}function cg(e){for(;e.nc.size>0&&e.sc.size<e.maxConcurrentLimboResolutions;){var t=e.nc.values().next().value;e.nc.delete(t);var n=new fh(sh.fromString(t)),r=e.cc.next();e.ic.set(r,new Fy(n)),e.sc=e.sc.insert(n,r),jm(e.remoteStore,new Pv(Md(Pd(n.path)),r,2,xh.ot))}}function lg(e,t,n){return fg.apply(this,arguments)}function fg(){return fg=lt(st().mark((function e(t,n,r){var i,a,o,u;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=Hf(t),a=[],o=[],u=[],e.t0=i.tc.isEmpty(),e.t0){e.next=9;break}return i.tc.forEach((function(e,t){u.push(i.hc(t,n,r).then((function(e){if(e){i.isPrimaryClient&&i.sharedClientState.updateQueryState(t.targetId,e.fromCache?"not-current":"current"),a.push(e);var n=em.Vi(t.targetId,e);o.push(n)}})))})),e.next=6,Promise.all(u);case 6:return i.Zu.Go(a),e.next=9,function(){var e=lt(st().mark((function e(t,n){var r,i,a,o,u,s,c,l;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Hf(t),e.prev=1,e.next=4,r.persistence.runTransaction("notifyLocalViewChanges","readwrite",(function(e){return wh.forEach(n,(function(t){return wh.forEach(t.Pi,(function(n){return r.persistence.referenceDelegate.addReference(e,t.targetId,n)})).next((function(){return wh.forEach(t.vi,(function(n){return r.persistence.referenceDelegate.removeReference(e,t.targetId,n)}))}))}))}));case 4:e.next=11;break;case 6:if(e.prev=6,e.t0=e.catch(1),_h(e.t0)){e.next=10;break}throw e.t0;case 10:Ff("LocalStore","Failed to update sequence numbers: "+e.t0);case 11:i=_t(n);try{for(i.s();!(a=i.n()).done;)o=a.value,u=o.targetId,o.fromCache||(s=r.$i.get(u),c=s.snapshotVersion,l=s.withLastLimboFreeSnapshotVersion(c),r.$i=r.$i.insert(u,l))}catch(f){i.e(f)}finally{i.f()}case 13:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(t,n){return e.apply(this,arguments)}}()(i.localStore,o);case 9:case"end":return e.stop()}}),e)}))),fg.apply(this,arguments)}function hg(e,t){return dg.apply(this,arguments)}function dg(){return dg=lt(st().mark((function e(t,n){var r,i;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=Hf(t)).currentUser.isEqual(n)){e.next=11;break}
2return Ff("SyncEngine","User change. New user:",n.toKey()),e.next=5,im(r.localStore,n);case 5:return i=e.sent,r.currentUser=n,function(e,t){e.uc.forEach((function(e){e.forEach((function(e){e.reject(new Wf(Kf.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))}))})),e.uc.clear()}(r),r.sharedClientState.handleUserChange(n,i.removedBatchIds,i.addedBatchIds),e.next=11,lg(r,i.Ki);case 11:case"end":return e.stop()}}),e)}))),dg.apply(this,arguments)}function pg(e,t){var n=Hf(e),r=n.ic.get(t);if(r&&r.Xu)return Up().add(r.key);var i=Up(),a=n.ec.get(t);if(!a)return i;var o,u=_t(a);try{for(u.s();!(o=u.n()).done;){var s=o.value,c=n.tc.get(s);i=i.unionWith(c.view.qu)}}catch(l){u.e(l)}finally{u.f()}return i}function vg(e){var t=Hf(e);return t.remoteStore.remoteSyncer.applyRemoteEvent=Gy.bind(null,t),t.remoteStore.remoteSyncer.getRemoteKeysForTarget=pg.bind(null,t),t.remoteStore.remoteSyncer.rejectListen=Yy.bind(null,t),t.Zu.Go=Oy.bind(null,t.eventManager),t.Zu.lc=Ay.bind(null,t.eventManager),t}function mg(e){var t=Hf(e);return t.remoteStore.remoteSyncer.applySuccessfulWrite=Zy.bind(null,t),t.remoteStore.remoteSyncer.rejectFailedWrite=tg.bind(null,t),t}var yg=function(){function e(){xt(this,e),this.synchronizeTabs=!1}return St(e,[{key:"initialize",value:function(){var e=lt(st().mark((function e(t){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.wt=Em(t.databaseInfo.databaseId),this.sharedClientState=this.dc(t),this.persistence=this._c(t),e.next=5,this.persistence.start();case 5:this.localStore=this.wc(t),this.gcScheduler=this.mc(t,this.localStore),this.indexBackfillerScheduler=this.gc(t,this.localStore);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"mc",value:function(e,t){return null}},{key:"gc",value:function(e,t){return null}},{key:"wc",value:function(e){return rm(this.persistence,new tm,e.initialUser,this.wt)}},{key:"_c",value:function(e){return new Yv(Zv.Ms,this.wt)}},{key:"dc",value:function(e){return new ym}},{key:"terminate",value:function(){var e=lt(st().mark((function e(){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.gcScheduler&&this.gcScheduler.stop(),e.next=3,this.sharedClientState.shutdown();case 3:return e.next=5,this.persistence.shutdown();case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),gg=function(){function e(){xt(this,e)}return St(e,[{key:"initialize",value:function(){var e=lt(st().mark((function e(t,n){var r=this;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=this.localStore,e.t0){e.next=12;break}return this.localStore=t.localStore,this.sharedClientState=t.sharedClientState,this.datastore=this.createDatastore(n),this.remoteStore=this.createRemoteStore(n),this.eventManager=this.createEventManager(n),this.syncEngine=this.createSyncEngine(n,!t.synchronizeTabs),this.sharedClientState.onlineStateHandler=function(e){return Xy(r.syncEngine,e,1)},this.remoteStore.remoteSyncer.handleCredentialChange=hg.bind(null,this.syncEngine),e.next=12,vy(this.remoteStore,this.syncEngine.isPrimaryClient);case 12:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"createEventManager",value:function(e){return new Sy}},{key:"createDatastore",value:function(e){var t,n=Em(e.databaseInfo.databaseId),r=(t=e.databaseInfo,new _m(t));return function(e,t,n,r){return new Nm(e,t,n,r)}(e.authCredentials,e.appCheckCredentials,r,n)}},{key:"createRemoteStore",value:function(e){var t,n,r,i,a,o=this;return t=this.localStore,n=this.datastore,r=e.asyncQueue,i=function(e){return Xy(o.syncEngine,e,0)},a=bm.V()?new bm:new gm,new Am(t,n,r,i,a)}},{key:"createSyncEngine",value:function(e,t){return function(e,t,n,r,i,a,o){var u=new Uy(e,t,n,r,i,a);return o&&(u.ac=!0),u}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,t)}},{key:"terminate",value:function(){return function(){var e=lt(st().mark((function e(t){var n;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Hf(t),Ff("RemoteStore","RemoteStore shutting down."),n.lu.add(5),e.next=5,Dm(n);case 5:n.du.shutdown(),n._u.set("Unknown");case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()(this.remoteStore)}}]),e}();var bg=function(){function e(t){xt(this,e),this.observer=t,this.muted=!1}return St(e,[{key:"next",value:function(e){this.observer.next&&this.Ic(this.observer.next,e)}},{key:"error",value:function(e){this.observer.error?this.Ic(this.observer.error,e):console.error("Uncaught Error in snapshot listener:",e)}},{key:"Tc",value:function(){this.muted=!0}
2},{key:"Ic",value:function(e,t){var n=this;this.muted||setTimeout((function(){n.muted||e(t)}),0)}}]),e}(),kg=function(){function e(t,n,r,i){var a=this;xt(this,e),this.authCredentials=t,this.appCheckCredentials=n,this.asyncQueue=r,this.databaseInfo=i,this.user=Df.UNAUTHENTICATED,this.clientId=nh.I(),this.authCredentialListener=function(){return Promise.resolve()},this.appCheckCredentialListener=function(){return Promise.resolve()},this.authCredentials.start(r,function(){var e=lt(st().mark((function e(t){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Ff("FirestoreClient","Received user=",t.uid),e.next=3,a.authCredentialListener(t);case 3:a.user=t;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),this.appCheckCredentials.start(r,(function(e){return Ff("FirestoreClient","Received new app check token=",e),a.appCheckCredentialListener(e,a.user)}))}return St(e,[{key:"getConfiguration",value:function(){var e=lt(st().mark((function e(){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100});case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"setCredentialChangeListener",value:function(e){this.authCredentialListener=e}},{key:"setAppCheckTokenChangeListener",value:function(e){this.appCheckCredentialListener=e}},{key:"verifyNotTerminated",value:function(){if(this.asyncQueue.isShuttingDown)throw new Wf(Kf.FAILED_PRECONDITION,"The client has already been terminated.")}},{key:"terminate",value:function(){var e=this;this.asyncQueue.enterRestrictedMode();var t=new Qf;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(lt(st().mark((function n(){var r;return st().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,n.t0=e.onlineComponents,!n.t0){n.next=5;break}return n.next=5,e.onlineComponents.terminate();case 5:if(n.t1=e.offlineComponents,!n.t1){n.next=9;break}return n.next=9,e.offlineComponents.terminate();case 9:e.authCredentials.shutdown(),e.appCheckCredentials.shutdown(),t.resolve(),n.next=18;break;case 14:n.prev=14,n.t2=n.catch(0),r=ky(n.t2,"Failed to shutdown persistence"),t.reject(r);case 18:case"end":return n.stop()}}),n,null,[[0,14]])})))),t.promise}}]),e}();function wg(e,t){return _g.apply(this,arguments)}function _g(){return _g=lt(st().mark((function e(t,n){var r,i;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.asyncQueue.verifyOperationInProgress(),Ff("FirestoreClient","Initializing OfflineComponentProvider"),e.next=3,t.getConfiguration();case 3:return r=e.sent,e.next=6,n.initialize(r);case 6:i=r.initialUser,t.setCredentialChangeListener(function(){var e=lt(st().mark((function e(t){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=i.isEqual(t),e.t0){e.next=5;break}return e.next=4,im(n.localStore,t);case 4:i=t;case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),n.persistence.setDatabaseDeletedListener((function(){return t.terminate()})),t.offlineComponents=n;case 8:case"end":return e.stop()}}),e)}))),_g.apply(this,arguments)}function xg(e,t){return Eg.apply(this,arguments)}function Eg(){return Eg=lt(st().mark((function e(t,n){var r,i;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.asyncQueue.verifyOperationInProgress(),e.next=3,Sg(t);case 3:return r=e.sent,Ff("FirestoreClient","Initializing OnlineComponentProvider"),e.next=7,t.getConfiguration();case 7:return i=e.sent,e.next=10,n.initialize(r,i);case 10:t.setCredentialChangeListener((function(e){return dy(n.remoteStore,e)})),t.setAppCheckTokenChangeListener((function(e,t){return dy(n.remoteStore,t)})),t.onlineComponents=n;case 13:case"end":return e.stop()}}),e)}))),Eg.apply(this,arguments)}function Sg(e){return Ig.apply(this,arguments)}function Ig(){return Ig=lt(st().mark((function e(t){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=t.offlineComponents,e.t0){e.next=5;break}return Ff("FirestoreClient","Using default OfflineComponentProvider"),e.next=5,wg(t,new yg);case 5:return e.abrupt("return",t.offlineComponents);case 6:case"end":return e.stop()}}),e)}))),Ig.apply(this,arguments)}function Tg(e){return Cg.apply(this,arguments)}function Cg(){return Cg=lt(st().mark((function e(t){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=t.onlineComponents,e.t0){e.next=5;break}return Ff("FirestoreClient","Using default OnlineComponentProvider"),e.next=5,xg(t,new gg);case 5:return e.abrupt("return",t.onlineComponents);case 6:case"end":return e.stop()}}),e)}))),Cg.apply(this,arguments)}function Ng(e){return Tg(e).then((function(e){return e.syncEngine}))}function Og(e){return Ag.apply(this,arguments)}function Ag(){return Ag=lt(st().mark((function e(t){var n,r;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Tg(t);case 2:return n=e.sent,r=n.eventManager,e.abrupt("return",(r.onListen=Vy.bind(null,n.syncEngine),r.onUnlisten=Hy.bind(null,n.syncEngine),r));case 5:case"end":return e.stop()}}),e)}))),Ag.apply(this,arguments)}var Pg=new Map;function Rg(e,t,n){if(!n)throw new Wf(Kf.INVALID_ARGUMENT,"Function ".concat(e,"() cannot be called with an empty ").concat(t,"."))}function Dg(e){if(!fh.isDocumentKey(e))throw new Wf(Kf.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but ".concat(e," has ").concat(e.length,"."))}function Lg(e){if(fh.isDocumentKey(e))throw new Wf(Kf.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but ".concat(e," has ").concat(e.length,"."))}function jg(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"==typeof e)return e.length>20&&(e="".concat(e.substring(0,20),"...")),JSON.stringify(e);if("number"==typeof e||"boolean"==typeof e)return""+e;if("object"==typeof e){if(e instanceof Array)return"an array";var t=function(e){return e.constructor?e.constructor.name:null}(e);return t?"a custom ".concat(t," object"):"an object"}return"function"==typeof e?"a function":qf()}function Mg(e,t){if("_delegate"in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new Wf(Kf.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");var n=jg(e);throw new Wf(Kf.INVALID_ARGUMENT,"Expected type '".concat(t.name,"', but it was: ").concat(n))}return e}var Fg=function(){function e(t){var n;if(xt(this,e),void 0===t.host){if(void 0!==t.ssl)throw new Wf(Kf.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=t.host,this.ssl=null===(n=t.ssl)||void 0===n||n;if(this.credentials=t.credentials,this.ignoreUndefinedProperties=!!t.ignoreUndefinedProperties,void 0===t.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==t.cacheSizeBytes&&t.cacheSizeBytes<1048576)throw new Wf(Kf.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=t.cacheSizeBytes}this.experimentalForceLongPolling=!!t.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!!t.experimentalAutoDetectLongPolling,this.useFetchStreams=!!t.useFetchStreams,function(e,t,n,r){if(!0===t&&!0===r)throw new Wf(Kf.INVALID_ARGUMENT,"".concat(e," and ").concat(n," cannot be used together."))}("experimentalForceLongPolling",t.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",t.experimentalAutoDetectLongPolling)}return St(e,[{key:"isEqual",value:function(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}]),e}(),Ug=function(){function e(t,n,r){xt(this,e),this._authCredentials=n,this._appCheckCredentials=r,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new Fg({}),this._settingsFrozen=!1,t instanceof qh?this._databaseId=t:(this._app=t,this._databaseId=function(e){if(!Object.prototype.hasOwnProperty.apply(e.options,["projectId"]))throw new Wf(Kf.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new qh(e.options.projectId)}(t))}return St(e,[{key:"app",get:function(){if(!this._app)throw new Wf(Kf.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}},{key:"_initialized",get:function(){return this._settingsFrozen}},{key:"_terminated",get:function(){return void 0!==this._terminateTask}},{key:"_setSettings",value:function(e){if(this._settingsFrozen)throw new Wf(Kf.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new Fg(e),void 0!==e.credentials&&(this._authCredentials=function(e){if(!e)return new $f;switch(e.type){case"gapi":var t=e.client;return Bf(!("object"!=typeof t||null===t||!t.auth||!t.auth.getAuthHeaderValueForFirstParty)),new Jf(t,e.sessionIndex||"0",e.iamToken||null);case"provider":return e.client;default:throw new Wf(Kf.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invali
2d credential type")}}(e.credentials))}},{key:"_getSettings",value:function(){return this._settings}},{key:"_freezeSettings",value:function(){return this._settingsFrozen=!0,this._settings}},{key:"_delete",value:function(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}},{key:"toJSON",value:function(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}},{key:"_terminate",value:function(){return function(e){var t=Pg.get(e);t&&(Ff("ComponentProvider","Removing Datastore"),Pg.delete(e),t.terminate())}(this),Promise.resolve()}}]),e}();var Vg=function(){function e(t,n,r){xt(this,e),this.converter=n,this._key=r,this.type="document",this.firestore=t}return St(e,[{key:"_path",get:function(){return this._key.path}},{key:"id",get:function(){return this._key.path.lastSegment()}},{key:"path",get:function(){return this._key.path.canonicalString()}},{key:"parent",get:function(){return new qg(this.firestore,this.converter,this._key.path.popLast())}},{key:"withConverter",value:function(t){return new e(this.firestore,t,this._key)}}]),e}(),zg=function(){function e(t,n,r){xt(this,e),this.converter=n,this._query=r,this.type="query",this.firestore=t}return St(e,[{key:"withConverter",value:function(t){return new e(this.firestore,t,this._query)}}]),e}(),qg=function(e){Ct(n,e);var t=Pt(n);function n(e,r,i){var a;return xt(this,n),(a=t.call(this,e,r,Pd(i)))._path=i,a.type="collection",a}return St(n,[{key:"id",get:function(){return this._query.path.lastSegment()}},{key:"path",get:function(){return this._query.path.canonicalString()}},{key:"parent",get:function(){var e=this._path.popLast();return e.isEmpty()?null:new Vg(this.firestore,null,new fh(e))}},{key:"withConverter",value:function(e){return new n(this.firestore,e,this._path)}}]),n}(zg);function Bg(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(e=nn(e),1===arguments.length&&(t=nh.I()),Rg("doc","path",t),e instanceof Ug){var a=sh.fromString.apply(sh,[t].concat(r));return Dg(a),new Vg(e,null,new fh(a))}if(!(e instanceof Vg||e instanceof qg))throw new Wf(Kf.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");var o=e._path.child(sh.fromString.apply(sh,[t].concat(r)));return Dg(o),new Vg(e.firestore,e instanceof qg?e.converter:null,new fh(o))}var Hg=function(){function e(){var t=this;xt(this,e),this.Oc=Promise.resolve(),this.Mc=[],this.Fc=!1,this.$c=[],this.Bc=null,this.Lc=!1,this.Uc=!1,this.qc=[],this.So=new Sm(this,"async_queue_retry"),this.Kc=function(){var e=xm();e&&Ff("AsyncQueue","Visibility state changed to "+e.visibilityState),t.So.Eo()};var n=xm();n&&"function"==typeof n.addEventListener&&n.addEventListener("visibilitychange",this.Kc)}return St(e,[{key:"isShuttingDown",get:function(){return this.Fc}},{key:"enqueueAndForget",value:function(e){this.enqueue(e)}},{key:"enqueueAndForgetEvenWhileRestricted",value:function(e){this.Gc(),this.Qc(e)}},{key:"enterRestrictedMode",value:function(e){if(!this.Fc){this.Fc=!0,this.Uc=e||!1;var t=xm();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.Kc)}}},{key:"enqueue",value:function(e){var t=this;if(this.Gc(),this.Fc)return new Promise((function(){}));var n=new Qf;return this.Qc((function(){return t.Fc&&t.Uc?Promise.resolve():(e().then(n.resolve,n.reject),n.promise)})).then((function(){return n.promise}))}},{key:"enqueueRetryable",value:function(e){var t=this;this.enqueueAndForget((function(){return t.Mc.push(e),t.jc()}))}},{key:"jc",value:function(){var e=lt(st().mark((function e(){var t=this;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0===this.Mc.length){e.next=14;break}return e.prev=1,e.next=4,this.Mc[0]();case 4:this.Mc.shift(),this.So.reset(),e.next=13;break;case 8:if(e.prev=8,e.t0=e.catch(1),_h(e.t0)){e.next=12;break}throw e.t0;case 12:Ff("AsyncQueue","Operation failed with retryable error: "+e.t0);case 13:this.Mc.length>0&&this.So.Io((function(){return t.jc()}));case 14:case"end":return e.stop()}}),e,this,[[1,8]])})));return function(){return e.apply(this,arguments)}}()},{key:"Qc",value:function(e){var t=this,n=this.Oc.then((function(){return t.Lc=!0,e().catch((function(e){t.Bc=e,t.Lc=!1;var n=function(e){var t=e.message||"";return e.stack&&(t=e.stack.includes(e.message)?e.stack:e.message+"\n"+e.stack),t}(e);
2throw Uf("INTERNAL UNHANDLED ERROR: ",n),e})).then((function(e){return t.Lc=!1,e}))}));return this.Oc=n,n}},{key:"enqueueAfterDelay",value:function(e,t,n){var r=this;this.Gc(),this.qc.indexOf(e)>-1&&(t=0);var i=by.createAndSchedule(this,e,t,n,(function(e){return r.Wc(e)}));return this.$c.push(i),i}},{key:"Gc",value:function(){this.Bc&&qf()}},{key:"verifyOperationInProgress",value:function(){}},{key:"zc",value:function(){var e=lt(st().mark((function e(){var t;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.Oc,e.next=3,t;case 3:if(t!==this.Oc){e.next=0;break}case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"Hc",value:function(e){var t,n=_t(this.$c);try{for(n.s();!(t=n.n()).done;){if(t.value.timerId===e)return!0}}catch(r){n.e(r)}finally{n.f()}return!1}},{key:"Jc",value:function(e){var t=this;return this.zc().then((function(){t.$c.sort((function(e,t){return e.targetTimeMs-t.targetTimeMs}));var n,r=_t(t.$c);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.skipDelay(),"all"!==e&&i.timerId===e)break}}catch(a){r.e(a)}finally{r.f()}return t.zc()}))}},{key:"Yc",value:function(e){this.qc.push(e)}},{key:"Wc",value:function(e){var t=this.$c.indexOf(e);this.$c.splice(t,1)}}]),e}();function Kg(e){return function(e,t){if("object"!=typeof e||null===e)return!1;var n,r=e,i=_t(["next","error","complete"]);try{for(i.s();!(n=i.n()).done;){var a=n.value;if(a in r&&"function"==typeof r[a])return!0}}catch(o){i.e(o)}finally{i.f()}return!1}(e)}var Wg=function(e){Ct(n,e);var t=Pt(n);function n(e,r,i){var a;return xt(this,n),(a=t.call(this,e,r,i)).type="firestore",a._queue=new Hg,a._persistenceKey="name"in e?e.name:"[DEFAULT]",a}return St(n,[{key:"_terminate",value:function(){return this._firestoreClient||Gg(this),this._firestoreClient.terminate()}}]),n}(Ug);function Qg(e){return e._firestoreClient||Gg(e),e._firestoreClient.verifyNotTerminated(),e._firestoreClient}function Gg(e){var t,n=e._freezeSettings(),r=function(e,t,n,r){return new zh(e,t,n,r.host,r.ssl,r.experimentalForceLongPolling,r.experimentalAutoDetectLongPolling,r.useFetchStreams)}(e._databaseId,(null===(t=e._app)||void 0===t?void 0:t.options.appId)||"",e._persistenceKey,n);e._firestoreClient=new kg(e._authCredentials,e._appCheckCredentials,e._queue,r)}var $g=function(){function e(){xt(this,e);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=0;i<n.length;++i)if(0===n[i].length)throw new Wf(Kf.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new lh(n)}return St(e,[{key:"isEqual",value:function(e){return this._internalPath.isEqual(e._internalPath)}}]),e}();var Xg=function(){function e(t){xt(this,e),this._byteString=t}return St(e,[{key:"toBase64",value:function(){return this._byteString.toBase64()}},{key:"toUint8Array",value:function(){return this._byteString.toUint8Array()}},{key:"toString",value:function(){return"Bytes(base64: "+this.toBase64()+")"}},{key:"isEqual",value:function(e){return this._byteString.isEqual(e._byteString)}}],[{key:"fromBase64String",value:function(t){try{return new e(Rh.fromBase64String(t))}catch(t){throw new Wf(Kf.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+t)}}},{key:"fromUint8Array",value:function(t){return new e(Rh.fromUint8Array(t))}}]),e}(),Yg=St((function e(t){xt(this,e),this._methodName=t})),Jg=function(){function e(t,n){if(xt(this,e),!isFinite(t)||t<-90||t>90)throw new Wf(Kf.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(n)||n<-180||n>180)throw new Wf(Kf.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+n);this._lat=t,this._long=n}return St(e,[{key:"latitude",get:function(){return this._lat}},{key:"longitude",get:function(){return this._long}},{key:"isEqual",value:function(e){return this._lat===e._lat&&this._long===e._long}},{key:"toJSON",value:function(){return{latitude:this._lat,longitude:this._long}}},{key:"_compareTo",value:function(e){return rh(this._lat,e._lat)||rh(this._long,e._long)}}]),e}(),Zg=/^__.*__$/,eb=function(){function e(t,n,r){xt(this,e),this.data=t,this.fieldMask=n,this.fieldTransforms=r}return St(e,[{key:"toMutation",value:function(e,t){return null!==this.fieldMask?new yp(e,this.data,this.fieldMask,t,this.fieldTransforms):new mp(e,this.data,t,this.fieldTransforms)}}]),e}();function tb(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw qf()}}var nb=function(){function e(t,n,r,i,a,o){xt(this,e),this.settings=t,this.databaseId=n,this.wt=r,this.ignoreUndefinedProperties=i,void 0===a&&this.Xc(),this.fieldTransforms=a||[],this.fieldMask=o||[]}return St(e,[{key:"path",get:function(){return this.settings.path}},{key:"Zc",get:function(){return this.settings.Zc}},{key:"ta",value:function(t){return new e(Object.assign(Object.assign({},this.settings),t),this.databaseId,this.wt,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}},{key:"ea",value:function(e){var t,n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.ta({path:n,na:!1});
2return r.sa(e),r}},{key:"ia",value:function(e){var t,n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.ta({path:n,na:!1});return r.Xc(),r}},{key:"ra",value:function(e){return this.ta({path:void 0,na:!0})}},{key:"oa",value:function(e){return pb(e,this.settings.methodName,this.settings.ua||!1,this.path,this.settings.ca)}},{key:"contains",value:function(e){return void 0!==this.fieldMask.find((function(t){return e.isPrefixOf(t)}))||void 0!==this.fieldTransforms.find((function(t){return e.isPrefixOf(t.field)}))}},{key:"Xc",value:function(){if(this.path)for(var e=0;e<this.path.length;e++)this.sa(this.path.get(e))}},{key:"sa",value:function(e){if(0===e.length)throw this.oa("Document fields must not be empty");if(tb(this.Zc)&&Zg.test(e))throw this.oa('Document fields cannot begin and end with "__"')}}]),e}(),rb=function(){function e(t,n,r){xt(this,e),this.databaseId=t,this.ignoreUndefinedProperties=n,this.wt=r||Em(t)}return St(e,[{key:"aa",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return new nb({Zc:e,methodName:t,ca:n,path:lh.emptyPath(),na:!1,ua:r},this.databaseId,this.wt,this.ignoreUndefinedProperties)}}]),e}();function ib(e){var t=e._freezeSettings(),n=Em(e._databaseId);return new rb(e._databaseId,!!t.ignoreUndefinedProperties,n)}function ab(e,t,n,r,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},o=e.aa(a.merge||a.mergeFields?2:0,t,n,i);lb("Data must be an object, but it was:",o,r);var u,s,c=sb(r,o);if(a.merge)u=new Ph(o.fieldMask),s=o.fieldTransforms;else if(a.mergeFields){var l,f=[],h=_t(a.mergeFields);try{for(h.s();!(l=h.n()).done;){var d=l.value,p=fb(t,d,n);if(!o.contains(p))throw new Wf(Kf.INVALID_ARGUMENT,"Field '".concat(p,"' is specified in your field mask but missing from your input data."));vb(f,p)||f.push(p)}}catch(v){h.e(v)}finally{h.f()}u=new Ph(f),s=o.fieldTransforms.filter((function(e){return u.covers(e.field)}))}else u=null,s=o.fieldTransforms;return new eb(new sd(c),u,s)}function ob(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return ub(n,e.aa(r?4:3,t))}function ub(e,t){if(cb(e=nn(e)))return lb("Unsupported field value:",t,e),sb(e,t);if(e instanceof Yg)return function(e,t){if(!tb(t.Zc))throw t.oa("".concat(e._methodName,"() can only be used with update() and set()"));if(!t.path)throw t.oa("".concat(e._methodName,"() is not currently supported inside arrays"));var n=e._toFieldTransform(t);n&&t.fieldTransforms.push(n)}(e,t),null;if(void 0===e&&t.ignoreUndefinedProperties)return null;if(t.path&&t.fieldMask.push(t.path),e instanceof Array){if(t.settings.na&&4!==t.Zc)throw t.oa("Nested arrays are not supported");return function(e,t){var n,r=[],i=0,a=_t(e);try{for(a.s();!(n=a.n()).done;){var o=ub(n.value,t.ra(i));null==o&&(o={nullValue:"NULL_VALUE"}),r.push(o),i++}}catch(u){a.e(u)}finally{a.f()}return{arrayValue:{values:r}}}(e,t)}return function(e,t){if(null===(e=nn(e)))return{nullValue:"NULL_VALUE"};if("number"==typeof e)return Gd(t.wt,e);if("boolean"==typeof e)return{booleanValue:e};if("string"==typeof e)return{stringValue:e};if(e instanceof Date){var n=ah.fromDate(e);return{timestampValue:ev(t.wt,n)}}if(e instanceof ah){var r=new ah(e.seconds,1e3*Math.floor(e.nanoseconds/1e3));return{timestampValue:ev(t.wt,r)}}if(e instanceof Jg)return{geoPointValue:{latitude:e.latitude,longitude:e.longitude}};if(e instanceof Xg)return{bytesValue:tv(t.wt,e._byteString)};if(e instanceof Vg){var i=t.databaseId,a=e.firestore._databaseId;if(!a.isEqual(i))throw t.oa("Document reference is for database ".concat(a.projectId,"/").concat(a.database," but should be for database ").concat(i.projectId,"/").concat(i.database));return{referenceValue:iv(e.firestore._databaseId||t.databaseId,e._key.path)}}throw t.oa("Unsupported field value: ".concat(jg(e)))}(e,t)}function sb(e,t){var n={};return Ih(e)?t.path&&t.path.length>0&&t.fieldMask.push(t.path):Sh(e,(function(e,r){var i=ub(r,t.ea(e));null!=i&&(n[e]=i)})),{mapValue:{fields:n}}}function cb(e){return!("object"!=typeof e||null===e||e instanceof Array||e instanceof Date||e instanceof ah||e instanceof Jg||e instanceof Xg||e instanceof Vg||e instanceof Yg)}function lb(e,t,n){if(!cb(n)||!function(e){return"object"==typeof e&&null!==e&&(Object.getPrototypeOf(e)===Object.prototype||null===Object.getPrototypeOf(e))}(n)){var r=jg(n);throw"an object"===r?t.oa(e+" a custom object"):t.oa(e+" "+r)}}function fb(e,t,n){if((t=nn(t))instanceof $g)return t._internalPath;if("string"==typeof t)return db(e,t);throw pb("Field path arguments must be of type string or ",e,!1,void 0,n)}var hb=new RegExp("[~\\*/\\[\\]]");function db(e,t,n){if(t.search(hb)>=0)throw pb("Invalid field path (".concat(t,"). Paths must not contain '~', '*', '/', '[', or ']'"),e,!1,void 0,n);try{return Rt($g,wt(t.split(".")))._internalPath}catch(nk){throw pb("Invalid field path (".concat(t,"). Paths must not be empty, begin with '.', end with '.', or contain '..'"),e,!1,void 0,n)}}function pb(e,t,n,r,i){var a=r&&!r.isEmpty(),o=void 0!==i,u="Function ".concat(t,"() called with invali
2d data");n&&(u+=" (via `toFirestore()`)"),u+=". ";var s="";return(a||o)&&(s+=" (found",a&&(s+=" in field ".concat(r)),o&&(s+=" in document ".concat(i)),s+=")"),new Wf(Kf.INVALID_ARGUMENT,u+e+s)}function vb(e,t){return e.some((function(e){return e.isEqual(t)}))}var mb=function(){function e(t,n,r,i,a){xt(this,e),this._firestore=t,this._userDataWriter=n,this._key=r,this._document=i,this._converter=a}return St(e,[{key:"id",get:function(){return this._key.path.lastSegment()}},{key:"ref",get:function(){return new Vg(this._firestore,this._converter,this._key)}},{key:"exists",value:function(){return null!==this._document}},{key:"data",value:function(){if(this._document){if(this._converter){var e=new yb(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}},{key:"get",value:function(e){if(this._document){var t=this._document.data.field(gb("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}}}]),e}(),yb=function(e){Ct(n,e);var t=Pt(n);function n(){return xt(this,n),t.apply(this,arguments)}return St(n,[{key:"data",value:function(){return hr(Nt(n.prototype),"data",this).call(this)}}]),n}(mb);function gb(e,t){return"string"==typeof t?db(e,t):t instanceof $g?t._internalPath:t._delegate._internalPath}var bb=function(){function e(t,n){xt(this,e),this.hasPendingWrites=t,this.fromCache=n}return St(e,[{key:"isEqual",value:function(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}]),e}(),kb=function(e){Ct(n,e);var t=Pt(n);function n(e,r,i,a,o,u){var s;return xt(this,n),(s=t.call(this,e,r,i,a,u))._firestore=e,s._firestoreImpl=e,s.metadata=o,s}return St(n,[{key:"exists",value:function(){return hr(Nt(n.prototype),"exists",this).call(this)}},{key:"data",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._document){if(this._converter){var t=new wb(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(t,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._document){var n=this._document.data.field(gb("DocumentSnapshot.get",e));if(null!==n)return this._userDataWriter.convertValue(n,t.serverTimestamps)}}}]),n}(mb),wb=function(e){Ct(n,e);var t=Pt(n);function n(){return xt(this,n),t.apply(this,arguments)}return St(n,[{key:"data",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return hr(Nt(n.prototype),"data",this).call(this,e)}}]),n}(kb),_b=function(){function e(t,n,r,i){xt(this,e),this._firestore=t,this._userDataWriter=n,this._snapshot=i,this.metadata=new bb(i.hasPendingWrites,i.fromCache),this.query=r}return St(e,[{key:"docs",get:function(){var e=[];return this.forEach((function(t){return e.push(t)})),e}},{key:"size",get:function(){return this._snapshot.docs.size}},{key:"empty",get:function(){return 0===this.size}},{key:"forEach",value:function(e,t){var n=this;this._snapshot.docs.forEach((function(r){e.call(t,new wb(n._firestore,n._userDataWriter,r.key,r,new bb(n._snapshot.mutatedKeys.has(r.key),n._snapshot.fromCache),n.query.converter))}))}},{key:"docChanges",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=!!e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new Wf(Kf.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=function(e,t){if(e._snapshot.oldDocs.isEmpty()){var n=0;return e._snapshot.docChanges.map((function(t){return{type:"added",doc:new wb(e._firestore,e._userDataWriter,t.doc.key,t.doc,new bb(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter),oldIndex:-1,newIndex:n++}}))}var r=e._snapshot.oldDocs;return e._snapshot.docChanges.filter((function(e){return t||3!==e.type})).map((function(t){var n=new wb(e._firestore,e._userDataWriter,t.doc.key,t.doc,new bb(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter),i=-1,a=-1;return 0!==t.type&&(i=r.indexOf(t.doc.key),r=r.delete(t.doc.key)),1!==t.type&&(a=(r=r.add(t.doc)).indexOf(t.doc.key)),{type:xb(t.type),doc:n,oldIndex:i,newIndex:a}}))}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges}}]),e}();function xb(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return qf()}}function Eb(e){if("L"===e.limitType&&0===e.explicitOrderBy.length)throw new Wf(Kf.UNIMPLEMENT
2ED,"limitToLast() queries require specifying at least one orderBy() clause")}var Sb=St((function e(){xt(this,e)}));var Ib=function(e){Ct(n,e);var t=Pt(n);function n(e,r,i){var a;return xt(this,n),(a=t.call(this)).fa=e,a.da=r,a._a=i,a.type="where",a}return St(n,[{key:"_apply",value:function(e){var t=ib(e.firestore),n=function(e,t,n,r,i,a,o){var u;if(i.isKeyField()){if("array-contains"===a||"array-contains-any"===a)throw new Wf(Kf.INVALID_ARGUMENT,"Invalid Query. You can't perform '".concat(a,"' queries on documentId()."));if("in"===a||"not-in"===a){Cb(o,a);var s,c=[],l=_t(o);try{for(l.s();!(s=l.n()).done;){var f=s.value;c.push(Tb(r,e,f))}}catch(d){l.e(d)}finally{l.f()}u={arrayValue:{values:c}}}else u=Tb(r,e,o)}else"in"!==a&&"not-in"!==a&&"array-contains-any"!==a||Cb(o,a),u=ob(n,"where",o,"in"===a||"not-in"===a);var h=md.create(i,a,u);return function(e,t){if(t.ht()){var n=Dd(e);if(null!==n&&!n.isEqual(t.field))throw new Wf(Kf.INVALID_ARGUMENT,"Invalid query. All where filters with an inequality (<, <=, !=, not-in, >, or >=) must be on the same field. But you have inequality filters on '".concat(n.toString(),"' and '").concat(t.field.toString(),"'"));var r=Rd(e);null!==r&&Nb(e,t.field,r)}var i=function(e,t){var n,r=_t(e.filters);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(t.indexOf(i.op)>=0)return i.op}}catch(d){r.e(d)}finally{r.f()}return null}(e,function(e){switch(e){case"!=":return["!=","not-in"];case"array-contains":return["array-contains","array-contains-any","not-in"];case"in":return["array-contains-any","in","not-in"];case"array-contains-any":return["array-contains","array-contains-any","in","not-in"];case"not-in":return["array-contains","array-contains-any","in","not-in","!="];default:return[]}}(t.op));if(null!==i)throw i===t.op?new Wf(Kf.INVALID_ARGUMENT,"Invalid query. You cannot use more than one '".concat(t.op.toString(),"' filter.")):new Wf(Kf.INVALID_ARGUMENT,"Invalid query. You cannot use '".concat(t.op.toString(),"' filters with '").concat(i.toString(),"' filters."))}(e,h),h}(e._query,0,t,e.firestore._databaseId,this.fa,this.da,this._a);return new zg(e.firestore,e.converter,function(e,t){var n=e.filters.concat([t]);return new Od(e.path,e.collectionGroup,e.explicitOrderBy.slice(),n,e.limit,e.limitType,e.startAt,e.endAt)}(e._query,n))}}]),n}(Sb);function Tb(e,t,n){if("string"==typeof(n=nn(n))){if(""===n)throw new Wf(Kf.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!Ld(t)&&-1!==n.indexOf("/"))throw new Wf(Kf.INVALID_ARGUMENT,"Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '".concat(n,"' contains a '/' character."));var r=t.path.child(sh.fromString(n));if(!fh.isDocumentKey(r))throw new Wf(Kf.INVALID_ARGUMENT,"Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '".concat(r,"' is not because it has an odd number of segments (").concat(r.length,")."));return ed(e,new fh(r))}if(n instanceof Vg)return ed(e,n._key);throw new Wf(Kf.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ".concat(jg(n),"."))}function Cb(e,t){if(!Array.isArray(e)||0===e.length)throw new Wf(Kf.INVALID_ARGUMENT,"Invalid Query. A non-empty array is required for '".concat(t.toString(),"' filters."));if(e.length>10)throw new Wf(Kf.INVALID_ARGUMENT,"Invalid Query. '".concat(t.toString(),"' filters support a maximum of 10 elements in the value array."))}function Nb(e,t,n){if(!n.isEqual(t))throw new Wf(Kf.INVALID_ARGUMENT,"Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '".concat(t.toString(),"' and so you must also use '").concat(t.toString(),"' as your first argument to orderBy(), but your first orderBy() is on field '").concat(n.toString(),"' instead."))}var Ob=function(){function e(){xt(this,e)}return St(e,[{key:"convertValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";switch(Qh(e)){case 0:return null;case 1:return e.booleanValue;case 2:return jh(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,t);case 5:return e.stringValue;case 6:return this.convertBytes(Mh(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,t);case 10:return this.convertObject(e.mapValue,t);default:throw qf()}}},{key:"convertObject",value:function(e,t){var n=this,r={};return Sh(e.fields,(function(e,i){r[e]=n.convertValue(i,t)})),r}},{key:"convertGeoPoint",value:function(e){return new Jg(jh(e.latitude),jh(e.longitude))}},{key:"convertArray",value:function(e,t){var n=this;return(e.values||[]).map((function(e){return n.convertValue(e,t)}))}},{key:"convertServerTimestamp",value:function(e,t){switch(t){case"previous":var n=Uh(e);return null==n?null:this.convertValue(n,t);case"estimate":return this.convertTimestamp(Vh(e));default:return null}}},{key:"convertTimestamp",value:function(e){var t=Lh(e);return new ah(t.seconds,t.nanos)}},{key:"convertDocumentKey",value:function(e,t){var n=sh.fromString(e);Bf(Sv(n));var r=new qh(n.get(1),n.get(3)),i=new fh(n.popFirst(5));return r.isEqual(t)||Uf("Document ".concat(i," contains a document reference within a different database (").concat(r.projectId,"/").concat(r.database,") which is not supported. It will be treated as a reference in the current database (").concat(t.projectId,"/").concat(t.database,") instead.")),i}}]),e}();function Ab(e,t,n){return e?n&&(n.merge||n.mergeFields)?e.toFirestore(t,n):e.toFirestore(t):t}var Pb=function(e){Ct(n,e);var t=Pt(n);function n(e){var r;return xt(this,n),(r=t.call(this)).firestore=e,r}
2return St(n,[{key:"convertBytes",value:function(e){return new Xg(e)}},{key:"convertReference",value:function(e){var t=this.convertDocumentKey(e,this.firestore._databaseId);return new Vg(this.firestore,null,t)}}]),n}(Ob);function Rb(e,t,n){e=Mg(e,Vg);var r=Mg(e.firestore,Wg),i=Ab(e.converter,t,n);return Lb(r,[ab(ib(r),"setDoc",e._key,i,null!==e.converter,n).toMutation(e._key,sp.none())])}function Db(e){return Lb(Mg(e.firestore,Wg),[new xp(e._key,sp.none())])}function Lb(e,t){return function(e,t){var n=new Qf;return e.asyncQueue.enqueueAndForget(lt(st().mark((function r(){return st().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=Wy,r.next=3,Ng(e);case 3:return r.t1=r.sent,r.t2=t,r.t3=n,r.abrupt("return",(0,r.t0)(r.t1,r.t2,r.t3));case 7:case"end":return r.stop()}}),r)})))),n.promise}(Qg(e),t)}function jb(e,t,n){var r=n.docs.get(t._key),i=new Pb(e);return new kb(e,i,t._key,r,new bb(n.hasPendingWrites,n.fromCache),t.converter)}!function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];Lf="9.9.1",Bn(new rn("firestore",(function(e,n){var r=n.options,i=e.getProvider("app").getImmediate(),a=new Wg(i,new Xf(e.getProvider("auth-internal")),new eh(e.getProvider("app-check-internal")));return r=Object.assign({useFetchStreams:t},r),a._setSettings(r),a}),"PUBLIC")),Xn(Rf,"3.4.13",e),Xn(Rf,"3.4.13","esm2017")}();var Mb=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!==typeof t){var n=t;t={name:n}}var r=Object.assign({name:Fn,automaticDataCollectionEnabled:!1},t),i=r.name;if("string"!==typeof i||!i)throw Wn.create("bad-app-name",{appName:String(i)});var a=Vn.get(i);if(a){if($t(e,a.options)&&$t(r,a.config))return a;throw Wn.create("duplicate-app",{appName:i})}var o,u=new cn(i),s=_t(zn.values());try{for(s.s();!(o=s.n()).done;){var c=o.value;u.addComponent(c)}}catch(f){s.e(f)}finally{s.f()}var l=new Qn(e,r,u);return Vn.set(i,l),l}({apiKey:"AIzaSyDXHL3C_wLEHM6guFf4I2IPdawElw6_BKs",authDomain:"finestandco-5154f.firebaseapp.com",projectId:"finestandco-5154f",storageBucket:"finestandco-5154f.appspot.com",messagingSenderId:"22292203504",appId:"1:22292203504:web:8b2852c3f92d6aa9f9bf35"}),Fb=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$n(),t=Hn(e,"auth");return t.isInitialized()?t.getImmediate():Nr(e,{popupRedirectResolver:du,persistence:[lo,Ua,za]})}(Mb),Ub=function(e,t){return function(e,t,n){return Pa.apply(this,arguments)}(Fb,e,t)},Vb=function(e,t){return function(e,t,n){return Ca(nn(e),aa.credential(t,n))}(Fb,e,t)},zb=function(){return function(e){return ma.apply(this,arguments)}(Fb)},qb=function(){return function(e){return nn(e).signOut()}(Fb)},Bb=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$n();return Hn(e,"firestore").getImmediate()}(Mb),Hb=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(e=nn(e),Rg("collection","path",t),e instanceof Ug){var a=sh.fromString.apply(sh,[t].concat(r));return Lg(a),new qg(e,null,a)}if(!(e instanceof Vg||e instanceof qg))throw new Wf(Kf.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");var o=e._path.child(sh.fromString.apply(sh,[t].concat(r)));return Lg(o),new qg(e.firestore,null,o)}(Bb,"userData"),Kb=function(){var e=lt(st().mark((function e(t,n,r){var i;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Bg(Bb,"userData","".concat(t)),e.next=3,Rb(i,{id:t,cart:wt(n),wishlist:wt(r)},{merge:!0});case 3:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),Wb=function(){var e=lt(st().mark((function e(t){var n,r;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=Bg(Bb,"userData","".concat(t)),r=Fb.currentUser,e.next=5,Db(n);case 5:return e.next=7,Ra(r);case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),alert(e.t0.message);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t){return e.apply(this,arguments)}}();function Qb(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Gb(e){return!!e&&!!e[Fk]}function $b(e){return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===Uk}(e)||Array.isArray(e)||!!e[Mk]||!!e.constructor[Mk]||nk(e)||rk(e))}function Xb(e,t,n){void 0===n&&(n=!1),0===Yb(e)?(n?Object.keys:Vk)(e).forEach((function(r){n&&"symbol"==typeof r||t(r,e[r],e)})):e.forEach((function(n,r){return t(r,n,e)}))}function Yb(e){var t=e[Fk];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:nk(e)?2:rk(e)?3:0}function Jb(e,t){return 2===Yb(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Zb(e,t){return 2===Yb(e)?e.get(t):e[t]}function ek(e,t,n){var r=Yb(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function tk(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function nk(e){return Rk&&e instanceof Map}function rk(e){return Dk&&e instanceof Set}function ik(e){return e.o||e.t}function ak(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=zk(e);delete t[Fk];for(var n=Vk(t),r=0;r<n.length;r++){var i=n[r],a=t[i];!1===a.writable&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function ok(e,t){return void 0===t&&(t=!1),sk(e)||Gb(e)||!$b(e)||(Yb(e)>1&&(e.set=e.add=e.clear=e.delete=uk),Object.freeze(e),t&&Xb(e,(function(e,t){return ok(t,!0)}),!0)),e}function uk(){Qb(2)}function sk(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function ck(e){var t=qk[e];return t||Qb(18,e),t}function lk(e,t){qk[e]||(qk[e]=t)}function fk(){return Ak}function hk(e,t){t&&(ck("Patches"),e.u=[],e.s=[],e.v=t)}function dk(e){pk(e),e.p.forEach(mk),e.p=null}function pk(e){e===Ak&&(Ak=e.l)}
vendor: 9,770 bytes, line 2
2function vk(e){return Ak={p:[],l:Ak,h:e,m:!0,_:0}}function mk(e){var t=e[Fk];0===t.i||1===t.i?t.j():t.O=!0}function yk(e,t){t._=t.p.length;var n=t.p[0],r=void 0!==e&&e!==n;return t.h.g||ck("ES5").S(t,e,r),r?(n[Fk].P&&(dk(t),Qb(4)),$b(e)&&(e=gk(t,e),t.l||kk(t,e)),t.u&&ck("Patches").M(n[Fk].t,e,t.u,t.s)):e=gk(t,n,[]),dk(t),t.u&&t.v(t.u,t.s),e!==jk?e:void 0}function gk(e,t,n){if(sk(t))return t;var r=t[Fk];if(!r)return Xb(t,(function(i,a){return bk(e,r,t,i,a,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return kk(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=ak(r.k):r.o;Xb(3===r.i?new Set(i):i,(function(t,a){return bk(e,r,i,t,a,n)})),kk(e,i,!1),n&&e.u&&ck("Patches").R(r,n,e.u,e.s)}return r.o}function bk(e,t,n,r,i,a){if(Gb(i)){var o=gk(e,i,a&&t&&3!==t.i&&!Jb(t.D,r)?a.concat(r):void 0);if(ek(n,r,o),!Gb(o))return;e.m=!1}if($b(i)&&!sk(i)){if(!e.h.F&&e._<1)return;gk(e,i),t&&t.A.l||kk(e,i)}}function kk(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&ok(t,n)}function wk(e,t){var n=e[Fk];return(n?ik(n):e)[t]}function _k(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function xk(e){e.P||(e.P=!0,e.l&&xk(e.l))}function Ek(e){e.o||(e.o=ak(e.t))}function Sk(e,t,n){var r=nk(t)?ck("MapSet").N(t,n):rk(t)?ck("MapSet").T(t,n):e.g?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:fk(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},i=r,a=Bk;n&&(i=[r],a=Hk);var o=Proxy.revocable(i,a),u=o.revoke,s=o.proxy;return r.k=s,r.j=u,s}(t,n):ck("ES5").J(t,n);return(n?n.A:fk()).p.push(r),r}function Ik(e){return Gb(e)||Qb(22,e),function e(t){if(!$b(t))return t;var n,r=t[Fk],i=Yb(t);if(r){if(!r.P&&(r.i<4||!ck("ES5").K(r)))return r.t;r.I=!0,n=Tk(t,i),r.I=!1}else n=Tk(t,i);return Xb(n,(function(t,i){r&&Zb(r.t,t)===i||ek(n,t,e(i))})),3===i?new Set(n):n}(e)}function Tk(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return ak(e)}function Ck(){function e(e,t){var n=i[e];return n?n.enumerable=t:i[e]=n={configurable:!0,enumerable:t,get:function(){var t=this[Fk];return Bk.get(t,e)},set:function(t){var n=this[Fk];Bk.set(n,e,t)}},n}function t(e){for(var t=e.length-1;t>=0;t--){var i=e[t][Fk];if(!i.P)switch(i.i){case 5:r(i)&&xk(i);break;case 4:n(i)&&xk(i)}}}function n(e){for(var t=e.t,n=e.k,r=Vk(n),i=r.length-1;i>=0;i--){var a=r[i];if(a!==Fk){var o=t[a];if(void 0===o&&!Jb(t,a))return!0;var u=n[a],s=u&&u[Fk];if(s?s.t!==o:!tk(u,o))return!0}}var c=!!t[Fk];return r.length!==Vk(t).length+(c?0:1)}function r(e){var t=e.k;if(t.length!==e.t.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);if(n&&!n.get)return!0;for(var r=0;r<t.length;r++)if(!t.hasOwnProperty(r))return!0;return!1}var i={};lk("ES5",{J:function(t,n){var r=Array.isArray(t),i=function(t,n){if(t){for(var r=Array(n.length),i=0;i<n.length;i++)Object.defineProperty(r,""+i,e(i,!0));return r}var a=zk(n);delete a[Fk];for(var o=Vk(a),u=0;u<o.length;u++){var s=o[u];a[s]=e(s,t||!!a[s].enumerable)}return Object.create(Object.getPrototypeOf(n),a)}(r,t),a={i:r?5:4,A:n?n.A:fk(),P:!1,I:!1,D:{},l:n,t:t,k:i,o:null,O:!1,C:!1};return Object.defineProperty(i,Fk,{value:a,writable:!0}),i},S:function(e,n,i){i?Gb(n)&&n[Fk].A===e&&t(e.p):(e.u&&function e(t){if(t&&"object"==typeof t){var n=t[Fk];if(n){var i=n.t,a=n.k,o=n.D,u=n.i;if(4===u)Xb(a,(function(t){t!==Fk&&(void 0!==i[t]||Jb(i,t)?o[t]||e(a[t]):(o[t]=!0,xk(n)))})),Xb(i,(function(e){void 0!==a[e]||Jb(a,e)||(o[e]=!1,xk(n))}));else if(5===u){if(r(n)&&(xk(n),o.length=!0),a.length<i.length)for(var s=a.length;s<i.length;s++)o[s]=!1;else for(var c=i.length;c<a.length;c++)o[c]=!0;for(var l=Math.min(a.length,i.length),f=0;f<l;f++)a.hasOwnProperty(f)||(o[f]=!0),void 0===o[f]&&e(a[f])}}}}(e.p[0]),t(e.p))},K:function(e){return 4===e.i?n(e):r(e)}})}function Nk(){function e(t){if(!$b(t))return t;if(Array.isArray(t))return t.map(e);if(nk(t))return new Map(Array.from(t.entries()).map((function(t){return[t[0],e(t[1])]})));if(rk(t))return new Set(Array.from(t).map(e));var n=Object.create(Object.getPrototypeOf(t));for(var r in t)n[r]=e(t[r]);return Jb(t,Mk)&&(n[Mk]=t[Mk]),n}function t(t){return Gb(t)?e(t):t}var n="add";lk("Patches",{$:function(t,r){return r.forEach((function(r){for(var i=r.path,a=r.op,o=t,u=0;u<i.length-1;u++){var s=Yb(o),c=""+i[u];0!==s&&1!==s||"__proto__"!==c&&"constructor"!==c||Qb(24),"function"==typeof o&&"prototype"===c&&Qb(24),"object"!=typeof(o=Zb(o,c))&&Qb(15,i.join("/"))}var l=Yb(o),f=e(r.value),h=i[i.length-1];switch(a){case"replace":switch(l){case 2:return o.set(h,f);case 3:Qb(16);default:return o[h]=f}case n:switch(l){case 1:return"-"===h?o.push(f):o.splice(h,0,f);case 2:return o.set(h,f);case 3:return o.add(f);default:return o[h]=f}case"remove":switch(l){case 1:return o.splice(h,1);case 2:return o.delete(h);case 3:return o.delete(r.value);default:return delete o[h]}default:Qb(17,a)}})),t},R:function(e,r,i,a){switch(e.i){case 0:case 4:case 2:return function(e,r,i,a){var o=e.t,u=e.o;Xb(e.D,(function(e,s){var c=Zb(o,e),l=Zb(u,e),f=s?Jb(o,e)?"replace":n:"remove";if(c!==l||"replace"!==f){var h=r.concat(e);i.push("remove"===f?{op:f,path:h}:{op:f,path:h,value:l}),a.push(f===n?{op:"remove",path:h}:"remove"===f?{op:n,path:h,value:t(c)}:{op:"replace",path:h,value:t(c)})}}))}(e,r,i,a);case 5:case 1:return function(e,r,i,a){var o=e.t,u=e.D,s=e.o;if(s.length<o.length){var c=[s,o];o=c[0],s=c[1];var l=[a,i];i=l[0],a=l[1]}for(var f=0;f<o.length;f++)if(u[f]&&s[f]!==o[f]){var h=r.concat([f]);i.push({op:"replace",path:h,value:t(s[f])}),a.push({op:"replace",path:h,value:t(o[f])})}for(var d=o.length;d<s.length;d++){var p=r.concat([d]);i.push({op:n,path:p,value:t(s[d])})}o.length<s.length&&a.push({op:"replace",path:r.concat(["length"]),value:o.length})}(e,r,i,a);case 3:return function(e,t,r,i){var a=e.t,o=e.o,u=0;a.forEach((function(e){if(!o.has(e)){var a=t.concat([u]);r.push({op:"remove",path:a,value:e}),i.unshift({op:n,path:a,value:e})}u++})),u=0,o.forEach((function(e){if(!a.has(e)){var o=t.concat([u]);r.push({op:n,path:o,value:e}),i.unshift({op:"remove",path:o,value:e})}u++}))}(e,r,i,a)}},M:function(e,t,n,r){n.push({op:"replace",path:[],value:t===jk?void 0:t}),r.push({op:"replace",path:[],value:e})}})}var Ok,Ak,Pk="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Rk="undefined"!=typeof Map,Dk="undefined"!=typeof Set,Lk="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,jk=Pk?Symbol.for("immer-nothing"):((Ok={})["immer-nothing"]=!0,Ok),Mk=Pk?Symbol.for("immer-draftable"):"__$immer_draftable",Fk=Pk?Symbol.for("immer-state"):"__$immer_state",Uk=("undefined"!=typeof Symbol&&Symbol.iterator,""+Object.prototype.constructor),Vk="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,zk=Object.getOwnPropertyDescriptors||function(e){var t={};return Vk(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},qk={},Bk={get:function(e,t){if(t===Fk)return e;var n=ik(e);if(!Jb(n,t))return function(e,t,n){var r,i=_k(t,n);return i?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!$b(r)?r:r===wk(e.t,t)?(Ek(e),e.o[t]=Sk(e.A.h,r,e)):r},has:function(e,t){return t in ik(e)},ownKeys:function(e){return Reflect.ownKeys(ik(e))},set:function(e,t,n){var r=_k(ik(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=wk(ik(e),t),a=null==i?void 0:i[Fk];if(a&&a.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(tk(n,i)&&(void 0!==n||Jb(e.t,t)))return!0;Ek(e),xk(e)}return e.o[t]===n&&"number"!=typeof n&&(void 0!==n||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==wk(e.t,t)||t in e.t?(e.D[t]=!1,Ek(e),xk(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=ik(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){Qb(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Qb(12)}},Hk={};Xb(Bk,(function(e,t){Hk[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Hk.deleteProperty=function(e,t){return Hk.set.call(this,e,t,void 0)},Hk.set=function(e,t,n){return Bk.set.call(this,e[0],t,n,e[0])};var Kk=function(){function e(e){var t=this;this.g=Lk,this.F=!0,this.produce=function(e,n,r){if("function"==typeof e&&"function"!=typeof n){var i=n;n=e;var a=t;return function(e){var t=this;void 0===e&&(e=i);for(var r=arguments.length,o=Array(r>1?r-1:0),u=1;u<r;u++)o[u-1]=arguments[u];return a.produce(e,(function(e){var r;return(r=n).call.apply(r,[t,e].concat(o))}))}}var o;if("function"!=typeof n&&Qb(6),void 0!==r&&"function"!=typeof r&&Qb(7),$b(e)){var u=vk(t),s=Sk(t,e,void 0),c=!0;try{o=n(s),c=!1}finally{c?dk(u):pk(u)}return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(e){return hk(u,r),yk(e,u)}),(function(e){throw dk(u),e})):(hk(u,r),yk(o,u))}if(!e||"object"!=typeof e){if(void 0===(o=n(e))&&(o=e),o===jk&&(o=void 0),t.F&&ok(o,!0),r){var l=[],f=[];ck("Patches").M(e,o,l,f),r(l,f)}return o}Qb(21,e)},this.produceWithPatches=function(e,n){if("function"==typeof e)return function(n){for(var r=arguments.length,i=Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(i))}))};var r,i,a=t.produce(e,n,(function(e,t){r=e,i=t}));return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(e){return[e,r,i]})):[a,r,i]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}
2var t=e.prototype;return t.createDraft=function(e){$b(e)||Qb(8),Gb(e)&&(e=Ik(e));var t=vk(this),n=Sk(this,e,void 0);return n[Fk].C=!0,pk(t),n},t.finishDraft=function(e,t){var n=(e&&e[Fk]).A;return hk(n,t),yk(void 0,n)},t.setAutoFreeze=function(e){this.F=e},t.setUseProxies=function(e){e&&!Lk&&Qb(20),this.g=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var i=ck("Patches").$;return Gb(e)?i(e,t):this.produce(e,(function(e){return i(e,t)}))},e}(),Wk=new Kk,Qk=Wk.produce,Gk=Wk.produceWithPatches.bind(Wk),$k=(Wk.setAutoFreeze.bind(Wk),Wk.setUseProxies.bind(Wk),Wk.applyPatches.bind(Wk)),Xk=(Wk.createDraft.bind(Wk),Wk.finishDraft.bind(Wk),Qk);function Yk(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Jk="function"===typeof Symbol&&Symbol.observable||"@@observable",Zk=function(){return Math.random().toString(36).substring(7).split("").join(".")},ew={INIT:"@@redux/INIT"+Zk(),REPLACE:"@@redux/REPLACE"+Zk(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Zk()}};function tw(e){if("object"!==typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function nw(e,t,n){var r;if("function"===typeof t&&"function"===typeof n||"function"===typeof n&&"function"===typeof arguments[3])throw new Error(Yk(0));if("function"===typeof t&&"undefined"===typeof n&&(n=t,t=void 0),"undefined"!==typeof n){if("function"!==typeof n)throw new Error(Yk(1));return n(nw)(e,t)}if("function"!==typeof e)throw new Error(Yk(2));var i=e,a=t,o=[],u=o,s=!1;function c(){u===o&&(u=o.slice())}function l(){if(s)throw new Error(Yk(3));return a}function f(e){if("function"!==typeof e)throw new Error(Yk(4));if(s)throw new Error(Yk(5));var t=!0;return c(),u.push(e),function(){if(t){if(s)throw new Error(Yk(6));t=!1,c();var n=u.indexOf(e);u.splice(n,1),o=null}}}function h(e){if(!tw(e))throw new Error(Yk(7));if("undefined"===typeof e.type)throw new Error(Yk(8));if(s)throw new Error(Yk(9));try{s=!0,a=i(a,e)}finally{s=!1}for(var t=o=u,n=0;n<t.length;n++){(0,t[n])()}return e}function d(e){if("function"!==typeof e)throw new Error(Yk(10));i=e,h({type:ew.REPLACE})}function p(){var e,t=f;return(e={subscribe:function(e){if("object"!==typeof e||null===e)throw new Error(Yk(11));function n(){e.next&&e.next(l())}return n(),{unsubscribe:t(n)}}})[Jk]=function(){return this},e}return h({type:ew.INIT}),(r={dispatch:h,subscribe:f,getState:l,replaceReducer:d})[Jk]=p,r}function rw(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r];0,"function"===typeof e[i]&&(n[i]=e[i])}var a,o=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if("undefined"===typeof n(void 0,{type:ew.INIT}))throw new Error(Yk(12));if("undefined"===typeof n(void 0,{type:ew.PROBE_UNKNOWN_ACTION()}))throw new Error(Yk(13))}))}(n)}catch(u){a=u}return function(e,t){if(void 0===e&&(e={}),a)throw a;for(var r=!1,i={},u=0;u<o.length;u++){var s=o[u],c=n[s],l=e[s],f=c(l,t);if("undefined"===typeof f){t&&t.type;throw new Error(Yk(14))}i[s]=f,r=r||f!==l}return(r=r||o.length!==Object.keys(e).length)?i:e}}function iw(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function aw(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error(Yk(15))},i={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},a=t.map((function(e){return e(i)}));return r=iw.apply(void 0,a)(n.dispatch),Ie(Ie({},n),{},{dispatch:r})}}}function ow(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(i){return"function"===typeof i?i(n,r,e):t(i)}}}}var uw=ow();uw.withExtraArgument=ow;var sw=uw,cw=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),lw=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;
2function u(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(u){a=[6,u],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},fw=function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},hw=Object.defineProperty,dw=Object.defineProperties,pw=Object.getOwnPropertyDescriptors,vw=Object.getOwnPropertySymbols,mw=Object.prototype.hasOwnProperty,yw=Object.prototype.propertyIsEnumerable,gw=function(e,t,n){return t in e?hw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},bw=function(e,t){for(var n in t||(t={}))mw.call(t,n)&&gw(e,n,t[n]);if(vw)for(var r=0,i=vw(t);r<i.length;r++){n=i[r];yw.call(t,n)&&gw(e,n,t[n])}return e},kw=function(e,t){return dw(e,pw(t))},ww=function(e,t,n){return new Promise((function(r,i){var a=function(e){try{u(n.next(e))}catch(t){i(t)}},o=function(e){try{u(n.throw(e))}catch(t){i(t)}},u=function(e){return e.done?r(e.value):Promise.resolve(e.value).then(a,o)};u((n=n.apply(e,t)).next())}))},_w="undefined"!==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"===typeof arguments[0]?iw:iw.apply(null,arguments)};"undefined"!==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function xw(e){if("object"!==typeof e||null===e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(var n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return t===n}var Ew=function(e){function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=e.apply(this,n)||this;return Object.setPrototypeOf(i,t.prototype),i}return cw(t,e),Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.prototype.concat.apply(this,t)},t.prototype.prepend=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return 1===e.length&&Array.isArray(e[0])?new(t.bind.apply(t,fw([void 0],e[0].concat(this)))):new(t.bind.apply(t,fw([void 0],e.concat(this))))},t}(Array);function Sw(e){return $b(e)?Xk(e,(function(){})):e}function Iw(){return function(e){return function(e){void 0===e&&(e={});var t=e.thunk,n=void 0===t||t,r=(e.immutableCheck,e.serializableCheck,new Ew);n&&(!function(e){return"boolean"===typeof e}(n)?r.push(sw.withExtraArgument(n.extraArgument)):r.push(sw));0;return r}(e)}}function Tw(e,t){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return bw(bw({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:n[0]}}return n.toString=function(){return""+e},n.type=e,n.match=function(t){return t.type===e},n}function Cw(e){var t,n={},r=[],i={addCase:function(e,t){var r="string"===typeof e?e:e.type;if(r in n)throw new Error("addCase cannot be called with two reducers for the same action type");return n[r]=t,i},addMatcher:function(e,t){return r.push({matcher:e,reducer:t}),i},addDefaultCase:function(e){return t=e,i}};return e(i),[n,r,t]}function Nw(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");var n,r="function"==typeof e.initialState?e.initialState:Sw(e.initialState),i=e.reducers||{},a=Object.keys(i),o={},u={},s={};function c(){var t="function"===typeof e.extraReducers?Cw(e.extraReducers):[e.extraReducers],n=t[0],i=void 0===n?{}:n,a=t[1],o=void 0===a?[]:a,s=t[2],c=void 0===s?void 0:s,l=bw(bw({},i),u);return function(e,t,n,r){void 0===n&&(n=[]);var i,a="function"===typeof t?Cw(t):[t,n,r],o=a[0],u=a[1],s=a[2];if(function(e){return"function"===typeof e}(e))i=function(){return Sw(e())};else{var c=Sw(e);i=function(){return c}}function l(e,t){void 0===e&&(e=i());var n=fw([o[t.type]],u.filter((function(e){return(0,e.matcher)(t)})).map((function(e){return e.reducer})));return 0===n.filter((function(e){return!!e})).length&&(n=[s]),n.reduce((function(e,n){if(n){var r;if(Gb(e))return"undefined"===typeof(r=n(e,t))?e:r;if($b(e))return Xk(e,(function(e){return n(e,t)}));if("undefined"===typeof(r=n(e,t))){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}return e}),e)}return l.getInitialState=i,l}(r,l,o,c)}return a.forEach((function(e){var n,r,a=i[e],c=t+"/"+e;"reducer"in a?(n=a.reducer,r=a.prepare):n=a,o[e]=n,u[c]=n,s[e]=r?Tw(c,r):Tw(c)})),{name:t,reducer:function(e,t){return n||(n=c()),n(e,t)},actions:s,caseReducers:o,getInitialState:function(){return n||(n=c()),n.getInitialState()}}}var Ow=function(e){void 0===e&&(e=21);for(var t="",n=e;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},Aw=["name","message","stack","code"],Pw=function(e,t){this.payload=e,this.meta=t},Rw=function(e,t){this.payload=e,this.meta=t},Dw=function(e){if("object"===typeof e&&null!==e){for(var t={},n=0,r=Aw;n<r.length;n++){var i=r[n];"string"===typeof e[i]&&(t[i]=e[i])}return t}return{message:String(e)}};function Lw(e,t,n){var r=Tw(e+"/fulfilled",(function(e,t,n,r){return{payload:e,meta:kw(bw({},r||{}),{arg:n,requestId:t,requestStatus:"fulfilled"})}})),i=Tw(e+"/pending",(function(e,t,n){return{payload:void 0,meta:kw(bw({},n||{}),{arg:t,requestId:e,requestStatus:"pending"})}}
2)),a=Tw(e+"/rejected",(function(e,t,r,i,a){return{payload:i,error:(n&&n.serializeError||Dw)(e||"Rejected"),meta:kw(bw({},a||{}),{arg:r,requestId:t,rejectedWithValue:!!i,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)})}})),o="undefined"!==typeof AbortController?AbortController:function(){function e(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return e.prototype.abort=function(){0},e}();return Object.assign((function(e){return function(u,s,c){var l,f=(null==n?void 0:n.idGenerator)?n.idGenerator(e):Ow(),h=new o,d=new Promise((function(e,t){return h.signal.addEventListener("abort",(function(){return t({name:"AbortError",message:l||"Aborted"})}))})),p=!1;var v=function(){return ww(this,null,(function(){var o,l,v,m,y;return lw(this,(function(g){switch(g.label){case 0:return g.trys.push([0,4,,5]),m=null==(o=null==n?void 0:n.condition)?void 0:o.call(n,e,{getState:s,extra:c}),null===(b=m)||"object"!==typeof b||"function"!==typeof b.then?[3,2]:[4,m];case 1:m=g.sent(),g.label=2;case 2:if(!1===m)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return p=!0,u(i(f,e,null==(l=null==n?void 0:n.getPendingMeta)?void 0:l.call(n,{requestId:f,arg:e},{getState:s,extra:c}))),[4,Promise.race([d,Promise.resolve(t(e,{dispatch:u,getState:s,extra:c,requestId:f,signal:h.signal,rejectWithValue:function(e,t){return new Pw(e,t)},fulfillWithValue:function(e,t){return new Rw(e,t)}})).then((function(t){if(t instanceof Pw)throw t;return t instanceof Rw?r(t.payload,f,e,t.meta):r(t,f,e)}))])];case 3:return v=g.sent(),[3,5];case 4:return y=g.sent(),v=y instanceof Pw?a(null,f,e,y.payload,y.meta):a(y,f,e),[3,5];case 5:return n&&!n.dispatchConditionRejection&&a.match(v)&&v.meta.condition||u(v),[2,v]}var b}))}))}();return Object.assign(v,{abort:function(e){p&&(l=e,h.abort())},requestId:f,arg:e,unwrap:function(){return v.then(jw)}})}}),{pending:i,rejected:a,fulfilled:r,typePrefix:e})}function jw(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var Mw=function(e,t){return function(e){return e&&"function"===typeof e.match}(e)?e.match(t):e(t)};function Fw(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.some((function(e){return Mw(e,t)}))}}function Uw(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.every((function(e){return Mw(e,t)}))}}function Vw(e,t){if(!e||!e.meta)return!1;var n="string"===typeof e.meta.requestId,r=t.indexOf(e.meta.requestStatus)>-1;return n&&r}function zw(e){return"function"===typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function qw(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return Vw(e,["pending"])}:zw(e)?function(t){var n=e.map((function(e){return e.pending}));return Fw.apply(void 0,n)(t)}:qw()(e[0])}function Bw(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return Vw(e,["rejected"])}:zw(e)?function(t){var n=e.map((function(e){return e.rejected}));return Fw.apply(void 0,n)(t)}:Bw()(e[0])}function Hw(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(e){return e&&e.meta&&e.meta.rejectedWithValue};return 0===e.length||zw(e)?function(t){return Uw(Bw.apply(void 0,e),n)(t)}:Hw()(e[0])}function Kw(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return Vw(e,["fulfilled"])}:zw(e)?function(t){var n=e.map((function(e){return e.fulfilled}));return Fw.apply(void 0,n)(t)}:Kw()(e[0])}function Ww(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return Vw(e,["pending","fulfilled","rejected"])}:zw(e)?function(t){for(var n=[],r=0,i=e;r<i.length;r++){var a=i[r];n.push(a.pending,a.rejected,a.fulfilled)}return Fw.apply(void 0,n)(t)}:Ww()(e[0])}Object.assign;var Qw="listenerMiddleware";Tw(Qw+"/add"),Tw(Qw+"/removeAll"),Tw(Qw+"/remove");Ck();var Gw=Nw({name:"auth",initialState:{id:null,isAnonymous:!1,email:null,providerID:null},reducers:{setUser:function(e,t){var n=t.payload,r=n.id,i=n.isAnonymous,a=n.email,o=n.providerID;e.id=r,e.isAnonymous=i,e.email=a,e.providerID=o}}}),$w=Gw.actions.setUser,Xw=Gw.reducer,Yw="LinkAccounts_link__E6UyH",Jw="LinkAccounts_form__group__5ZHNx",Zw="LinkAccounts_link__btns__c8iTI",e_="LinkAccounts_form__error__ZEXFb",t_=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,n_=function(e){var t={emailError:null,valid:!1};return""===e||0===e.length?Ie(Ie({},t),{},{emailError:"Email is required",valid:!1}):""===e||String(e).match(t_)?Ie(Ie({},t),{},{valid:!0}):Ie(Ie({},t),{}
2,{emailError:"Email is not valid",valid:!1})},r_=function(e){var t={passwordError:null,valid:!1};if(""!==e&&e.length<6){return Ie(Ie({},t),{},{passwordError:"Password must be at least 6 characters",valid:!1})}return""===e||0===e.length?Ie(Ie({},t),{},{passwordError:"Password is required",valid:!1}):Ie(Ie({},t),{},{valid:!0})};function i_(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function a_(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=a_(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}var o_=function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=a_(e))&&(r&&(r+=" "),r+=t);return r},u_=["theme","type"],s_=["delay","staleId"];function c_(e){return"number"===typeof e&&!isNaN(e)}function l_(e){return"boolean"===typeof e}function f_(e){return"string"===typeof e}function h_(e){return"function"===typeof e}function d_(e){return f_(e)||h_(e)?e:null}function p_(e){return null!=e}function v_(e){return(0,t.isValidElement)(e)||f_(e)||h_(e)||c_(e)}var m_={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},y_={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"};function g_(e){var n=e.enter,r=e.exit,i=e.appendPosition,a=void 0!==i&&i,o=e.collapse,u=void 0===o||o,s=e.collapseDuration,c=void 0===s?300:s;return function(e){var i=e.children,o=e.position,s=e.preventExitTransition,l=e.done,f=e.nodeRef,h=e.isIn,d=a?n+"--"+o:n,p=a?r+"--"+o:r,v=(0,t.useRef)(0);return(0,t.useLayoutEffect)((function(){var e=f.current,t=d.split(" "),n=function n(r){var i;r.target===f.current&&(e.dispatchEvent(new Event("d")),e.removeEventListener("animationend",n),e.removeEventListener("animationcancel",n),0===v.current&&"animationcancel"!==r.type&&(i=e.classList).remove.apply(i,wt(t)))};!function(){var r;(r=e.classList).add.apply(r,wt(t)),e.addEventListener("animationend",n),e.addEventListener("animationcancel",n)}()}),[]),(0,t.useEffect)((function(){var e=f.current,t=function t(){e.removeEventListener("animationend",t),u?function(e,t,n){void 0===n&&(n=300);var r=e.scrollHeight,i=e.style;requestAnimationFrame((function(){i.minHeight="initial",i.height=r+"px",i.transition="all "+n+"ms",requestAnimationFrame((function(){i.height="0",i.padding="0",i.margin="0",setTimeout(t,n)}))}))}(e,l,c):l()};h||(s?t():(v.current=1,e.className+=" "+p,e.addEventListener("animationend",t)))}),[h]),t.createElement(t.Fragment,null,i)}}function b_(e,t){return{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}}var k_={list:new Map,emitQueue:new Map,on:function(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off:function(e,t){if(t){var n=this.list.get(e).filter((function(e){return e!==t}));return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit:function(e){var t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit:function(e){var t=arguments,n=this;this.list.has(e)&&this.list.get(e).forEach((function(r){var i=setTimeout((function(){r.apply(void 0,wt([].slice.call(t,1)))}),0);n.emitQueue.has(e)||n.emitQueue.set(e,[]),n.emitQueue.get(e).push(i)}))}},w_=function(e){var n=e.theme,r=e.type,i=i_(e,u_);return t.createElement("svg",Ie({viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===n?"currentColor":"var(--toastify-icon-color-"+r+")"},i))};var __={info:function(e){return t.createElement(w_,Ie({},e),t.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return t.createElement(w_,Ie({},e),t.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return t.createElement(w_,Ie({},e),t.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return t.createElement(w_,Ie({},e),t.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return t.createElement("div",{className:"Toastify__spinner"})}};function x_(e){var n=e.theme,r=e.type,i=e.isLoading,a=e.icon,o=null,u={theme:n,type:r};return!1===a||(h_(a)?o=a(u):(0,t.isValidElement)(a)?o=(0,t.cloneElement)(a,u):f_(a)||c_(a)?o=a:i?o=__.spinner():function(e){return e in __}(r)&&(o=__[r](u))),o}function E_(e){var n=(0,t.useReducer)((function(e){return e+1}),0),r=o(n,2)[1],i=o((0,t.useState)([]),2),a=i[0],u=i[1],s=(0,t.useRef)(null),c=(0,t.useRef)(new Map).current,l=function(e){return-1!==a.indexOf(e)},f=(0,t.useRef)({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:l,getToast:function(e){return c.get(e)}}).current;function h(e){var t=e.containerId;!f.props.limit||t&&f.containerId!==t||(f.count-=f.queue.length,f.queue=[])}
2function d(e){u((function(t){return p_(e)?t.filter((function(t){return t!==e})):[]}))}function p(){var e=f.queue.shift();m(e.toastContent,e.toastProps,e.staleId)}function v(e,n){var i=n.delay,a=n.staleId,o=i_(n,s_);if(v_(e)&&!function(e){return!s.current||f.props.enableMultiContainer&&e.containerId!==f.props.containerId||c.has(e.toastId)&&null==e.updateId}(o)){var u=o.toastId,l=o.updateId,h=o.data,v=f.props,y=function(){return d(u)},g=null==l;g&&f.count++;var b,k,w={toastId:u,updateId:l,data:h,containerId:o.containerId,isLoading:o.isLoading,theme:o.theme||v.theme,icon:null!=o.icon?o.icon:v.icon,isIn:!1,key:o.key||f.toastKey++,type:o.type,closeToast:y,closeButton:o.closeButton,rtl:v.rtl,position:o.position||v.position,transition:o.transition||v.transition,className:d_(o.className||v.toastClassName),bodyClassName:d_(o.bodyClassName||v.bodyClassName),style:o.style||v.toastStyle,bodyStyle:o.bodyStyle||v.bodyStyle,onClick:o.onClick||v.onClick,pauseOnHover:l_(o.pauseOnHover)?o.pauseOnHover:v.pauseOnHover,pauseOnFocusLoss:l_(o.pauseOnFocusLoss)?o.pauseOnFocusLoss:v.pauseOnFocusLoss,draggable:l_(o.draggable)?o.draggable:v.draggable,draggablePercent:o.draggablePercent||v.draggablePercent,draggableDirection:o.draggableDirection||v.draggableDirection,closeOnClick:l_(o.closeOnClick)?o.closeOnClick:v.closeOnClick,progressClassName:d_(o.progressClassName||v.progressClassName),progressStyle:o.progressStyle||v.progressStyle,autoClose:!o.isLoading&&(b=o.autoClose,k=v.autoClose,!1===b||c_(b)&&b>0?b:k),hideProgressBar:l_(o.hideProgressBar)?o.hideProgressBar:v.hideProgressBar,progress:o.progress,role:o.role||v.role,deleteToast:function(){var e=b_(c.get(u),"removed");c.delete(u),k_.emit(4,e);var t=f.queue.length;if(f.count=p_(u)?f.count-1:f.count-f.displayedToast,f.count<0&&(f.count=0),t>0){var n=p_(u)?1:f.props.limit;if(1===t||1===n)f.displayedToast++,p();else{var i=n>t?t:n;f.displayedToast=i;for(var a=0;a<i;a++)p()}}else r()}};w.iconOut=x_(w),h_(o.onOpen)&&(w.onOpen=o.onOpen),h_(o.onClose)&&(w.onClose=o.onClose),w.closeButton=v.closeButton,!1===o.closeButton||v_(o.closeButton)?w.closeButton=o.closeButton:!0===o.closeButton&&(w.closeButton=!v_(v.closeButton)||v.closeButton);var _=e;(0,t.isValidElement)(e)&&!f_(e.type)?_=(0,t.cloneElement)(e,{closeToast:y,toastProps:w,data:h}):h_(e)&&(_=e({closeToast:y,toastProps:w,data:h})),v.limit&&v.limit>0&&f.count>v.limit&&g?f.queue.push({toastContent:_,toastProps:w,staleId:a}):c_(i)?setTimeout((function(){m(_,w,a)}),i):m(_,w,a)}}function m(e,t,n){var r=t.toastId;n&&c.delete(n);var i={content:e,props:t};c.set(r,i),u((function(e){return[].concat(wt(e),[r]).filter((function(e){return e!==n}))})),k_.emit(4,b_(i,null==i.props.updateId?"added":"updated"))}return(0,t.useEffect)((function(){return f.containerId=e.containerId,k_.cancelEmit(3).on(0,v).on(1,(function(e){return s.current&&d(e)})).on(5,h).emit(2,f),function(){c.clear(),k_.emit(3,f)}}),[]),(0,t.useEffect)((function(){f.props=e,f.isToastActive=l,f.displayedToast=a.length})),{getToastToRender:function(t){var n=new Map,r=Array.from(c.values());return e.newestOnTop&&r.reverse(),r.forEach((function(e){var t=e.props.position;n.has(t)||n.set(t,[]),n.get(t).push(e)})),Array.from(n,(function(e){return t(e[0],e[1])}))},containerRef:s,isToastActive:l}}function S_(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function I_(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function T_(e){var n=o((0,t.useState)(!1),2),r=n[0],i=n[1],a=o((0,t.useState)(!1),2),u=a[0],s=a[1],c=(0,t.useRef)(null),l=(0,t.useRef)({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,f=(0,t.useRef)(e),h=e.autoClose,d=e.pauseOnHover,p=e.closeToast,v=e.onClick,m=e.closeOnClick;function y(t){if(e.draggable){l.didMove=!1,document.addEventListener("mousemove",w),document.addEventListener("mouseup",_),document.addEventListener("touchmove",w),document.addEventListener("touchend",_);var n=c.current;l.canCloseOnClick=!0,l.canDrag=!0,l.boundingRect=n.getBoundingClientRect(),n.style.transition="",l.x=S_(t.nativeEvent),l.y=I_(t.nativeEvent),"x"===e.draggableDirection?(l.start=l.x,l.removalDistance=n.offsetWidth*(e.draggablePercent/100)):(l.start=l.y,l.removalDistance=n.offsetHeight*(80===e.draggablePercent?1.5*e.draggablePercent:e.draggablePercent/100))}}function g(){if(l.boundingRect){var t=l.boundingRect,n=t.top,r=t.bottom,i=t.left,a=t.right;e.pauseOnHover&&l.x>=i&&l.x<=a&&l.y>=n&&l.y<=r?k():b()}}function b(){i(!0)}function k(){i(!1)}function w(t){var n=c.current;l.canDrag&&n&&(l.didMove=!0,r&&k(),l.x=S_(t),l.y=I_(t),"x"===e.draggableDirection?l.delta=l.x-l.start:l.delta=l.y-l.start,l.start!==l.x&&(l.canCloseOnClick=!1),n.style.transform="translate"+e.draggableDirection+"("+l.delta+"px)",n.style.opacity=""+(1-Math.abs(l.delta/l.removalDistance)))}function _(){document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",_),document.removeEventListener("touchmove",w),document.removeEventListener("touchend",_);var t=c.current;if(l.canDrag&&l.didMove&&t){if(l.canDrag=!1,Math.abs(l.delta)>l.removalDistance)return s(!0),void e.closeToast();t.style.transition="transform 0.2s, opacity 0.2s",t.style.transform="translate"+e.draggableDirection+"(0)",t.style.opacity="1"}}(0,t.useEffect)((function(){f.current=e})),(0,t.useEffect)((function(){return c.current&&c.current.addEventListener("d",b,{once:!0}),h_(e.onOpen)&&e.onOpen((0,t.isValidElement)(e.children)&&e.children.props),function(){var e=f.current;h_(e.onClose)&&e.onClose((0,t.isValidElement)(e.children)&&e.children.props)}}),[]),(0,t.useEffect)((function(){return e.pauseOnFocusLoss&&function(){document.hasFocus()||k();window.addEventListener("focus",b),window.addEventListener("blur",k)}(),function(){e.pauseOnFocusLoss&&(window.removeEventListener("focus",b),window.removeEventListener("blur",k))}}),[e.pauseOnFocusLoss]);var x={onMouseDown:y,onTouchStart:y,onMouseUp:g,onTouchEnd:g};return h&&d&&(x.onMouseEnter=k,x.onMouseLeave=b),m&&(x.onClick=function(e){v&&v(e),l.canCloseOnClick&&p()}),{playToast:b,pauseToast:k,isRunning:r,preventExitTransition:u,toastRef:c,eventHandlers:x}}function C_(e){var n=e.closeToast,r=e.theme,i=e.ariaLabel,a=void 0===i?"close"
2:i;return t.createElement("button",{className:"Toastify__close-button Toastify__close-button--"+r,type:"button",onClick:function(e){e.stopPropagation(),n(e)},"aria-label":a},t.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},t.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function N_(e){var n=e.delay,r=e.isRunning,i=e.closeToast,a=e.type,o=e.hide,u=e.className,s=e.style,c=e.controlledProgress,l=e.progress,f=e.rtl,h=e.isIn,d=e.theme,p=Ie(Ie({},s),{},{animationDuration:n+"ms",animationPlayState:r?"running":"paused",opacity:o?0:1});c&&(p.transform="scaleX("+l+")");var v=o_("Toastify__progress-bar",c?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar-theme--"+d,"Toastify__progress-bar--"+a,Ee({},"Toastify__progress-bar--rtl",f)),m=h_(u)?u({rtl:f,type:a,defaultClassName:v}):o_(v,u),y=Ee({},c&&l>=1?"onTransitionEnd":"onAnimationEnd",c&&l<1?null:function(){h&&i()});return t.createElement("div",Ie({role:"progressbar","aria-hidden":o?"true":"false","aria-label":"notification timer",className:m,style:p},y))}N_.defaultProps={type:y_.DEFAULT,hide:!1};var O_=function(e){var n=T_(e),r=n.isRunning,i=n.preventExitTransition,a=n.toastRef,o=n.eventHandlers,u=e.closeButton,s=e.children,c=e.autoClose,l=e.onClick,f=e.type,h=e.hideProgressBar,d=e.closeToast,p=e.transition,v=e.position,m=e.className,y=e.style,g=e.bodyClassName,b=e.bodyStyle,k=e.progressClassName,w=e.progressStyle,_=e.updateId,x=e.role,E=e.progress,S=e.rtl,I=e.toastId,T=e.deleteToast,C=e.isIn,N=e.isLoading,O=e.iconOut,A=e.theme,P=o_("Toastify__toast","Toastify__toast-theme--"+A,"Toastify__toast--"+f,Ee({},"Toastify__toast--rtl",S)),R=h_(m)?m({rtl:S,position:v,type:f,defaultClassName:P}):o_(P,m),D=!!E,L={closeToast:d,type:f,theme:A},j=null;return!1===u||(j=h_(u)?u(L):t.isValidElement(u)?t.cloneElement(u,L):C_(L)),t.createElement(p,{isIn:C,done:T,position:v,preventExitTransition:i,nodeRef:a},t.createElement("div",Ie(Ie({id:I,onClick:l,className:R},o),{},{style:y,ref:a}),t.createElement("div",Ie(Ie({},C&&{role:x}),{},{className:h_(g)?g({type:f}):o_("Toastify__toast-body",g),style:b}),null!=O&&t.createElement("div",{className:o_("Toastify__toast-icon",Ee({},"Toastify--animate-icon Toastify__zoom-enter",!N))},O),t.createElement("div",null,s)),j,(c||D)&&t.createElement(N_,Ie(Ie({},_&&!D?{key:"pb-"+_}:{}),{},{rtl:S,theme:A,delay:c,isRunning:r,isIn:C,closeToast:d,hide:h,type:f,style:w,className:k,controlledProgress:D,progress:E}))))},A_=g_({enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0}),P_=(g_({enter:"Toastify--animate Toastify__slide-enter",exit:"Toastify--animate Toastify__slide-exit",appendPosition:!0}),g_({enter:"Toastify--animate Toastify__zoom-enter",exit:"Toastify--animate Toastify__zoom-exit"}),g_({enter:"Toastify--animate Toastify__flip-enter",exit:"Toastify--animate Toastify__flip-exit"}),(0,t.forwardRef)((function(e,n){var r=E_(e),i=r.getToastToRender,a=r.containerRef,o=r.isToastActive,u=e.className,s=e.style,c=e.rtl,l=e.containerId;function f(e){var t=o_("Toastify__toast-container","Toastify__toast-container--"+e,Ee({},"Toastify__toast-container--rtl",c));return h_(u)?u({position:e,rtl:c,defaultClassName:t}):o_(t,d_(u))}return(0,t.useEffect)((function(){n&&(n.current=a.current)}),[]),t.createElement("div",{ref:a,className:"Toastify",id:l},i((function(e,n){var r=n.length?Ie({},s):Ie(Ie({},s),{},{pointerEvents:"none"});return t.createElement("div",{className:f(e),style:r,key:"container-"+e},n.map((function(e,r){var i=e.content,a=e.props;return t.createElement(O_,Ie(Ie({},a),{},{isIn:o(a.toastId),style:Ie(Ie({},a.style),{},{"--nth":r+1,"--len":n.length}),key:"toast-"+a.key}),i)})))})))})));P_.displayName="ToastContainer",P_.defaultProps={position:m_.TOP_RIGHT,transition:A_,rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:C_,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};var R_,D_=new Map,L_=[];function j_(){return Math.random().toString(36).substring(2,9)}function M_(e){return e&&(f_(e.toastId)||c_(e.toastId))?e.toastId:j_()}function F_(e,t){return D_.size>0?k_.emit(0,e,t):L_.push({content:e,options:t}),t.toastId}function U_(e,t){return Ie(Ie({},t),{},{type:t&&t.type||e,toastId:M_(t)})}function V_(e){return function(t,n){return F_(t,U_(e,n))}}function z_(e,t){return F_(e,U_(y_.DEFAULT,t))}z_.loading=function(e,t){return F_(e,U_(y_.DEFAULT,Ie({isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1},t)))},z_.promise=function(e,t,n){var r,i=t.pending,a=t.error,o=t.success;i&&(r=f_(i)?z_.loading(i,n):z_.loading(i.render,Ie(Ie({}
2,n),i)));var u={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null,delay:100},s=function(e,t,i){if(null!=t){var a=Ie(Ie(Ie({type:e},u),n),{},{data:i}),o=f_(t)?{render:t}:t;return r?z_.update(r,Ie(Ie({},a),o)):z_(o.render,Ie(Ie({},a),o)),i}z_.dismiss(r)},c=h_(e)?e():e;return c.then((function(e){return s("success",o,e)})).catch((function(e){return s("error",a,e)})),c},z_.success=V_(y_.SUCCESS),z_.info=V_(y_.INFO),z_.error=V_(y_.ERROR),z_.warning=V_(y_.WARNING),z_.warn=z_.warning,z_.dark=function(e,t){return F_(e,U_(y_.DEFAULT,Ie({theme:"dark"},t)))},z_.dismiss=function(e){D_.size>0?k_.emit(1,e):L_=L_.filter((function(t){return p_(e)&&t.options.toastId!==e}))},z_.clearWaitingQueue=function(e){return void 0===e&&(e={}),k_.emit(5,e)},z_.isActive=function(e){var t=!1;return D_.forEach((function(n){n.isToastActive&&n.isToastActive(e)&&(t=!0)})),t},z_.update=function(e,t){void 0===t&&(t={}),setTimeout((function(){var n=function(e,t){var n=t.containerId,r=D_.get(n||R_);return r?r.getToast(e):null}(e,t);if(n){var r=n.props,i=n.content,a=Ie(Ie(Ie({},r),t),{},{toastId:t.toastId||e,updateId:j_()});a.toastId!==e&&(a.staleId=e);var o=a.render||i;delete a.render,F_(o,a)}}),0)},z_.done=function(e){z_.update(e,{progress:1})},z_.onChange=function(e){return k_.on(4,e),function(){k_.off(4,e)}},z_.POSITION=m_,z_.TYPE=y_,k_.on(2,(function(e){R_=e.containerId||e,D_.set(R_,e),L_.forEach((function(e){k_.emit(0,e.content,e.options)})),L_=[]})).on(3,(function(e){D_.delete(e.containerId||e),0===D_.size&&k_.off(0).off(1).off(5)}));var q_=function(e){var n=e.setOpenModal,r=e.closeLogoutModal,i=o((0,t.useState)(""),2),a=i[0],u=i[1],s=o((0,t.useState)(""),2),c=s[0],l=s[1],f=o((0,t.useState)(!1),2),h=f[0],d=f[1],p=o((0,t.useState)({}),2),v=p[0],m=p[1],y=o((0,t.useState)({}),2),g=y[0],b=y[1],k=o((0,t.useState)(!1),2),w=k[0],_=k[1],x=ye();(0,t.useEffect)((function(){var e=(null===g||void 0===g?void 0:g.valid)&&(null===v||void 0===v?void 0:v.valid);d(!!e)}),[g,v]);var E=function(e){return z_.success("Accounts linked successfully! You can now sign in with this account ".concat(e),{autoClose:5e3})},S=function(){var e=lt(st().mark((function e(t){var i;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.preventDefault(),h){e.next=5;break}return e.abrupt("return");case 5:if(h)try{_(!0),i=aa.credential(a,c),Oa(Fb.currentUser,i).then((function(e){var t,i=e.user,a={id:i.uid,isAnonymous:i.isAnonymous,email:i.email,providerID:i.providerId};E(null!==(t=null===i||void 0===i?void 0:i.email)&&void 0!==t?t:""),x($w(a)),_(!1),n(!1),r(!1)}))}catch(o){z_.error(o.message,{autoClose:5e3})}case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),I=!(null!==v&&void 0!==v&&v.valid)&&(null===v||void 0===v?void 0:v.emailError),T=!(null!==g&&void 0!==g&&g.valid)&&(null===g||void 0===g?void 0:g.passwordError),C=!h||w;return w?(0,_e.jsx)(xe,{}):(console.log(w),(0,_e.jsx)("section",{className:Yw,children:(0,_e.jsxs)(Oe,{children:[(0,_e.jsx)("h3",{children:"Link Accounts"}),(0,_e.jsx)("p",{className:"text",children:"Provide your email and password to link your account to a permanent one."}),(0,_e.jsxs)("form",{onSubmit:S,children:[(0,_e.jsxs)("div",{className:Jw,children:[(0,_e.jsx)("input",{type:"email",value:a,onChange:function(e){u(e.target.value),m(n_(e.target.value))},placeholder:"Email"}),(0,_e.jsx)("div",{className:e_,children:I&&(0,_e.jsx)("p",{children:null===v||void 0===v?void 0:v.emailError})}),(0,_e.jsx)("input",{type:"password",value:c,onChange:function(e){l(e.target.value),b(r_(e.target.value))},placeholder:"Password"}),(0,_e.jsx)("div",{className:e_,children:T&&(0,_e.jsx)("p",{children:null===g||void 0===g?void 0:g.passwordError})})]}),(0,_e.jsxs)("div",{className:Zw,children:[(0,_e.jsx)(Ce,{className:"secondary",onClick:function(){return n(!1)},children:"Cancel"}),(0,_e.jsx)(Ce,{disabled:C,className:"primary",type:"submit",children:"Submit"})]})]})]})}))},B_="Modal_modal__background__VR8dx",H_=function(e){var n=e.children,r=e.setOpenModal,i=e.openModal;(0,t.useEffect)((function(){return!0===i&&(document.body.style.overflow="hidden"),function(){return document.body.style.overflow="unset"}}),[i]);return Z.createPortal((0,_e.jsx)("div",{className:B_,onClick:function(){return r((function(e){return!e}))},children:(0,_e.jsx)(Oe,{children:(0,_e.jsx)("div",{onClick:function(e){return function(e){return e.stopPropagation()}(e)},children:n})})}),document.querySelector("#modal"))}
2,K_=Nw({name:"cart",initialState:{cartItems:[],amountOfItemsInCart:0,total:{subTotal:0,tax:0,shipping:0,finalTotal:0}},reducers:{addToCart:function(e,t){var n=t.payload,r=e.cartItems.find((function(e){return e.id===n.id}));e.amountOfItemsInCart++,r?(r.quantity++,r.productTotal+=r.price):e.cartItems.unshift({id:n.id,name:n.name,price:n.price,quantity:1,productTotal:n.price,image:n.image})},increase:function(e,t){e.amountOfItemsInCart++;var n=e.cartItems.find((function(e){return e.id===t.payload.id}));n.quantity=n.quantity+1,n.productTotal+=n.price},decrease:function(e,t){var n=e.cartItems.find((function(e){return e.id===t.payload.id}));e.amountOfItemsInCart--,1===n.quantity?e.cartItems=e.cartItems.filter((function(e){return e.id!==n.id})):(n.quantity--,n.productTotal-=n.price)},calculateTotal:function(e){var t,n=0,r=0,i=0;e.cartItems.forEach((function(e){n+=e.productTotal,i+=.1*e.productTotal,r+=.05*e.productTotal})),t=n+i+r,e.total={subTotal:n,tax:i,shipping:r,finalTotal:t}},updateCartFromFirebase:function(e,t){e.cartItems=t.payload;var n=0;e.cartItems.forEach((function(e){n+=e.quantity})),e.amountOfItemsInCart=n},clearCartOnLogout:function(e){e.cartItems=[],e.amountOfItemsInCart=0,e.total={subTotal:0,tax:0,shipping:0,finalTotal:0}}}}),W_=K_.actions,Q_=W_.increase,G_=W_.addToCart,$_=W_.decrease,X_=W_.calculateTotal,Y_=W_.updateCartFromFirebase,J_=W_.clearCartOnLogout,Z_=K_.reducer,ex=Nw({name:"wishlist",initialState:{wishListItems:[],amountOfItemsInWishList:0,feedback:{message:"",type:""}},reducers:{addToWishList:function(e,t){var n=t.payload,r=e.wishListItems.find((function(e){return e.id===n.id}));r||(e.wishListItems.unshift(n),e.feedback.message="Item added to wishlist",e.feedback.type="success",e.amountOfItemsInWishList++),r&&(e.amountOfItemsInWishList--,e.feedback.message="Item removed from wishlist",e.feedback.type="success",e.wishListItems=e.wishListItems.filter((function(e){return e.id!==r.id})))},updateListFromFirebase:function(e,t){e.wishListItems=t.payload,e.amountOfItemsInWishList=e.wishListItems.length},clearListOnLogout:function(e){e.wishListItems=[],e.amountOfItemsInWishList=0}}}),tx=ex.actions,nx=tx.addToWishList,rx=tx.updateListFromFirebase,ix=tx.clearListOnLogout,ax=ex.reducer,ox=function(e){var n=e.setOpenModal,r=se((function(e){return e.auth})),i=r.id,a=r.isAnonymous,u=ye(),s=o((0,t.useState)(!1),2),c=s[0],l=s[1],f=o((0,t.useState)(!1),2),h=f[0],d=f[1],p=j(),v={id:null,isAnonymous:!1,email:null},m=function(){var e=lt(st().mark((function e(){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l(!0),e.prev=1,!a){e.next=5;break}return e.next=5,Wb(i);case 5:return e.next=7,qb();case 7:u($w(v)),u(J_()),u(ix()),p("/",{replace:!0}),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),alert(e.t0.message);case 16:l(!1),n(!1);case 18:case"end":return e.stop()}}),e,null,[[1,13]])})));return function(){return e.apply(this,arguments)}}(),y=function(){return n((function(e){return!e}))},g=a?"You are using a guest acount. If you logout now, all your data will be lost.":"Leaving so soon?";return c?(0,_e.jsx)(xe,{}):(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsxs)("section",{className:ft,children:[(0,_e.jsx)("div",{className:ht,onClick:y,children:(0,_e.jsx)(at,{size:25})}),(0,_e.jsx)("div",{className:dt,children:(0,_e.jsx)(bt,{size:25})}),(0,_e.jsxs)("article",{children:[(0,_e.jsx)("h1",{className:pt,children:"Are you sure you want to logout?"}),(0,_e.jsx)("p",{className:"text ".concat(vt),children:g}),a&&(0,_e.jsx)("p",{className:"text ".concat(mt),onClick:function(){return d((function(e){return!e}))},children:"I want to save my data"}),(0,_e.jsxs)("div",{className:yt,children:[(0,_e.jsx)(Ce,{className:"primary",onClick:m,children:"Logout"}),(0,_e.jsx)(Ce,{className:"secondary",onClick:y,children:"Cancel"})]})]})]}),h&&(0,_e.jsx)(H_,{openModal:h,setOpenModal:d,children:(0,_e.jsx)(q_,{setOpenModal:d,closeLogoutModal:n})})]})},ux=function(e){var n=se((function(e){return e.auth})).id,r=se((function(e){return e.cart})).amountOfItemsInCart,i=se((function(e){return e.wishlist})).amountOfItemsInWishList,a=o((0,t.useState)(!1),2),u=a[0],s=a[1],c=o((0,t.useState)(!1),2),l=c[0],f=c[1],h=j(),d=e.light;(0,t.useEffect)((function(){u?document.body.style.overflow="hidden":u||(document.body.style.overflow="auto")}),[u]);var p=d?"var(--primary-light)":"var(--primary)";return(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)("div",{className:Ae,children:(0,_e.jsx)(Oe,{children:(0,_e.jsxs)("nav",{className:Pe,children:[(0,_e.jsx)("p",{className:"logo",style:{color:"".concat(p)},onClick:function(){return h("/")},children:"finest&co"}),(0,_e.jsx)("div",{className:De,children:(0,_e.jsx)(rt,{color:p})}),(0,_e.jsxs)("ul",{className:Re,children:[(0,_e.jsx)("li",{onClick:function(){n?f((function(e){return!e})):h("/account")},children:(0,_e.jsx)(Qe,{size:"22",color:p})}),(0,_e.jsx)("li",{onClick:function(){return s((function(e){return!e}))},className:Me,children:(0,_e.jsx)(Ge,{size:"22",color:p})}),(0,_e.jsxs)("div",{className:Le,children:[(0,_e.jsxs)("li",{children:[(0,_e.jsx)(X,{to:"/wishlist",children:(0,_e.jsx)(ot,{size:"22",color:p})}),!!i&&n&&(0,_e.jsx)("span",{className:je,children:i})]}),(0,_e.jsxs)("li",{children:[(0,_e.jsx)(X,{to:"/cart",children:(0,_e.jsx)(it,{size:"25",color:p})}),!!r&&n&&(0,_e.jsx)("span",{className:je,children:r})]})]})]})]})})}),u&&(0,_e.jsx)(tt,{setIsOpen:s}),l&&(0,_e.jsx)(H_,{setOpenModal:f,openModal:l,children:(0,_e.jsx)(ox,{setOpenModal:f})})]})},sx="Hero_background__nZOGe",cx="Hero_hero__BX3b8",lx="Hero_hero__content__0Ru8X",fx=function(){var e=j();return(0,_e.jsx)("section",{className:sx,children:(0,_e.jsxs)("article",{className:cx,children:[(0,_e.jsx)(ux,{light:!0}),(0,_e.jsx)(Oe,{children:(0,_e.jsxs)("div",{className:lx,children:[(0,_e.jsx)("h1",{children:"The epitome of luxury furniture"}),(0,_e.jsx)("p",{className:"text",children:"We believe that furniture should be more than just functional \u2013 it should be a reflection of your personal style and taste."}),(0,_e.jsx)(Ce,{className:"secondary",onClick:function(){return e("/shop")},children:"Shop Now"})]})})]})})},hx=function(){return(0,_e.jsx)(_e.Fragment,{children:(0,_e.jsx)(fx,{})})},dx="Shop_shop__buttons__nW8Z-",px="Arrivals_arrivals__hREAq",vx="Arrivals_arrivals__btn-group__WCWBN",mx="Arrivals_arrivals__details__DfxAN",yx=function(){return(0,_e.jsx)(Oe,{children:(0,_e.jsxs)("section",{className:px,children:[(0,_e.jsx)("figure",{children:(0,_e.jsx)("img",{src:"https://images.pexels.com/photos/6316069/pexels-photo-6316069.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1",alt:"A styling kitchen with modern funriture."})}),(0,_e.jsx)("div",{className:mx,children:(0,_e.jsx)("article",{children:(0,_e.jsxs)(Oe,{children:[(0,_e.jsx)("h1",{children:"New Arrival"}),(0,_e.jsxs)("div",{className:vx,children:[(0,_e.jsx)(Ce,{className:"secondary",children:"Kitchen"}),(0,_e.jsx)(Ce,{className:"secondary",children:"Ikea"})]}),(0,_e.jsxs)("p",{className:"text",children:["Introducing our new kitchen set, the",(0,_e.jsx)("strong",{children:' "Gourmet Collection"'}),". This luxurious set features all the latest in kitchenware, from cookware and utensils to appliances and storage solutions. With this set, you'll be able to cook like a pro and entertain in style."]})]})})})]})})},gx={list:"ProductList_list__lGhH7",list__header:"ProductList_list__header__sdvjl",empty:"ProductList_empty__VHlxd",product__grid:"ProductList_product__grid__UweqA"};function bx(e){return Be({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"circle",attr:{cx:"8",cy:"8",r:"8"}}]})(e)}var kx=function(e){var t=e.color;return(0,_e.jsx)(bx,{size:"20",color:t})},wx={product:"Product_product__KX+mT",product__image:"Product_product__image__DdsAY",product__details:"Product_product__details__idc0M",product__name:"Product_product__name__tVtBE",product__category:"Product_product__category__rN1Kn",product__colours:"Product_product__colours__2KjjY",product__group__info:"Product_product__group__info__vY4ix",product__price:"Product_product__price__Ka2mF",product__icons:"Product_product__icons__09LOW",normal:"Product_normal__tk32D",height:"Product_height__WPsG9",product__group:"Product_product__group__yN7rs"},_x=function(e){var n,r=e.product,i=e.wishlist,a=j(),u=ye(),s=se((function(e){return e.auth})).id,c=se((function(e){return e.wishlist})).wishListItems,l=o((0,t.useState)(!1),2),f=l[0],h=l[1],d=new Intl.NumberFormat("en-US"),p=null===(n=r.colors)||void 0===n?void 0:n.map((function(e){return(0,_e.jsx)(kx,{color:e},e)})),v={id:r.id,name:r.name,price:r.price,image:r.image};(0,t.useEffect)((function(){var e=c.find((function(e){return e.id===r.id}));h(!!e)}),[c,r]);var m=i?"height":"normal",y=f?(0,_e.jsx)(gt,{size:22}):(0,_e.jsx)(kt,{size:22});return(0,_e.jsxs)("article",{className:"".concat(wx.product," ").concat(wx[m]),children:[(0,_e.jsx)("figure",{className:wx.product__image,onClick:function(){return a("/shop/".concat(r.id))},children:(0,_e.jsx)("img",{src:r.image,alt:r.name})}),(0,_e.jsxs)("div",{className:wx.product__details,children:[(0,_e.jsx)("h4",{className:wx.product__name,children:r.name}),(0,_e.jsxs)("p",{className:wx.product__category,children:[r.category,", ",r.company]}),(0,_e.jsxs)("div",{className:wx.product__colours,children:[p," "]}),(0,_e.jsxs)("div",{className:wx.product__group,children:[(0,_e.jsxs)("div",{className:wx.product__group__info,children:[(0,_e.jsxs)("p",{className:wx.product__price,children:["$ ",d.format(r.price)]}),(0,_e.jsx)("div",{className:wx.product__icons,onClick:function(){s?(u(nx(r)),f?z_.success("Item removed from wishlist"):z_.success("Item added to wishlist")):a("/account")},children:y})]}),i&&(0,_e.jsx)(Ce,{className:"primary",onClick:function(){u(G_(v)),u(nx(r)),z_.success("Item moved to cart")},children:"Move to cart"})]})]})]})},xx="Error_error__P9JHD";var Ex=n.p+"static/media/error.0636cdd79d131bc85466c0decce700f5.svg",Sx=function(e){var t=e.error;return(0,_e.jsx)(Oe,{children:(0,_e.jsxs)("article",{className:xx,children:[(0,_e.jsx)("figure",{children:(0,_e.jsx)("img",{src:Ex,alt:"Illustration of a server that failed to connect."})}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)("h3",{children:null===t||void 0===t?void 0:t.status.split("_").join(" ")}),(0,_e.jsx)("p",{children:null===t||void 0===t?void 0:t.error})]})]})})},Ix="Filters_filters__G2Kkf",Tx="Filters_filters__btn__bmOQu";function Cx(e){return Be({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0zM0 0h24m0 24H0"}},{tag:"path",attr:{d:"M4.25 5.66c.1.13 5.74 7.33 5.74 7.33V19c0 .55.45 1 1.01 1h2.01c.55 0 1.01-.45 1.01-1v-6.02s5.49-7.02 5.75-7.34C20.03 5.32 20 5 20 5c0-.55-.45-1-1.01-1H5.01C4.4 4 4 4.48 4 5c0 .2.06.44.25.66z"}}]})(e)}var Nx="MobileFilter_filter__container__WCDGa",Ox="MobileFilter_filter__hnC-Z",Ax="MobileFilter_filter__heading__SHCY9",Px="FilterOptions_filter__J4d-4",Rx="FilterOptions_filter__group__d2kNJ",Dx="FilterOptions_filter__option__64Br1",Lx={products:[],error:null,filters:{category:[],company:[],sortBy:"",search:""},filteredProducts:[],filteredProductsMessage:"",currentSearch:"",similarCategories:[]},jx=Nw({name:"products",initialState:Lx,reducers:{updateProducts:function(e,t){var n=t.payload;e.products=n.data},setError:function(e,t){var n=t.payload;e.error=n.error},filterProducts:function(e,t){var n=e.filters,r=n.category,i=n.company,a=n.sortBy,o=n.search;(null===r||void 0===r?void 0:r.length)||(null===i||void 0===i?void 0:i.length)||!!a||!!o||(e.filteredProductsMessage=""),e.filteredProducts=wt(e.products).filter((function(e){return null!==r&&void 0!==r&&r.length?r.includes(e.category):e})).filter((function(e){return null!==i&&void 0!==i&&i.length?i.includes(e.company):e})).sort((function(e,t){return"lowToHigh"===a?e.price-t.price:"highToLow"===a?t.price-e.price:"ascending"===a?e.name.localeCompare(t.name):"descending"===a?t.name.localeCompare(e.name):e-t})).filter((function(t){var n=t.name;return o?n.toLowerCase().includes(o.toLowerCase()):e.filteredProductsMessage="No products found."})),e.filteredProducts||(e.filteredProductsMessage="No products found.")},clearFilters:function(e,t){e.filteredProducts=[],e.filteredProductsMessage="",e.filters=Lx.filters,localStorage.removeItem("filters")},updateFilters:function(e,t){var n=t.payload,r=n.type,i=n.value;e.filters[r]=i},getSimilarCategories:function(e,t){var n=t.payload;e.similarCategories=wt(e.products).filter((function(e){var t=e.category,r=e.id;return t===n.category&&r!==n.id})).slice(0,4)}}}),Mx=jx.actions,Fx=Mx.updateProducts,Ux=Mx.setError,Vx=(Mx.setLoa
2ding,Mx.filterProducts),zx=Mx.clearFilters,qx=Mx.updateFilters,Bx=Mx.getSimilarCategories,Hx=jx.reducer,Kx=[{name:"Name: A-Z",value:"ascending"},{name:"Name: Z-A",value:"descending"},{name:"Price: Lowest",value:"lowToHigh"},{name:"Price: Highest",value:"highToLow"}],Wx=(0,t.createContext)(),Qx=function(e){var n=e.children,r=JSON.parse(localStorage.getItem("filters")),i=ye(),a=se((function(e){return e.products})).products,u=o((0,t.useState)({category:(null===r||void 0===r?void 0:r.category)||[],company:(null===r||void 0===r?void 0:r.company)||[],sortBy:(null===r||void 0===r?void 0:r.sortBy)||""}),2),s=u[0],c=u[1];return(0,t.useEffect)((function(){a.length>0&&(i(qx({type:"category",value:s.category})),i(qx({type:"company",value:s.company})),i(qx({type:"sortBy",value:s.sortBy})),i(Vx()))}),[i,s,a]),(0,_e.jsx)(Wx.Provider,{value:{filter:s,setFilter:c},children:n})},Gx=function(e){var n=ye(),r=(0,t.useContext)(Wx),i=r.setFilter,a=r.filter,o=se((function(e){return e.products})).products,u=Kx.map((function(e,t){return(0,_e.jsxs)("div",{className:Dx,children:[(0,_e.jsx)("input",{type:"radio",name:"sort",id:t,value:e.value,checked:e.value===a.sortBy,onChange:function(e){return function(e){var t=e.target.value;i(Ie(Ie({},a),{},{sortBy:t})),localStorage.setItem("filters",JSON.stringify(Ie(Ie({},a),{},{sortBy:t})))}(e)}}),(0,_e.jsx)("label",{htmlFor:e.name,children:e.name})]},t)})),s=new Set(o.map((function(e){return e.category}))),c=function(e){var t=e.target,n=t.value,r=t.checked,o=Ie({},a);r&&(o.category=[].concat(wt(o.category),[n])),r||(o.category=o.category.filter((function(e){return e!==n}))),i(o),localStorage.setItem("filters",JSON.stringify(o))},l=Array.from(s).map((function(e){return(0,_e.jsxs)("div",{className:Dx,children:[(0,_e.jsx)("input",{type:"checkbox",id:e,value:e,onChange:c,checked:a.category.includes(e)}),(0,_e.jsx)("label",{htmlFor:e,children:e})]},e)})),f=new Set(o.map((function(e){return e.company}))),h=function(e){var t=e.target,n=t.value,r=t.checked,o=Ie({},a);r&&(o.company=[].concat(wt(o.company),[n])),r||(o.company=o.company.filter((function(e){return e!==n}))),i(o),localStorage.setItem("filters",JSON.stringify(o))},d=Array.from(f).map((function(e){return(0,_e.jsxs)("div",{className:Dx,children:[(0,_e.jsx)("input",{type:"checkbox",id:e,value:e,onChange:h,checked:a.company.includes(e)}),(0,_e.jsx)("label",{htmlFor:e,children:e})]},e)}));return(0,_e.jsxs)("form",{className:Px,children:[(0,_e.jsx)("h3",{children:"Filters"}),(0,_e.jsxs)("div",{className:Rx,children:[(0,_e.jsx)("h4",{children:"Sort By"}),u]}),(0,_e.jsxs)("div",{className:Rx,children:[(0,_e.jsx)("h4",{children:"category"}),l]}),(0,_e.jsxs)("div",{className:Rx,children:[(0,_e.jsx)("h4",{children:"company"}),d]}),(0,_e.jsx)(Ce,{className:"secondary",onClick:function(){i({category:[],company:[],sortBy:""}),n(zx()),e.setOpenFilterMenu&&e.setOpenFilterMenu(!1)},children:"Clear Filters"})]})},$x=function(e){return Z.createPortal((0,_e.jsx)("section",{className:Nx,children:(0,_e.jsx)("div",{className:Ox,children:(0,_e.jsxs)(Oe,{children:[(0,_e.jsxs)("p",{className:Ax,children:["Filter and Sort",(0,_e.jsx)("span",{onClick:function(){return e.setOpenFilterMenu((function(e){return!e}))},children:(0,_e.jsx)(et,{size:"20"})})]}),(0,_e.jsx)(Gx,{setOpenFilterMenu:e.setOpenFilterMenu})]})})}),document.querySelector("#filters"))},Xx="Search_search__4e1YI";function Yx(e){return Be({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M10 18a7.952 7.952 0 0 0 4.897-1.688l4.396 4.396 1.414-1.414-4.396-4.396A7.952 7.952 0 0 0 18 10c0-4.411-3.589-8-8-8s-8 3.589-8 8 3.589 8 8 8zm0-14c3.309 0 6 2.691 6 6s-2.691 6-6 6-6-2.691-6-6 2.691-6 6-6z"}}]})(e)}var Jx=function(){var e=o((0,t.useState)(""),2),n=e[0],r=e[1],i=ye();return(0,t.useEffect)((function(){i(qx({type:"search",value:n})),i(Vx())}),[n,i]),(0,_e.jsxs)("form",{className:Xx,children:[(0,_e.jsx)("input",{type:"text",name:"",id:"",placeholder:"Search",onChange:function(e){return r(e.target.value)},value:n}),(0,_e.jsx)("label",{htmlFor:"search",children:(0,_e.jsx)(Yx,{size:"20"})})]})},Zx=function(){var e=o((0,t.useState)(!1),2),n=e[0],r=e[1],i=se((function(e){return e.products})).products,a=ye();(0,t.useEffect)((function(){var e=JSON.parse(localStorage.getItem("filters"));e&&(a(qx(e)),i&&a(Vx(e)))}),[a,i]),(0,t.useEffect)((function(){n?document.body.style.overflow="hidden":n||(document.body.style.overflow="auto")}),[n]);return(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)("div",{className:Ix,children:(0,_e.jsxs)("div",{className:Tx,children:[(0,_e.jsx)(Jx,{}),(0,_e.jsxs)(Ce,{className:"secondary",onClick:function(){return r((function(e){return!e}))},children:["Filter & Sort",(0,_e.jsx)("span",{children:(0,_e.jsx)(Cx,{size:"20"})})]})]})}),n&&(0,_e.jsx)($x,{openFilterMenu:n,setOpenFilterMenu:r})]})},eE=function(){return(0,_e.jsx)(Gx,{})},tE=function(){var e,t=se((function(e){return e.products})),n=t.products,r=t.filteredProducts,i=t.filteredProductsMessage,a=t.error,o=r.length>0?r:n;return 0===o.length&&(e=(0,_e.jsx)(xe,{})),a&&(e=(0,_e.jsx)(Sx,{error:a})),o&&(e=(0,_e.jsx)("div",{className:gx.list,children:null===o||void 0===o?void 0:o.map((function(e){return(0,_e.jsx)(_x,{product:e},e.id)}))})),i&&0===r.length&&(e=(0,_e.jsxs)("div",{className:gx.empty,children:[(0,_e.jsxs)("h2",{children:[i,"."]}),(0,_e.jsx)("p",{className:"text",children:"Try changing the filters to
2see more products."})]})),(0,_e.jsxs)(Oe,{children:[(0,_e.jsx)(Zx,{}),(0,_e.jsxs)("div",{className:gx.product__grid,children:[(0,_e.jsx)("aside",{children:(0,_e.jsx)(eE,{})}),(0,_e.jsx)("section",{className:gx.product__list,children:e})]})]})},nE=["dining","living room","office","kitchen","kids","bedroom","ikea","liddy","marcos","caressa"],rE=function(){var e=nE.map((function(e){return(0,_e.jsx)(Ce,{className:"secondary",children:e},e)}));return(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(ux,{}),(0,_e.jsx)(Oe,{children:(0,_e.jsx)("div",{className:dx,children:e})}),(0,_e.jsx)(yx,{}),(0,_e.jsx)(tE,{})]})},iE="ProductInfo_info__SP-4i",aE="NOT_FOUND";var oE=function(e,t){return e===t};function uE(e,t){var n="object"===typeof t?t:{equalityCheck:t},r=n.equalityCheck,i=void 0===r?oE:r,a=n.maxSize,o=void 0===a?1:a,u=n.resultEqualityCheck,s=function(e){return function(t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,i=0;i<r;i++)if(!e(t[i],n[i]))return!1;return!0}}(i),c=1===o?function(e){var t;return{get:function(n){return t&&e(t.key,n)?t.value:aE},put:function(e,n){t={key:e,value:n}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}(s):function(e,t){var n=[];function r(e){var r=n.findIndex((function(n){return t(e,n.key)}));if(r>-1){var i=n[r];return r>0&&(n.splice(r,1),n.unshift(i)),i.value}return aE}return{get:r,put:function(t,i){r(t)===aE&&(n.unshift({key:t,value:i}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(o,s);function l(){var t=c.get(arguments);if(t===aE){if(t=e.apply(null,arguments),u){var n=c.getEntries(),r=n.find((function(e){return u(e.value,t)}));r&&(t=r.value)}c.put(arguments,t)}return t}return l.clearCache=function(){return c.clear()},l}function sE(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"===typeof e}))){var n=t.map((function(e){return"function"===typeof e?"function "+(e.name||"unnamed")+"()":typeof e})).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}function cE(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];var a,o=0,u={memoizeOptions:void 0},s=r.pop();if("object"===typeof s&&(u=s,s=r.pop()),"function"!==typeof s)throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof s+"]");var c=u,l=c.memoizeOptions,f=void 0===l?n:l,h=Array.isArray(f)?f:[f],d=sE(r),p=e.apply(void 0,[function(){return o++,s.apply(null,arguments)}].concat(h)),v=e((function(){for(var e=[],t=d.length,n=0;n<t;n++)e.push(d[n].apply(null,arguments));return a=p.apply(null,e)}));return Object.assign(v,{resultFunc:s,memoizedResultFunc:p,dependencies:d,lastResult:function(){return a},recomputations:function(){return o},resetRecomputations:function(){return o=0}}),v};return i}var lE,fE,hE=cE(uE),dE=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(u){a=[6,u],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},pE=function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},vE=Object.defineProperty,mE=Object.defineProperties,yE=Object.getOwnPropertyDescriptors,gE=Object.getOwnPropertySymbols,bE=Object.prototype.hasOwnProperty,kE=Object.prototype.propertyIsEnumerable,wE=function(e,t,n){return t in e?vE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},_E=function(e,t){for(var n in t||(t={}))bE.call(t,n)&&wE(e,n,t[n]);if(gE)for(var r=0,i=gE(t);r<i.length;r++){n=i[r];kE.call(t,n)&&wE(e,n,t[n])}return e},xE=function(e,t){return mE(e,yE(t))},EE=function(e,t){var n={};for(var r in e)bE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);
2if(null!=e&&gE)for(var i=0,a=gE(e);i<a.length;i++){r=a[i];t.indexOf(r)<0&&kE.call(e,r)&&(n[r]=e[r])}return n},SE=function(e,t,n){return new Promise((function(r,i){var a=function(e){try{u(n.next(e))}catch(t){i(t)}},o=function(e){try{u(n.throw(e))}catch(t){i(t)}},u=function(e){return e.done?r(e.value):Promise.resolve(e.value).then(a,o)};u((n=n.apply(e,t)).next())}))};(fE=lE||(lE={})).uninitialized="uninitialized",fE.pending="pending",fE.fulfilled="fulfilled",fE.rejected="rejected";function IE(e,t){return e?t?function(e){return new RegExp("(^|:)//").test(e)}(t)?t:(e=function(e){return e.replace(/\/$/,"")}(e),e+"/"+(t=function(e){return e.replace(/^\//,"")}(t))):e:t}var TE=function(e){return[].concat.apply([],e)};var CE=xw;function NE(e,t){if(e===t||!(CE(e)&&CE(t)||Array.isArray(e)&&Array.isArray(t)))return t;for(var n=Object.keys(t),r=Object.keys(e),i=n.length===r.length,a=Array.isArray(t)?[]:{},o=0,u=n;o<u.length;o++){var s=u[o];a[s]=NE(e[s],t[s]),i&&(i=e[s]===a[s])}return i?e:a}var OE=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return fetch.apply(void 0,e)},AE=function(e){return e.status>=200&&e.status<=299},PE=function(e,t){return SE(void 0,null,(function(){var n;return dE(this,(function(r){switch(r.label){case 0:return"function"===typeof t?[2,t(e)]:"text"===t?[2,e.text()]:"json"!==t?[3,2]:[4,e.text()];case 1:return[2,(n=r.sent()).length?JSON.parse(n):null];case 2:return[2]}}
2))}))};function RE(e){if(!xw(e))return e;for(var t=_E({},e),n=0,r=Object.entries(t);n<r.length;n++){var i=r[n],a=i[0];"undefined"===typeof i[1]&&delete t[a]}return t}var DE=function(e,t){void 0===t&&(t=void 0),this.value=e,this.meta=t};var LE,jE,ME=Tw("__rtkq/focused"),FE=Tw("__rtkq/unfocused"),UE=Tw("__rtkq/online"),VE=Tw("__rtkq/offline");function zE(e,t,n,r,i,a){return function(e){return"function"===typeof e}(e)?e(t,n,r,i).map(qE).map(a):Array.isArray(e)?e.map(qE).map(a):[]}function qE(e){return"string"===typeof e?{type:e}:e}function BE(e){return e}function HE(e,t,n,r){return zE(n[e.meta.arg.endpointName][t],Kw(e)?e.payload:void 0,Hw(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}function KE(e,t,n){var r=e[t];r&&n(r)}function WE(e){var t;return null!=(t="arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)?t:e.requestId}function QE(e,t,n){var r=e[WE(t)];r&&n(r)}(jE=LE||(LE={})).query="query",jE.mutation="mutation";var GE={};function $E(e){var t=e.reducerPath,n=e.queryThunk,r=e.mutationThunk,i=e.context,a=i.endpointDefinitions,o=i.apiUid,u=i.extractRehydrationInfo,s=i.hasRehydrationInfo,c=e.assertTagType,l=e.config,f=Tw(t+"/resetApiState"),h=Nw({name:t+"/queries",initialState:GE,reducers:{removeQueryResult:function(e,t){delete e[t.payload.queryCacheKey]},queryResultPatched:function(e,t){var n=t.payload,r=n.queryCacheKey,i=n.patches;KE(e,r,(function(e){e.data=$k(e.data,i.concat())}
2))}},extraReducers:function(e){e.addCase(n.pending,(function(e,t){var n,r=t.meta,i=t.meta.arg;i.subscribe&&(null!=e[n=i.queryCacheKey]||(e[n]={status:lE.uninitialized,endpointName:i.endpointName})),KE(e,i.queryCacheKey,(function(e){e.status=lE.pending,e.requestId=r.requestId,void 0!==i.originalArgs&&(e.originalArgs=i.originalArgs),e.startedTimeStamp=r.startedTimeStamp}))})).addCase(n.fulfilled,(function(e,t){var n=t.meta,r=t.payload;KE(e,n.arg.queryCacheKey,(function(e){var t;e.requestId===n.requestId&&(e.status=lE.fulfilled,e.data=null==(t=a[n.arg.endpointName].structuralSharing)||t?NE(e.data,r):r,delete e.error,e.fulfilledTimeStamp=n.fulfilledTimeStamp)}))})).addCase(n.rejected,(function(e,t){var n=t.meta,r=n.condition,i=n.arg,a=n.requestId,o=t.error,u=t.payload;KE(e,i.queryCacheKey,(function(e){if(r);else{if(e.requestId!==a)return;e.status=lE.rejected,e.error=null!=u?u:o}}))})).addMatcher(s,(function(e,t){for(var n=u(t).queries,r=0,i=Object.entries(n);r<i.length;r++){var a=i[r],o=a[0],s=a[1];(null==s?void 0:s.status)!==lE.fulfilled&&(null==s?void 0:s.status)!==lE.rejected||(e[o]=s)}}))}}),d=Nw({name:t+"/mutations",initialState:GE,reducers:{removeMutationResult:function(e,t){var n=WE(t.payload);n in e&&delete e[n]}},extraReducers:function(e){e.addCase(r.pending,(function(e,t){var n=t.meta,r=t.meta,i=r.requestId,a=r.arg,o=r.startedTimeStamp;a.track&&(e[WE(n)]={requestId:i,status:lE.pending,endpointName:a.endpointName,startedTimeStamp:o})})).addCase(r.fulfilled,(function(e,t){var n=t.payload,r=t.meta;r.arg.track&&QE(e,r,(function(e){e.requestId===r.requestId&&(e.status=lE.fulfilled,e.data=n,e.fulfilledTimeStamp=r.fulfilledTimeStamp)}))})).addCase(r.rejected,(function(e,t){var n=t.payload,r=t.error,i=t.meta;i.arg.track&&QE(e,i,(function(e){e.requestId===i.requestId&&(e.status=lE.rejected,e.error=null!=n?n:r)}))})).addMatcher(s,(function(e,t){for(var n=u(t).mutations,r=0,i=Object.entries(n);r<i.length;r++){var a=i[r],o=a[0],s=a[1];(null==s?void 0:s.status)!==lE.fulfilled&&(null==s?void 0:s.status)!==lE.rejected||o===(null==s?void 0:s.requestId)||(e[o]=s)}}))}}),p=Nw({name:t+"/invalidation",initialState:GE,reducers:{},extraReducers:function(e){e.addCase(h.actions.removeQueryResult,(function(e,t){for(var n=t.payload.queryCacheKey,r=0,i=Object.values(e);r<i.length;r++)for(var a=i[r],o=0,u=Object.values(a);o<u.length;o++){var s=u[o],c=s.indexOf(n);-1!==c&&s.splice(c,1)}})).addMatcher(s,(function(e,t){for(var n,r,i,a,o=u(t).provided,s=0,c=Object.entries(o);s<c.length;s++)for(var l=c[s],f=l[0],h=l[1],d=0,p=Object.entries(h);d<p.length;d++)for(var v=p[d],m=v[0],y=v[1],g=null!=(a=(r=null!=(n=e[f])?n:e[f]={})[i=m||"__internal_without_id"])?a:r[i]=[],b=0,k=y;b<k.length;b++){var w=k[b];g.includes(w)||g.push(w)}})).addMatcher(Fw(Kw(n),Hw(n)),(function(e,t){for(var n,r,i,o,u=HE(t,"providesTags",a,c),s=t.meta.arg.queryCacheKey,l=0,f=u;l<f.length;l++){var h=f[l],d=h.type,p=h.id,v=null!=(o=(r=null!=(n=e[d])?n:e[d]={})[i=p||"__internal_without_id"])?o:r[i]=[];v.includes(s)||v.push(s)}}))}}),v=Nw({name:t+"/subscriptions",initialState:GE,reducers:{updateSubscriptionOptions:function(e,t){var n,r=t.payload,i=r.queryCacheKey,a=r.requestId,o=r.options;(null==(n=null==e?void 0:e[i])?void 0:n[a])&&(e[i][a]=o)},unsubscribeQueryResult:function(e,t){var n=t.payload,r=n.queryCacheKey,i=n.requestId;e[r]&&delete e[r][i]}},extraReducers:function(e){e.addCase(h.actions.removeQueryResult,(function(e,t){delete e[t.payload.queryCacheKey]})).addCase(n.pending,(function(e,t){var n,r,i,a,o=t.meta,u=o.arg,s=o.requestId;if(u.subscribe){var c=null!=(r=e[n=u.queryCacheKey])?r:e[n]={};c[s]=null!=(a=null!=(i=u.subscriptionOptions)?i:c[s])?a:{}}})).addCase(n.rejected,(function(e,t){var n,r,i,a,o=t.meta,u=o.condition,s=o.arg,c=o.requestId;t.error,t.payload;if(u&&s.subscribe){var l=null!=(r=e[n=s.queryCacheKey])?r:e[n]={};l[c]=null!=(a=null!=(i=s.subscriptionOptions)?i:l[c])?a:{}}})).addMatcher(s,(function(e){return _E({},e)}))}}),m=Nw({name:t+"/config",initialState:_E({online:"undefined"===typeof navigator||void 0===navigator.onLine||navigator.onLine,focused:"undefined"===typeof document||"hidden"
2!==document.visibilityState,middlewareRegistered:!1},l),reducers:{middlewareRegistered:function(e,t){var n=t.payload;e.middlewareRegistered="conflict"!==e.middlewareRegistered&&o===n||"conflict"}},extraReducers:function(e){e.addCase(UE,(function(e){e.online=!0})).addCase(VE,(function(e){e.online=!1})).addCase(ME,(function(e){e.focused=!0})).addCase(FE,(function(e){e.focused=!1})).addMatcher(s,(function(e){return _E({},e)}))}}),y=rw({queries:h.reducer,mutations:d.reducer,provided:p.reducer,subscriptions:v.reducer,config:m.reducer});return{reducer:function(e,t){return y(f.match(t)?void 0:e,t)},actions:xE(_E(_E(_E(_E({},m.actions),h.actions),v.actions),d.actions),{unsubscribeMutationResult:d.actions.removeMutationResult,resetApiState:f})}}var XE=Symbol.for("RTKQ/skipToken"),YE={status:lE.uninitialized},JE=Xk(YE,(function(){})),ZE=Xk(YE,(function(){}));function eS(e){var t=e.serializeQueryArgs,n=e.reducerPath;return{buildQuerySelector:function(e,n){return function(a){var o=hE(i,(function(r){var i,o;return null!=(o=a===XE||null==(i=null==r?void 0:r.queries)?void 0:i[t({queryArgs:a,endpointDefinition:n,endpointName:e})])?o:JE}));return hE(o,r)}},buildMutationSelector:function(){return function(e){var t,n;n="object"===typeof e?null!=(t=WE(e))?t:XE:e;var a=hE(i,(function(e){var t,r;return null!=(r=n===XE||null==(t=null==e?void 0:e.mutations)?void 0:t[n])?r:ZE}));return hE(a,r)}},selectInvalidatedBy:function(e,t){for(var r,i=e[n],a=new Set,o=0,u=t.map(qE);o<u.length;o++){var s=u[o],c=i.provided[s.type];if(c)for(var l=null!=(r=void 0!==s.id?c[s.id]:TE(Object.values(c)))?r:[],f=0,h=l;f<h.length;f++){var d=h[f];a.add(d)}}return TE(Array.from(a.values()).map((function(e){var t=i.queries[e];return t?[{queryCacheKey:e,endpointName:t.endpointName,originalArgs:t.originalArgs}]:[]})))}};function r(e){return _E(_E({},e),{status:t=e.status,isUninitialized:t===lE.uninitialized,isLoading:t===lE.pending,isSuccess:t===lE.fulfilled,isError:t===lE.rejected});var t}function i(e){return e[n]}}var tS=function(e){var t=e.endpointName,n=e.queryArgs;return t+"("+JSON.stringify(n,(function(e,t){return xw(t)?Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{}):t}))+")"};function nS(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var n=uE((function(e){var n,r;return null==(r=t.extractRehydrationInfo)?void 0:r.call(t,e,{reducerPath:null!=(n=t.reducerPath)?n:"api"})})),r=xE(_E({reducerPath:"api",serializeQueryArgs:tS,keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1},t),{extractRehydrationInfo:n,tagTypes:pE([],t.tagTypes||[])}),i={endpointDefinitions:{},batch:function(e){e()},apiUid:Ow(),extractRehydrationInfo:n,hasRehydrationInfo:uE((function(e){return null!=n(e)}))},a={injectEndpoints:function(e){for(var t=e.endpoints({query:function(e){return xE(_E({},e),{type:LE.query})},mutation:function(e){return xE(_E({},e),{type:LE.mutation})}}),n=0,r=Object.entries(t);n<r.length;n++){var u=r[n],s=u[0],c=u[1];if(e.overrideExisting||!(s in i.endpointDefinitions)){i.endpointDefinitions[s]=c;for(var l=0,f=o;l<f.length;l++){f[l].injectEndpoint(s,c)}}}return a},enhanceEndpoints:function(e){var t=e.addTagTypes,n=e.endpoints;if(t)for(var o=0,u=t;o<u.length;o++){var s=u[o];r.tagTypes.includes(s)||r.tagTypes.push(s)}if(n)for(var c=0,l=Object.entries(n);c<l.length;c++){var f=l[c],h=f[0],d=f[1];"function"===typeof d?d(i.endpointDefinitions[h]):Object.assign(i.endpointDefinitions[h]||{},d)}return a}},o=e.map((function(e){return e.init(a,r,i)}));return a.injectEndpoints({endpoints:t.endpoints})}}var rS=function(e){var t=e.reducerPath,n=e.api,r=e.context,i=n.internalActions,a=i.removeQueryResult,o=i.unsubscribeQueryResult;return function(e){var i={};return function(a){return function(s){var c,l=a(s);if(o.match(s)){var f=e.getState()[t];u(w=s.payload.queryCacheKey,null==(c=f.queries[w])?void 0:c.endpointName,e,f.config)}if(n.util.resetApiState.match(s))for(var h=0,d=Object.entries(i);h<d.length;h++){var p=d[h],v=p[0],m=p[1];m&&clearTimeout(m),delete i[v]}if(r.hasRehydrationInfo(s)){f=e.getState()[t];for(var y=r.extractRehydrationInfo(s).queries,g=0,b=Object.entries(y);g<b.length;g++){var k=b[g],w=k[0],_=k[1];u(w,null==_?void 0:_.endpointName,e,f.config)}}return l}};function u(e,n,o,u){var s,c=r.endpointDefinitions[n],l=null!=(s=null==c?void 0:c.keepUnusedData
2For)?s:u.keepUnusedDataFor,f=i[e];f&&clearTimeout(f),i[e]=setTimeout((function(){var n=o.getState()[t].subscriptions[e];n&&0!==Object.keys(n).length||o.dispatch(a({queryCacheKey:e})),delete i[e]}),1e3*l)}}},iS=function(e){var t=e.reducerPath,n=e.context,r=e.context.endpointDefinitions,i=e.mutationThunk,a=e.api,o=e.assertTagType,u=e.refetchQuery,s=a.internalActions.removeQueryResult;return function(e){return function(t){return function(n){var u=t(n);return Fw(Kw(i),Hw(i))(n)&&c(HE(n,"invalidatesTags",r,o),e),a.util.invalidateTags.match(n)&&c(zE(n.payload,void 0,void 0,void 0,void 0,o),e),u}}};function c(e,r){var i=r.getState(),o=i[t],c=a.util.selectInvalidatedBy(i,e);n.batch((function(){for(var e=0,t=Array.from(c.values());e<t.length;e++){var n=t[e].queryCacheKey,i=o.queries[n],a=o.subscriptions[n];i&&a&&(0===Object.keys(a).length?r.dispatch(s({queryCacheKey:n})):i.status!==lE.uninitialized&&r.dispatch(u(i,n)))}}))}},aS=function(e){var t=e.reducerPath,n=e.queryThunk,r=e.api,i=e.refetchQuery;return function(e){var o={};return function(t){return function(i){var a=t(i);return(r.internalActions.updateSubscriptionOptions.match(i)||r.internalActions.unsubscribeQueryResult.match(i))&&s(i.payload,e),(n.pending.match(i)||n.rejected.match(i)&&i.meta.condition)&&s(i.meta.arg,e),(n.fulfilled.match(i)||n.rejected.match(i)&&!i.meta.condition)&&u(i.meta.arg,e),r.util.resetApiState.match(i)&&function(){for(var e=0,t=Object.keys(o);e<t.length;e++){c(t[e])}}(),a}};function u(e,n){var r=e.queryCacheKey,u=n.getState()[t],s=u.queries[r],c=u.subscriptions[r];if(s&&s.status!==lE.uninitialized){var l=a(c);if(Number.isFinite(l)){var f=o[r];(null==f?void 0:f.timeout)&&(clearTimeout(f.timeout),f.timeout=void 0);var h=Date.now()+l,d=o[r]={nextPollTimestamp:h,pollingInterval:l,timeout:setTimeout((function(){d.timeout=void 0,n.dispatch(i(s,r))}),l)}}}}function s(e,n){var r=e.queryCacheKey,i=n.getState()[t],s=i.queries[r],l=i.subscriptions[r];if(s&&s.status!==lE.uninitialized){var f=a(l);if(Number.isFinite(f)){var h=o[r],d=Date.now()+f;(!h||d<h.nextPollTimestamp)&&u({queryCacheKey:r},n)}else c(r)}}function c(e){var t=o[e];(null==t?void 0:t.timeout)&&clearTimeout(t.timeout),delete o[e]}};function a(e){void 0===e&&(e={});for(var t=Number.POSITIVE_INFINITY,n=0,r=Object.values(e);n<r.length;n++){var i=r[n];i.pollingInterval&&(t=Math.min(i.pollingInterval,t))}return t}},oS=function(e){var t=e.reducerPath,n=e.context,r=e.api,i=e.refetchQuery,a=r.internalActions.removeQueryResult;return function(e){return function(t){return function(n){var r=t(n);return ME.match(n)&&o(e,"refetchOnFocus"),UE.match(n)&&o(e,"refetchOnReconnect"),r}}};function o(e,r){var o=e.getState()[t],u=o.queries,s=o.subscriptions;n.batch((function(){for(var t=0,n=Object.keys(s);t<n.length;t++){var c=n[t],l=u[c],f=s[c];if(f&&l)(Object.values(f).some((function(e){return!0===e[r]}))||Object.values(f).every((function(e){return void 0===e[r]}))&&o.config[r])&&(0===Object.keys(f).length?e.dispatch(a({queryCacheKey:c})):l.status!==lE.uninitialized&&e.dispatch(i(l,c)))}}))}},uS=new Error("Promise never resolved before cacheEntryRemoved."),sS=function(e){var t=e.api,n=e.reducerPath,r=e.context,i=e.queryThunk,a=e.mutationThunk,o=Ww(i),u=Ww(a),s=Kw(i,a);return function(e){var c={};return function(r){return function(f){var h=e.getState(),d=r(f),p=function(e){return o(e)?e.meta.arg.queryCacheKey:u(e)?e.meta.requestId:t.internalActions.removeQueryResult.match(e)?e.payload.queryCacheKey:t.internalActions.removeMutationResult.match(e)?WE(e.payload):""}(f);if(i.pending.match(f)){var v=h[n].queries[p],m=e.getState()[n].queries[p];!v&&m&&l(f.meta.arg.endpointName,f.meta.arg.originalArgs,p,e,f.meta.requestId)}else if(a.pending.match(f)){(m=e.getState()[n].mutations[p])&&l(f.meta.arg.endpointName,f.meta.arg.originalArgs,p,e,f.meta.requestId)}else if(s(f)){(null==(w=c[p])?void 0:w.valueResolved)&&(w.valueResolved({data:f.payload,meta:f.meta.baseQueryMeta}),delete w.valueResolved)}else if(t.internalActions.removeQueryResult.match(f)||t.internalActions.removeMutationResult.match(f)){(w=c[p])&&(delete c[p],w.cacheEntryRemoved())}else if(t.util.resetApiState.match(f))for(var y=0,g=Object.entries(c);y<g.length;y++){var b=g[y],k=b[0],w=b[1];delete c[k],w.cacheEntryRemoved()}return d}};function l(e,n,i,a,o){var u=r.endpointDefinitions[e],s=null==u?void 0:u.onCacheEntryAdded;if(s){var l={},f=new Promise((function(e){l.cacheEntryRemoved=e})),h=Promise.race([new Promise((function(e){l.valueResolved=e})),f.then((function(){throw uS}))]);h.catch((function(){})),c[i]=l;var d=t.endpoints[e].select(u.type===LE.query?n:i),p=a.dispatch((function(e,t,n){return n})),v=xE(_E({},a),{getCacheEntry:function(){return d(a.getState())},requestId:o,extra:p,updateCachedData:u.type===LE.query?function(r){return a.dispatch(t.util.updateQueryData(e,n,r))}:void 0,cacheDataLoaded:h,cacheEntryRemoved:f}),m=s(n,v);
2Promise.resolve(m).catch((function(e){if(e!==uS)throw e}))}}}},cS=function(e){var t=e.api,n=e.context,r=e.queryThunk,i=e.mutationThunk,a=qw(r,i),o=Bw(r,i),u=Kw(r,i);return function(e){var r={};return function(i){return function(s){var c,l,f,h=i(s);if(a(s)){var d=s.meta,p=d.requestId,v=d.arg,m=v.endpointName,y=v.originalArgs,g=n.endpointDefinitions[m],b=null==g?void 0:g.onQueryStarted;if(b){var k={},w=new Promise((function(e,t){k.resolve=e,k.reject=t}));w.catch((function(){})),r[p]=k;var _=t.endpoints[m].select(g.type===LE.query?y:p),x=e.dispatch((function(e,t,n){return n})),E=xE(_E({},e),{getCacheEntry:function(){return _(e.getState())},requestId:p,extra:x,updateCachedData:g.type===LE.query?function(n){return e.dispatch(t.util.updateQueryData(m,y,n))}:void 0,queryFulfilled:w});b(y,E)}}else if(u(s)){var S=s.meta,I=(p=S.requestId,S.baseQueryMeta);null==(c=r[p])||c.resolve({data:s.payload,meta:I}),delete r[p]}else if(o(s)){var T=s.meta,C=(p=T.requestId,T.rejectedWithValue);I=T.baseQueryMeta;null==(f=r[p])||f.reject({error:null!=(l=s.payload)?l:s.error,isUnhandledError:!C,meta:I}),delete r[p]}return h}}}},lS=function(e){var t=e.api,n=e.context.apiUid;e.reducerPath;return function(e){var r=!1;return function(i){return function(a){r||(r=!0,e.dispatch(t.internalActions.middlewareRegistered(n)));var o=i(a);return t.util.resetApiState.match(a)&&e.dispatch(t.internalActions.middlewareRegistered(n)),o}}}};function fS(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Object.assign.apply(Object,pE([e],t))}var hS=Symbol(),dS=function(){return{name:hS,init:function(e,t,n){var r=t.baseQuery,i=(t.tagTypes,t.reducerPath),a=t.serializeQueryArgs,o=t.keepUnusedDataFor,u=t.refetchOnMountOrArgChange,s=t.refetchOnFocus,c=t.refetchOnReconnect;Nk();var l=function(e){return e};Object.assign(e,{reducerPath:i,endpoints:{},internalActions:{onOnline:UE,onOffline:VE,onFocus:ME,onFocusLost:FE},util:{}});var f=function(e){var t=this,n=e.reducerPath,r=e.baseQuery,i=e.context.endpointDefinitions,a=e.serializeQueryArgs,o=e.api,u=function(e,n){return SE(t,[e,n],(function(e,t){var n,a,o,u,c,l,f=t.signal,h=t.rejectWithValue,d=t.fulfillWithValue,p=t.dispatch,v=t.getState,m=t.extra;return dE(this,(function(t){switch(t.label){case 0:n=i[e.endpointName],t.label=1;case 1:return t.trys.push([1,7,,8]),a=BE,o=void 0,u={signal:f,dispatch:p,getState:v,extra:m,endpoint:e.endpointName,type:e.type,forced:"query"===e.type?s(e,v()):void 0},n.query?[4,r(n.query(e.originalArgs),u,n.extraOptions)]:[3,3];case 2:return o=t.sent(),n.transformResponse&&(a=n.transformResponse),[3,5];case 3:return[4,n.queryFn(e.originalArgs,u,n.extraOptions,(function(e){return r(e,u,n.extraOptions)}))];case 4:o=t.sent(),t.label=5;case 5:if(o.error)throw new DE(o.error,o.meta);return c=d,[4,a(o.data,o.meta,e.originalArgs)];case 6:return[2,c.apply(void 0,[t.sent(),{fulfilledTimeStamp:Date.now(),baseQueryMeta:o.meta}])];case 7:if((l=t.sent())instanceof DE)return[2,h(l.value,{baseQueryMeta:l.meta})];throw console.error(l),l;case 8:return[2]}}
2))}))};function s(e,t){var r,i,a,o,u=null==(i=null==(r=t[n])?void 0:r.queries)?void 0:i[e.queryCacheKey],s=null==(a=t[n])?void 0:a.config.refetchOnMountOrArgChange,c=null==u?void 0:u.fulfilledTimeStamp,l=null!=(o=e.forceRefetch)?o:e.subscribe&&s;return!!l&&(!0===l||(Number(new Date)-Number(c))/1e3>=l)}var c=Lw(n+"/executeQuery",u,{getPendingMeta:function(){return{startedTimeStamp:Date.now()}},condition:function(e,t){var r,i,a=(0,t.getState)(),o=null==(i=null==(r=a[n])?void 0:r.queries)?void 0:i[e.queryCacheKey],u=null==o?void 0:o.fulfilledTimeStamp;return"pending"!==(null==o?void 0:o.status)&&(!!s(e,a)||!u)},dispatchConditionRejection:!0}),l=Lw(n+"/executeMutation",u,{getPendingMeta:function(){return{startedTimeStamp:Date.now()}}});function f(e){return function(t){var n,r;return(null==(r=null==(n=null==t?void 0:t.meta)?void 0:n.arg)?void 0:r.endpointName)===e}}return{queryThunk:c,mutationThunk:l,prefetch:function(e,t,n){return function(r,i){var a=function(e){return"force"in e}(n)&&n.force,u=function(e){return"ifOlderThan"in e}(n)&&n.ifOlderThan,s=function(n){return void 0===n&&(n=!0),o.endpoints[e].initiate(t,{forceRefetch:n})},c=o.endpoints[e].select(t)(i());if(a)r(s());else if(u){var l=null==c?void 0:c.fulfilledTimeStamp;if(!l)return void r(s());(Number(new Date)-Number(new Date(l)))/1e3>=u&&r(s())}else r(s(!1))}},updateQueryData:function(e,t,n){return function(r,i){var a,u,s=o.endpoints[e].select(t)(i()),c={patches:[],inversePatches:[],undo:function(){return r(o.util.patchQueryData(e,t,c.inversePatches))}};if(s.status===lE.uninitialized)return c;if("data"in s)if($b(s.data)){var l=Gk(s.data,n),f=l[1],h=l[2];(a=c.patches).push.apply(a,f),(u=c.inversePatches).push.apply(u,h)}else{var d=n(s.data);c.patches.push({op:"replace",path:[],value:d}),c.inversePatches.push({op:"replace",path:[],value:s.data})}return r(o.util.patchQueryData(e,t,c.patches)),c}},patchQueryData:function(e,t,n){return function(r){var u=i[e];r(o.internalActions.queryResultPatched({queryCacheKey:a({queryArgs:t,endpointDefinition:u,endpointName:e}),patches:n}))}},buildMatchThunkActions:function(e,t){return{matchPending:Uw(qw(e),f(t)),matchFulfilled:Uw(Kw(e),f(t)),matchRejected:Uw(Bw(e),f(t))}}}}({baseQuery:r,reducerPath:i,context:n,api:e,serializeQueryArgs:a}),h=f.queryThunk,d=f.mutationThunk,p=f.patchQueryData,v=f.updateQueryData,m=f.prefetch,y=f.buildMatchThunkActions,g=$E({context:n,queryThunk:h,mutationThunk:d,reducerPath:i,assertTagType:l,config:{refetchOnFocus:s,refetchOnReconnect:c,refetchOnMountOrArgChange:u,keepUnusedDataFor:o,reducerPath:i}}),b=g.reducer,k=g.actions;fS(e.util,{patchQueryData:p,updateQueryData:v,prefetch:m,resetApiState:k.resetApiState}),fS(e.internalActions,k),Object.defineProperty(e.util,"updateQueryResult",{get:function(){return e.util.updateQueryData}}),Object.defineProperty(e.util,"patchQueryResult",{get:function(){return e.util.patchQueryData}});var w=function(e){var t=e.reducerPath,n=e.queryThunk,r={invalidateTags:Tw(t+"/invalidateTags")},i=[lS,rS,iS,aS,oS,sS,cS].map((function(t){return t(xE(_E({},e),{refetchQuery:a}))}));return{middleware:function(e){return function(n){var r=iw.apply(void 0,i.map((function(t){return t(e)})))(n);return function(i){return e.getState()[t]?r(i):n(i)}}},actions:r};function a(e,t,r){return void 0===r&&(r={}),n(_E({type:"query",endpointName:e.endpointName,originalArgs:e.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:t},r))}}({reducerPath:i,context:n,queryThunk:h,mutationThunk:d,api:e,assertTagType:l}),_=w.middleware,x=w.actions;fS(e.util,x),fS(e,{reducer:b,middleware:_});var E=eS({serializeQueryArgs:a,reducerPath:i}),S=E.buildQuerySelector,I=E.buildMutationSelector,T=E.selectInvalidatedBy;fS(e.util,{selectInvalidatedBy:T});var C=function(e){var t=e.serializeQueryArgs,n=e.queryThunk,r=e.mutationThunk,i=e.api,a=e.context,o={},u={},s=i.internalActions,c=s.unsubscribeQueryResult,l=s.removeMutationResult,f=s.updateSubscriptionOptions;return{buildInitiateQuery:function(e,r){return function a(u,s){var l=void 0===s?{}:s,d=l.subscribe,p=void 0===d||d,v=l.forceRefetch,m=l.subscriptionOptions;return function(s,l){var d=t({queryArgs:u,endpointDefinition:r,endpointName:e}),y=n({type:"query",subscribe:p,forceRefetch:v,subscriptionOptions:m,endpointName:e,originalArgs:u,queryCacheKey:d}),g=s(y);h(l);var b=g.requestId,k=g.abort,w=Object.assign(Promise.all([o[d],g]).then((function(){return i.endpoints[e].select(u)(l())})),{arg:u,requestId:b,subscriptionOptions:m,queryCacheKey:d,abort:k,unwrap:function(){return SE(this,null,(function(){var e;return dE(this,(function(t){switch(t.label){case 0:return[4,w];case 1:if((e=t.sent()).isError)throw e.error;return[2,e.data]}}))}))},refetch:function(){s(a(u,{subscribe:!1,forceRefetch:!0}))},unsubscribe:function(){p&&s(c({queryCacheKey:d,requestId:b}))},updateSubscriptionOptions:function(t){w.subscriptionOptions=t,s(f({endpointName:e,requestId:b,queryCacheKey:d,options:t}))}});return o[d]||(o[d]=w,w.then((function(){delete o[d]}))),w}}},buildInitiateMutation:function(e){return function(t,n){var i=void 0===n?{}:n,a=i.track,o=void 0===a||a,s=i.fixedCacheKey;return function(n,i){var a=r({type:"mutation",endpointName:e,originalArgs:t,track:o,fixedCacheKey:s}),c=n(a);h(i);var f=c.requestId,d=c.abort,p=c.unwrap,v=c.unwrap().then((function(e){return{data:e}})).catch((function(e){return{error:e}})),m=function(){n(l({requestId:f,fixedCacheKey:s}))},y=Object.assign(v,{arg:c.arg,requestId:f,abort:d,unwrap:p,unsubscribe:m,reset:m});return u[f]=y,y.then((function(){delete u[f]})),s&&(u[s]=y,y.then((function(){u[s]===y&&delete u[s]}))),y}}},getRunningOperationPromises:function(){return pE(pE([],Object.values(o)),Object.values(u)).filter((function(e){return!!e}))},getRunningOperationPromise:function(e,n){var r=a.endpointDefinitions[e];if(r.type===LE.query){var i=t({queryArgs:n,endpointDefinition:r,endpointName:e});return o[i]}return u[n]}};function h(e){}}({queryThunk:h,mutationThunk:d,api:e,serializeQueryArgs:a,context:n}),N=C.buildInitiateQuery,O=C.buildInitiateMutation,A=C.getRunningOperationPromises,P=C.getRunningOperationPromise;return fS(e.util,{getRunningOperationPromises:A,getRunningOperationPromise:P}),{name:hS,injectEndpoint:function(t,n){var r,i=e;null!=(r=i.endpoints)[t]||(r[t]={}),!function(e){return e.type===LE.query}(n)?function(e){return e.type===LE.mutation}(n)&&fS(i.endpoints[t],{select:I(),initiate:O(t)},y(d,t)):fS(i.endpoints[t],{select:S(t,n),initiate:N(t,n)},y(h,t))}}}}},pS=(dS(),function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e}),vS=Object.defineProperty,mS=Object.defineProperties,yS=Object.getOwnPropertyDescriptors,gS=Object.getOwnPropertySymbols,bS=Object.prototype.hasOwnProperty,kS=Object.prototype.propertyIsEnumerable,wS=function(e,t,n){return t in e?vS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},_S=function(e,t){for(var n in t||(t={}))bS.call(t,n)&&wS(e,n,t[n]);if(gS)for(var r=0,i=gS(t);r<i.length;r++){n=i[r];kS.call(t,n)&&wS(e,n,t[n])}return e},xS=function(e,t){return mS(e,yS(t))};function ES(e,n,r,i){var a=(0,t.useMemo)((function(){return{queryArgs:e,serialized:"object"==typeof e?n({queryArgs:e,endpointDefinition:r,endpointName:i}):e}}),[e,n,r,i]),o=(0,t.useRef)(a);return(0,t.useEffect)((function(){o.current.serialized!==a.serialized&&(o.current=a)}),[a]),o.current.serialized===a.serialized?o.current.queryArgs:e}var SS=Symbol();function IS(e){var n=(0,t.useRef)(e);return(0,t.useEffect)((function(){be(n.current,e)||(n.current=e)}),[e]),be(n.current,e)?n.current:e}var TS,CS="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?t.useLayoutEffect:t.useEffect,NS=function(e){return e},OS=function(e){return e},AS=function(e){return e.isUninitialized?xS(_S({},e),{isUninitialized:!1,isFetching:!0,isLoading:void 0===e.data,status:lE.pending}):e};function PS(e){return e.replace(e[0],e[0].toUpperCase())}function RS(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Object.assign.apply(Object,pS([e],t))}!function(e){e.query="query",e.mutation="mutation"}(TS||(TS={}));var DS=Symbol();var LS=nS(dS(),function(e){var n=void 0===e?{}:e,r=n.batch,i=void 0===r?Z.unstable_batchedUpdates:r,a=n.useDispatch,o=void 0===a?ye:a,u=n.useSelector,s=void 0===u?se:u,c=n.useStore,l=void 0===c?pe:c,f=n.unstable__sideEffectsInRender,h=void 0!==f&&f;return{name:DS,init:function(e,n,r){var a=n.serializeQueryArgs,u=e,c=function(e){var n=e.api,r=e.moduleOptions,i=r.batch,a=r.useDispatch,o=r.useSelector,u=r.useStore,s=r.unstable__sideEffectsInRender,c=e.serializeQueryArgs,l=e.context,f
2=s?function(e){return e()}:t.useEffect;return{buildQueryHooks:function(e){var r=function(r,i){var u=void 0===i?{}:i,s=u.refetchOnReconnect,h=u.refetchOnFocus,d=u.refetchOnMountOrArgChange,p=u.skip,v=void 0!==p&&p,m=u.pollingInterval,y=void 0===m?0:m,g=n.endpoints[e].initiate,b=a(),k=ES(v?XE:r,c,l.endpointDefinitions[e],e),w=IS({refetchOnReconnect:s,refetchOnFocus:h,pollingInterval:y}),_=(0,t.useRef)(),x=_.current||{},E=x.queryCacheKey,S=x.requestId,I=o((function(e){var t;return!!E&&!!S&&!(null==(t=e[n.reducerPath].subscriptions[E])?void 0:t[S])}));return f((function(){_.current=void 0}),[I]),f((function(){var e,t=_.current;if(k===XE)return null==t||t.unsubscribe(),void(_.current=void 0);var n=null==(e=_.current)?void 0:e.subscriptionOptions;if(t&&t.arg===k)w!==n&&t.updateSubscriptionOptions(w);else{null==t||t.unsubscribe();var r=b(g(k,{subscriptionOptions:w,forceRefetch:d}));_.current=r}}),[b,g,d,k,w,I]),(0,t.useEffect)((function(){return function(){var e;null==(e=_.current)||e.unsubscribe(),_.current=void 0}}),[]),(0,t.useMemo)((function(){return{refetch:function(){var e;null==(e=_.current)||e.refetch()}}}),[])},s=function(r){var o=void 0===r?{}:r,u=o.refetchOnReconnect,s=o.refetchOnFocus,c=o.pollingInterval,l=void 0===c?0:c,h=n.endpoints[e].initiate,d=a(),p=(0,t.useState)(SS),v=p[0],m=p[1],y=(0,t.useRef)(),g=IS({refetchOnReconnect:u,refetchOnFocus:s,pollingInterval:l});f((function(){var e,t,n=null==(e=y.current)?void 0:e.subscriptionOptions;g!==n&&(null==(t=y.current)||t.updateSubscriptionOptions(g))}),[g]);var b=(0,t.useRef)(g);f((function(){b.current=g}),[g]);var k=(0,t.useCallback)((function(e,t){var n;return void 0===t&&(t=!1),i((function(){var r;null==(r=y.current)||r.unsubscribe(),y.current=n=d(h(e,{subscriptionOptions:b.current,forceRefetch:!t})),m(e)})),n}),[d,h]);return(0,t.useEffect)((function(){return function(){var e;null==(e=null==y?void 0:y.current)||e.unsubscribe()}}),[]),(0,t.useEffect)((function(){v===SS||y.current||k(v,!0)}),[v,k]),(0,t.useMemo)((function(){return[k,v]}),[k,v])},d=function(r,i){var a=void 0===i?{}:i,s=a.skip,f=void 0!==s&&s,d=a.selectFromResult,p=void 0===d?NS:d,v=n.endpoints[e].select,m=ES(f?XE:r,c,l.endpointDefinitions[e],e),y=(0,t.useRef)(),g=(0,t.useMemo)((function(){return hE([v(m),function(e,t){return t},function(e){return m}],h)}),[v,m]),b=(0,t.useMemo)((function(){return hE([g],p)}),[g,p]),k=o((function(e){return b(e,y.current)}),be),w=u(),_=g(w.getState(),y.current);return CS((function(){y.current=_}),[_]),k};return{useQueryState:d,useQuerySubscription:r,useLazyQuerySubscription:s,useLazyQuery:function(e){var n=s(e),r=n[0],i=n[1],a=d(i,xS(_S({},e),{skip:i===SS})),o=(0,t.useMemo)((function(){return{lastArg:i}}),[i]);return(0,t.useMemo)((function(){return[r,a,o]}),[r,a,o])},useQuery:function(e,n){var i=r(e,n),a=d(e,_S({selectFromResult:e===XE||(null==n?void 0:n.skip)?void 0:AS},n));return(0,t.useMemo)((function(){return _S(_S({},a),i)}),[a,i])}}},buildMutationHook:function(e){return function(r){var u=void 0===r?{}:r,s=u.selectFromResult,c=void 0===s?OS:s,l=u.fixedCacheKey,f=n.endpoints[e],h=f.select,d=f.initiate,p=a(),v=(0,t.useState)(),m=v[0],y=v[1];(0,t.useEffect)((function(){return function(){(null==m?void 0:m.arg.fixedCacheKey)||null==m||m.reset()}}),[m]);var g=(0,t.useCallback)((function(e){var t=p(d(e,{fixedCacheKey:l}));return y(t),t}),[p,d,l]),b=(m||{}).requestId,k=(0,t.useMemo)((function(){return hE([h({fixedCacheKey:l,requestId:null==m?void 0:m.requestId})],c)}),[h,m,c,l]),w=o(k,be),_=null==l?null==m?void 0:m.arg.originalArgs:void 0,x=(0,t.useCallback)((function(){i((function(){m&&y(void 0),l&&p(n.internalActions.removeMutationResult({requestId:b,fixedCacheKey:l}))}))}),[p,l,m,b]),E=(0,t.useMemo)((function(){return xS(_S({},w),{originalArgs:_,reset:x})}),[w,_,x]);return(0,t.useMemo)((function(){return[g,E]}),[g,E])}},usePrefetch:function(e,r){var i=a(),o=IS(r);return(0,t.useCallback)((function(t,r){return i(n.util.prefetch(e,t,_S(_S({},o),r)))}),[e,i,o])}};function h(e,t,n){if((null==t?void 0:t.endpointName)&&e.isUninitialized){var r=t.endpointName,i=l.endpointDefinitions[r];c({queryArgs:t.originalArgs,endpointDefinition:i,endpointName:r})===c({queryArgs:n,endpointDefinition:i,endpointName:r})&&(t=void 0)}var a=e.isSuccess?e.data:null==t?void 0:t.data;void 0===a&&(a=e.data);var o=void 0!==a,u=e.isLoading,s=!o&&u,f=e.isSuccess||u&&o;return xS(_S({},e),{data:a,currentData:e.data,isFetching:u,isLoading:s,isSuccess:f})}}({api:e,moduleOptions:{batch:i,useDispatch:o,useSelector:s,useStore:l,unstable__sideEffectsInRender:h},serializeQueryArgs:a,context:r}),f=c.buildQueryHooks,d=c.buildMutationHook,p=c.usePrefetch;return RS(u,{usePrefetch:p}),RS(r,{batch:i}),{injectEndpoint:function(t,n){if(function(e){return e.type===TS.query}(n)){var r=f(t),i=r.useQuery,a=r.useLazyQuery,o=r.useLazyQuerySubscription,s=r.useQueryState,c=r.useQuerySubscription;RS(u.endpoints[t],{useQuery:i,useLazyQuery:a,useLazyQuerySubscription:o,useQueryState:s,useQuerySubscription:c}),e["use"+PS(t)+"Query"]=i,e["useLazy"+PS(t)+"Query"]=a}else if(function(e){return e.type===TS.mutation}(n)){var l=d(t);RS(u.endpoints[t],{useMutation:l}),e["use"+PS(t)+"Mutation"]=l}}}}}}()),jS=LS({reducerPath:"api",baseQuery:function(e){var t=this;void 0===e&&(e={});var n=e,r=n.baseUrl,i=n.prepareHeaders,a=void 0===i?function(e){return e}:i,o=n.fetchFn,u=void 0===o?OE:o,s=n.paramsSerializer,c=EE(n,["baseUrl","prepareHeaders","fetchFn","paramsSerializer"]);return"undefined"===typeof fetch&&u===OE&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),function(e,n){return SE(t,null,(function(){var t,i,o,l,f,h,d,p,v,m,y,g,b,k,w,_,x,E,S,I,T,C,N,O,A,P,R,D,L,j,M,F,U,V,z,q;return dE(this,(function(B){switch(B.label){case 0:return t=n.signal,i=n.getState,o=n.extra,l=n.endpoint,f=n.forced,h=n.type,v=(p="string"==typeof e?{url:e}:e).url,m=p.method,y=void 0===m?"GET":m,g=p.headers,b=void 0===g?new Headers({}):g,k=p.body,w=void 0===k?void 0:k,_=p.params,x=void 0===_?void 0:_,E=p.responseHandler,S=void 0===E?"json":E,I=p.validateStatus,T=void 0===I?AE:I,C=EE(p,["url","method","headers","body","params","responseHandler","validateStatus"]),N=_E(xE(_E({},c),{method:y,signal:t,body:w}),C),O=N,[4,a(new Headers(RE(b)),{getState:i,extra:o,endpoint:l,forced:f,type:h})];case 1:O.headers=B.sent(),A=function(e){return"object"===typeof e&&(xw(e)||Array.isArray(e)||"function"===typeof e.toJSON)},!N.headers.has("content-type")&&A(w)&&N.headers.set("content-type","application/json"),A(w)&&function(e){var t,n;return null==(n=null==(t=e.get("content-type"))?void 0:t.trim())?void 0:n.startsWith("application/json")}(N.headers)&&(N.body=JSON.stringify(w)),x&&(P=~v.indexOf("?")?"&":"?",R=s?
2s(x):new URLSearchParams(RE(x)),v+=P+R),v=IE(r,v),D=new Request(v,N),L=D.clone(),d={request:L},B.label=2;case 2:return B.trys.push([2,4,,5]),[4,u(D)];case 3:return j=B.sent(),[3,5];case 4:return M=B.sent(),[2,{error:{status:"FETCH_ERROR",error:String(M)},meta:d}];case 5:F=j.clone(),d.response=F,V="",B.label=6;case 6:return B.trys.push([6,8,,9]),[4,Promise.all([PE(j,S).then((function(e){return U=e}),(function(e){return z=e})),F.text().then((function(e){return V=e}),(function(){}))])];case 7:if(B.sent(),z)throw z;return[3,9];case 8:return q=B.sent(),[2,{error:{status:"PARSING_ERROR",originalStatus:j.status,data:V,error:String(q)},meta:d}];case 9:return[2,T(j,U)?{data:U,meta:d}:{error:{status:j.status,data:U},meta:d}]}}))}))}}({baseUrl:"https://course-api.com"}),refetchOnMountOrArgChange:3600,endpoints:function(e){return{getProducts:e.query({query:function(){return"/react-store-products"}}),getProductInfo:e.query({query:function(e){return"/react-store-single-product?id=".concat(e)}})}}}),MS=jS.useGetProductsQuery,FS=jS.useGetProductInfoQuery,US={details:"ProductDetails_details__4SXb9",details__image:"ProductDetails_details__image__wAMdH",details__images:"ProductDetails_details__images__F7MXn",product__colours:"ProductDetails_product__colours__1jHYP",details__info:"ProductDetails_details__info__XxmtV",details__info__title:"ProductDetails_details__info__title__p1hEl",details__info__filters:"ProductDetails_details__info__filters__aDrQg",product__desc:"ProductDetails_product__desc__UUk6u",product__price:"ProductDetails_product__price__8rf0P",product__stars:"ProductDetails_product__stars__G3Mi9",details__group:"ProductDetails_details__group__bSqeF"},VS="ProductDetailsButtons_buttons__+3CAt",zS="ProductDetailsButtons_wishlist__QPNdi",qS=function(e){var n=se((function(e){return e.wishlist})).wishListItems,r=o((0,t.useState)(!1),2),i=r[0],a=r[1],u=e.product;(0,t.useEffect)((function(){var e=n.find((function(e){return e.id===u.id}));a(!!e)}),[n,u]);var s=ye(),c=se((function(e){return e.auth})).id,l=j(),f={id:u.id,name:u.name,price:u.price,image:u.images[0].thumbnails.large.url},h=i?(0,_e.jsx)(gt,{size:22}):(0,_e.jsx)(kt,{size:22});return(0,_e.jsxs)("div",{className:VS,children:[(0,_e.jsx)(Ce,{className:"primary",onClick:function(){c?(s(G_(f)),z_.success("Item added to cart")):l("/account",{state:{redirect:"/shop/".concat(u.id)}})},children:"Add To Cart"}),(0,_e.jsx)("div",{className:zS,onClick:function(){c?(s(nx(Ie(Ie({},u),{},{image:u.images[0].thumbnails.large.url}))),i?z_.success("Item removed from wishlist"):z_.success("Item added to wishlist")):l("/account",{state:{redirect:"/shop/".concat(u.id)}})},children:h})]})},BS="Ratings_ratings__2TCHr",HS=function(e){var t=e.product,n=Math.round(t.stars),r=wt(Array(n)).map((function(e,t){return(0,_e.jsx)($e,{size:"20"},t)}));return(0,_e.jsxs)("div",{className:BS,children:[(0,_e.jsx)("div",{children:r}),(0,_e.jsxs)("p",{children:[t.reviews," Reviews"]})]})},KS=function(e){var n,r,i,a,u=o((0,t.useState)(null),2),s=u[0],c=u[1],l=e.product;(0,t.useEffect)((function(){c(l.images[0])}),[l]);var f=new Intl.NumberFormat("en-US"),h=null===(n=l.images)||void 0===n?void 0:n.map((function(e){return(0,_e.jsx)("figure",{onClick:function(){return function(e){return c(e)}(e)},children:(0,_e.jsx)("img",{src:e.thumbnails.large.url,alt:e.alt})},e.id)})),d=null===(r=l.colors)||void 0===r?void 0:r.map((function(e){return(0,_e.jsx)(kx,{color:e},e)}));return(0,_e.jsx)("section",{className:US.details,children:(0,_e.jsx)(Oe,{children:(0,_e.jsxs)("div",{className:US.details__group,children:[(0,_e.jsxs)("div",{className:US.details__image__group,children:[(0,_e.jsxs)("figure",{className:US.details__image,children:[(0,_e.jsx)("img",{src:null===s||void 0===s||null===(i=s.thumbnails)||void 0===i||null===(a=i.full)||void 0===a?void 0:a.url,alt:l.name}),(0,_e.jsxs)("div",{className:US.product__colours,children:[d," "]})]}),(0,_e.jsx)("div",{className:US.details__images,children:h})]}),(0,_e.jsxs)("article",{className:US.details__info,children:[(0,_e.jsx)("h1",{className:US.details__info__title,children:l.name}),(0,_e.jsxs)("div",{className:US.details__info__filters,children:[(0,_e.jsx)(Ce,{className:"secondary",children:l.category}),(0,_e.jsx)(Ce,{className:"secondary",children:l.company})]}),(0,_e.jsx)(HS,{product:l}),(0,_e.jsx)("p",{className:"text",children:l.description}),(0,_e.jsxs)("p",{className:US.product__price,children:["$ ",f.format(l.price)]}),(0,_e.jsx)(qS,{product:l})]})]})})})};function WS(e){return Be({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm43.4 289.1c7.5 7.5 7.5 19.8 0 27.3-3.8 3.8-8.7 5.6-13.6 5.6s-9.9-1.9-13.7-5.7l-94-94.3
2c-6.9-7.6-6.7-19.3.6-26.6l95.4-95.7c7.5-7.5 19.7-7.6 27.3 0 7.5 7.5 7.6 19.7 0 27.3l-81.9 81 79.9 81.1z"}}]})(e)}var QS="SimilarCategories_similarCategories__837KH",GS="SimilarCategories_categories__cxRVh",$S=function(e){var t=se((function(e){return e.products})).similarCategories,n=null===t||void 0===t?void 0:t.map((function(e){return(0,_e.jsx)(_x,{product:e},e.id)}));return(0,_e.jsxs)("section",{className:QS,children:[(0,_e.jsx)("h1",{children:"Customers also viewed"}),n?(0,_e.jsx)("div",{className:GS,children:n}):(0,_e.jsx)(xe,{})]})},XS=function(e){var n=e.product,r=se((function(e){return e.products})).similarCategories,i=ye();return(0,t.useEffect)((function(){var e=n.id,t=n.category;i(Bx({category:t,id:e}))}),[i,n]),(0,_e.jsx)(Oe,{children:(null===r||void 0===r?void 0:r.length)>0&&(0,_e.jsx)($S,{product:n})})},YS=function(){var e,n=function(){var e=(0,t.useContext)(g).matches,n=e[e.length-1];return n?n.params:{}}(),r=n.productId,i=FS(r),a=j();return i.isSuccess&&(e=(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(KS,{product:i.data}),(0,_e.jsx)(XS,{product:i.data})]})),i.isLoading&&(e=(0,_e.jsx)(xe,{})),i.isError&&(e=(0,_e.jsx)(Sx,{error:i.error})),(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(ux,{}),(0,_e.jsxs)("section",{className:iE,children:[(0,_e.jsx)(Oe,{children:(0,_e.jsxs)("span",{onClick:function(){return a(-1)},children:[(0,_e.jsx)(WS,{size:"25"})," Back to Shop"]})}),(0,_e.jsx)(_e.Fragment,{children:e})]})]})},JS="WishList_wishlist__B2qvk",ZS="WishList_wishlist__heading__OgjbU",eI="WishList_wishlist__empty__dTNcE",tI="SignInPrompt_prompt__Gv088",nI=function(e){var t=j(),n=e.page;return(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(ux,{}),(0,_e.jsx)(Oe,{children:(0,_e.jsx)("div",{className:tI,children:(0,_e.jsxs)("article",{children:[(0,_e.jsx)("h1",{children:"Sign In"}),(0,_e.jsxs)("p",{className:"text",children:["You're currently signed out. Sign in to see the items in your"," ","".concat(n),"."]}),(0,_e.jsx)(Ce,{className:"primary",onClick:function(){return t("/account",{state:{redirect:"/".concat(n)}})},children:"Sign In"})]})})})]})},rI="Empty_empty__TJ4UV",iI=function(e){var t=e.heading,n=e.text,r=e.button,i=j();return(0,_e.jsx)(Oe,{children:(0,_e.jsxs)("article",{className:rI,children:[(0,_e.jsx)("h2",{children:t}),(0,_e.jsx)("p",{children:n}),r&&(0,_e.jsx)(Ce,{className:"primary",onClick:function(){return i("".concat(e.route))},children:r})]})})},aI=function(){var e,t=se((function(e){return e.auth})).id,n=se((function(e){return e.wishlist})),r=n.amountOfItemsInWishList,i=n.wishListItems;if(!t)return(0,_e.jsx)(nI,{page:"wishlist"});i&&(e=(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsxs)("h3",{className:ZS,children:["Wishlist ",(0,_e.jsxs)("span",{children:[r," items"]})]}),(0,_e.jsx)("div",{className:JS,children:null===i||void 0===i?void 0:i.map((function(e){return(0,_e.jsx)(_x,{wishlist:!0,product:e},e.id)}))})]}));return r||(e=(0,_e.jsx)("div",{className:eI,children:(0,_e.jsx)(iI,{heading:"Your wishlist is empty.",text:"Your wishlist is empty. Visit the shop and start adding items to your wishlist.",button:"Start shopping",route:"/shop"})})),(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(ux,{}),(0,_e.jsx)(Oe,{children:e})]})},oI="Cart_cart__container__Lr4kL",uI="Cart_cart__heading__d+EBK",sI="Cart_cart__empty__TdPxL",cI="Cart_cart__kJhX2",lI="Cart_cart__summary__t7+IE",fI="CartItem_item__QlZ5B",hI="CartItem_item__content__HI3jS",dI="CartItem_item__name__vFlr0",pI="CartItem_item__image__kTE6k",vI="CartItem_item__calculate__hdMXJ",mI="CartItem_item__quantity-group__vHKWC",yI="CartItem_item__price__gG3fP";var gI=function(e){var t=e.item,n=ye(),r=new Intl.NumberFormat("en-US");return(0,_e.jsxs)("section",{className:fI,children:[(0,_e.jsx)("figure",{className:pI,children:(0,_e.jsx)("img",{src:t.image,alt:t.name})}),(0,_e.jsxs)("article",{className:hI,children:[(0,_e.jsx)("h4",{className:dI,children:t.name}),(0,_e.jsxs)("div",{className:vI,children:[(0,_e.jsxs)("div",{className:mI,children:[(0,_e.jsx)("div",{onClick:function(){return n($_(t))},children:(0,_e.jsx)(Ke,{size:"15"})}),(0,_e.jsx)("p",{children:t.quantity}),(0,_e.jsx)("div",{onClick:function(){return n(Q_(t))},children:(0,_e.jsx)(We,{size:"15"})})]}),(0,_e.jsx)("p",{children:"x"}),(0,_e.jsx)("p",{children:r.format(t.price)})]}),(0,_e.jsx)("p",{className:yI,children:r.format(t.productTotal)})]})]},t.id)},bI="CartSummary_summary__RgeWS",kI="CartSummary_summary__details__8+L7L",wI="CartSummary_summary__total__X6scV",_I="CartSummary_summary__btns__6B1tJ",xI=function(){var e=j(),t=se((function(e){return e.cart})).total,n=t.finalTotal,r=t.tax,i=t.shipping,a=t.subTotal,o=new Intl.NumberFormat("en-US");return(0,_e.jsxs)("article",{className:bI,children:[(0,_e.jsx)("h3",{children:"Order Summary"}),(0,_e.jsxs)("div",{className:kI,children:[(0,_e.jsxs)("p",{children:["SubTotal",(0,_e.jsx)("span",{children:o.format(a)})]}),(0,_e.jsxs)("p",{children:["Shipping",(0,_e.jsx)("span",{children:o.format(i)})]}),(0,_e.jsxs)("p",{children:["Tax",(0,_e.jsx)("span",{children:o.format(r)})]})]}),(0,_e.jsxs)("p",{className:wI,children:["Total",(0,_e.jsxs)("span",{children:["$",o.format(n)]})]}),(0,_e.jsxs)("div",{className:_I,children:[(0,_e.jsx)(Ce,{className:"secondary",onClick:function(){return e("/shop")},children:"Continue Shopping"}),(0,_e.jsx)(Ce,{onClick:function(){return z_.success("Order placed successfully")},className:"primary",children:"Checkout"})]})]})},EI=function(){var e=ye(),n=se((function(e){return e.cart})),r=n.cartItems,i=n.amountOfItemsInCart,a=se((function(e){return e.auth})).id;(0,t.useEffect)((function(){e(X_())}),[e,r]);var o=r.map((function(e){return(0,_e.jsx)(gI,{item:e},e.id)})),u=0===r.length;return a?(0,_e.jsxs)("div",{children:[(0,_e.jsx)(ux,{}),u?(0,_e.jsx)("div",{className:sI,children:(0,_e.jsx)(iI,{heading:"Your cart is empty.",text:"Your cart is empty, but we can fix that. Visit the shop and start adding items to your cart.",button:"Start shopping",route:"/shop"})}):(0,_e.jsx)("section",{className:oI,children:(0,_e.jsx)(Oe,{children:(0,_e.jsxs)("div",{className:cI,children:[(0,_e.jsxs)("div",{children:[(0,_e.jsxs)("h3",{className:uI,children:["Order Details ",(0,_e.jsxs)("span",{children:[i," items"]})]}),o]}),(0,_e.jsx)("div",{className:lI,children:!u&&(0,_e.jsx)(xI,{})})]})})})]}):(0,_e.jsx)(nI,{page:"cart"})},SI="Account_account__ogzVF",II="Account_account__group__sGVgU",TI="Account_account__image__sULUN",CI="SignIn_form__m8W8S",NI="SignIn_form__heading__dyj
2pK",OI="SignIn_form__group__norYN",AI="SignIn_form__prompt__8Pmqw",PI="SignIn_form__error__Oe6QE",RI=function(e){var n=o((0,t.useState)(!1),2),r=n[0],i=n[1],a=o((0,t.useState)(""),2),u=a[0],s=a[1],c=o((0,t.useState)(""),2),l=c[0],f=c[1],h=o((0,t.useState)(!1),2),d=h[0],p=h[1],v=j(),m=L().state,y=o((0,t.useState)(!1),2),g=y[0],b=y[1],k=o((0,t.useState)({}),2),w=k[0],_=k[1],x=o((0,t.useState)({}),2),E=x[0],S=x[1];(0,t.useEffect)((function(){var e=(null===E||void 0===E?void 0:E.valid)&&(null===w||void 0===w?void 0:w.valid);b(!!e)}),[E,w]);var I=function(){v(m?"".concat(m.redirect):"/shop",{replace:!0})},T=function(){var e=lt(st().mark((function e(t){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.preventDefault(),g){e.next=5;break}return e.abrupt("return");case 5:if(!g){e.next=32;break}if(r){e.next=20;break}return p(!0),e.prev=8,e.next=11,Ub(u,l);case 11:I(),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(8),z_.error(e.t0.message,{autoClose:5e3});case 17:p(!1),e.next=32;break;case 20:if(!r){e.next=32;break}return p(!0),e.prev=22,e.next=25,Vb(u,l);case 25:I(),e.next=31;break;case 28:e.prev=28,e.t1=e.catch(22),z_.error(e.t1.message,{autoClose:5e3});case 31:p(!1);case 32:case"end":return e.stop()}}),e,null,[[8,14],[22,28]])})));return function(t){return e.apply(this,arguments)}}(),C=function(){var e=lt(st().mark((function e(){return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return p(!0),e.prev=1,e.next=4,zb();case 4:I(),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),z_.error(e.t0.message,{autoClose:5e3});case 10:p(!1);case 11:case"end":return e.stop()}}),e,null,[[1,7]])})));return function(){return e.apply(this,arguments)}}(),N=!(null!==w&&void 0!==w&&w.valid)&&(null===w||void 0===w?void 0:w.emailError),O=!(null!==E&&void 0!==E&&E.valid)&&(null===E||void 0===E?void 0:E.passwordError),A=!g||d,P=r?"Sign In":"Create Account",R=r?"Create Account":"Sign In",D=r?"Don't have an account?":"Already have an account?",M=r?"Welcome back! Enter your details and get started.":"Welcome to Finest & Co. Create an account to get started.";return d?(0,_e.jsx)(xe,{}):(0,_e.jsx)(Oe,{children:(0,_e.jsxs)("form",{className:CI,onSubmit:T,children:[(0,_e.jsxs)("div",{className:NI,children:[(0,_e.jsx)("h3",{children:P}),(0,_e.jsx)("p",{className:"text",children:M})]}),(0,_e.jsxs)("div",{className:OI,children:[(0,_e.jsx)("input",{type:"email",id:"email",placeholder:"Email",onChange:function(e){s(e.target.value),_(n_(e.target.value))},value:u}),(0,_e.jsx)("div",{className:PI,children:N&&(0,_e.jsx)("p",{children:null===w||void 0===w?void 0:w.emailError})}),(0,_e.jsx)("input",{type:"password",id:"password",placeholder:"Password",onChange:function(e){f(e.target.value),S(r_(e.target.value))},value:l}),(0,_e.jsx)("div",{className:PI,children:O&&(0,_e.jsx)("p",{children:null===E||void 0===E?void 0:E.passwordError})})]}),(0,_e.jsx)(Ce,{type:"submit",disabled:A,className:"primary",children:P}),(0,_e.jsx)(Ce,{className:"secondary",disabled:d,onClick:C,children:"Continue as Guest"}),(0,_e.jsxs)("p",{className:"text ".concat(AI),children:[D," ",(0,_e.jsx)("span",{onClick:function(){return i((function(e){return!e}))},children:R})]})]})})},DI=function(){return(0,_e.jsxs)("section",{className:SI,children:[(0,_e.jsx)(ux,{}),(0,_e.jsx)("figure",{className:TI,children:(0,_e.jsx)("img",{src:"https://images.pexels.com/photos/7828701/pexels-photo-7828701.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2",alt:"A black lamp on a grey background"})}),(0,_e.jsx)("div",{className:II,children:(0,_e.jsx)(RI,{})})]})},LI=function(){var e=se((function(e){return e.auth})).id,n=se((function(e){return e.cart})).cartItems,r=se((function(e){return e.wishlist})).wishListItems,i=o((0,t.useState)(!0),2),a=i[0],u=i[1],s=o((0,t.useState)([]),2),c=s[0],l=s[1],f=ye();return(0,t.useEffect)((function(){null===e||0===n.length&&0===r.length||Kb(e,n,r)}),[n,r,e]),(0,t.useEffect)((function(){var t=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=0,a=n;i<a.length;i++){e=a[i]._apply(e)}return e}(Hb,function(e,t,n){var r=t,i=gb("where",e);return new Ib(i,r,n)}("id","==","".concat(e))),n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i,a,o;e=nn(e);var u={includeMetadataChanges:!1},s=0;"object"!=typeof n[s]||Kg(n[s])||(u=n[s],s++);var c,l,f,h={includeMetadataChanges:u.includeMetadataChanges};if(Kg(n[s])){var d=n[s];n[s]=null===(i=d.next)||void 0===i?void 0:i.bind(d),n[s+1]=null===(a=d.error)||void 0===a?void 0:a.bind(d),n[s+2]=null===(o=d.complete)||void 0===o?void 0:o.bind(d)}if(e instanceof Vg)l=Mg(e.firestore,Wg),f=Pd(e._key.path),c={next:function(t){n[s]&&n[s](jb(l,e,t))}
2,error:n[s+1],complete:n[s+2]};else{var p=Mg(e,zg);l=Mg(p.firestore,Wg),f=p._query;var v=new Pb(l);c={next:function(e){n[s]&&n[s](new _b(l,v,p,e))},error:n[s+1],complete:n[s+2]},Eb(e._query)}return function(e,t,n,r){var i=new bg(r),a=new Ry(t,i,n);return e.asyncQueue.enqueueAndForget(lt(st().mark((function t(){return st().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=Iy,t.next=3,Og(e);case 3:return t.t1=t.sent,t.t2=a,t.abrupt("return",(0,t.t0)(t.t1,t.t2));case 6:case"end":return t.stop()}}),t)})))),function(){i.Tc(),e.asyncQueue.enqueueAndForget(lt(st().mark((function t(){return st().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=Cy,t.next=3,Og(e);case 3:return t.t1=t.sent,t.t2=a,t.abrupt("return",(0,t.t0)(t.t1,t.t2));case 6:case"end":return t.stop()}}),t)}))))}}(Qg(l),f,h,c)}(t,(function(e){l(e.docs.map((function(e){return Ie({id:e.id},e.data())}))),u(!1)}));return function(){return n()}}),[e]),(0,t.useEffect)((function(){var t=0!==(null===c||void 0===c?void 0:c.length)&&void 0!==c;if(null!==e&&t){var n=c[0],r=n.cart,i=n.wishlist;0!==(null===r||void 0===r?void 0:r.length)&&f(Y_(r)),0!==(null===i||void 0===i?void 0:i.length)&&f(rx(i))}}),[c,e,f]),e&&a?(0,_e.jsx)(xe,{}):(0,_e.jsx)("div",{children:(0,_e.jsxs)(q,{children:[(0,_e.jsx)(V,{path:"/",exact:!0,element:(0,_e.jsx)(hx,{})}),(0,_e.jsx)(V,{path:"/shop",element:(0,_e.jsx)(rE,{})}),(0,_e.jsx)(V,{path:"/shop/:productId",element:(0,_e.jsx)(YS,{})}),(0,_e.jsx)(V,{path:"/wishlist",element:(0,_e.jsx)(aI,{})}),(0,_e.jsx)(V,{path:"/cart",element:(0,_e.jsx)(EI,{})}),(0,_e.jsx)(V,{path:"/account",element:e?(0,_e.jsx)(U,{to:"/"}):(0,_e.jsx)(DI,{})})]})})},jI=function(){var e=o((0,t.useState)(null),2),n=e[0],r=e[1];return(0,t.useEffect)((function(){var e=function(e,t,n,r){return nn(e).onAuthStateChanged(t,n,r)}(Fb,(function(e){var t,n,i,a,o,u={id:null!==(t=null===e||void 0===e?void 0:e.uid)&&void 0!==t?t:null,isAnonymous:null!==(n=null===e||void 0===e?void 0:e.isAnonymous)&&void 0!==n?n:null,email:null!==(i=null===e||void 0===e?void 0:e.email)&&void 0!==i?i:null,providerID:null!==(a=null===e||void 0===e||null===(o=e.providerData[0])||void 0===o?void 0:o.providerId)&&void 0!==a?a:null};r(u)}));return function(){return e()}}),[]),n};var MI=function(){var e=ye(),n=jI(),r=MS();return(0,t.useEffect)((function(){var t=r.data,n=r.error,i=r.isSuccess,a=r.isError;i&&e(Fx({data:t})),a&&e(Ux({error:n}))}),[e,r]),(0,t.useEffect)((function(){n&&e($w(n))}),[n,e]),(0,_e.jsx)(_e.Fragment,{children:r.isLoading?(0,_e.jsx)(xe,{}):(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(LI,{}),(0,_e.jsx)(P_,{autoClose:2500,limit:3,position:"top-left"})]})})},FI=function(e){var t,n=Iw(),r=e||{},i=r.reducer,a=void 0===i?void 0:i,o=r.middleware,u=void 0===o?n():o,s=r.devTools,c=void 0===s||s,l=r.preloadedState,f=void 0===l?void 0:l,h=r.enhancers,d=void 0===h?void 0:h;if("function"===typeof a)t=a;else{if(!xw(a))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');t=rw(a)}var p=u;"function"===typeof p&&(p=p(n));var v=aw.apply(void 0,p),m=iw;c&&(m=_w(bw({trace:!1},"object"===typeof c&&c)));var y=[v];return Array.isArray(d)?y=fw([v],d):"function"===typeof d&&(y=d(y)),nw(t,f,m.apply(void 0,y))}({reducer:Ee({products:Hx,cart:Z_,wishlist:ax,auth:Xw},jS.reducerPath,jS.reducer),middleware:function(e){return e().concat(jS.middleware)}});function UI(e){var n=e.children,r=L();return(0,t.useEffect)((function(){window.scrollTo(0,0)}),[r]),n}r.createRoot(document.getElementById("root")).render((0,_e.jsx)(he,{store:FI,children:(0,_e.jsx)(Qx,{children:(0,_e.jsx)(G,{children:(0,_e.jsx)(UI,{children:(0,_e.jsx)(MI,{})})})})}))}()}(); 3//# sourceMappingURL=main.74ecef1f.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.