/*! For license information please see main.8b77f094.js.LICENSE.txt */
!function(){var e={764:function(e,t,n){!function(e,t){"use strict";function n(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 r(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e){return i="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},i(e)}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(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}function s(e,t){if(null==e)return{};var n,r,i=o(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 u(e,t){return c(e)||l(e,t)||f(e,t)||d()}function c(e){if(Array.isArray(e))return e}function l(e,t){var n=e&&("undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(u){s=!0,i=u}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}function f(e,t){if(e){if("string"===typeof e)return h(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)?h(e,t):void 0}}function h(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 d(){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 p(e,t){return e(t={exports:{}},t.exports),t.exports}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var v="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";function m(){}function y(){}y.resetWarningCache=m;var g=function(){function e(e,t,n,r,i,a){if(a!==v){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:y,resetWarningCache:m};return n.PropTypes=n,n},k=p((function(e){e.exports=g()})),b=function(e){var n=t.useRef(e);return t.useEffect((function(){n.current=e}),[e]),n.current},w=function(e){return null!==e&&"object"===i(e)},x=function(e){return w(e)&&"function"===typeof e.then},E=function(e){return w(e)&&"function"===typeof e.elements&&"function"===typeof e.createToken&&"function"===typeof e.createPaymentMethod&&"function"===typeof e.confirmCardPayment},_="[object Object]",S=function e(t,n){if(!w(t)||!w(n))return t===n;var r=Array.isArray(t);if(r!==Array.isArray(n))return!1;var i=Object.prototype.toString.call(t)===_;if(i!==(Object.prototype.toString.call(n)===_))return!1;if(!i&&!r)return t===n;var a=Object.keys(t),o=Object.keys(n);if(a.length!==o.length)return!1;for(var s={},u=0;u<a.length;u+=1)s[a[u]]=!0;for(var c=0;c<o.length;c+=1)s[o[c]]=!0;var l=Object.keys(s);if(l.length!==a.length)return!1;var f=t,h=n,d=function(t){return e(f[t],h[t])};return l.every(d)},T=function(e,t,n){return w(e)?Object.keys(e).reduce((function(i,o){var s=!w(t)||!S(e[o],t[o]);return n.includes(o)?(s&&console.warn("Unsupported prop change: options.".concat(o," is not a mutable property.")),i):s?r(r({},i||{}),{},a({},o,e[o])):i}),null):null},C="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",I=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:C;if(null===e||E(e))return e;throw new Error(t)},N=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:C;if(x(e))return{tag:"async",stripePromise:Promise.resolve(e).then((function(e){return I(e,t)}))};var n=I(e,t);return null===n?{tag:"empty"}:{tag:"sync",stripe:n}},A=function(e){e&&e._registerWrapper&&e.registerAppInfo&&(e._registerWrapper({name:"react-stripe-js",version:"2.4.0"}),e.registerAppInfo({name:"react-stripe-js",version:"2.4.0",url:"https://stripe.com/docs/stripe-js/react"}))},R=["on","session"],O=t.createContext(null);O.displayName="CustomCheckoutSdkContext";var P=function(e,t){if(!e)throw new Error("Could not find CustomCheckoutProvider context; You need to wrap the part of your app that ".concat(t," in an <CustomCheckoutProvider> provider."));return e},D=t.createContext(null);D.displayName="CustomCheckoutContext";var L=function(e,t){if(!e)return null;e.on,e.session;var n=s(e,R);return r(r({},n),t||e.session())},j="Invalid prop `stripe` supplied to `CustomCheckoutProvider`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",M=function(e){var n=e.stripe,r=e.options,i=e.children,a=t.useMemo((function(){return N(n,j)}),[n]),o=u(t.useState(null),2),s=o[0],c=o[1],l=u(t.useState((function(){return{stripe:"sync"===a.tag?a.stripe:null,customCheckoutSdk:null}})),2),f=l[0],h=l[1],d=function(e,t){h((function(n){return n.stripe&&n.customCheckoutSdk?n:{stripe:e,customCheckoutSdk:t}}))},p=t.useRef(!1);t.useEffect((function(){var e=!0;return"async"!==a.tag||f.stripe?"sync"===a.tag&&a.stripe&&!p.current&&(p.current=!0,a.stripe.initCustomCheckout(r).then((function(e){e&&(d(a.stripe,e),e.on("change",c))}))):a.stripePromise.then((function(t){t&&e&&!p.current&&(p.current=!0,t.initCustomCheckout(r).then((function(e){e&&(d(t,e),e.on("change",c))})))})),function(){e=!1}}),[a,f,r,c]);var v=b(n);t.useEffect((function(){null!==v&&v!==n&&console.warn("Unsupported prop change on CustomCheckoutProvider: You cannot change the `stripe` prop after setting it.")}),[v,n]);var m=b(r);t.useEffect((function(){var e,t;if(f.customCheckoutSdk){!r.clientSecret||w(m)||S(r.clientSecret,m.clientSecret)||console.warn("Unsupported prop change: options.client_secret is not a mutable property.");var n=null===m||void 0===m||null===(e=m.elementsOptions)||void 0===e?void 0:e.appearance,i=null===r||void 0===r||null===(t=r.elementsOptions)||void 0===t?void 0:t.appearance;i&&!S(i,n)&&f.customCheckoutSdk.changeAppearance(i)}}),[r,m,f.customCheckoutSdk]),t.useEffect((function(){A(f.stripe)}),[f.stripe]);var y=t.useMemo((function(){return L(f.customCheckoutSdk,s)}),[f.customCheckoutSdk,s]);return f.customCheckoutSdk?t.createElement(O.Provider,{value:f},t.createElement(D.Provider,{value:y},i)):null};M.propTypes={stripe:k.any,options:k.shape({clientSecret:k.string.isRequired,elementsOptions:k.object}).isRequired};var F=function(e){var n=t.useContext(O);return P(n,e)},U=function(e){var n=t.useContext(O),r=t.useContext(z);if(n&&r)throw new Error("You cannot wrap the part of your app that ".concat(e," in both <CustomCheckoutProvider> and <Elements> providers."));return n?P(n,e):B(r,e)},V=function(){F("calls useCustomCheckout()");var e=t.useContext(D);if(!e)throw new Error("Could not find CustomCheckout Context; You need to wrap the part of your app that calls useCustomCheckout() in an <CustomCheckoutProvider> provider.");return e},z=t.createContext(null);z.displayName="ElementsContext";var B=function(e,t){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e},q=t.createContext(null);q.displayName="CartElementContext";var H=function(e,t){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e},W=function(e){var n=e.stripe,r=e.options,i=e.children,a=t.useMemo((function(){return N(n)}),[n]),o=u(t.useState(null),2),s=o[0],c=o[1],l=u(t.useState(null),2),f=l[0],h=l[1],d=u(t.useState((function(){return{stripe:"sync"===a.tag?a.stripe:null,elements:"sync"===a.tag?a.stripe.elements(r):null}})),2),p=d[0],v=d[1];t.useEffect((function(){var e=!0,t=function(e){v((function(t){return t.stripe?t:{stripe:e,elements:e.elements(r)}}))};return"async"!==a.tag||p.stripe?"sync"!==a.tag||p.stripe||t(a.stripe):a.stripePromise.then((function(n){n&&e&&t(n)})),function(){e=!1}}),[a,p,r]);var m=b(n);t.useEffect((function(){null!==m&&m!==n&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")}),[m,n]);var y=b(r);return t.useEffect((function(){if(p.elements){var e=T(r,y,["clientSecret","fonts"]);e&&p.elements.update(e)}}),[r,y,p.elements]),t.useEffect((function(){A(p.stripe)}),[p.stripe]),t.createElement(z.Provider,{value:p},t.createElement(q.Provider,{value:{cart:s,setCart:c,cartState:f,setCartState:h}},i))};W.propTypes={stripe:k.any,options:k.object};var K=function(e){var n=t.useContext(z);return B(n,e)},G={cart:null,cartState:null,setCart:function(){},setCartState:function(){}},Q=function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=t.useContext(q);return n?G:H(r,e)},$=function(){return K("calls useElements()").elements},X=function(){return U("calls useStripe()").stripe},Y=function(){return Q("calls useCartElement()").cart},J=function(){return Q("calls useCartElementState()").cartState},Z=function(e){return(0,e.children)(K("mounts <ElementsConsumer>"))};Z.propTypes={children:k.func.isRequired};var ee=function(e,n,r){var i=!!r,a=t.useRef(r);t.useEffect((function(){a.current=r}),[r]),t.useEffect((function(){if(!i||!e)return function(){};var t=function(){a.current&&a.current.apply(a,arguments)};return e.on(n,t),function(){e.off(n,t)}}),[i,n,e,a])},te=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},ne=function(e,n){var r="".concat(te(e),"Element"),i=n?function(e){var n=U("mounts <".concat(r,">"));Q("mounts <".concat(r,">"),"customCheckoutSdk"in n);var i=e.id,a=e.className;return t.createElement("div",{id:i,className:a})}:function(n){var i,a=n.id,o=n.className,s=n.options,c=void 0===s?{}:s,l=n.onBlur,f=n.onFocus,h=n.onReady,d=n.onChange,p=n.onEscape,v=n.onClick,m=n.onLoadError,y=n.onLoaderStart,g=n.onNetworksChange,k=n.onCheckout,w=n.onLineItemClick,x=n.onConfirm,E=n.onCancel,_=n.onShippingAddressChange,S=n.onShippingRateChange,C=U("mounts <".concat(r,">")),I="elements"in C?C.elements:null,N="customCheckoutSdk"in C?C.customCheckoutSdk:null,A=u(t.useState(null),2),R=A[0],O=A[1],P=t.useRef(null),D=t.useRef(null),L=Q("mounts <".concat(r,">"),"customCheckoutSdk"in C),j=L.setCart,M=L.setCartState;ee(R,"blur",l),ee(R,"focus",f),ee(R,"escape",p),ee(R,"click",v),ee(R,"loaderror",m),ee(R,"loaderstart",y),ee(R,"networkschange",g),ee(R,"lineitemclick",w),ee(R,"confirm",x),ee(R,"cancel",E),ee(R,"shippingaddresschange",_),ee(R,"shippingratechange",S),"cart"===e?i=function(e){M(e),h&&h(e)}:h&&(i="expressCheckout"===e?h:function(){h(R)}),ee(R,"ready",i),ee(R,"change","cart"===e?function(e){M(e),d&&d(e)}:d),ee(R,"checkout","cart"===e?function(e){M(e),k&&k(e)}:k),t.useLayoutEffect((function(){if(null===P.current&&null!==D.current&&(I||N)){var t=null;N?t=N.createElement(e,c):I&&(t=I.create(e,c)),"cart"===e&&j&&j(t),P.current=t,O(t),t&&t.mount(D.current)}}),[I,N,c,j]);var F=b(c);return t.useEffect((function(){if(P.current){var e=T(c,F,["paymentRequest"]);e&&P.current.update(e)}}),[c,F]),t.useLayoutEffect((function(){return function(){if(P.current&&"function"===typeof P.current.destroy)try{P.current.destroy(),P.current=null}catch(e){}}}),[]),t.createElement("div",{id:a,className:o,ref:D})};return i.propTypes={id:k.string,className:k.string,onChange:k.func,onBlur:k.func,onFocus:k.func,onReady:k.func,onEscape:k.func,onClick:k.func,onLoadError:k.func,onLoaderStart:k.func,onNetworksChange:k.func,onCheckout:k.func,onLineItemClick:k.func,onConfirm:k.func,onCancel:k.func,onShippingAddressChange:k.func,onShippingRateChange:k.func,options:k.object},i.displayName=r,i.__elementType=e,i},re="undefined"===typeof window,ie=t.createContext(null);ie.displayName="EmbeddedCheckoutProviderContext";var ae=function(){var e=t.useContext(ie);if(!e)throw new Error("<EmbeddedCheckout> must be used within <EmbeddedCheckoutProvider>");return e},oe="Invalid prop `stripe` supplied to `EmbeddedCheckoutProvider`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",se=function(e){var n=e.stripe,r=e.options,i=e.children,a=t.useMemo((function(){return N(n,oe)}),[n]),o=t.useRef(null),s=t.useRef(null),c=u(t.useState({embeddedCheckout:null}),2),l=c[0],f=c[1];t.useEffect((function(){if(!s.current&&!o.current){var e=function(e){s.current||o.current||(s.current=e,o.current=s.current.initEmbeddedCheckout(r).then((function(e){f({embeddedCheckout:e})})))};"async"===a.tag&&!s.current&&r.clientSecret?a.stripePromise.then((function(t){t&&e(t)})):"sync"===a.tag&&!s.current&&r.clientSecret&&e(a.stripe)}}),[a,r,l,s]),t.useEffect((function(){return function(){l.embeddedCheckout?(o.current=null,l.embeddedCheckout.destroy()):o.current&&o.current.then((function(){o.current=null,l.embeddedCheckout&&l.embeddedCheckout.destroy()}))}}),[l.embeddedCheckout]),t.useEffect((function(){A(s)}),[s]);var h=b(n);t.useEffect((function(){null!==h&&h!==n&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the `stripe` prop after setting it.")}),[h,n]);var d=b(r);return t.useEffect((function(){null!=d&&(null!=r?(null!=d.clientSecret&&r.clientSecret!==d.clientSecret&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the client secret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead."),null!=d.onComplete&&r.onComplete!==d.onComplete&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onComplete option after setting it.")):console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot unset options after setting them."))}),[d,r]),t.createElement(ie.Provider,{value:l},i)},ue=function(e){var n=e.id,r=e.className,i=ae().embeddedCheckout,a=t.useRef(!1),o=t.useRef(null);return t.useLayoutEffect((function(){return!a.current&&i&&null!==o.current&&(i.mount(o.current),a.current=!0),function(){if(a.current&&i)try{i.unmount(),a.current=!1}catch(e){}}}),[i]),t.createElement("div",{ref:o,id:n,className:r})},ce=function(e){var n=e.id,r=e.className;return ae(),t.createElement("div",{id:n,className:r})},le=re?ce:ue,fe=ne("auBankAccount",re),he=ne("card",re),de=ne("cardNumber",re),pe=ne("cardExpiry",re),ve=ne("cardCvc",re),me=ne("fpxBank",re),ye=ne("iban",re),ge=ne("idealBank",re),ke=ne("p24Bank",re),be=ne("epsBank",re),we=ne("payment",re),xe=ne("expressCheckout",re),Ee=ne("paymentRequestButton",re),_e=ne("linkAuthentication",re),Se=ne("address",re),Te=ne("shippingAddress",re),Ce=ne("cart",re),Ie=ne("paymentMethodMessaging",re),Ne=ne("affirmMessage",re),Ae=ne("afterpayClearpayMessage",re);e.AddressElement=Se,e.AffirmMessageElement=Ne,e.AfterpayClearpayMessageElement=Ae,e.AuBankAccountElement=fe,e.CardCvcElement=ve,e.CardElement=he,e.CardExpiryElement=pe,e.CardNumberElement=de,e.CartElement=Ce,e.CustomCheckoutProvider=M,e.Elements=W,e.ElementsConsumer=Z,e.EmbeddedCheckout=le,e.EmbeddedCheckoutProvider=se,e.EpsBankElement=be,e.ExpressCheckoutElement=xe,e.FpxBankElement=me,e.IbanElement=ye,e.IdealBankElement=ge,e.LinkAuthenticationElement=_e,e.P24BankElement=ke,e.PaymentElement=we,e.PaymentMethodMessagingElement=Ie,e.PaymentRequestButtonElement=Ee,e.ShippingAddressElement=Te,e.useCartElement=Y,e.useCartElementState=J,e.useCustomCheckout=V,e.useElements=$,e.useStripe=X,Object.defineProperty(e,"__esModule",{value:!0})}(t,n(791))},463:function(e,t,n){"use strict";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,s={};function u(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(s[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"]].forEach((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 k(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 b=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),x=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),T=Symbol.for("react.provider"),C=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),O=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var P=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,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(1!==o||1!==s)do{if(o--,0>--s||i[o]!==a[s]){var u="\n"+i[o].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}}while(1<=o&&0<=s);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 B(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case E:return"Fragment";case x:return"Portal";case S:return"Profiler";case _:return"StrictMode";case N:return"Suspense";case A:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case C:return(e.displayName||"Context")+".Consumer";case T:return(e._context.displayName||"Context")+".Provider";case I:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case R:return null!==(t=e.displayName||null)?t:B(e.type)||"Memo";case O:t=e._payload,e=e._init;try{return B(e(t))}catch(n){}}return null}function q(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return B(t);case 8:return t===_?"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 W(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function K(e){e._valueTracker||(e._valueTracker=function(e){var t=W(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 G(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=W(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Q(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)&&k(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&&Q(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 se(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 ue(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(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 ke(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var be=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var xe=null,Ee=null,_e=null;function Se(e){if(e=ki(e)){if("function"!==typeof xe)throw Error(a(280));var t=e.stateNode;t&&(t=wi(t),xe(e.stateNode,e.type,t))}}function Te(e){Ee?_e?_e.push(e):_e=[e]:Ee=e}function Ce(){if(Ee){var e=Ee,t=_e;if(_e=Ee=null,Se(e),t)for(e=0;e<t.length;e++)Se(t[e])}}function Ie(e,t){return e(t)}function Ne(){}var Ae=!1;function Re(e,t,n){if(Ae)return e(t,n);Ae=!0;try{return Ie(e,t,n)}finally{Ae=!1,(null!==Ee||null!==_e)&&(Ne(),Ce())}}function Oe(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 Pe=!1;if(l)try{var De={};Object.defineProperty(De,"passive",{get:function(){Pe=!0}}),window.addEventListener("test",De,De),window.removeEventListener("test",De,De)}catch(le){Pe=!1}function Le(e,t,n,r,i,a,o,s,u){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,s,u){je=!1,Me=null,Le.apply(Ve,arguments)}function Be(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 qe(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(Be(e)!==e)throw Error(a(188))}function We(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Be(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 s=!1,u=i.child;u;){if(u===n){s=!0,n=i,r=o;break}if(u===r){s=!0,r=i,n=o;break}u=u.sibling}if(!s){for(u=o.child;u;){if(u===n){s=!0,n=o,r=i;break}if(u===r){s=!0,r=o,n=i;break}u=u.sibling}if(!s)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))?Ke(e):null}function Ke(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ke(e);if(null!==t)return t;e=e.sibling}return null}var Ge=i.unstable_scheduleCallback,Qe=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 e>>>=0,0===e?32:31-(st(e)/ut|0)|0},st=Math.log,ut=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 s=o&~i;0!==s?r=ft(s):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 kt=0;function bt(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var wt,xt,Et,_t,St,Tt=!1,Ct=[],It=null,Nt=null,At=null,Rt=new Map,Ot=new Map,Pt=[],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":It=null;break;case"dragenter":case"dragleave":Nt=null;break;case"mouseover":case"mouseout":At=null;break;case"pointerover":case"pointerout":Rt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ot.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=ki(t))&&xt(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=Be(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=qe(n)))return e.blockedOn=t,void St(e.priority,(function(){Et(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=ki(n))&&xt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);be=r,n.target.dispatchEvent(r),be=null,t.shift()}return!0}function Ut(e,t,n){Ft(e)&&n.delete(t)}function Vt(){Tt=!1,null!==It&&Ft(It)&&(It=null),null!==Nt&&Ft(Nt)&&(Nt=null),null!==At&&Ft(At)&&(At=null),Rt.forEach(Ut),Ot.forEach(Ut)}function zt(e,t){e.blockedOn===t&&(e.blockedOn=null,Tt||(Tt=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Vt)))}function Bt(e){function t(t){return zt(t,e)}if(0<Ct.length){zt(Ct[0],e);for(var n=1;n<Ct.length;n++){var r=Ct[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==It&&zt(It,e),null!==Nt&&zt(Nt,e),null!==At&&zt(At,e),Rt.forEach(t),Ot.forEach(t),n=0;n<Pt.length;n++)(r=Pt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Pt.length&&null===(n=Pt[0]).blockedOn;)Mt(n),null===n.blockedOn&&Pt.shift()}var qt=b.ReactCurrentBatchConfig,Ht=!0;function Wt(e,t,n,r){var i=kt,a=qt.transition;qt.transition=null;try{kt=1,Gt(e,t,n,r)}finally{kt=i,qt.transition=a}}function Kt(e,t,n,r){var i=kt,a=qt.transition;qt.transition=null;try{kt=4,Gt(e,t,n,r)}finally{kt=i,qt.transition=a}}function Gt(e,t,n,r){if(Ht){var i=$t(e,t,n,r);if(null===i)Hr(e,t,r,Qt,n),Lt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return It=jt(It,e,t,n,r,i),!0;case"dragenter":return Nt=jt(Nt,e,t,n,r,i),!0;case"mouseover":return At=jt(At,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return Rt.set(a,jt(Rt.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,Ot.set(a,jt(Ot.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=ki(i);if(null!==a&&wt(a),null===(a=$t(e,t,n,r))&&Hr(e,t,r,Qt,n),a===i)break;i=a}null!==i&&r.stopPropagation()}else Hr(e,t,r,null,n)}}var Qt=null;function $t(e,t,n,r){if(Qt=null,null!==(e=gi(e=we(r))))if(null===(t=Be(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=qe(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 Qt=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,sn,un,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!==un&&(un&&"mousemove"===e.type?(on=e.screenX-un.screenX,sn=e.screenY-un.screenY):sn=on=0,un=e),on)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),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}}),kn=an(gn),bn=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"},xn={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"},En={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _n(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=En[e])&&!!t[e]}function Sn(){return _n}var Tn=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?xn[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}}),Cn=an(Tn),In=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})),An=an(M({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Rn=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}),On=an(Rn),Pn=[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!==Pn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Bn=!1;var qn={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?!!qn[e.type]:"textarea"===t}function Wn(e,t,n,r){Te(r),0<(t=Kr(t,"onChange")).length&&(n=new ln("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Kn=null,Gn=null;function Qn(e){Fr(e,0)}function $n(e){if(G(bi(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(){Kn&&(Kn.detachEvent("onpropertychange",nr),Gn=Kn=null)}function nr(e){if("value"===e.propertyName&&$n(Gn)){var t=[];Wn(t,Gn,e,we(e)),Re(Qn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Gn=n,(Kn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return $n(Gn)}function ar(e,t){if("click"===e)return $n(t)}function or(e,t){if("input"===e||"change"===e)return $n(t)}var sr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function ur(e,t){if(sr(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)||!sr(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=Q();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=Q((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,kr=!1;function br(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;kr||null==mr||mr!==Q(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&&ur(gr,r)||(gr=r,0<(r=Kr(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 xr={animationend:wr("Animation","AnimationEnd"),animationiteration:wr("Animation","AnimationIteration"),animationstart:wr("Animation","AnimationStart"),transitionend:wr("Transition","TransitionEnd")},Er={},_r={};function Sr(e){if(Er[e])return Er[e];if(!xr[e])return e;var t,n=xr[e];for(t in n)if(n.hasOwnProperty(t)&&t in _r)return Er[e]=n[t];return e}l&&(_r=document.createElement("div").style,"AnimationEvent"in window||(delete xr.animationend.animation,delete xr.animationiteration.animation,delete xr.animationstart.animation),"TransitionEvent"in window||delete xr.transitionend.transition);var Tr=Sr("animationend"),Cr=Sr("animationiteration"),Ir=Sr("animationstart"),Nr=Sr("transitionend"),Ar=new Map,Rr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Or(e,t){Ar.set(e,t),u(t,[e])}for(var Pr=0;Pr<Rr.length;Pr++){var Dr=Rr[Pr];Or(Dr.toLowerCase(),"on"+(Dr[0].toUpperCase()+Dr.slice(1)))}Or(Tr,"onAnimationEnd"),Or(Cr,"onAnimationIteration"),Or(Ir,"onAnimationStart"),Or("dblclick","onDoubleClick"),Or("focusin","onFocus"),Or("focusout","onBlur"),Or(Nr,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("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,s,u,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 s=r[o],u=s.instance,c=s.currentTarget;if(s=s.listener,u!==a&&i.isPropagationStopped())break e;Mr(i,s,c),a=u}else for(o=0;o<r.length;o++){if(u=(s=r[o]).instance,c=s.currentTarget,s=s.listener,u!==a&&i.isPropagationStopped())break e;Mr(i,s,c),a=u}}}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)||(qr(t,e,2,!1),n.add(r))}function Vr(e,t,n){var r=0;t&&(r|=4),qr(n,e,r,t)}var zr="_reactListening"+Math.random().toString(36).slice(2);function Br(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 qr(e,t,n,r){switch(Xt(t)){case 1:var i=Wt;break;case 4:i=Kt;break;default:i=Gt}n=i.bind(null,t,n,e),i=void 0,!Pe||"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 s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===o)for(o=r.return;null!==o;){var u=o.tag;if((3===u||4===u)&&((u=o.stateNode.containerInfo)===i||8===u.nodeType&&u.parentNode===i))return;o=o.return}for(;null!==s;){if(null===(o=gi(s)))return;if(5===(u=o.tag)||6===u){r=a=o;continue e}s=s.parentNode}}r=r.return}Re((function(){var r=a,i=we(n),o=[];e:{var s=Ar.get(e);if(void 0!==s){var u=ln,c=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":u=Cn;break;case"focusin":c="focus",u=mn;break;case"focusout":c="blur",u=mn;break;case"beforeblur":case"afterblur":u=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":u=pn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=vn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=Nn;break;case Tr:case Cr:case Ir:u=yn;break;case Nr:u=An;break;case"scroll":u=hn;break;case"wheel":u=On;break;case"copy":case"cut":case"paste":u=kn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=In}var l=0!==(4&t),f=!l&&"scroll"===e,h=l?null!==s?s+"Capture":null:s;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=Oe(p,h))&&l.push(Wr(p,v,d)))),f)break;p=p.return}0<l.length&&(s=new u(s,c,null,n,i),o.push({event:s,listeners:l}))}}if(0===(7&t)){if(u="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===be||!(c=n.relatedTarget||n.fromElement)||!gi(c)&&!c[pi])&&(u||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,u?(u=r,null!==(c=(c=n.relatedTarget||n.toElement)?gi(c):null)&&(c!==(f=Be(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(u=null,c=r),u!==c)){if(l=pn,v="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(l=In,v="onPointerLeave",h="onPointerEnter",p="pointer"),f=null==u?s:bi(u),d=null==c?s:bi(c),(s=new l(v,p+"leave",u,n,i)).target=f,s.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,u&&c)e:{for(h=c,p=0,d=l=u;d;d=Gr(d))p++;for(d=0,v=h;v;v=Gr(v))d++;for(;0<p-d;)l=Gr(l),p--;for(;0<d-p;)h=Gr(h),d--;for(;p--;){if(l===h||null!==h&&l===h.alternate)break e;l=Gr(l),h=Gr(h)}l=null}else l=null;null!==u&&Qr(o,s,u,l,!1),null!==c&&null!==f&&Qr(o,f,c,l,!0)}if("select"===(u=(s=r?bi(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===u&&"file"===s.type)var m=Xn;else if(Hn(s))if(Yn)m=or;else{m=ir;var y=rr}else(u=s.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(m=ar);switch(m&&(m=m(e,r))?Wn(o,m,n,i):(y&&y(e,s,r),"focusout"===e&&(y=s._wrapperState)&&y.controlled&&"number"===s.type&&ee(s,"number",s.value)),y=r?bi(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":kr=!0;break;case"contextmenu":case"mouseup":case"dragend":kr=!1,br(o,n,i);break;case"selectionchange":if(vr)break;case"keydown":case"keyup":br(o,n,i)}var g;if(Dn)e:{switch(e){case"compositionstart":var k="onCompositionStart";break e;case"compositionend":k="onCompositionEnd";break e;case"compositionupdate":k="onCompositionUpdate";break e}k=void 0}else Bn?Vn(e,n)&&(k="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(k="onCompositionStart");k&&(Mn&&"ko"!==n.locale&&(Bn||"onCompositionStart"!==k?"onCompositionEnd"===k&&Bn&&(g=en()):(Jt="value"in(Yt=i)?Yt.value:Yt.textContent,Bn=!0)),0<(y=Kr(r,k)).length&&(k=new bn(k,e,null,n,i),o.push({event:k,listeners:y}),g?k.data=g:null!==(g=zn(n))&&(k.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(Bn)return"compositionend"===e||!Dn&&Vn(e,t)?(e=en(),Zt=Jt=Yt=null,Bn=!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;case"compositionend":return Mn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Kr(r,"onBeforeInput")).length&&(i=new bn("onBeforeInput","beforeinput",null,n,i),o.push({event:i,listeners:r}),i.data=g))}Fr(o,t)}))}function Wr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Kr(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=Oe(e,n))&&r.unshift(Wr(e,a,i)),null!=(a=Oe(e,t))&&r.push(Wr(e,a,i))),e=e.return}return r}function Gr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Qr(e,t,n,r,i){for(var a=t._reactName,o=[];null!==n&&n!==r;){var s=n,u=s.alternate,c=s.stateNode;if(null!==u&&u===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(u=Oe(n,a))&&o.unshift(Wr(n,u,s)):i||null!=(u=Oe(n,a))&&o.push(Wr(n,u,s))),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(si)}:ri;function si(e){setTimeout((function(){throw e}))}function ui(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 Bt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Bt(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 ki(e){return!(e=e[hi]||e[pi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function bi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function wi(e){return e[di]||null}var xi=[],Ei=-1;function _i(e){return{current:e}}function Si(e){0>Ei||(e.current=xi[Ei],xi[Ei]=null,Ei--)}function Ti(e,t){Ei++,xi[Ei]=e.current,e.current=t}var Ci={},Ii=_i(Ci),Ni=_i(!1),Ai=Ci;function Ri(e,t){var n=e.type.contextTypes;if(!n)return Ci;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 Oi(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Pi(){Si(Ni),Si(Ii)}function Di(e,t,n){if(Ii.current!==Ci)throw Error(a(168));Ti(Ii,t),Ti(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,q(e)||"Unknown",i));return M({},n,r)}function ji(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ci,Ai=Ii.current,Ti(Ii,e),Ti(Ni,Ni.current),!0}function Mi(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=Li(e,t,Ai),r.__reactInternalMemoizedMergedChildContext=e,Si(Ni),Si(Ii),Ti(Ii,e)):Si(Ni),Ti(Ni,n)}var Fi=null,Ui=!1,Vi=!1;function zi(e){null===Fi?Fi=[e]:Fi.push(e)}function Bi(){if(!Vi&&null!==Fi){Vi=!0;var e=0,t=kt;try{var n=Fi;for(kt=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)),Ge(Ze,Bi),i}finally{kt=t,Vi=!1}}return null}var qi=[],Hi=0,Wi=null,Ki=0,Gi=[],Qi=0,$i=null,Xi=1,Yi="";function Ji(e,t){qi[Hi++]=Ki,qi[Hi++]=Wi,Wi=e,Ki=t}function Zi(e,t,n){Gi[Qi++]=Xi,Gi[Qi++]=Yi,Gi[Qi++]=$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===Wi;)Wi=qi[--Hi],qi[Hi]=null,Ki=qi[--Hi],qi[Hi]=null;for(;e===$i;)$i=Gi[--Qi],Gi[Qi]=null,Yi=Gi[--Qi],Gi[Qi]=null,Xi=Gi[--Qi],Gi[Qi]=null}var na=null,ra=null,ia=!1,aa=null;function oa(e,t){var n=Oc(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 sa(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=Oc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,na=e,ra=null,!0);default:return!1}}function ua(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function ca(e){if(ia){var t=ra;if(t){var n=t;if(!sa(e,t)){if(ua(e))throw Error(a(418));t=ci(n.nextSibling);var r=na;t&&sa(e,t)?oa(r,n):(e.flags=-4097&e.flags|2,ia=!1,na=e)}}else{if(ua(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(ua(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=b.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=_i(null),ga=null,ka=null,ba=null;function wa(){ba=ka=ga=null}function xa(e){var t=ya.current;Si(ya),e._currentValue=t}function Ea(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 _a(e,t){ga=e,ba=ka=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(bs=!0),e.firstContext=null)}function Sa(e){var t=e._currentValue;if(ba!==e)if(e={context:e,memoizedValue:t,next:null},null===ka){if(null===ga)throw Error(a(308));ka=e,ga.dependencies={lanes:0,firstContext:e}}else ka=ka.next=e;return t}var Ta=null;function Ca(e){null===Ta?Ta=[e]:Ta.push(e)}function Ia(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Ca(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 Aa=!1;function Ra(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Oa(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 Pa(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&Nu)){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,Ca(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;Aa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var u=s,c=u.next;u.next=null,null===o?a=c:o.next=c,o=u;var l=e.alternate;null!==l&&((s=(l=l.updateQueue).lastBaseUpdate)!==o&&(null===s?l.firstBaseUpdate=c:s.next=c,l.lastBaseUpdate=u))}if(null!==a){var f=i.baseState;for(o=0,l=c=u=null,s=a;;){var h=s.lane,d=s.eventTime;if((r&h)===h){null!==l&&(l=l.next={eventTime:d,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,v=s;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:Aa=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(h=i.effects)?i.effects=[s]:h.push(s))}else d={eventTime:d,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===l?(c=l=d,u=f):l=l.next=d,o|=h;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(h=s).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===l&&(u=f),i.baseState=u,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);Mu|=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)&&Be(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=tc(),i=nc(e),a=Pa(r,i);a.payload=t,void 0!==n&&null!==n&&(a.callback=n),null!==(t=Da(e,a,i))&&(rc(t,e,i,r),La(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=tc(),i=nc(e),a=Pa(r,i);a.tag=1,a.payload=t,void 0!==n&&null!==n&&(a.callback=n),null!==(t=Da(e,a,i))&&(rc(t,e,i,r),La(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tc(),r=nc(e),i=Pa(n,r);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),null!==(t=Da(e,i,r))&&(rc(t,e,r,n),La(t,e,r))}};function Ba(e,t,n,r,i,a,o){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!t.prototype||!t.prototype.isPureReactComponent||(!ur(n,r)||!ur(i,a))}function qa(e,t,n){var r=!1,i=Ci,a=t.contextType;return"object"===typeof a&&null!==a?a=Sa(a):(i=Oi(t)?Ai:Ii.current,a=(r=null!==(r=t.contextTypes)&&void 0!==r)?Ri(e,i):Ci),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 Wa(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Ua,Ra(e);var a=t.contextType;"object"===typeof a&&null!==a?i.context=Sa(a):(a=Oi(t)?Ai:Ii.current,i.context=Ri(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 Ka(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 Ga(e,t){throw e=Object.prototype.toString.call(t),Error(a(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Qa(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=Dc(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 s(t){return e&&null===t.alternate&&(t.flags|=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Fc(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===E?f(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"===typeof a&&null!==a&&a.$$typeof===O&&Qa(a)===t.type)?((r=i(t,n.props)).ref=Ka(e,t,n),r.return=e,r):((r=Lc(n.type,n.key,n.props,null,e.mode,r)).ref=Ka(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=Uc(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=jc(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=Fc(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case w:return(n=Lc(t.type,t.key,t.props,null,e.mode,n)).ref=Ka(e,null,t),n.return=e,n;case x:return(t=Uc(t,e.mode,n)).return=e,t;case O:return h(e,(0,t._init)(t._payload),n)}if(te(t)||L(t))return(t=jc(t,e.mode,n,null)).return=e,t;Ga(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:u(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 x:return n.key===i?l(e,t,n,r):null;case O: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);Ga(e,n)}return null}function p(e,t,n,r,i){if("string"===typeof r&&""!==r||"number"===typeof r)return u(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 x:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i);case O: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);Ga(t,r)}return null}function v(i,a,s,u){for(var c=null,l=null,f=a,v=a=0,m=null;null!==f&&v<s.length;v++){f.index>v?(m=f,f=null):m=f.sibling;var y=d(i,f,s[v],u);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===s.length)return n(i,f),ia&&Ji(i,v),c;if(null===f){for(;v<s.length;v++)null!==(f=h(i,s[v],u))&&(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<s.length;v++)null!==(m=p(f,i,v,s[v],u))&&(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,s,u,c){var l=L(u);if("function"!==typeof l)throw Error(a(150));if(null==(u=l.call(u)))throw Error(a(151));for(var f=l=null,v=s,m=s=0,y=null,g=u.next();null!==v&&!g.done;m++,g=u.next()){v.index>m?(y=v,v=null):y=v.sibling;var k=d(i,v,g.value,c);if(null===k){null===v&&(v=y);break}e&&v&&null===k.alternate&&t(i,v),s=o(k,s,m),null===f?l=k:f.sibling=k,f=k,v=y}if(g.done)return n(i,v),ia&&Ji(i,m),l;if(null===v){for(;!g.done;m++,g=u.next())null!==(g=h(i,g.value,c))&&(s=o(g,s,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=u.next())null!==(g=p(v,i,m,g.value,c))&&(e&&null!==g.alternate&&v.delete(null===g.key?m:g.key),s=o(g,s,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,u){if("object"===typeof o&&null!==o&&o.type===E&&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)===E){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===O&&Qa(c)===l.type){n(r,l.sibling),(a=i(l,o.props)).ref=Ka(r,l,o),a.return=r,r=a;break e}n(r,l);break}t(r,l),l=l.sibling}o.type===E?((a=jc(o.props.children,r.mode,u,o.key)).return=r,r=a):((u=Lc(o.type,o.key,o.props,null,r.mode,u)).ref=Ka(r,a,o),u.return=r,r=u)}return s(r);case x: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=Uc(o,r.mode,u)).return=r,r=a}return s(r);case O:return e(r,a,(l=o._init)(o._payload),u)}if(te(o))return v(r,a,o,u);if(L(o))return m(r,a,o,u);Ga(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=Fc(o,r.mode,u)).return=r,r=a),s(r)):n(r,a)}}var Xa=$a(!0),Ya=$a(!1),Ja={},Za=_i(Ja),eo=_i(Ja),to=_i(Ja);function no(e){if(e===Ja)throw Error(a(174));return e}function ro(e,t){switch(Ti(to,t),Ti(eo,e),Ti(Za,Ja),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ue(null,"");break;default:t=ue(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Si(Za),Ti(Za,t)}function io(){Si(Za),Si(eo),Si(to)}function ao(e){no(to.current);var t=no(Za.current),n=ue(t,e.type);t!==n&&(Ti(eo,e),Ti(Za,n))}function oo(e){eo.current===e&&(Si(Za),Si(eo))}var so=_i(0);function uo(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=b.ReactCurrentDispatcher,ho=b.ReactCurrentBatchConfig,po=0,vo=null,mo=null,yo=null,go=!1,ko=!1,bo=0,wo=0;function xo(){throw Error(a(321))}function Eo(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function _o(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?ss:us,e=n(r,i),ko){o=0;do{if(ko=!1,bo=0,25<=o)throw Error(a(301));o+=1,yo=mo=null,t.updateQueue=null,fo.current=cs,e=n(r,i)}while(ko)}if(fo.current=os,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!==bo;return bo=0,e}function To(){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 Co(){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 Io(e,t){return"function"===typeof t?t(e):t}function No(e){var t=Co(),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 s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){o=i.next,r=r.baseState;var u=s=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?(u=c=h,s=r):c=c.next=h,vo.lanes|=f,Mu|=f}l=l.next}while(null!==l&&l!==o);null===c?s=r:c.next=u,sr(r,t.memoizedState)||(bs=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{o=i.lane,vo.lanes|=o,Mu|=o,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ao(e){var t=Co(),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 s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);sr(o,t.memoizedState)||(bs=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Ro(){}function Oo(e,t){var n=vo,r=Co(),i=t(),o=!sr(r.memoizedState,i);if(o&&(r.memoizedState=i,bs=!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===Au)throw Error(a(349));0!==(30&po)||Po(n,t,i)}return i}function Po(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!sr(e,n)}catch(r){return!0}}function Mo(e){var t=Na(e,1);null!==t&&rc(t,e,1,-1)}function Fo(e){var t=To();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:e},t.queue=e,e=e.dispatch=ns.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 Co().memoizedState}function zo(e,t,n,r){var i=To();vo.flags|=e,i.memoizedState=Uo(1|t,n,void 0,void 0===r?null:r)}function Bo(e,t,n,r){var i=Co();r=void 0===r?null:r;var a=void 0;if(null!==mo){var o=mo.memoizedState;if(a=o.destroy,null!==r&&Eo(r,o.deps))return void(i.memoizedState=Uo(t,n,a,r))}vo.flags|=e,i.memoizedState=Uo(1|t,n,a,r)}function qo(e,t){return zo(8390656,8,e,t)}function Ho(e,t){return Bo(2048,8,e,t)}function Wo(e,t){return Bo(4,2,e,t)}function Ko(e,t){return Bo(4,4,e,t)}function Go(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 Qo(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Bo(4,4,Go.bind(null,t,e),n)}function $o(){}function Xo(e,t){var n=Co();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Eo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Yo(e,t){var n=Co();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Eo(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,bs=!0),e.memoizedState=n):(sr(n,t)||(n=vt(),vo.lanes|=n,Mu|=n,e.baseState=!0),t)}function Zo(e,t){var n=kt;kt=0!==n&&4>n?n:4,e(!0);var r=ho.transition;ho.transition={};try{e(!1),t()}finally{kt=n,ho.transition=r}}function es(){return Co().memoizedState}function ts(e,t,n){var r=nc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},rs(e))is(t,n);else if(null!==(n=Ia(e,t,n,r))){rc(n,e,r,tc()),as(n,t,r)}}function ns(e,t,n){var r=nc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(rs(e))is(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,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,sr(s,o)){var u=t.interleaved;return null===u?(i.next=i,Ca(t)):(i.next=u.next,u.next=i),void(t.interleaved=i)}}catch(c){}null!==(n=Ia(e,t,i,r))&&(rc(n,e,r,i=tc()),as(n,t,r))}}function rs(e){var t=e.alternate;return e===vo||null!==t&&t===vo}function is(e,t){ko=go=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function as(e,t,n){if(0!==(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,gt(e,n)}}var os={readContext:Sa,useCallback:xo,useContext:xo,useEffect:xo,useImperativeHandle:xo,useInsertionEffect:xo,useLayoutEffect:xo,useMemo:xo,useReducer:xo,useRef:xo,useState:xo,useDebugValue:xo,useDeferredValue:xo,useTransition:xo,useMutableSource:xo,useSyncExternalStore:xo,useId:xo,unstable_isNewReconciler:!1},ss={readContext:Sa,useCallback:function(e,t){return To().memoizedState=[e,void 0===t?null:t],e},useContext:Sa,useEffect:qo,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,zo(4194308,4,Go.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=To();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=To();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=ts.bind(null,vo,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},To().memoizedState=e},useState:Fo,useDebugValue:$o,useDeferredValue:function(e){return To().memoizedState=e},useTransition:function(){var e=Fo(!1),t=e[0];return e=Zo.bind(null,e[1]),To().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=vo,i=To();if(ia){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===Au)throw Error(a(349));0!==(30&po)||Po(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,qo(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=To(),t=Au.identifierPrefix;if(ia){var n=Yi;t=":"+t+"R"+(n=(Xi&~(1<<32-ot(Xi)-1)).toString(32)+n),0<(n=bo++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=wo++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},us={readContext:Sa,useCallback:Xo,useContext:Sa,useEffect:Ho,useImperativeHandle:Qo,useInsertionEffect:Wo,useLayoutEffect:Ko,useMemo:Yo,useReducer:No,useRef:Vo,useState:function(){return No(Io)},useDebugValue:$o,useDeferredValue:function(e){return Jo(Co(),mo.memoizedState,e)},useTransition:function(){return[No(Io)[0],Co().memoizedState]},useMutableSource:Ro,useSyncExternalStore:Oo,useId:es,unstable_isNewReconciler:!1},cs={readContext:Sa,useCallback:Xo,useContext:Sa,useEffect:Ho,useImperativeHandle:Qo,useInsertionEffect:Wo,useLayoutEffect:Ko,useMemo:Yo,useReducer:Ao,useRef:Vo,useState:function(){return Ao(Io)},useDebugValue:$o,useDeferredValue:function(e){var t=Co();return null===mo?t.memoizedState=e:Jo(t,mo.memoizedState,e)},useTransition:function(){return[Ao(Io)[0],Co().memoizedState]},useMutableSource:Ro,useSyncExternalStore:Oo,useId:es,unstable_isNewReconciler:!1};function ls(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 fs(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function hs(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var ds="function"===typeof WeakMap?WeakMap:Map;function ps(e,t,n){(n=Pa(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Wu||(Wu=!0,Ku=r),hs(0,t)},n}function vs(e,t,n){(n=Pa(-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(){hs(0,t)}}var a=e.stateNode;return null!==a&&"function"===typeof a.componentDidCatch&&(n.callback=function(){hs(0,t),"function"!==typeof r&&(null===Gu?Gu=new Set([this]):Gu.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ms(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ds;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=Tc.bind(null,e,t,n),t.then(e,e))}function ys(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 gs(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=Pa(-1,1)).tag=2,Da(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var ks=b.ReactCurrentOwner,bs=!1;function ws(e,t,n,r){t.child=null===e?Ya(t,null,n,r):Xa(t,e.child,n,r)}function xs(e,t,n,r,i){n=n.render;var a=t.ref;return _a(t,i),r=_o(e,t,n,r,a,i),n=So(),null===e||bs?(ia&&n&&ea(t),t.flags|=1,ws(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ws(e,t,i))}function Es(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=Lc(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,_s(e,t,a,r,i))}if(a=e.child,0===(e.lanes&i)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:ur)(o,r)&&e.ref===t.ref)return Ws(e,t,i)}return t.flags|=1,(e=Dc(a,r)).ref=t.ref,e.return=t,t.child=e}function _s(e,t,n,r,i){if(null!==e){var a=e.memoizedProps;if(ur(a,r)&&e.ref===t.ref){if(bs=!1,t.pendingProps=r=a,0===(e.lanes&i))return t.lanes=e.lanes,Ws(e,t,i);0!==(131072&e.flags)&&(bs=!0)}}return Cs(e,t,n,r,i)}function Ss(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},Ti(Du,Pu),Pu|=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,Ti(Du,Pu),Pu|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,Ti(Du,Pu),Pu|=r}else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,Ti(Du,Pu),Pu|=r;return ws(e,t,i,n),t.child}function Ts(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Cs(e,t,n,r,i){var a=Oi(n)?Ai:Ii.current;return a=Ri(t,a),_a(t,i),n=_o(e,t,n,r,a,i),r=So(),null===e||bs?(ia&&r&&ea(t),t.flags|=1,ws(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ws(e,t,i))}function Is(e,t,n,r,i){if(Oi(n)){var a=!0;ji(t)}else a=!1;if(_a(t,i),null===t.stateNode)Hs(e,t),qa(t,n,r),Wa(t,n,r,i),r=!0;else if(null===e){var o=t.stateNode,s=t.memoizedProps;o.props=s;var u=o.context,c=n.contextType;"object"===typeof c&&null!==c?c=Sa(c):c=Ri(t,c=Oi(n)?Ai:Ii.current);var l=n.getDerivedStateFromProps,f="function"===typeof l||"function"===typeof o.getSnapshotBeforeUpdate;f||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(s!==r||u!==c)&&Ha(t,o,r,c),Aa=!1;var h=t.memoizedState;o.state=h,Ma(t,r,o,i),u=t.memoizedState,s!==r||h!==u||Ni.current||Aa?("function"===typeof l&&(Va(t,n,l,r),u=t.memoizedState),(s=Aa||Ba(t,n,s,r,h,u,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=u),o.props=r,o.state=u,o.context=c,r=s):("function"===typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Oa(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:ma(t.type,s),o.props=c,f=t.pendingProps,h=o.context,"object"===typeof(u=n.contextType)&&null!==u?u=Sa(u):u=Ri(t,u=Oi(n)?Ai:Ii.current);var d=n.getDerivedStateFromProps;(l="function"===typeof d||"function"===typeof o.getSnapshotBeforeUpdate)||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(s!==f||h!==u)&&Ha(t,o,r,u),Aa=!1,h=t.memoizedState,o.state=h,Ma(t,r,o,i);var p=t.memoizedState;s!==f||h!==p||Ni.current||Aa?("function"===typeof d&&(Va(t,n,d,r),p=t.memoizedState),(c=Aa||Ba(t,n,c,r,h,p,u)||!1)?(l||"function"!==typeof o.UNSAFE_componentWillUpdate&&"function"!==typeof o.componentWillUpdate||("function"===typeof o.componentWillUpdate&&o.componentWillUpdate(r,p,u),"function"===typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,p,u)),"function"===typeof o.componentDidUpdate&&(t.flags|=4),"function"===typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof o.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),o.props=r,o.state=p,o.context=u,r=c):("function"!==typeof o.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Ns(e,t,n,r,a,i)}function Ns(e,t,n,r,i,a){Ts(e,t);var o=0!==(128&t.flags);if(!r&&!o)return i&&Mi(t,n,!1),Ws(e,t,a);r=t.stateNode,ks.current=t;var s=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,s,a)):ws(e,t,s,a),t.memoizedState=r.state,i&&Mi(t,n,!0),t.child}function As(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 Rs(e,t,n,r,i){return da(),pa(i),t.flags|=256,ws(e,t,n,r),t.child}var Os,Ps,Ds,Ls,js={dehydrated:null,treeContext:null,retryLane:0};function Ms(e){return{baseLanes:e,cachePool:null,transitions:null}}function Fs(e,t,n){var r,i=t.pendingProps,o=so.current,s=!1,u=0!==(128&t.flags);if((r=u)||(r=(null===e||null!==e.memoizedState)&&0!==(2&o)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),Ti(so,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):(u=i.children,e=i.fallback,s?(i=t.mode,s=t.child,u={mode:"hidden",children:u},0===(1&i)&&null!==s?(s.childLanes=0,s.pendingProps=u):s=Mc(u,i,0,null),e=jc(e,i,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Ms(n),t.memoizedState=js,e):Us(t,u));if(null!==(o=e.memoizedState)&&null!==(r=o.dehydrated))return function(e,t,n,r,i,o,s){if(n)return 256&t.flags?(t.flags&=-257,Vs(e,t,s,r=fs(Error(a(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Mc({mode:"visible",children:r.children},i,0,null),(o=jc(o,i,s,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,0!==(1&t.mode)&&Xa(t,e.child,null,s),t.child.memoizedState=Ms(s),t.memoizedState=js,o);if(0===(1&t.mode))return Vs(e,t,s,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var u=r.dgst;return r=u,Vs(e,t,s,r=fs(o=Error(a(419)),r,void 0))}if(u=0!==(s&e.childLanes),bs||u){if(null!==(r=Au)){switch(s&-s){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|s))?0:i)&&i!==o.retryLane&&(o.retryLane=i,Na(e,i),rc(r,e,i,-1))}return mc(),Vs(e,t,s,r=fs(Error(a(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Ic.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,ra=ci(i.nextSibling),na=t,ia=!0,aa=null,null!==e&&(Gi[Qi++]=Xi,Gi[Qi++]=Yi,Gi[Qi++]=$i,Xi=e.id,Yi=e.overflow,$i=t),t=Us(t,r.children),t.flags|=4096,t)}(e,t,u,i,r,o,n);if(s){s=i.fallback,u=t.mode,r=(o=e.child).sibling;var c={mode:"hidden",children:i.children};return 0===(1&u)&&t.child!==o?((i=t.child).childLanes=0,i.pendingProps=c,t.deletions=null):(i=Dc(o,c)).subtreeFlags=14680064&o.subtreeFlags,null!==r?s=Dc(r,s):(s=jc(s,u,n,null)).flags|=2,s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,u=null===(u=e.child.memoizedState)?Ms(n):{baseLanes:u.baseLanes|n,cachePool:null,transitions:u.transitions},s.memoizedState=u,s.childLanes=e.childLanes&~n,t.memoizedState=js,i}return e=(s=e.child).sibling,i=Dc(s,{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 Us(e,t){return(t=Mc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Vs(e,t,n,r){return null!==r&&pa(r),Xa(t,e.child,null,n),(e=Us(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function zs(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ea(e.return,t,n)}function Bs(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 qs(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(ws(e,t,r.children,n),0!==(2&(r=so.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&&zs(e,n,t);else if(19===e.tag)zs(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(Ti(so,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===uo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Bs(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===uo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Bs(t,!0,n,null,a);break;case"together":Bs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Hs(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ws(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Mu|=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=Dc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Dc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Ks(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 Gs(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 Qs(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 Gs(t),null;case 1:case 17:return Oi(t.type)&&Pi(),Gs(t),null;case 3:return r=t.stateNode,io(),Si(Ni),Si(Ii),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&&(sc(aa),aa=null))),Ps(e,t),Gs(t),null;case 5:oo(t);var i=no(to.current);if(n=t.type,null!==e&&null!=t.stateNode)Ds(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(a(166));return Gs(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 u in ge(n,o),i=null,o)if(o.hasOwnProperty(u)){var c=o[u];"children"===u?"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]):s.hasOwnProperty(u)&&null!=c&&"onScroll"===u&&Ur("scroll",r)}switch(n){case"input":K(r),Z(r,o,!0);break;case"textarea":K(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{u=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=u.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=u.createElement(n,{is:r.is}):(e=u.createElement(n),"select"===n&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,n),e[hi]=t,e[di]=r,Os(e,t,!1,!1),t.stateNode=e;e:{switch(u=ke(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&&(s.hasOwnProperty(o)?null!=l&&"onScroll"===o&&Ur("scroll",e):null!=l&&k(e,o,l,u))}switch(n){case"input":K(e),Z(e,r,!1);break;case"textarea":K(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 Gs(t),null;case 6:if(e&&null!=t.stateNode)Ls(e,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 Gs(t),null;case 13:if(Si(so),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;Gs(t),o=!1}else null!==aa&&(sc(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&so.current)?0===Lu&&(Lu=3):mc())),null!==t.updateQueue&&(t.flags|=4),Gs(t),null);case 4:return io(),Ps(e,t),null===e&&Br(t.stateNode.containerInfo),Gs(t),null;case 10:return xa(t.type._context),Gs(t),null;case 19:if(Si(so),null===(o=t.memoizedState))return Gs(t),null;if(r=0!==(128&t.flags),null===(u=o.rendering))if(r)Ks(o,!1);else{if(0!==Lu||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(u=uo(e))){for(t.flags|=128,Ks(o,!1),null!==(r=u.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(o=n).flags&=14680066,null===(u=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=u.childLanes,o.lanes=u.lanes,o.child=u.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=u.memoizedProps,o.memoizedState=u.memoizedState,o.updateQueue=u.updateQueue,o.type=u.type,e=u.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ti(so,1&so.current|2),t.child}e=e.sibling}null!==o.tail&&Ye()>qu&&(t.flags|=128,r=!0,Ks(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=uo(u))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Ks(o,!0),null===o.tail&&"hidden"===o.tailMode&&!u.alternate&&!ia)return Gs(t),null}else 2*Ye()-o.renderingStartTime>qu&&1073741824!==n&&(t.flags|=128,r=!0,Ks(o,!1),t.lanes=4194304);o.isBackwards?(u.sibling=t.child,t.child=u):(null!==(n=o.last)?n.sibling=u:t.child=u,o.last=u)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ye(),t.sibling=null,n=so.current,Ti(so,r?1&n|2:1&n),t):(Gs(t),null);case 22:case 23:return hc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(1&t.mode)?0!==(1073741824&Pu)&&(Gs(t),6&t.subtreeFlags&&(t.flags|=8192)):Gs(t),null;case 24:case 25:return null}throw Error(a(156,t.tag))}function $s(e,t){switch(ta(t),t.tag){case 1:return Oi(t.type)&&Pi(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return io(),Si(Ni),Si(Ii),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(so),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(so),null;case 4:return io(),null;case 10:return xa(t.type._context),null;case 22:case 23:return hc(),null;default:return null}}Os=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}},Ps=function(){},Ds=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 u=i[l];for(a in u)u.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(s.hasOwnProperty(l)?o||(o=[]):(o=o||[]).push(l,null));for(l in r){var c=r[l];if(u=null!=i?i[l]:void 0,r.hasOwnProperty(l)&&c!==u&&(null!=c||null!=u))if("style"===l)if(u){for(a in u)!u.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&u[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,u=u?u.__html:void 0,null!=c&&u!==c&&(o=o||[]).push(l,c)):"children"===l?"string"!==typeof c&&"number"!==typeof c||(o=o||[]).push(l,""+c):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(s.hasOwnProperty(l)?(null!=c&&"onScroll"===l&&Ur("scroll",e),o||u===c||(o=[])):(o=o||[]).push(l,c))}n&&(o=o||[]).push("style",n);var l=o;(t.updateQueue=l)&&(t.flags|=4)}},Ls=function(e,t,n,r){n!==r&&(t.flags|=4)};var Xs=!1,Ys=!1,Js="function"===typeof WeakSet?WeakSet:Set,Zs=null;function eu(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){Sc(e,t,r)}else n.current=null}function tu(e,t,n){try{n()}catch(r){Sc(e,t,r)}}var nu=!1;function ru(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&&tu(t,n,a)}i=i.next}while(i!==r)}}function iu(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 au(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 ou(e){var t=e.alternate;null!==t&&(e.alternate=null,ou(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 su(e){return 5===e.tag||3===e.tag||4===e.tag}function uu(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||su(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 cu(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(cu(e,t,n),e=e.sibling;null!==e;)cu(e,t,n),e=e.sibling}function lu(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(lu(e,t,n),e=e.sibling;null!==e;)lu(e,t,n),e=e.sibling}var fu=null,hu=!1;function du(e,t,n){for(n=n.child;null!==n;)pu(e,t,n),n=n.sibling}function pu(e,t,n){if(at&&"function"===typeof at.onCommitFiberUnmount)try{at.onCommitFiberUnmount(it,n)}catch(s){}switch(n.tag){case 5:Ys||eu(n,t);case 6:var r=fu,i=hu;fu=null,du(e,t,n),hu=i,null!==(fu=r)&&(hu?(e=fu,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):fu.removeChild(n.stateNode));break;case 18:null!==fu&&(hu?(e=fu,n=n.stateNode,8===e.nodeType?ui(e.parentNode,n):1===e.nodeType&&ui(e,n),Bt(e)):ui(fu,n.stateNode));break;case 4:r=fu,i=hu,fu=n.stateNode.containerInfo,hu=!0,du(e,t,n),fu=r,hu=i;break;case 0:case 11:case 14:case 15:if(!Ys&&(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))&&tu(n,t,o),i=i.next}while(i!==r)}du(e,t,n);break;case 1:if(!Ys&&(eu(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Sc(n,t,s)}du(e,t,n);break;case 21:du(e,t,n);break;case 22:1&n.mode?(Ys=(r=Ys)||null!==n.memoizedState,du(e,t,n),Ys=r):du(e,t,n);break;default:du(e,t,n)}}function vu(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Js),t.forEach((function(t){var r=Nc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function mu(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,s=t,u=s;e:for(;null!==u;){switch(u.tag){case 5:fu=u.stateNode,hu=!1;break e;case 3:case 4:fu=u.stateNode.containerInfo,hu=!0;break e}u=u.return}if(null===fu)throw Error(a(160));pu(o,s,i),fu=null,hu=!1;var c=i.alternate;null!==c&&(c.return=null),i.return=null}catch(l){Sc(i,t,l)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)yu(t,e),t=t.sibling}function yu(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(mu(t,e),gu(e),4&r){try{ru(3,e,e.return),iu(3,e)}catch(m){Sc(e,e.return,m)}try{ru(5,e,e.return)}catch(m){Sc(e,e.return,m)}}break;case 1:mu(t,e),gu(e),512&r&&null!==n&&eu(n,n.return);break;case 5:if(mu(t,e),gu(e),512&r&&null!==n&&eu(n,n.return),32&e.flags){var i=e.stateNode;try{he(i,"")}catch(m){Sc(e,e.return,m)}}if(4&r&&null!=(i=e.stateNode)){var o=e.memoizedProps,s=null!==n?n.memoizedProps:o,u=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===u&&"radio"===o.type&&null!=o.name&&Y(i,o),ke(u,s);var l=ke(u,o);for(s=0;s<c.length;s+=2){var f=c[s],h=c[s+1];"style"===f?me(i,h):"dangerouslySetInnerHTML"===f?fe(i,h):"children"===f?he(i,h):k(i,f,h,l)}switch(u){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){Sc(e,e.return,m)}}break;case 6:if(mu(t,e),gu(e),4&r){if(null===e.stateNode)throw Error(a(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(m){Sc(e,e.return,m)}}break;case 3:if(mu(t,e),gu(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Bt(t.containerInfo)}catch(m){Sc(e,e.return,m)}break;case 4:default:mu(t,e),gu(e);break;case 13:mu(t,e),gu(e),8192&(i=e.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,!o||null!==i.alternate&&null!==i.alternate.memoizedState||(Bu=Ye())),4&r&&vu(e);break;case 22:if(f=null!==n&&null!==n.memoizedState,1&e.mode?(Ys=(l=Ys)||f,mu(t,e),Ys=l):mu(t,e),gu(e),8192&r){if(l=null!==e.memoizedState,(e.stateNode.isHidden=l)&&!f&&0!==(1&e.mode))for(Zs=e,f=e.child;null!==f;){for(h=Zs=f;null!==Zs;){switch(p=(d=Zs).child,d.tag){case 0:case 11:case 14:case 15:ru(4,d,d.return);break;case 1:eu(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){Sc(r,n,m)}}break;case 5:eu(d,d.return);break;case 22:if(null!==d.memoizedState){xu(h);continue}}null!==p?(p.return=d,Zs=p):xu(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":(u=h.stateNode,s=void 0!==(c=h.memoizedProps.style)&&null!==c&&c.hasOwnProperty("display")?c.display:null,u.style.display=ve("display",s))}catch(m){Sc(e,e.return,m)}}}else if(6===h.tag){if(null===f)try{h.stateNode.nodeValue=l?"":h.memoizedProps}catch(m){Sc(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:mu(t,e),gu(e),4&r&&vu(e);case 21:}}function gu(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(su(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),lu(e,uu(e),i);break;case 3:case 4:var o=r.stateNode.containerInfo;cu(e,uu(e),o);break;default:throw Error(a(161))}}catch(s){Sc(e,e.return,s)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function ku(e,t,n){Zs=e,bu(e,t,n)}function bu(e,t,n){for(var r=0!==(1&e.mode);null!==Zs;){var i=Zs,a=i.child;if(22===i.tag&&r){var o=null!==i.memoizedState||Xs;if(!o){var s=i.alternate,u=null!==s&&null!==s.memoizedState||Ys;s=Xs;var c=Ys;if(Xs=o,(Ys=u)&&!c)for(Zs=i;null!==Zs;)u=(o=Zs).child,22===o.tag&&null!==o.memoizedState?Eu(i):null!==u?(u.return=o,Zs=u):Eu(i);for(;null!==a;)Zs=a,bu(a,t,n),a=a.sibling;Zs=i,Xs=s,Ys=c}wu(e)}else 0!==(8772&i.subtreeFlags)&&null!==a?(a.return=i,Zs=a):wu(e)}}function wu(e){for(;null!==Zs;){var t=Zs;if(0!==(8772&t.flags)){var n=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Ys||iu(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Ys)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 s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Fa(t,s,n)}break;case 5:var u=t.stateNode;if(null===n&&4&t.flags){n=u;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&&Bt(h)}}}break;default:throw Error(a(163))}Ys||512&t.flags&&au(t)}catch(d){Sc(t,t.return,d)}}if(t===e){Zs=null;break}if(null!==(n=t.sibling)){n.return=t.return,Zs=n;break}Zs=t.return}}function xu(e){for(;null!==Zs;){var t=Zs;if(t===e){Zs=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Zs=n;break}Zs=t.return}}function Eu(e){for(;null!==Zs;){var t=Zs;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{iu(4,t)}catch(u){Sc(t,n,u)}break;case 1:var r=t.stateNode;if("function"===typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(u){Sc(t,i,u)}}var a=t.return;try{au(t)}catch(u){Sc(t,a,u)}break;case 5:var o=t.return;try{au(t)}catch(u){Sc(t,o,u)}}}catch(u){Sc(t,t.return,u)}if(t===e){Zs=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Zs=s;break}Zs=t.return}}var _u,Su=Math.ceil,Tu=b.ReactCurrentDispatcher,Cu=b.ReactCurrentOwner,Iu=b.ReactCurrentBatchConfig,Nu=0,Au=null,Ru=null,Ou=0,Pu=0,Du=_i(0),Lu=0,ju=null,Mu=0,Fu=0,Uu=0,Vu=null,zu=null,Bu=0,qu=1/0,Hu=null,Wu=!1,Ku=null,Gu=null,Qu=!1,$u=null,Xu=0,Yu=0,Ju=null,Zu=-1,ec=0;function tc(){return 0!==(6&Nu)?Ye():-1!==Zu?Zu:Zu=Ye()}function nc(e){return 0===(1&e.mode)?1:0!==(2&Nu)&&0!==Ou?Ou&-Ou:null!==va.transition?(0===ec&&(ec=vt()),ec):0!==(e=kt)?e:e=void 0===(e=window.event)?16:Xt(e.type)}function rc(e,t,n,r){if(50<Yu)throw Yu=0,Ju=null,Error(a(185));yt(e,n,r),0!==(2&Nu)&&e===Au||(e===Au&&(0===(2&Nu)&&(Fu|=n),4===Lu&&uc(e,Ou)),ic(e,r),1===n&&0===Nu&&0===(1&t.mode)&&(qu=Ye()+500,Ui&&Bi()))}function ic(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),s=1<<o,u=i[o];-1===u?0!==(s&n)&&0===(s&r)||(i[o]=dt(s,t)):u<=t&&(e.expiredLanes|=s),a&=~s}}(e,t);var r=ht(e,e===Au?Ou:0);if(0===r)null!==n&&Qe(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Qe(n),1===t)0===e.tag?function(e){Ui=!0,zi(e)}(cc.bind(null,e)):zi(cc.bind(null,e)),oi((function(){0===(6&Nu)&&Bi()})),n=null;else{switch(bt(r)){case 1:n=Ze;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Ac(n,ac.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ac(e,t){if(Zu=-1,ec=0,0!==(6&Nu))throw Error(a(327));var n=e.callbackNode;if(Ec()&&e.callbackNode!==n)return null;var r=ht(e,e===Au?Ou:0);if(0===r)return null;if(0!==(30&r)||0!==(r&e.expiredLanes)||t)t=yc(e,r);else{t=r;var i=Nu;Nu|=2;var o=vc();for(Au===e&&Ou===t||(Hu=null,qu=Ye()+500,dc(e,t));;)try{kc();break}catch(u){pc(e,u)}wa(),Tu.current=o,Nu=i,null!==Ru?t=0:(Au=null,Ou=0,t=Lu)}if(0!==t){if(2===t&&(0!==(i=pt(e))&&(r=i,t=oc(e,i))),1===t)throw n=ju,dc(e,0),uc(e,r),ic(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(!sr(a(),i))return!1}catch(s){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=yc(e,r))&&(0!==(o=pt(e))&&(r=o,t=oc(e,o))),1===t))throw n=ju,dc(e,0),uc(e,r),ic(e,Ye()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(a(345));case 2:case 5:xc(e,zu,Hu);break;case 3:if(uc(e,r),(130023424&r)===r&&10<(t=Bu+500-Ye())){if(0!==ht(e,0))break;if(((i=e.suspendedLanes)&r)!==r){tc(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ri(xc.bind(null,e,zu,Hu),t);break}xc(e,zu,Hu);break;case 4:if(uc(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-ot(r);o=1<<s,(s=t[s])>i&&(i=s),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*Su(r/1960))-r)){e.timeoutHandle=ri(xc.bind(null,e,zu,Hu),r);break}xc(e,zu,Hu);break;default:throw Error(a(329))}}}return ic(e,Ye()),e.callbackNode===n?ac.bind(null,e):null}function oc(e,t){var n=Vu;return e.current.memoizedState.isDehydrated&&(dc(e,t).flags|=256),2!==(e=yc(e,t))&&(t=zu,zu=n,null!==t&&sc(t)),e}function sc(e){null===zu?zu=e:zu.push.apply(zu,e)}function uc(e,t){for(t&=~Uu,t&=~Fu,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 cc(e){if(0!==(6&Nu))throw Error(a(327));Ec();var t=ht(e,0);if(0===(1&t))return ic(e,Ye()),null;var n=yc(e,t);if(0!==e.tag&&2===n){var r=pt(e);0!==r&&(t=r,n=oc(e,r))}if(1===n)throw n=ju,dc(e,0),uc(e,t),ic(e,Ye()),n;if(6===n)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,xc(e,zu,Hu),ic(e,Ye()),null}function lc(e,t){var n=Nu;Nu|=1;try{return e(t)}finally{0===(Nu=n)&&(qu=Ye()+500,Ui&&Bi())}}function fc(e){null!==$u&&0===$u.tag&&0===(6&Nu)&&Ec();var t=Nu;Nu|=1;var n=Iu.transition,r=kt;try{if(Iu.transition=null,kt=1,e)return e()}finally{kt=r,Iu.transition=n,0===(6&(Nu=t))&&Bi()}}function hc(){Pu=Du.current,Si(Du)}function dc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ii(n)),null!==Ru)for(n=Ru.return;null!==n;){var r=n;switch(ta(r),r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&Pi();break;case 3:io(),Si(Ni),Si(Ii),lo();break;case 5:oo(r);break;case 4:io();break;case 13:case 19:Si(so);break;case 10:xa(r.type._context);break;case 22:case 23:hc()}n=n.return}if(Au=e,Ru=e=Dc(e.current,null),Ou=Pu=t,Lu=0,ju=null,Uu=Fu=Mu=0,zu=Vu=null,null!==Ta){for(t=0;t<Ta.length;t++)if(null!==(r=(n=Ta[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}Ta=null}return e}function pc(e,t){for(;;){var n=Ru;try{if(wa(),fo.current=os,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,ko=!1,bo=0,Cu.current=null,null===n||null===n.return){Lu=1,ju=t,Ru=null;break}e:{var o=e,s=n.return,u=n,c=t;if(t=Ou,u.flags|=32768,null!==c&&"object"===typeof c&&"function"===typeof c.then){var l=c,f=u,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=ys(s);if(null!==p){p.flags&=-257,gs(p,s,u,0,t),1&p.mode&&ms(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)){ms(o,l,t),mc();break e}c=Error(a(426))}else if(ia&&1&u.mode){var y=ys(s);if(null!==y){0===(65536&y.flags)&&(y.flags|=256),gs(y,s,u,0,t),pa(ls(c,u));break e}}o=c=ls(c,u),4!==Lu&&(Lu=2),null===Vu?Vu=[o]:Vu.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,ja(o,ps(0,c,t));break e;case 1:u=c;var g=o.type,k=o.stateNode;if(0===(128&o.flags)&&("function"===typeof g.getDerivedStateFromError||null!==k&&"function"===typeof k.componentDidCatch&&(null===Gu||!Gu.has(k)))){o.flags|=65536,t&=-t,o.lanes|=t,ja(o,vs(o,u,t));break e}}o=o.return}while(null!==o)}wc(n)}catch(b){t=b,Ru===n&&null!==n&&(Ru=n=n.return);continue}break}}function vc(){var e=Tu.current;return Tu.current=os,null===e?os:e}function mc(){0!==Lu&&3!==Lu&&2!==Lu||(Lu=4),null===Au||0===(268435455&Mu)&&0===(268435455&Fu)||uc(Au,Ou)}function yc(e,t){var n=Nu;Nu|=2;var r=vc();for(Au===e&&Ou===t||(Hu=null,dc(e,t));;)try{gc();break}catch(i){pc(e,i)}if(wa(),Nu=n,Tu.current=r,null!==Ru)throw Error(a(261));return Au=null,Ou=0,Lu}function gc(){for(;null!==Ru;)bc(Ru)}function kc(){for(;null!==Ru&&!$e();)bc(Ru)}function bc(e){var t=_u(e.alternate,e,Pu);e.memoizedProps=e.pendingProps,null===t?wc(e):Ru=t,Cu.current=null}function wc(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(n=Qs(n,t,Pu)))return void(Ru=n)}else{if(null!==(n=$s(n,t)))return n.flags&=32767,void(Ru=n);if(null===e)return Lu=6,void(Ru=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Ru=t);Ru=t=e}while(null!==t);0===Lu&&(Lu=5)}function xc(e,t,n){var r=kt,i=Iu.transition;try{Iu.transition=null,kt=1,function(e,t,n,r){do{Ec()}while(null!==$u);if(0!==(6&Nu))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===Au&&(Ru=Au=null,Ou=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||Qu||(Qu=!0,Ac(tt,(function(){return Ec(),null}))),o=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||o){o=Iu.transition,Iu.transition=null;var s=kt;kt=1;var u=Nu;Nu|=4,Cu.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 s=0,u=-1,c=-1,l=0,f=0,h=e,d=null;t:for(;;){for(var p;h!==n||0!==i&&3!==h.nodeType||(u=s+i),h!==o||0!==r&&3!==h.nodeType||(c=s+r),3===h.nodeType&&(s+=h.nodeValue.length),null!==(p=h.firstChild);)d=h,h=p;for(;;){if(h===e)break t;if(d===n&&++l===i&&(u=s),d===o&&++f===r&&(c=s),null!==(p=h.nextSibling))break;d=(h=d).parentNode}h=p}n=-1===u||-1===c?null:{start:u,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(ti={focusedElem:e,selectionRange:n},Ht=!1,Zs=t;null!==Zs;)if(e=(t=Zs).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Zs=e;else for(;null!==Zs;){t=Zs;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,k=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:ma(t.type,m),y);g.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(a(163))}}catch(w){Sc(t,t.return,w)}if(null!==(e=t.sibling)){e.return=t.return,Zs=e;break}Zs=t.return}v=nu,nu=!1}(e,n),yu(n,e),pr(ti),Ht=!!ei,ti=ei=null,e.current=n,ku(n,e,i),Xe(),Nu=u,kt=s,Iu.transition=o}else e.current=n;if(Qu&&(Qu=!1,$u=e,Xu=i),o=e.pendingLanes,0===o&&(Gu=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),ic(e,Ye()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Wu)throw Wu=!1,e=Ku,Ku=null,e;0!==(1&Xu)&&0!==e.tag&&Ec(),o=e.pendingLanes,0!==(1&o)?e===Ju?Yu++:(Yu=0,Ju=e):Yu=0,Bi()}(e,t,n,r)}finally{Iu.transition=i,kt=r}return null}function Ec(){if(null!==$u){var e=bt(Xu),t=Iu.transition,n=kt;try{if(Iu.transition=null,kt=16>e?16:e,null===$u)var r=!1;else{if(e=$u,$u=null,Xu=0,0!==(6&Nu))throw Error(a(331));var i=Nu;for(Nu|=4,Zs=e.current;null!==Zs;){var o=Zs,s=o.child;if(0!==(16&Zs.flags)){var u=o.deletions;if(null!==u){for(var c=0;c<u.length;c++){var l=u[c];for(Zs=l;null!==Zs;){var f=Zs;switch(f.tag){case 0:case 11:case 15:ru(8,f,o)}var h=f.child;if(null!==h)h.return=f,Zs=h;else for(;null!==Zs;){var d=(f=Zs).sibling,p=f.return;if(ou(f),f===l){Zs=null;break}if(null!==d){d.return=p,Zs=d;break}Zs=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)}}Zs=o}}if(0!==(2064&o.subtreeFlags)&&null!==s)s.return=o,Zs=s;else e:for(;null!==Zs;){if(0!==(2048&(o=Zs).flags))switch(o.tag){case 0:case 11:case 15:ru(9,o,o.return)}var g=o.sibling;if(null!==g){g.return=o.return,Zs=g;break e}Zs=o.return}}var k=e.current;for(Zs=k;null!==Zs;){var b=(s=Zs).child;if(0!==(2064&s.subtreeFlags)&&null!==b)b.return=s,Zs=b;else e:for(s=k;null!==Zs;){if(0!==(2048&(u=Zs).flags))try{switch(u.tag){case 0:case 11:case 15:iu(9,u)}}catch(x){Sc(u,u.return,x)}if(u===s){Zs=null;break e}var w=u.sibling;if(null!==w){w.return=u.return,Zs=w;break e}Zs=u.return}}if(Nu=i,Bi(),at&&"function"===typeof at.onPostCommitFiberRoot)try{at.onPostCommitFiberRoot(it,e)}catch(x){}r=!0}return r}finally{kt=n,Iu.transition=t}}return!1}function _c(e,t,n){e=Da(e,t=ps(0,t=ls(n,t),1),1),t=tc(),null!==e&&(yt(e,1,t),ic(e,t))}function Sc(e,t,n){if(3===e.tag)_c(e,e,n);else for(;null!==t;){if(3===t.tag){_c(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Gu||!Gu.has(r))){t=Da(t,e=vs(t,e=ls(n,e),1),1),e=tc(),null!==t&&(yt(t,1,e),ic(t,e));break}}t=t.return}}function Tc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=tc(),e.pingedLanes|=e.suspendedLanes&n,Au===e&&(Ou&n)===n&&(4===Lu||3===Lu&&(130023424&Ou)===Ou&&500>Ye()-Bu?dc(e,0):Uu|=n),ic(e,t)}function Cc(e,t){0===t&&(0===(1&e.mode)?t=1:(t=lt,0===(130023424&(lt<<=1))&&(lt=4194304)));var n=tc();null!==(e=Na(e,t))&&(yt(e,t,n),ic(e,n))}function Ic(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Cc(e,n)}function Nc(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),Cc(e,n)}function Ac(e,t){return Ge(e,t)}function Rc(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 Oc(e,t,n,r){return new Rc(e,t,n,r)}function Pc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Dc(e,t){var n=e.alternate;return null===n?((n=Oc(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 Lc(e,t,n,r,i,o){var s=2;if(r=e,"function"===typeof e)Pc(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case E:return jc(n.children,i,o,t);case _:s=8,i|=8;break;case S:return(e=Oc(12,n,t,2|i)).elementType=S,e.lanes=o,e;case N:return(e=Oc(13,n,t,i)).elementType=N,e.lanes=o,e;case A:return(e=Oc(19,n,t,i)).elementType=A,e.lanes=o,e;case P:return Mc(n,i,o,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case T:s=10;break e;case C:s=9;break e;case I:s=11;break e;case R:s=14;break e;case O:s=16,r=null;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Oc(s,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function jc(e,t,n,r){return(e=Oc(7,e,r,t)).lanes=n,e}function Mc(e,t,n,r){return(e=Oc(22,e,r,t)).elementType=P,e.lanes=n,e.stateNode={isHidden:!1},e}function Fc(e,t,n){return(e=Oc(6,e,null,t)).lanes=n,e}function Uc(e,t,n){return(t=Oc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Vc(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 zc(e,t,n,r,i,a,o,s,u){return e=new Vc(e,t,n,s,u),1===t?(t=1,!0===a&&(t|=8)):t=0,a=Oc(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ra(a),e}function Bc(e){if(!e)return Ci;e:{if(Be(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(Oi(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(Oi(n))return Li(e,n,t)}return t}function qc(e,t,n,r,i,a,o,s,u){return(e=zc(n,r,!0,e,0,a,0,s,u)).context=Bc(null),n=e.current,(a=Pa(r=tc(),i=nc(n))).callback=void 0!==t&&null!==t?t:null,Da(n,a,i),e.current.lanes=i,yt(e,i,r),ic(e,r),e}function Hc(e,t,n,r){var i=t.current,a=tc(),o=nc(i);return n=Bc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Pa(a,o)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Da(i,t,o))&&(rc(e,i,o,a),La(e,i,o)),o}function Wc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Kc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Gc(e,t){Kc(e,t),(e=e.alternate)&&Kc(e,t)}_u=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ni.current)bs=!0;else{if(0===(e.lanes&n)&&0===(128&t.flags))return bs=!1,function(e,t,n){switch(t.tag){case 3:As(t),da();break;case 5:ao(t);break;case 1:Oi(t.type)&&ji(t);break;case 4:ro(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ti(ya,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Ti(so,1&so.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Fs(e,t,n):(Ti(so,1&so.current),null!==(e=Ws(e,t,n))?e.sibling:null);Ti(so,1&so.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(128&e.flags)){if(r)return qs(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ti(so,so.current),r)break;return null;case 22:case 23:return t.lanes=0,Ss(e,t,n)}return Ws(e,t,n)}(e,t,n);bs=0!==(131072&e.flags)}else bs=!1,ia&&0!==(1048576&t.flags)&&Zi(t,Ki,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Hs(e,t),e=t.pendingProps;var i=Ri(t,Ii.current);_a(t,n),i=_o(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,Oi(r)?(o=!0,ji(t)):o=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Ra(t),i.updater=za,t.stateNode=i,i._reactInternals=t,Wa(t,r,e,n),t=Ns(null,t,r,!0,o,n)):(t.tag=0,ia&&o&&ea(t),ws(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Hs(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)===I)return 11;if(e===R)return 14}return 2}(r),e=ma(r,e),i){case 0:t=Cs(null,t,r,e,n);break e;case 1:t=Is(null,t,r,e,n);break e;case 11:t=xs(null,t,r,e,n);break e;case 14:t=Es(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,Cs(e,t,r,i=t.elementType===r?i:ma(r,i),n);case 1:return r=t.type,i=t.pendingProps,Is(e,t,r,i=t.elementType===r?i:ma(r,i),n);case 3:e:{if(As(t),null===e)throw Error(a(387));r=t.pendingProps,i=(o=t.memoizedState).element,Oa(e,t),Ma(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Rs(e,t,r,n,i=ls(Error(a(423)),t));break e}if(r!==i){t=Rs(e,t,r,n,i=ls(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=Ws(e,t,n);break e}ws(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,s=i.children,ni(r,i)?s=null:null!==o&&ni(r,o)&&(t.flags|=32),Ts(e,t),ws(e,t,s,n),t.child;case 6:return null===e&&ca(t),null;case 13:return Fs(e,t,n);case 4:return ro(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Xa(t,null,r,n):ws(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,xs(e,t,r,i=t.elementType===r?i:ma(r,i),n);case 7:return ws(e,t,t.pendingProps,n),t.child;case 8:case 12:return ws(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Ti(ya,r._currentValue),r._currentValue=s,null!==o)if(sr(o.value,s)){if(o.children===i.children&&!Ni.current){t=Ws(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var u=o.dependencies;if(null!==u){s=o.child;for(var c=u.firstContext;null!==c;){if(c.context===r){if(1===o.tag){(c=Pa(-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),Ea(o.return,n,t),u.lanes|=n;break}c=c.next}}else if(10===o.tag)s=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(s=o.return))throw Error(a(341));s.lanes|=n,null!==(u=s.alternate)&&(u.lanes|=n),Ea(s,n,t),s=o.sibling}else s=o.child;if(null!==s)s.return=o;else for(s=o;null!==s;){if(s===t){s=null;break}if(null!==(o=s.sibling)){o.return=s.return,s=o;break}s=s.return}o=s}ws(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,_a(t,n),r=r(i=Sa(i)),t.flags|=1,ws(e,t,r,n),t.child;case 14:return i=ma(r=t.type,t.pendingProps),Es(e,t,r,i=ma(r.type,i),n);case 15:return _s(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ma(r,i),Hs(e,t),t.tag=1,Oi(r)?(e=!0,ji(t)):e=!1,_a(t,n),qa(t,r,i),Wa(t,r,i,n),Ns(null,t,r,!0,e,n);case 19:return qs(e,t,n);case 22:return Ss(e,t,n)}throw Error(a(156,t.tag))};var Qc="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 s=i;i=function(){var e=Wc(o);s.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=Wc(o);a.call(e)}}var o=qc(t,r,e,0,null,!1,0,"",Zc);return e._reactRootContainer=o,e[pi]=o.current,Br(8===e.nodeType?e.parentNode:e),fc(),o}for(;i=e.lastChild;)e.removeChild(i);if("function"===typeof r){var s=r;r=function(){var e=Wc(u);s.call(e)}}var u=zc(e,0,!1,null,0,!1,0,"",Zc);return e._reactRootContainer=u,e[pi]=u.current,Br(8===e.nodeType?e.parentNode:e),fc((function(){Hc(t,u,n,r)})),u}(n,t,e,i,r);return Wc(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;fc((function(){Hc(null,e,null,null)})),t[pi]=null}},Xc.prototype.unstable_scheduleHydration=function(e){if(e){var t=_t();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Pt.length&&0!==t&&t<Pt[n].priority;n++);Pt.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),ic(t,Ye()),0===(6&Nu)&&(qu=Ye()+500,Bi()))}break;case 13:fc((function(){var t=Na(e,1);if(null!==t){var n=tc();rc(t,e,1,n)}})),Gc(e,1)}},xt=function(e){if(13===e.tag){var t=Na(e,134217728);if(null!==t)rc(t,e,134217728,tc());Gc(e,134217728)}},Et=function(e){if(13===e.tag){var t=nc(e),n=Na(e,t);if(null!==n)rc(n,e,t,tc());Gc(e,t)}},_t=function(){return kt},St=function(e,t){var n=kt;try{return kt=e,t()}finally{kt=n}},xe=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));G(r),J(r,i)}}}break;case"textarea":ae(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Ie=lc,Ne=fc;var tl={usingClientEntryPoint:!1,Events:[ki,bi,wi,Te,Ce,lc]},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:b.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=We(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 function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:x,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Yc(e))throw Error(a(299));var n=!1,r="",i=Qc;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=zc(e,1,!1,null,0,n,0,r,i),e[pi]=t.current,Br(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=We(t))?null:e.stateNode},t.flushSync=function(e){return fc(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="",s=Qc;if(null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=qc(t,null,e,1,null!=n?n:null,i,0,o,s),e[pi]=t.current,Br(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&&(fc((function(){el(null,null,e,!1,(function(){e._reactRootContainer=null,e[pi]=null}))})),!0)},t.unstable_batchedUpdates=lc,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){"use strict";var r=n(164);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},164:function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(463)},374:function(e,t,n){"use strict";var r=n(791),i=Symbol.for("react.element"),a=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={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)&&!u.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:s.current}}t.Fragment=a,t.jsx=c,t.jsxs=c},117:function(e,t){"use strict";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"),s=Symbol.for("react.provider"),u=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 k(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 b=k.prototype=new g;b.constructor=k,v(b,y.prototype),b.isPureReactComponent=!0;var w=Array.isArray,x=Object.prototype.hasOwnProperty,E={current:null},_={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,r){var i,a={},o=null,s=null;if(null!=t)for(i in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(o=""+t.key),t)x.call(t,i)&&!_.hasOwnProperty(i)&&(a[i]=t[i]);var u=arguments.length-2;if(1===u)a.children=r;else if(1<u){for(var c=Array(u),l=0;l<u;l++)c[l]=arguments[l+2];a.children=c}if(e&&e.defaultProps)for(i in u=e.defaultProps)void 0===a[i]&&(a[i]=u[i]);return{$$typeof:n,type:e,key:o,ref:s,props:a,_owner:E.current}}function T(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var C=/\/+/g;function I(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 s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var u=!1;if(null===e)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case n:case r:u=!0}}if(u)return o=o(u=e),e=""===a?"."+I(u,0):a,w(o)?(i="",null!=e&&(i=e.replace(C,"$&/")+"/"),N(o,t,i,"",(function(e){return e}))):null!=o&&(T(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||u&&u.key===o.key?"":(""+o.key).replace(C,"$&/")+"/")+e)),t.push(o)),1;if(u=0,a=""===a?".":a+":",w(e))for(var c=0;c<e.length;c++){var l=a+I(s=e[c],c);u+=N(s,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;!(s=e.next()).done;)u+=N(s=s.value,t,i,l=a+I(s,c++),o);else if("object"===s)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 u}function A(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 R(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 O={current:null},P={transition:null},D={ReactCurrentDispatcher:O,ReactCurrentBatchConfig:P,ReactCurrentOwner:E};t.Children={map:A,forEach:function(e,t,n){A(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return A(e,(function(){t++})),t},toArray:function(e){return A(e,(function(e){return e}))||[]},only:function(e){if(!T(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=k,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,s=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,s=E.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(c in t)x.call(t,c)&&!_.hasOwnProperty(c)&&(i[c]=void 0===t[c]&&void 0!==u?u[c]:t[c])}var c=arguments.length-2;if(1===c)i.children=r;else if(1<c){u=Array(c);for(var l=0;l<c;l++)u[l]=arguments[l+2];i.children=u}return{$$typeof:n,type:e.type,key:a,ref:o,props:i,_owner:s}},t.createContext=function(e){return(e={$$typeof:u,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_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=T,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:R}},t.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=P.transition;P.transition={};try{e()}finally{P.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return O.current.useCallback(e,t)},t.useContext=function(e){return O.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return O.current.useDeferredValue(e)},t.useEffect=function(e,t){return O.current.useEffect(e,t)},t.useId=function(){return O.current.useId()},t.useImperativeHandle=function(e,t,n){return O.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return O.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return O.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return O.current.useMemo(e,t)},t.useReducer=function(e,t,n){return O.current.useReducer(e,t,n)},t.useRef=function(e){return O.current.useRef(e)},t.useState=function(e){return O.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return O.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return O.current.useTransition()},t.version="18.2.0"},791:function(e,t,n){"use strict";e.exports=n(117)},184:function(e,t,n){"use strict";e.exports=n(374)},813:function(e,t){"use strict";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 s=2*(r+1)-1,u=e[s],c=s+1,l=e[c];if(0>a(u,n))c<i&&0>a(l,u)?(e[r]=l,e[c]=n,r=c):(e[r]=u,e[s]=n,r=s);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 s=Date,u=s.now();t.unstable_now=function(){return s.now()-u}}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,k="undefined"!==typeof setImmediate?setImmediate:null;function b(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,b(e),!v)if(null!==r(c))v=!0,P(x);else{var t=r(l);null!==t&&D(w,t.startTime-e)}}function x(e,n){v=!1,m&&(m=!1,g(T),T=-1),p=!0;var a=d;try{for(b(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 s=o(h.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?h.callback=s:h===r(c)&&i(c),b(n)}else i(c);h=r(c)}if(null!==h)var u=!0;else{var f=r(l);null!==f&&D(w,f.startTime-n),u=!1}return u}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 E,_=!1,S=null,T=-1,C=5,I=-1;function N(){return!(t.unstable_now()-I<C)}function A(){if(null!==S){var e=t.unstable_now();I=e;var n=!0;try{n=S(!0,e)}finally{n?E():(_=!1,S=null)}}else _=!1}if("function"===typeof k)E=function(){k(A)};else if("undefined"!==typeof MessageChannel){var R=new MessageChannel,O=R.port2;R.port1.onmessage=A,E=function(){O.postMessage(null)}}else E=function(){y(A,0)};function P(e){S=e,_||(_=!0,E())}function D(e,n){T=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,P(x))},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"):C=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 s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:f++,callback:i,priorityLevel:e,startTime:a,expirationTime:s=a+s,sortIndex:-1},a>o?(e.sortIndex=a,n(l,e),null===r(c)&&e===r(l)&&(m?(g(T),T=-1):m=!0,D(w,a-o))):(e.sortIndex=s,n(c,e),v||p||(v=!0,P(x))),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){"use strict";e.exports=n(813)},165:function(e,t,n){var r;"undefined"!=typeof self&&self,e.exports=(r=n(791),function(){var e={7403:function(e,t,n){"use strict";n.d(t,{default:function(){return T}});var r=n(4087),i=n.n(r),a=function(e){return new RegExp(/<[a-z][\s\S]*>/i).test(e)},o=function(e){var t=document.createElement("div");return t.innerHTML=e,t.childNodes},s=function(e,t){return Math.floor(Math.random()*(t-e+1))+e},u="TYPE_CHARACTER",c="REMOVE_CHARACTER",l="REMOVE_ALL",f="REMOVE_LAST_VISIBLE_NODE",h="PAUSE_FOR",d="CALL_FUNCTION",p="ADD_HTML_TAG_ELEMENT",v="CHANGE_DELETE_SPEED",m="CHANGE_DELAY",y="CHANGE_CURSOR",g="PASTE_STRING",k="HTML_TAG";function b(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 w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function x(e){return function(e){if(Array.isArray(e))return E(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return E(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)?E(e,t):void 0}}(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 E(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 _(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 S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var T=function(){function e(t,n){var b=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),S(this,"state",{cursorAnimation:null,lastFrameTime:null,pauseUntil:null,eventQueue:[],eventLoop:null,eventLoopPaused:!1,reverseCalledEvents:[],calledEvents:[],visibleNodes:[],initialOptions:null,elements:{container:null,wrapper:document.createElement("span"),cursor:document.createElement("span")}}),S(this,"options",{strings:null,cursor:"|",delay:"natural",pauseFor:1500,deleteSpeed:"natural",loop:!1,autoStart:!1,devMode:!1,skipAddStyles:!1,wrapperClassName:"Typewriter__wrapper",cursorClassName:"Typewriter__cursor",stringSplitter:null,onCreateTextNode:null,onRemoveNode:null}),S(this,"setupWrapperElement",(function(){b.state.elements.container&&(b.state.elements.wrapper.className=b.options.wrapperClassName,b.state.elements.cursor.className=b.options.cursorClassName,b.state.elements.cursor.innerHTML=b.options.cursor,b.state.elements.container.innerHTML="",b.state.elements.container.appendChild(b.state.elements.wrapper),b.state.elements.container.appendChild(b.state.elements.cursor))})),S(this,"start",(function(){return b.state.eventLoopPaused=!1,b.runEventLoop(),b})),S(this,"pause",(function(){return b.state.eventLoopPaused=!0,b})),S(this,"stop",(function(){return b.state.eventLoop&&((0,r.cancel)(b.state.eventLoop),b.state.eventLoop=null),b})),S(this,"pauseFor",(function(e){return b.addEventToQueue(h,{ms:e}),b})),S(this,"typeOutAllStrings",(function(){return"string"==typeof b.options.strings?(b.typeString(b.options.strings).pauseFor(b.options.pauseFor),b):(b.options.strings.forEach((function(e){b.typeString(e).pauseFor(b.options.pauseFor).deleteAll(b.options.deleteSpeed)})),b)})),S(this,"typeString",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(a(e))return b.typeOutHTMLString(e,t);if(e){var n=(b.options||{}).stringSplitter,r="function"==typeof n?n(e):e.split("");b.typeCharacters(r,t)}return b})),S(this,"pasteString",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return a(e)?b.typeOutHTMLString(e,t,!0):(e&&b.addEventToQueue(g,{character:e,node:t}),b)})),S(this,"typeOutHTMLString",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,r=o(e);if(r.length>0)for(var i=0;i<r.length;i++){var a=r[i],s=a.innerHTML;a&&3!==a.nodeType?(a.innerHTML="",b.addEventToQueue(p,{node:a,parentNode:t}),n?b.pasteString(s,a):b.typeString(s,a)):a.textContent&&(n?b.pasteString(a.textContent,t):b.typeString(a.textContent,t))}return b})),S(this,"deleteAll",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"natural";return b.addEventToQueue(l,{speed:e}),b})),S(this,"changeDeleteSpeed",(function(e){if(!e)throw new Error("Must provide new delete speed");return b.addEventToQueue(v,{speed:e}),b})),S(this,"changeDelay",(function(e){if(!e)throw new Error("Must provide new delay");return b.addEventToQueue(m,{delay:e}),b})),S(this,"changeCursor",(function(e){if(!e)throw new Error("Must provide new cursor");return b.addEventToQueue(y,{cursor:e}),b})),S(this,"deleteChars",(function(e){if(!e)throw new Error("Must provide amount of characters to delete");for(var t=0;t<e;t++)b.addEventToQueue(c);return b})),S(this,"callFunction",(function(e,t){if(!e||"function"!=typeof e)throw new Error("Callbak must be a function");return b.addEventToQueue(d,{cb:e,thisArg:t}),b})),S(this,"typeCharacters",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e||!Array.isArray(e))throw new Error("Characters must be an array");return e.forEach((function(e){b.addEventToQueue(u,{character:e,node:t})})),b})),S(this,"removeCharacters",(function(e){if(!e||!Array.isArray(e))throw new Error("Characters must be an array");return e.forEach((function(){b.addEventToQueue(c)})),b})),S(this,"addEventToQueue",(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return b.addEventToStateProperty(e,t,n,"eventQueue")})),S(this,"addReverseCalledEvent",(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return b.options.loop?b.addEventToStateProperty(e,t,n,"reverseCalledEvents"):b})),S(this,"addEventToStateProperty",(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0,i={eventName:e,eventArgs:t||{}};return b.state[r]=n?[i].concat(x(b.state[r])):[].concat(x(b.state[r]),[i]),b})),S(this,"runEventLoop",(function(){b.state.lastFrameTime||(b.state.lastFrameTime=Date.now());var e=Date.now(),t=e-b.state.lastFrameTime;if(!b.state.eventQueue.length){if(!b.options.loop)return;b.state.eventQueue=x(b.state.calledEvents),b.state.calledEvents=[],b.options=w({},b.state.initialOptions)}if(b.state.eventLoop=i()(b.runEventLoop),!b.state.eventLoopPaused){if(b.state.pauseUntil){if(e<b.state.pauseUntil)return;b.state.pauseUntil=null}var n,r=x(b.state.eventQueue),a=r.shift();if(!(t<=(n=a.eventName===f||a.eventName===c?"natural"===b.options.deleteSpeed?s(40,80):b.options.deleteSpeed:"natural"===b.options.delay?s(120,160):b.options.delay))){var o=a.eventName,E=a.eventArgs;switch(b.logInDevMode({currentEvent:a,state:b.state,delay:n}),o){case g:case u:var _=E.character,S=E.node,T=document.createTextNode(_),C=T;b.options.onCreateTextNode&&"function"==typeof b.options.onCreateTextNode&&(C=b.options.onCreateTextNode(_,T)),C&&(S?S.appendChild(C):b.state.elements.wrapper.appendChild(C)),b.state.visibleNodes=[].concat(x(b.state.visibleNodes),[{type:"TEXT_NODE",character:_,node:C}]);break;case c:r.unshift({eventName:f,eventArgs:{removingCharacterNode:!0}});break;case h:var I=a.eventArgs.ms;b.state.pauseUntil=Date.now()+parseInt(I);break;case d:var N=a.eventArgs,A=N.cb,R=N.thisArg;A.call(R,{elements:b.state.elements});break;case p:var O=a.eventArgs,P=O.node,D=O.parentNode;D?D.appendChild(P):b.state.elements.wrapper.appendChild(P),b.state.visibleNodes=[].concat(x(b.state.visibleNodes),[{type:k,node:P,parentNode:D||b.state.elements.wrapper}]);break;case l:var L=b.state.visibleNodes,j=E.speed,M=[];j&&M.push({eventName:v,eventArgs:{speed:j,temp:!0}});for(var F=0,U=L.length;F<U;F++)M.push({eventName:f,eventArgs:{removingCharacterNode:!1}});j&&M.push({eventName:v,eventArgs:{speed:b.options.deleteSpeed,temp:!0}}),r.unshift.apply(r,M);break;case f:var V=a.eventArgs.removingCharacterNode;if(b.state.visibleNodes.length){var z=b.state.visibleNodes.pop(),B=z.type,q=z.node,H=z.character;b.options.onRemoveNode&&"function"==typeof b.options.onRemoveNode&&b.options.onRemoveNode({node:q,character:H}),q&&q.parentNode.removeChild(q),B===k&&V&&r.unshift({eventName:f,eventArgs:{}})}break;case v:b.options.deleteSpeed=a.eventArgs.speed;break;case m:b.options.delay=a.eventArgs.delay;break;case y:b.options.cursor=a.eventArgs.cursor,b.state.elements.cursor.innerHTML=a.eventArgs.cursor}b.options.loop&&(a.eventName===f||a.eventArgs&&a.eventArgs.temp||(b.state.calledEvents=[].concat(x(b.state.calledEvents),[a]))),b.state.eventQueue=r,b.state.lastFrameTime=e}}})),t)if("string"==typeof t){var E=document.querySelector(t);if(!E)throw new Error("Could not find container element");this.state.elements.container=E}else this.state.elements.container=t;n&&(this.options=w(w({},this.options),n)),this.state.initialOptions=w({},this.options),this.init()}var t,n;return t=e,(n=[{key:"init",value:function(){var e,t;this.setupWrapperElement(),this.addEventToQueue(y,{cursor:this.options.cursor},!0),this.addEventToQueue(l,null,!0),!window||window.___TYPEWRITER_JS_STYLES_ADDED___||this.options.skipAddStyles||(e=".Typewriter__cursor{-webkit-animation:Typewriter-cursor 1s infinite;animation:Typewriter-cursor 1s infinite;margin-left:1px}@-webkit-keyframes Typewriter-cursor{0%{opacity:0}50%{opacity:1}100%{opacity:0}}@keyframes Typewriter-cursor{0%{opacity:0}50%{opacity:1}100%{opacity:0}}",(t=document.createElement("style")).appendChild(document.createTextNode(e)),document.head.appendChild(t),window.___TYPEWRITER_JS_STYLES_ADDED___=!0),!0===this.options.autoStart&&this.options.strings&&this.typeOutAllStrings().start()}},{key:"logInDevMode",value:function(e){this.options.devMode&&console.log(e)}}])&&_(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()},8552:function(e,t,n){var r=n(852)(n(5639),"DataView");e.exports=r},1989:function(e,t,n){var r=n(1789),i=n(401),a=n(7667),o=n(1327),s=n(1866);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=o,u.prototype.set=s,e.exports=u},8407:function(e,t,n){var r=n(7040),i=n(4125),a=n(2117),o=n(7518),s=n(4705);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=o,u.prototype.set=s,e.exports=u},7071:function(e,t,n){var r=n(852)(n(5639),"Map");e.exports=r},3369:function(e,t,n){var r=n(4785),i=n(1285),a=n(6e3),o=n(9916),s=n(5265);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=o,u.prototype.set=s,e.exports=u},3818:function(e,t,n){var r=n(852)(n(5639),"Promise");e.exports=r},8525:function(e,t,n){var r=n(852)(n(5639),"Set");e.exports=r},8668:function(e,t,n){var r=n(3369),i=n(619),a=n(2385);function o(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}o.prototype.add=o.prototype.push=i,o.prototype.has=a,e.exports=o},6384:function(e,t,n){var r=n(8407),i=n(7465),a=n(3779),o=n(7599),s=n(4758),u=n(4309);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=a,c.prototype.get=o,c.prototype.has=s,c.prototype.set=u,e.exports=c},2705:function(e,t,n){var r=n(5639).Symbol;e.exports=r},1149:function(e,t,n){var r=n(5639).Uint8Array;e.exports=r},577:function(e,t,n){var r=n(852)(n(5639),"WeakMap");e.exports=r},4963:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}},4636:function(e,t,n){var r=n(2545),i=n(5694),a=n(1469),o=n(4144),s=n(5776),u=n(6719),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=a(e),l=!n&&i(e),f=!n&&!l&&o(e),h=!n&&!l&&!f&&u(e),d=n||l||f||h,p=d?r(e.length,String):[],v=p.length;for(var m in e)!t&&!c.call(e,m)||d&&("length"==m||f&&("offset"==m||"parent"==m)||h&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||s(m,v))||p.push(m);return p}},2488:function(e){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},2908:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},8470:function(e,t,n){var r=n(7813);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},8866:function(e,t,n){var r=n(2488),i=n(1469);e.exports=function(e,t,n){var a=t(e);return i(e)?a:r(a,n(e))}},4239:function(e,t,n){var r=n(2705),i=n(9607),a=n(2333),o=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?i(e):a(e)}},9454:function(e,t,n){var r=n(4239),i=n(7005);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},939:function(e,t,n){var r=n(2492),i=n(7005);e.exports=function e(t,n,a,o,s){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!=t&&n!=n:r(t,n,a,o,e,s))}},2492:function(e,t,n){var r=n(6384),i=n(7114),a=n(8351),o=n(6096),s=n(4160),u=n(1469),c=n(4144),l=n(6719),f="[object Arguments]",h="[object Array]",d="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,v,m,y){var g=u(e),k=u(t),b=g?h:s(e),w=k?h:s(t),x=(b=b==f?d:b)==d,E=(w=w==f?d:w)==d,_=b==w;if(_&&c(e)){if(!c(t))return!1;g=!0,x=!1}if(_&&!x)return y||(y=new r),g||l(e)?i(e,t,n,v,m,y):a(e,t,b,n,v,m,y);if(!(1&n)){var S=x&&p.call(e,"__wrapped__"),T=E&&p.call(t,"__wrapped__");if(S||T){var C=S?e.value():e,I=T?t.value():t;return y||(y=new r),m(C,I,n,v,y)}}return!!_&&(y||(y=new r),o(e,t,n,v,m,y))}},8458:function(e,t,n){var r=n(3560),i=n(5346),a=n(3218),o=n(346),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,h=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||i(e))&&(r(e)?h:s).test(o(e))}},8749:function(e,t,n){var r=n(4239),i=n(1780),a=n(7005),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,e.exports=function(e){return a(e)&&i(e.length)&&!!o[r(e)]}},280:function(e,t,n){var r=n(5726),i=n(6916),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))a.call(e,n)&&"constructor"!=n&&t.push(n);return t}},2545:function(e){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},1717:function(e){e.exports=function(e){return function(t){return e(t)}}},4757:function(e){e.exports=function(e,t){return e.has(t)}},4429:function(e,t,n){var r=n(5639)["__core-js_shared__"];e.exports=r},7114:function(e,t,n){var r=n(8668),i=n(2908),a=n(4757);e.exports=function(e,t,n,o,s,u){var c=1&n,l=e.length,f=t.length;if(l!=f&&!(c&&f>l))return!1;var h=u.get(e),d=u.get(t);if(h&&d)return h==t&&d==e;var p=-1,v=!0,m=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++p<l;){var y=e[p],g=t[p];if(o)var k=c?o(g,y,p,t,e,u):o(y,g,p,e,t,u);if(void 0!==k){if(k)continue;v=!1;break}if(m){if(!i(t,(function(e,t){if(!a(m,t)&&(y===e||s(y,e,n,o,u)))return m.push(t)}))){v=!1;break}}else if(y!==g&&!s(y,g,n,o,u)){v=!1;break}}return u.delete(e),u.delete(t),v}},8351:function(e,t,n){var r=n(2705),i=n(1149),a=n(7813),o=n(7114),s=n(8776),u=n(1814),c=r?r.prototype:void 0,l=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,f,h){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return a(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=s;case"[object Set]":var p=1&r;if(d||(d=u),e.size!=t.size&&!p)return!1;var v=h.get(e);if(v)return v==t;r|=2,h.set(e,t);var m=o(d(e),d(t),r,c,f,h);return h.delete(e),m;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},6096:function(e,t,n){var r=n(8234),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,a,o,s){var u=1&n,c=r(e),l=c.length;if(l!=r(t).length&&!u)return!1;for(var f=l;f--;){var h=c[f];if(!(u?h in t:i.call(t,h)))return!1}var d=s.get(e),p=s.get(t);if(d&&p)return d==t&&p==e;var v=!0;s.set(e,t),s.set(t,e);for(var m=u;++f<l;){var y=e[h=c[f]],g=t[h];if(a)var k=u?a(g,y,h,t,e,s):a(y,g,h,e,t,s);if(!(void 0===k?y===g||o(y,g,n,a,s):k)){v=!1;break}m||(m="constructor"==h)}if(v&&!m){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(v=!1)}return s.delete(e),s.delete(t),v}},1957:function(e,t,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},8234:function(e,t,n){var r=n(8866),i=n(9551),a=n(3674);e.exports=function(e){return r(e,a,i)}},5050:function(e,t,n){var r=n(7019);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},852:function(e,t,n){var r=n(8458),i=n(7801);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},9607:function(e,t,n){var r=n(2705),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var i=o.call(e);return r&&(t?e[s]=n:delete e[s]),i}},9551:function(e,t,n){var r=n(4963),i=n(479),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(e){return null==e?[]:(e=Object(e),r(o(e),(function(t){return a.call(e,t)})))}:i;e.exports=s},4160:function(e,t,n){var r=n(8552),i=n(7071),a=n(3818),o=n(8525),s=n(577),u=n(4239),c=n(346),l="[object Map]",f="[object Promise]",h="[object Set]",d="[object WeakMap]",p="[object DataView]",v=c(r),m=c(i),y=c(a),g=c(o),k=c(s),b=u;(r&&b(new r(new ArrayBuffer(1)))!=p||i&&b(new i)!=l||a&&b(a.resolve())!=f||o&&b(new o)!=h||s&&b(new s)!=d)&&(b=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case v:return p;case m:return l;case y:return f;case g:return h;case k:return d}return t}),e.exports=b},7801:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},1789:function(e,t,n){var r=n(4536);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},401:function(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},7667:function(e,t,n){var r=n(4536),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},1327:function(e,t,n){var r=n(4536),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},1866:function(e,t,n){var r=n(4536);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},5776:function(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},7019:function(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},5346:function(e,t,n){var r,i=n(4429),a=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},5726:function(e){var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},7040:function(e){e.exports=function(){this.__data__=[],this.size=0}},4125:function(e,t,n){var r=n(8470),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():i.call(t,n,1),--this.size,0))}},2117:function(e,t,n){var r=n(8470);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},7518:function(e,t,n){var r=n(8470);e.exports=function(e){return r(this.__data__,e)>-1}},4705:function(e,t,n){var r=n(8470);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},4785:function(e,t,n){var r=n(1989),i=n(8407),a=n(7071);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||i),string:new r}}},1285:function(e,t,n){var r=n(5050);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},6e3:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).get(e)}},9916:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).has(e)}},5265:function(e,t,n){var r=n(5050);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},8776:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},4536:function(e,t,n){var r=n(852)(Object,"create");e.exports=r},6916:function(e,t,n){var r=n(5569)(Object.keys,Object);e.exports=r},1167:function(e,t,n){e=n.nmd(e);var r=n(1957),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,o=a&&a.exports===i&&r.process,s=function(){try{return a&&a.require&&a.require("util").types||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=s},2333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},5639:function(e,t,n){var r=n(1957),i="object"==typeof self&&self&&self.Object===Object&&self,a=r||i||Function("return this")();e.exports=a},619:function(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},2385:function(e){e.exports=function(e){return this.__data__.has(e)}},1814:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},7465:function(e,t,n){var r=n(8407);e.exports=function(){this.__data__=new r,this.size=0}},3779:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},7599:function(e){e.exports=function(e){return this.__data__.get(e)}},4758:function(e){e.exports=function(e){return this.__data__.has(e)}},4309:function(e,t,n){var r=n(8407),i=n(7071),a=n(3369);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!i||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(o)}return n.set(e,t),this.size=n.size,this}},346:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7813:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},5694:function(e,t,n){var r=n(9454),i=n(7005),a=Object.prototype,o=a.hasOwnProperty,s=a.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return i(e)&&o.call(e,"callee")&&!s.call(e,"callee")};e.exports=u},1469:function(e){var t=Array.isArray;e.exports=t},8612:function(e,t,n){var r=n(3560),i=n(1780);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},4144:function(e,t,n){e=n.nmd(e);var r=n(5639),i=n(5062),a=t&&!t.nodeType&&t,o=a&&e&&!e.nodeType&&e,s=o&&o.exports===a?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;e.exports=u},8446:function(e,t,n){var r=n(939);e.exports=function(e,t){return r(e,t)}},3560:function(e,t,n){var r=n(4239),i=n(3218);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},6719:function(e,t,n){var r=n(8749),i=n(1717),a=n(1167),o=a&&a.isTypedArray,s=o?i(o):r;e.exports=s},3674:function(e,t,n){var r=n(4636),i=n(280),a=n(8612);e.exports=function(e){return a(e)?r(e):i(e)}},479:function(e){e.exports=function(){return[]}},5062:function(e){e.exports=function(){return!1}},75:function(e){(function(){var t,n,r,i,a,o;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(e.exports=function(){return(t()-a)/1e6},n=process.hrtime,i=(t=function(){var e;return 1e9*(e=n())[0]+e[1]})(),o=1e9*process.uptime(),a=i-o):Date.now?(e.exports=function(){return Date.now()-r},r=Date.now()):(e.exports=function(){return(new Date).getTime()-r},r=(new Date).getTime())}).call(this)},4087:function(e,t,n){for(var r=n(75),i="undefined"==typeof window?n.g:window,a=["moz","webkit"],o="AnimationFrame",s=i["request"+o],u=i["cancel"+o]||i["cancelRequest"+o],c=0;!s&&c<a.length;c++)s=i[a[c]+"Request"+o],u=i[a[c]+"Cancel"+o]||i[a[c]+"CancelRequest"+o];if(!s||!u){var l=0,f=0,h=[];s=function(e){if(0===h.length){var t=r(),n=Math.max(0,16.666666666666668-(t-l));l=n+t,setTimeout((function(){var e=h.slice(0);h.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(l)}catch(e){setTimeout((function(){throw e}),0)}}),Math.round(n))}return h.push({handle:++f,callback:e,cancelled:!1}),f},u=function(e){for(var t=0;t<h.length;t++)h[t].handle===e&&(h[t].cancelled=!0)}}e.exports=function(e){return s.call(i,e)},e.exports.cancel=function(){u.apply(i,arguments)},e.exports.polyfill=function(e){e||(e=i),e.requestAnimationFrame=s,e.cancelAnimationFrame=u}},8156:function(e){"use strict";e.exports=r}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(r){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e};var i={};return function(){"use strict";n.d(i,{default:function(){return m}});var e=n(8156),t=n.n(e),r=n(7403),a=n(8446),o=n.n(a);function s(e){return s="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},s(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(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 l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function f(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return h(e)}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=function(e){!function(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&&l(e,t)}(m,e);var n,i,a,s,v=(a=m,s=function(){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(){var e,t=d(a);if(s){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return f(this,e)});function m(){var e;u(this,m);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return p(h(e=v.call.apply(v,[this].concat(n))),"state",{instance:null}),e}return n=m,(i=[{key:"componentDidMount",value:function(){var e=this,t=new r.default(this.typewriter,this.props.options);this.setState({instance:t},(function(){var n=e.props.onInit;n&&n(t)}))}},{key:"componentDidUpdate",value:function(e){o()(this.props.options,e.options)||this.setState({instance:new r.default(this.typewriter,this.props.options)})}},{key:"componentWillUnmount",value:function(){this.state.instance&&this.state.instance.stop()}},{key:"render",value:function(){var e=this,n=this.props.component;return t().createElement(n,{ref:function(t){return e.typewriter=t},className:"Typewriter","data-testid":"typewriter-wrapper"})}}])&&c(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),m}(e.Component);v.defaultProps={component:"div"};var m=v}(),i.default}())}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.m=e,n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(t,r){return n.f[r](e,t),t}),[]))},n.u=function(e){return"static/js/"+e+".033114b5.chunk.js"},n.miniCssF=function(e){},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={},t="123no-routine:";n.l=function(r,i,a,o){if(e[r])e[r].push(i);else{var s,u;if(void 0!==a)for(var c=document.getElementsByTagName("script"),l=0;l<c.length;l++){var f=c[l];if(f.getAttribute("src")==r||f.getAttribute("data-webpack")==t+a){s=f;break}}s||(u=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",t+a),s.src=r),e[r]=[i];var h=function(t,n){s.onerror=s.onload=null,clearTimeout(d);var i=e[r];if(delete e[r],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach((function(e){return e(n)})),t)return t(n)},d=setTimeout(h.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=h.bind(null,s.onerror),s.onload=h.bind(null,s.onload),u&&document.head.appendChild(s)}}}(),n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/",function(){var e={179:0};n.f.j=function(t,r){var i=n.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{var a=new Promise((function(n,r){i=e[t]=[n,r]}));r.push(i[2]=a);var o=n.p+n.u(t),s=new Error;n.l(o,(function(r){if(n.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var a=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+a+": "+o+")",s.name="ChunkLoadError",s.type=a,s.request=o,i[1](s)}}),"chunk-"+t,t)}};var t=function(t,r){var i,a,o=r[0],s=r[1],u=r[2],c=0;if(o.some((function(t){return 0!==e[t]}))){for(i in s)n.o(s,i)&&(n.m[i]=s[i]);if(u)u(n)}for(t&&t(r);c<o.length;c++)a=o[c],n.o(e,a)&&e[a]&&e[a][0](),e[a]=0},r=self.webpackChunk_123no_routine=self.webpackChunk_123no_routine||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}(),function(){"use strict";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){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function o(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 s(e){return function(e){if(Array.isArray(e))return i(e)}(e)||a(e)||o(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 u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e){return c="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},c(e)}function l(e){var t=function(e,t){if("object"!==c(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===c(t)?t:String(t)}function f(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,l(r.key),r)}}function h(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function p(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&&d(e,t)}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function m(){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 y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){var t=m();return function(){var n,r=v(e);if(t){var i=v(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===c(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return y(e)}(this,n)}}function k(e,t,n){return k=m()?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&&d(i,n.prototype),i},k.apply(null,arguments)}function b(e){var t="function"===typeof Map?new Map:void 0;return b=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 k(e,arguments,v(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),d(n,e)},b(e)}function w(e){if(Array.isArray(e))return e}function x(){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 E(e,t){return w(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,s=[],u=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(l){c=!0,i=l}finally{try{if(!u&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(e,t)||o(e,t)||x()}function _(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=o(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 a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function S(){return S=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},S.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(e||(e={}));var T,C="popstate";function I(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function N(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function A(e,t){return{usr:e.state,key:e.key,idx:t}}function R(e,t,n,r){return void 0===n&&(n=null),S({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?P(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function O(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 P(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}function D(t,n,r,i){void 0===i&&(i={});var a=i,o=a.window,s=void 0===o?document.defaultView:o,u=a.v5Compat,c=void 0!==u&&u,l=s.history,f=e.Pop,h=null,d=p();function p(){return(l.state||{idx:null}).idx}function v(){f=e.Pop;var t=p(),n=null==t?null:t-d;d=t,h&&h({action:f,location:y.location,delta:n})}function m(e){var t="null"!==s.location.origin?s.location.origin:s.location.href,n="string"===typeof e?e:O(e);return I(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==d&&(d=0,l.replaceState(S({},l.state,{idx:d}),""));var y={get action(){return f},get location(){return t(s,l)},listen:function(e){if(h)throw new Error("A history only accepts one active listener");return s.addEventListener(C,v),h=e,function(){s.removeEventListener(C,v),h=null}},createHref:function(e){return n(s,e)},createURL:m,encodeLocation:function(e){var t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(t,n){f=e.Push;var i=R(y.location,t,n);r&&r(i,t);var a=A(i,d=p()+1),o=y.createHref(i);try{l.pushState(a,"",o)}catch(u){s.location.assign(o)}c&&h&&h({action:f,location:y.location,delta:1})},replace:function(t,n){f=e.Replace;var i=R(y.location,t,n);r&&r(i,t);var a=A(i,d=p()),o=y.createHref(i);l.replaceState(a,"",o),c&&h&&h({action:f,location:y.location,delta:0})},go:function(e){return l.go(e)}};return y}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(T||(T={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function L(e,t,n){void 0===n&&(n="/");var r=$(("string"===typeof t?P(t):t).pathname||"/",n);if(null==r)return null;var i=j(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=K(i[o],Q(r));return a}function j(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");var i=function(e,i,a){var o={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};o.relativePath.startsWith("/")&&(I(o.relativePath.startsWith(r),'Absolute route path "'+o.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),o.relativePath=o.relativePath.slice(r.length));var s=Z([r,o.relativePath]),u=n.concat(o);e.children&&e.children.length>0&&(I(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),j(e.children,t,u,s)),(null!=e.path||e.index)&&t.push({path:s,score:W(s,e.index),routesMeta:u})};return e.forEach((function(e,t){var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?")){var r,a=_(M(e.path));try{for(a.s();!(r=a.n()).done;){var o=r.value;i(e,t,o)}}catch(s){a.e(s)}finally{a.f()}}else i(e,t)})),t}function M(e){var t=e.split("/");if(0===t.length)return[];var n,r=w(n=t)||a(n)||o(n)||x(),i=r[0],u=r.slice(1),c=i.endsWith("?"),l=i.replace(/\?$/,"");if(0===u.length)return c?[l,""]:[l];var f=M(u.join("/")),h=[];return h.push.apply(h,s(f.map((function(e){return""===e?l:[l,e].join("/")})))),c&&h.push.apply(h,s(f)),h.map((function(t){return e.startsWith("/")&&""===t?"/":t}))}var F=/^:\w+$/,U=3,V=2,z=1,B=10,q=-2,H=function(e){return"*"===e};function W(e,t){var n=e.split("/"),r=n.length;return n.some(H)&&(r+=q),t&&(r+=V),n.filter((function(e){return!H(e)})).reduce((function(e,t){return e+(F.test(t)?U:""===t?z:B)}),r)}function K(e,t){for(var n=e.routesMeta,r={},i="/",a=[],o=0;o<n.length;++o){var s=n[o],u=o===n.length-1,c="/"===i?t:t.slice(i.length)||"/",l=G({path:s.relativePath,caseSensitive:s.caseSensitive,end:u},c);if(!l)return null;Object.assign(r,l.params);var f=s.route;a.push({params:r,pathname:Z([i,l.pathname]),pathnameBase:ee(Z([i,l.pathnameBase])),route:f}),"/"!==l.pathnameBase&&(i=Z([i,l.pathnameBase]))}return a}function G(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);N("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');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?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");var a=new RegExp(i,t?void 0:"i");return[a,r]}(e.path,e.caseSensitive,e.end),r=E(n,2),i=r[0],a=r[1],o=t.match(i);if(!o)return null;var s=o[0],u=s.replace(/(.)\/+$/,"$1"),c=o.slice(1);return{params:a.reduce((function(e,t,n){if("*"===t){var r=c[n]||"";u=s.slice(0,s.length-r.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(n){return N(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),e}}(c[n]||"",t),e}),{}),pathname:s,pathnameBase:u,pattern:e}}function Q(e){try{return decodeURI(e)}catch(t){return N(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function $(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;var n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function X(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function Y(e){return e.filter((function(e,t){return 0===t||e.route.path&&e.route.path.length>0}))}function J(e,t,n,r){var i;void 0===r&&(r=!1),"string"===typeof e?i=P(e):(I(!(i=S({},e)).pathname||!i.pathname.includes("?"),X("?","pathname","search",i)),I(!i.pathname||!i.pathname.includes("#"),X("#","pathname","hash",i)),I(!i.search||!i.search.includes("#"),X("#","search","hash",i)));var a,o=""===e||""===i.pathname,s=o?"/":i.pathname;if(r||null==s)a=n;else{var u=t.length-1;if(s.startsWith("..")){for(var c=s.split("/");".."===c[0];)c.shift(),u-=1;i.pathname=c.join("/")}a=u>=0?t[u]:"/"}var l=function(e,t){void 0===t&&(t="/");var n="string"===typeof e?P(e):e,r=n.pathname,i=n.search,a=void 0===i?"":i,o=n.hash,s=void 0===o?"":o,u=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:u,search:te(a),hash:ne(s)}}(i,a),f=s&&"/"!==s&&s.endsWith("/"),h=(o||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!f&&!h||(l.pathname+="/"),l}var Z=function(e){return e.join("/").replace(/\/\/+/g,"/")},ee=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},te=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},ne=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""},re=function(e){p(n,e);var t=g(n);function n(){return u(this,n),t.apply(this,arguments)}return h(n)}(b(Error));function ie(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}var ae=["post","put","patch","delete"],oe=(new Set(ae),["get"].concat(ae));new Set(oe),new Set([301,302,303,307,308]),new Set([307,308]),"undefined"!==typeof window&&"undefined"!==typeof window.document&&window.document.createElement;Symbol("deferred");function se(){return se=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},se.apply(this,arguments)}var ue=t.createContext(null);var ce=t.createContext(null);var le=t.createContext(null);var fe=t.createContext(null);var he=t.createContext(null);var de=t.createContext({outlet:null,matches:[],isDataRoute:!1});var pe=t.createContext(null);function ve(){return null!=t.useContext(he)}function me(){return ve()||I(!1),t.useContext(he).location}function ye(e){t.useContext(fe).static||t.useLayoutEffect(e)}function ge(){return t.useContext(de).isDataRoute?function(){var e=Ie(xe.UseNavigateStable).router,n=Ae(Ee.UseNavigateStable),r=t.useRef(!1);ye((function(){r.current=!0}));var i=t.useCallback((function(t,i){void 0===i&&(i={}),r.current&&("number"===typeof t?e.navigate(t):e.navigate(t,se({fromRouteId:n},i)))}),[e,n]);return i}():function(){ve()||I(!1);var e=t.useContext(fe),n=e.basename,r=e.navigator,i=t.useContext(de).matches,a=me().pathname,o=JSON.stringify(Y(i).map((function(e){return e.pathnameBase}))),s=t.useRef(!1);ye((function(){s.current=!0}));var u=t.useCallback((function(e,t){if(void 0===t&&(t={}),s.current)if("number"!==typeof e){var i=J(e,JSON.parse(o),a,"path"===t.relative);"/"!==n&&(i.pathname="/"===i.pathname?n:Z([n,i.pathname])),(t.replace?r.replace:r.push)(i,t.state,t)}else r.go(e)}),[n,r,o,a]);return u}()}function ke(e,n){var r=(void 0===n?{}:n).relative,i=t.useContext(de).matches,a=me().pathname,o=JSON.stringify(Y(i).map((function(e){return e.pathnameBase})));return t.useMemo((function(){return J(e,JSON.parse(o),a,"path"===r)}),[e,o,a,r])}function be(n,r,i){ve()||I(!1);var a,o=t.useContext(fe).navigator,s=t.useContext(de).matches,u=s[s.length-1],c=u?u.params:{},l=(u&&u.pathname,u?u.pathnameBase:"/"),f=(u&&u.route,me());if(r){var h,d="string"===typeof r?P(r):r;"/"===l||(null==(h=d.pathname)?void 0:h.startsWith(l))||I(!1),a=d}else a=f;var p=a.pathname||"/",v=L(n,{pathname:"/"===l?p:p.slice(l.length)||"/"});var m=Ce(v&&v.map((function(e){return Object.assign({},e,{params:Object.assign({},c,e.params),pathname:Z([l,o.encodeLocation?o.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?l:Z([l,o.encodeLocation?o.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})})),s,i);return r&&m?t.createElement(he.Provider,{value:{location:se({pathname:"/",search:"",hash:"",state:null,key:"default"},a),navigationType:e.Pop}},m):m}function we(){var e=function(){var e,n=t.useContext(pe),r=Ne(Ee.UseRouteError),i=Ae(Ee.UseRouteError);if(n)return n;return null==(e=r.errors)?void 0:e[i]}(),n=ie(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:i};return t.createElement(t.Fragment,null,t.createElement("h2",null,"Unexpected Application Error!"),t.createElement("h3",{style:{fontStyle:"italic"}},n),r?t.createElement("pre",{style:a},r):null,null)}var xe,Ee,_e=t.createElement(we,null),Se=function(e){p(r,e);var n=g(r);function r(e){var t;return u(this,r),(t=n.call(this,e)).state={location:e.location,revalidation:e.revalidation,error:e.error},t}return h(r,[{key:"componentDidCatch",value:function(e,t){console.error("React Router caught the following error during render",e,t)}},{key:"render",value:function(){return this.state.error?t.createElement(de.Provider,{value:this.props.routeContext},t.createElement(pe.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}},{key:"getDerivedStateFromProps",value:function(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}}]),r}(t.Component);function Te(e){var n=e.routeContext,r=e.match,i=e.children,a=t.useContext(ue);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),t.createElement(de.Provider,{value:n},i)}function Ce(e,n,r){var i;if(void 0===n&&(n=[]),void 0===r&&(r=null),null==e){var a;if(null==(a=r)||!a.errors)return null;e=r.matches}var o=e,s=null==(i=r)?void 0:i.errors;if(null!=s){var u=o.findIndex((function(e){return e.route.id&&(null==s?void 0:s[e.route.id])}));u>=0||I(!1),o=o.slice(0,Math.min(o.length,u+1))}return o.reduceRight((function(e,i,a){var u=i.route.id?null==s?void 0:s[i.route.id]:null,c=null;r&&(c=i.route.errorElement||_e);var l=n.concat(o.slice(0,a+1)),f=function(){var n;return n=u?c:i.route.Component?t.createElement(i.route.Component,null):i.route.element?i.route.element:e,t.createElement(Te,{match:i,routeContext:{outlet:e,matches:l,isDataRoute:null!=r},children:n})};return r&&(i.route.ErrorBoundary||i.route.errorElement||0===a)?t.createElement(Se,{location:r.location,revalidation:r.revalidation,component:c,error:u,children:f(),routeContext:{outlet:null,matches:l,isDataRoute:!0}}):f()}),null)}function Ie(e){var n=t.useContext(ue);return n||I(!1),n}function Ne(e){var n=t.useContext(ce);return n||I(!1),n}function Ae(e){var n=function(e){var n=t.useContext(de);return n||I(!1),n}(),r=n.matches[n.matches.length-1];return r.route.id||I(!1),r.route.id}!function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"}(xe||(xe={})),function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"}(Ee||(Ee={}));var Re;function Oe(e){I(!1)}function Pe(n){var r=n.basename,i=void 0===r?"/":r,a=n.children,o=void 0===a?null:a,s=n.location,u=n.navigationType,c=void 0===u?e.Pop:u,l=n.navigator,f=n.static,h=void 0!==f&&f;ve()&&I(!1);var d=i.replace(/^\/*/,"/"),p=t.useMemo((function(){return{basename:d,navigator:l,static:h}}),[d,l,h]);"string"===typeof s&&(s=P(s));var v=s,m=v.pathname,y=void 0===m?"/":m,g=v.search,k=void 0===g?"":g,b=v.hash,w=void 0===b?"":b,x=v.state,E=void 0===x?null:x,_=v.key,S=void 0===_?"default":_,T=t.useMemo((function(){var e=$(y,d);return null==e?null:{location:{pathname:e,search:k,hash:w,state:E,key:S},navigationType:c}}),[d,y,k,w,E,S,c]);return null==T?null:t.createElement(fe.Provider,{value:p},t.createElement(he.Provider,{children:o,value:T}))}function De(e){var t=e.children,n=e.location;return be(je(t),n)}!function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(Re||(Re={}));var Le=new Promise((function(){}));t.Component;function je(e,n){void 0===n&&(n=[]);var r=[];return t.Children.forEach(e,(function(e,i){if(t.isValidElement(e)){var a=[].concat(s(n),[i]);if(e.type!==t.Fragment){e.type!==Oe&&I(!1),e.props.index&&e.props.children&&I(!1);var o={id:e.props.id||a.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=je(e.props.children,a)),r.push(o)}else r.push.apply(r,je(e.props.children,a))}})),r}function Me(){Me=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.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(N){u=function(e,t,n){return e[t]=n}}function l(e,t,n,i){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),s=new T(i||[]);return r(o,"_invoke",{value:x(e,n,s)}),o}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(N){return{type:"throw",arg:N}}}e.wrap=l;var h={};function d(){}function p(){}function v(){}var m={};u(m,a,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(C([])));g&&g!==t&&n.call(g,a)&&(m=g);var k=v.prototype=d.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function i(r,a,o,s){var u=f(e[r],e,a);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==c(h)&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){i("next",e,o,s)}),(function(e){i("throw",e,o,s)})):t.resolve(h).then((function(e){l.value=e,o(l)}),(function(e){return i("throw",e,o,s)}))}s(u.arg)}var a;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return a=a?a.then(r,r):r()}})}function x(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 I()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=E(o,n);if(s){if(s===h)continue;return s}}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 u=f(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function E(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=f(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,h;var a=i.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function _(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 S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function C(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=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 i.next=i}}return{next:I}}function I(){return{value:void 0,done:!0}}return p.prototype=v,r(k,"constructor",{value:v,configurable:!0}),r(v,"constructor",{value:p,configurable:!0}),p.displayName=u(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,u(e,s,"GeneratorFunction")),e.prototype=Object.create(k),e},e.awrap=function(e){return{__await:e}},b(w.prototype),u(w.prototype,o,(function(){return this})),e.AsyncIterator=w,e.async=function(t,n,r,i,a){void 0===a&&(a=Promise);var o=new w(l(t,n,r,i),a);return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},b(k),u(k,s,"Generator"),u(k,a,(function(){return this})),u(k,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=C,T.prototype={constructor:T,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(S),!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 s=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)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,h):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),h},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),S(n),h}},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;S(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:C(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}function Fe(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,i)}function Ue(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){Fe(a,r,i,o,s,"next",e)}function s(e){Fe(a,r,i,o,s,"throw",e)}o(void 0)}))}}function Ve(){return Ve=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},Ve.apply(this,arguments)}function ze(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 Be=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function qe(e){var n,r=e.basename,i=e.children,a=e.window,o=t.useRef();null==o.current&&(o.current=(void 0===(n={window:a,v5Compat:!0})&&(n={}),D((function(e,t){var n=e.location;return R("",{pathname:n.pathname,search:n.search,hash:n.hash},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"===typeof t?t:O(t)}),null,n)));var s=o.current,u=E(t.useState({action:s.action,location:s.location}),2),c=u[0],l=u[1];return t.useLayoutEffect((function(){return s.listen(l)}),[s]),t.createElement(Pe,{basename:r,children:i,location:c.location,navigationType:c.action,navigator:s})}var He="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,We=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ke=t.forwardRef((function(e,n){var r,i=e.onClick,a=e.relative,o=e.reloadDocument,s=e.replace,u=e.state,c=e.target,l=e.to,f=e.preventScrollReset,h=ze(e,Be),d=t.useContext(fe).basename,p=!1;if("string"===typeof l&&We.test(l)&&(r=l,He))try{var v=new URL(window.location.href),m=l.startsWith("//")?new URL(v.protocol+l):new URL(l),y=$(m.pathname,d);m.origin===v.origin&&null!=y?l=y+m.search+m.hash:p=!0}catch(b){}var g=function(e,n){var r=(void 0===n?{}:n).relative;ve()||I(!1);var i=t.useContext(fe),a=i.basename,o=i.navigator,s=ke(e,{relative:r}),u=s.hash,c=s.pathname,l=s.search,f=c;return"/"!==a&&(f="/"===c?a:Z([a,c])),o.createHref({pathname:f,search:l,hash:u})}(l,{relative:a}),k=function(e,n){var r=void 0===n?{}:n,i=r.target,a=r.replace,o=r.state,s=r.preventScrollReset,u=r.relative,c=ge(),l=me(),f=ke(e,{relative:u});return t.useCallback((function(t){if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(t,i)){t.preventDefault();var n=void 0!==a?a:O(l)===O(f);c(e,{replace:n,state:o,preventScrollReset:s,relative:u})}}),[l,c,f,a,o,i,e,s,u])}(l,{replace:s,state:u,target:c,preventScrollReset:f,relative:a});return t.createElement("a",Ve({},h,{href:r||g,onClick:p||o?i:function(e){i&&i(e),e.defaultPrevented||k(e)},ref:n,target:c}))}));var Ge,Qe;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(Ge||(Ge={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Qe||(Qe={}));function $e(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Xe=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},Ye={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,s=o?e[i+1]:0,u=i+2<e.length,c=u?e[i+2]:0,l=a>>2,f=(3&a)<<4|s>>4,h=(15&s)<<2|c>>6,d=63&c;u||(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(Xe(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 s=e[n++],u=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&s)<<6|63&u)}}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,s=++i<e.length?n[e.charAt(i)]:64,u=++i<e.length?n[e.charAt(i)]:64;if(++i,null==a||null==o||null==s||null==u)throw new Je;var c=a<<2|o>>4;if(r.push(c),64!==s){var l=o<<4&240|s>>2;if(r.push(l),64!==u){var f=s<<6&192|u;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)}}},Je=function(e){p(n,e);var t=g(n);function n(){var e;return u(this,n),(e=t.apply(this,arguments)).name="DecodeBase64StringError",e}return h(n)}(b(Error)),Ze=function(e){return function(e){var t=Xe(e);return Ye.encodeByteArray(t,!0)}(e).replace(/\./g,"")},et=function(e){try{return Ye.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};var tt=function(){return function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__},nt=function(){try{return tt()||function(){if("undefined"!==typeof process){var e={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_VERCEL_GIT_COMMIT_SHA:"5d09a76205dbd09b1848ccb97ee003d1ebdbc132",REACT_APP_VERCEL_URL:"123no-routine-gv1yze2j6-tenrs-projects.vercel.app",REACT_APP_VERCEL_PROJECT_PRODUCTION_URL:"noroutine.nyc",REACT_APP_VERCEL_ENV:"production",REACT_APP_VERCEL_GIT_PREVIOUS_SHA:"",REACT_APP_VERCEL_GIT_COMMIT_AUTHOR_LOGIN:"tenr",REACT_APP_VERCEL_GIT_PROVIDER:"github",REACT_APP_VERCEL_GIT_COMMIT_AUTHOR_NAME:"Giancarlos Rodriguez",REACT_APP_VERCEL_GIT_REPO_OWNER:"tenr",REACT_APP_VERCEL_GIT_REPO_SLUG:"123no-routine",REACT_APP_VERCEL_GIT_PULL_REQUEST_ID:"",REACT_APP_VERCEL_BRANCH_URL:"123no-routine-git-master-tenrs-projects.vercel.app",REACT_APP_STRIPE_PUBLISHABLE_KEY:"pk_live_51OGZQJHmtEmYyDRUh0VVIJxascH2yZEuMNlMoc10ixdsK4IdMVvqAEkqhngvVjCTV4c1ql0HLashI79FyBJ3Ghdh000A9rY3J8",REACT_APP_VERCEL_GIT_COMMIT_MESSAGE:"removed theme toggle and adjusted about page",REACT_APP_VERCEL_GIT_REPO_ID:"639120457",REACT_APP_VERCEL_GIT_COMMIT_REF:"master"}.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0}}()||function(){if("undefined"!==typeof document){var e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(n){return}var t=e&&et(e[1]);return t&&JSON.parse(t)}}()}catch(e){return void console.info("Unable to get __FIREBASE_DEFAULTS__ due to: ".concat(e))}},rt=function(e){var t,n;return null===(n=null===(t=nt())||void 0===t?void 0:t.emulatorHosts)||void 0===n?void 0:n[e]},it=function(e){var t=rt(e);if(t){var n=t.lastIndexOf(":");if(n<=0||n+1===t.length)throw new Error("Invalid host ".concat(t," with no separate hostname and port!"));var r=parseInt(t.substring(n+1),10);return"["===t[0]?[t.substring(1,n-1),r]:[t.substring(0,n),r]}},at=function(){var e;return null===(e=nt())||void 0===e?void 0:e.config},ot=function(e){var t;return null===(t=nt())||void 0===t?void 0:t["_".concat(e)]},st=function(){function e(){var t=this;u(this,e),this.reject=function(){},this.resolve=function(){},this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))}return h(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 ut(e,t){if(e.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');var n=t||"demo-project",r=e.iat||0,i=e.sub||e.user_id;if(!i)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");var a=Object.assign({iss:"https://securetoken.google.com/".concat(n),aud:n,iat:r,exp:r+3600,auth_time:r,sub:i,user_id:i,firebase:{sign_in_provider:"custom",identities:{}}},e);return[Ze(JSON.stringify({alg:"none",type:"JWT"})),Ze(JSON.stringify(a)),""].join(".")}function ct(){return"undefined"!==typeof navigator&&"string"===typeof navigator.userAgent?navigator.userAgent:""}function lt(){var e="object"===typeof chrome?chrome.runtime:"object"===typeof browser?browser.runtime:void 0;return"object"===typeof e&&void 0!==e.id}function ft(){try{return"object"===typeof indexedDB}catch(e){return!1}}function ht(){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)}}))}var dt=function(e){p(n,e);var t=g(n);function n(e,r,i){var a;return u(this,n),(a=t.call(this,r)).code=e,a.customData=i,a.name="FirebaseError",Object.setPrototypeOf(y(a),n.prototype),Error.captureStackTrace&&Error.captureStackTrace(y(a),pt.prototype.create),a}return h(n)}(b(Error)),pt=function(){function e(t,n,r){u(this,e),this.service=t,this.serviceName=n,this.errors=r}return h(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?function(e,t){return e.replace(vt,(function(e,n){var r=t[n];return null!=r?String(r):"<".concat(n,"?>")}))}(r,t):"Error",a="".concat(this.serviceName,": ").concat(i," (").concat(n,").");return new dt(n,a,t)}}]),e}();var vt=/\{\$([^}]+)}/g;function mt(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function yt(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 s=e[o],u=t[o];if(gt(s)&&gt(u)){if(!yt(s,u))return!1}else if(s!==u)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 gt(e){return null!==e&&"object"===typeof e}function kt(e){for(var t=[],n=function(){var e=E(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 bt(e){var t={};return e.replace(/^\?/,"").split("&").forEach((function(e){if(e){var n=E(e.split("="),2),r=n[0],i=n[1];t[decodeURIComponent(r)]=decodeURIComponent(i)}})),t}function wt(e){var t=e.indexOf("?");if(!t)return"";var n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)}var xt=function(){function e(t,n){var r=this;u(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 h(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);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=Et),void 0===r.error&&(r.error=Et),void 0===r.complete&&(r.complete=Et);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 Et(){}var _t=1e3,St=2,Tt=144e5,Ct=.5;function It(e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:St,n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:_t)*Math.pow(t,e),r=Math.round(Ct*n*(Math.random()-.5)*2);return Math.min(Tt,n+r)}function Nt(e){return e&&e._delegate?e._delegate:e}var At=function(){function e(t,n,r){u(this,e),this.name=t,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}return h(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}(),Rt="[DEFAULT]",Ot=function(){function e(t,n){u(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 h(e,[{key:"get",value:function(e){var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){var n=new st;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:Rt})}catch(u){}var t,n=_(this.instancesDeferred.entries());try{for(n.s();!(t=n.n()).done;){var r=E(t.value,2),i=r[0],a=r[1],o=this.normalizeInstanceIdentifier(i);try{var s=this.getOrInitializeService({instanceIdentifier:o});a.resolve(s)}catch(u){}}}catch(c){n.e(c)}finally{n.f()}}}},{key:"clearInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Rt;this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}},{key:"delete",value:function(){var e=Ue(Me().mark((function e(){var t;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Array.from(this.instances.values()),e.next=3,Promise.all([].concat(s(t.filter((function(e){return"INTERNAL"in e})).map((function(e){return e.INTERNAL.delete()}))),s(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]:Rt;return this.instances.has(e)}},{key:"getOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Rt;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}),o=_(this.instancesDeferred.entries());try{for(o.s();!(i=o.n()).done;){var s=E(i.value,2),u=s[0],c=s[1];r===this.normalizeInstanceIdentifier(u)&&c.resolve(a)}}catch(l){o.e(l)}finally{o.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=_(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;try{a(e,t)}catch(o){}}}catch(s){i.e(s)}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===Rt?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(o){}return a||null}},{key:"normalizeInstanceIdentifier",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Rt;return this.component?this.component.multipleInstances?e:Rt:e}},{key:"shouldAutoInitialize",value:function(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}]),e}();var Pt,Dt,Lt=function(){function e(t){u(this,e),this.name=t,this.providers=new Map}return h(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 Ot(e,this);return this.providers.set(e,t),t}},{key:"getProviders",value:function(){return Array.from(this.providers.values())}}]),e}(),jt=[];!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"}(Dt||(Dt={}));var Mt={debug:Dt.DEBUG,verbose:Dt.VERBOSE,info:Dt.INFO,warn:Dt.WARN,error:Dt.ERROR,silent:Dt.SILENT},Ft=Dt.INFO,Ut=($e(Pt={},Dt.DEBUG,"log"),$e(Pt,Dt.VERBOSE,"log"),$e(Pt,Dt.INFO,"info"),$e(Pt,Dt.WARN,"warn"),$e(Pt,Dt.ERROR,"error"),Pt),Vt=function(e,t){if(!(t<e.logLevel)){var n=(new Date).toISOString(),r=Ut[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),s=2;s<a;s++)o[s-2]=arguments[s];(i=console)[r].apply(i,["[".concat(n,"]  ").concat(e.name,":")].concat(o))}},zt=function(){function e(t){u(this,e),this.name=t,this._logLevel=Ft,this._logHandler=Vt,this._userLogHandler=null,jt.push(this)}return h(e,[{key:"logLevel",get:function(){return this._logLevel},set:function(e){if(!(e in Dt))throw new TypeError('Invalid value "'.concat(e,'" assigned to `logLevel`'));this._logLevel=e}},{key:"setLogLevel",value:function(e){this._logLevel="string"===typeof e?Mt[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,Dt.DEBUG].concat(t)),this._logHandler.apply(this,[this,Dt.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,Dt.VERBOSE].concat(t)),this._logHandler.apply(this,[this,Dt.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,Dt.INFO].concat(t)),this._logHandler.apply(this,[this,Dt.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,Dt.WARN].concat(t)),this._logHandler.apply(this,[this,Dt.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,Dt.ERROR].concat(t)),this._logHandler.apply(this,[this,Dt.ERROR].concat(t))}}]),e}();function Bt(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 qt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bt(Object(n),!0).forEach((function(t){$e(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ht,Wt,Kt=function(e,t){return t.some((function(t){return e instanceof t}))};var Gt=new WeakMap,Qt=new WeakMap,$t=new WeakMap,Xt=new WeakMap,Yt=new WeakMap;var Jt={get:function(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return Qt.get(e);if("objectStoreNames"===t)return e.objectStoreNames||$t.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return tn(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 Zt(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(Wt||(Wt=[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(nn(this),n),tn(Gt.get(this))}:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tn(e.apply(nn(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,[nn(this),t].concat(r));return $t.set(a,t.sort?t.sort():[t]),tn(a)}}function en(e){return"function"===typeof e?Zt(e):(e instanceof IDBTransaction&&function(e){if(!Qt.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)}));Qt.set(e,t)}}(e),Kt(e,Ht||(Ht=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,Jt):e)}function tn(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(tn(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&&Gt.set(t,e)})).catch((function(){})),Yt.set(t,e),t}(e);if(Xt.has(e))return Xt.get(e);var t=en(e);return t!==e&&(Xt.set(e,t),Yt.set(t,e)),t}var nn=function(e){return Yt.get(e)};var rn,an,on=["get","getKey","getAll","getAllKeys","count"],sn=["put","add","delete","clear"],un=new Map;function cn(e,t){if(e instanceof IDBDatabase&&!(t in e)&&"string"===typeof t){if(un.get(t))return un.get(t);var n=t.replace(/FromIndex$/,""),r=t!==n,i=sn.includes(n);if(n in(r?IDBIndex:IDBObjectStore).prototype&&(i||on.includes(n))){var a=function(){var e=Ue(Me().mark((function e(t){var a,o,s,u,c,l,f=arguments;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(o=this.transaction(t,i?"readwrite":"readonly"),s=o.store,u=f.length,c=new Array(u>1?u-1:0),l=1;l<u;l++)c[l-1]=f[l];return r&&(s=s.index(c.shift())),e.next=6,Promise.all([(a=s)[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 un.set(t,a),a}}}Jt=function(e){return qt(qt({},e),{},{get:function(t,n,r){return cn(t,n)||e.get(t,n,r)},has:function(t,n){return!!cn(t,n)||e.has(t,n)}})}(Jt);var ln=function(){function e(t){u(this,e),this.container=t}return h(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 fn="@firebase/app",hn="0.9.9",dn=new zt("@firebase/app"),pn="[DEFAULT]",vn=($e(rn={},fn,"fire-core"),$e(rn,"@firebase/app-compat","fire-core-compat"),$e(rn,"@firebase/analytics","fire-analytics"),$e(rn,"@firebase/analytics-compat","fire-analytics-compat"),$e(rn,"@firebase/app-check","fire-app-check"),$e(rn,"@firebase/app-check-compat","fire-app-check-compat"),$e(rn,"@firebase/auth","fire-auth"),$e(rn,"@firebase/auth-compat","fire-auth-compat"),$e(rn,"@firebase/database","fire-rtdb"),$e(rn,"@firebase/database-compat","fire-rtdb-compat"),$e(rn,"@firebase/functions","fire-fn"),$e(rn,"@firebase/functions-compat","fire-fn-compat"),$e(rn,"@firebase/installations","fire-iid"),$e(rn,"@firebase/installations-compat","fire-iid-compat"),$e(rn,"@firebase/messaging","fire-fcm"),$e(rn,"@firebase/messaging-compat","fire-fcm-compat"),$e(rn,"@firebase/performance","fire-perf"),$e(rn,"@firebase/performance-compat","fire-perf-compat"),$e(rn,"@firebase/remote-config","fire-rc"),$e(rn,"@firebase/remote-config-compat","fire-rc-compat"),$e(rn,"@firebase/storage","fire-gcs"),$e(rn,"@firebase/storage-compat","fire-gcs-compat"),$e(rn,"@firebase/firestore","fire-fst"),$e(rn,"@firebase/firestore-compat","fire-fst-compat"),$e(rn,"fire-js","fire-js"),$e(rn,"firebase","fire-js-all"),rn),mn=new Map,yn=new Map;function gn(e,t){try{e.container.addComponent(t)}catch(n){dn.debug("Component ".concat(t.name," failed to register with FirebaseApp ").concat(e.name),n)}}function kn(e){var t=e.name;if(yn.has(t))return dn.debug("There were multiple attempts to register component ".concat(t,".")),!1;yn.set(t,e);var n,r=_(mn.values());try{for(r.s();!(n=r.n()).done;){gn(n.value,e)}}catch(i){r.e(i)}finally{r.f()}return!0}function bn(e,t){var n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}var wn=($e(an={},"no-app","No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()"),$e(an,"bad-app-name","Illegal App name: '{$appName}"),$e(an,"duplicate-app","Firebase App named '{$appName}' already exists with different options or config"),$e(an,"app-deleted","Firebase App named '{$appName}' already deleted"),$e(an,"no-options","Need to provide options, when not being deployed to hosting via source."),$e(an,"invalid-app-argument","firebase.{$appName}() takes either no argument or a Firebase App instance."),$e(an,"invalid-log-argument","First argument to `onLog` must be null or a function."),$e(an,"idb-open","Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}."),$e(an,"idb-get","Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}."),$e(an,"idb-set","Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}."),$e(an,"idb-delete","Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."),an),xn=new pt("app","Firebase",wn),En=function(){function e(t,n,r){var i=this;u(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 At("app",(function(){return i}),"PUBLIC"))}return h(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 xn.create("app-deleted",{appName:this._name})}}]),e}(),_n="9.21.0";function Sn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e;"object"!==typeof t&&(t={name:t});var r=Object.assign({name:pn,automaticDataCollectionEnabled:!1},t),i=r.name;if("string"!==typeof i||!i)throw xn.create("bad-app-name",{appName:String(i)});if(n||(n=at()),!n)throw xn.create("no-options");var a=mn.get(i);if(a){if(yt(n,a.options)&&yt(r,a.config))return a;throw xn.create("duplicate-app",{appName:i})}var o,s=new Lt(i),u=_(yn.values());try{for(u.s();!(o=u.n()).done;){var c=o.value;s.addComponent(c)}}catch(f){u.e(f)}finally{u.f()}var l=new En(n,r,s);return mn.set(i,l),l}function Tn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pn,t=mn.get(e);if(!t&&e===pn)return Sn();if(!t)throw xn.create("no-app",{appName:e});return t}function Cn(e,t,n){var r,i=null!==(r=vn[e])&&void 0!==r?r:e;n&&(i+="-".concat(n));var a=i.match(/\s|\//),o=t.match(/\s|\//);if(a||o){var s=['Unable to register library "'.concat(i,'" with version "').concat(t,'":')];return a&&s.push('library name "'.concat(i,'" contains illegal characters (whitespace or "/")')),a&&o&&s.push("and"),o&&s.push('version name "'.concat(t,'" contains illegal characters (whitespace or "/")')),void dn.warn(s.join(" "))}kn(new At("".concat(i,"-version"),(function(){return{library:i,version:t}}),"VERSION"))}var In="firebase-heartbeat-database",Nn=1,An="firebase-heartbeat-store",Rn=null;function On(){return Rn||(Rn=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,s=indexedDB.open(e,t),u=tn(s);return i&&s.addEventListener("upgradeneeded",(function(e){i(tn(s.result),e.oldVersion,e.newVersion,tn(s.transaction),e)})),r&&s.addEventListener("blocked",(function(e){return r(e.oldVersion,e.newVersion,e)})),u.then((function(e){o&&e.addEventListener("close",(function(){return o()})),a&&e.addEventListener("versionchange",(function(e){return a(e.oldVersion,e.newVersion,e)}))})).catch((function(){})),u}(In,Nn,{upgrade:function(e,t){if(0===t)e.createObjectStore(An)}}).catch((function(e){throw xn.create("idb-open",{originalErrorMessage:e.message})}))),Rn}function Pn(e){return Dn.apply(this,arguments)}function Dn(){return Dn=Ue(Me().mark((function e(t){var n,r;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,On();case 3:return n=e.sent,e.abrupt("return",n.transaction(An).objectStore(An).get(Mn(t)));case 7:e.prev=7,e.t0=e.catch(0),e.t0 instanceof dt?dn.warn(e.t0.message):(r=xn.create("idb-get",{originalErrorMessage:null===e.t0||void 0===e.t0?void 0:e.t0.message}),dn.warn(r.message));case 10:case"end":return e.stop()}}),e,null,[[0,7]])}))),Dn.apply(this,arguments)}function Ln(e,t){return jn.apply(this,arguments)}function jn(){return jn=Ue(Me().mark((function e(t,n){var r,i,a,o;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,On();case 3:return r=e.sent,i=r.transaction(An,"readwrite"),a=i.objectStore(An),e.next=8,a.put(n,Mn(t));case 8:return e.abrupt("return",i.done);case 11:e.prev=11,e.t0=e.catch(0),e.t0 instanceof dt?dn.warn(e.t0.message):(o=xn.create("idb-set",{originalErrorMessage:null===e.t0||void 0===e.t0?void 0:e.t0.message}),dn.warn(o.message));case 14:case"end":return e.stop()}}),e,null,[[0,11]])}))),jn.apply(this,arguments)}function Mn(e){return"".concat(e.name,"!").concat(e.options.appId)}var Fn=function(){function e(t){var n=this;u(this,e),this.container=t,this._heartbeatsCache=null;var r=this.container.getProvider("app").getImmediate();this._storage=new Bn(r),this._heartbeatsCachePromise=this._storage.read().then((function(e){return n._heartbeatsCache=e,e}))}return h(e,[{key:"triggerHeartbeat",value:function(){var e=Ue(Me().mark((function e(){var t,n,r;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.container.getProvider("platform-logger").getImmediate(),n=t.getPlatformInfoString(),r=Un(),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=Ue(Me().mark((function e(){var t,n,r,i,a;return Me().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=Un(),n=Vn(this._heartbeatsCache.heartbeats),r=n.heartbeatsToSend,i=n.unsentEntries,a=Ze(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 Un(){return(new Date).toISOString().substring(0,10)}function Vn(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1024,r=[],i=e.slice(),a=_(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),qn(r)>n)return a.dates.pop(),"break"}else if(r.push({agent:e.agent,dates:[e.date]}),qn(r)>n)return r.pop(),"break";i=i.slice(1)};for(a.s();!(t=a.n()).done;){if("break"===o())break}}catch(s){a.e(s)}finally{a.f()}return{heartbeatsToSend:r,unsentEntries:i}}var zn,Bn=function(){function e(t){u(this,e),this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}return h(e,[{key:"runIndexedDBEnvironmentCheck",value:function(){var e=Ue(Me().mark((function e(){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ft()){e.next=4;break}return e.abrupt("return",!1);case 4:return e.abrupt("return",ht().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=Ue(Me().mark((function e(){var t;return Me().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,Pn(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)}}()},{key:"overwrite",value:function(){var e=Ue(Me().mark((function e(t){var n,r;return Me().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",Ln(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=Ue(Me().mark((function e(t){var n,r;return Me().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",Ln(this.app,{lastSentHeartbeatDate:null!==(n=t.lastSentHeartbeatDate)&&void 0!==n?n:r.lastSentHeartbeatDate,heartbeats:[].concat(s(r.heartbeats),s(t.heartbeats))}));case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();function qn(e){return Ze(JSON.stringify({version:2,heartbeats:e})).length}zn="",kn(new At("platform-logger",(function(e){return new ln(e)}),"PRIVATE")),kn(new At("heartbeat",(function(e){return new Fn(e)}),"PRIVATE")),Cn(fn,hn,zn),Cn(fn,hn,"esm2017"),Cn("fire-js","");Cn("firebase","9.21.0","app");var Hn,Wn="firebasestorage.googleapis.com",Kn="storageBucket",Gn=function(e){p(n,e);var t=g(n);function n(e,r){var i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return u(this,n),(i=t.call(this,Qn(e),"Firebase Storage: ".concat(r," (").concat(Qn(e),")"))).status_=a,i.customData={serverResponse:null},i._baseMessage=i.message,Object.setPrototypeOf(y(i),n.prototype),i}return h(n,[{key:"status",get:function(){return this.status_},set:function(e){this.status_=e}},{key:"_codeEquals",value:function(e){return Qn(e)===this.code}},{key:"serverResponse",get:function(){return this.customData.serverResponse},set:function(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message="".concat(this._baseMessage,"\n").concat(this.customData.serverResponse):this.message=this._baseMessage}}]),n}(dt);function Qn(e){return"storage/"+e}function $n(){return new Gn(Hn.UNKNOWN,"An unknown error occurred, please check the error payload for server response.")}function Xn(){return new Gn(Hn.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function Yn(){return new Gn(Hn.CANCELED,"User canceled the upload/download.")}function Jn(e){return new Gn(Hn.INVALID_ARGUMENT,e)}function Zn(){return new Gn(Hn.APP_DELETED,"The Firebase app was deleted.")}!function(e){e.UNKNOWN="unknown",e.OBJECT_NOT_FOUND="object-not-found",e.BUCKET_NOT_FOUND="bucket-not-found",e.PROJECT_NOT_FOUND="project-not-found",e.QUOTA_EXCEEDED="quota-exceeded",e.UNAUTHENTICATED="unauthenticated",e.UNAUTHORIZED="unauthorized",e.UNAUTHORIZED_APP="unauthorized-app",e.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",e.INVALID_CHECKSUM="invalid-checksum",e.CANCELED="canceled",e.INVALID_EVENT_NAME="invalid-event-name",e.INVALID_URL="invalid-url",e.INVALID_DEFAULT_BUCKET="invalid-default-bucket",e.NO_DEFAULT_BUCKET="no-default-bucket",e.CANNOT_SLICE_BLOB="cannot-slice-blob",e.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",e.NO_DOWNLOAD_URL="no-download-url",e.INVALID_ARGUMENT="invalid-argument",e.INVALID_ARGUMENT_COUNT="invalid-argument-count",e.APP_DELETED="app-deleted",e.INVALID_ROOT_OPERATION="invalid-root-operation",e.INVALID_FORMAT="invalid-format",e.INTERNAL_ERROR="internal-error",e.UNSUPPORTED_ENVIRONMENT="unsupported-environment"}(Hn||(Hn={}));var er,tr=function(){function e(t,n){u(this,e),this.bucket=t,this.path_=n}return h(e,[{key:"path",get:function(){return this.path_}},{key:"isRoot",get:function(){return 0===this.path.length}},{key:"fullServerUrl",value:function(){var e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)}},{key:"bucketOnlyServerUrl",value:function(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}}],[{key:"makeFromBucketSpec",value:function(t,n){var r,i;try{r=e.makeFromUrl(t,n)}catch(a){return new e(t,"")}if(""===r.path)return r;throw i=t,new Gn(Hn.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+i+"'.")}},{key:"makeFromUrl",value:function(t,n){var r=null,i="([A-Za-z0-9.\\-_]+)";var a=new RegExp("^gs://"+i+"(/(.*))?$","i");function o(e){e.path_=decodeURIComponent(e.path)}for(var s=n.replace(/[.]/g,"\\."),u=[{regex:a,indices:{bucket:1,path:3},postModify:function(e){"/"===e.path.charAt(e.path.length-1)&&(e.path_=e.path_.slice(0,-1))}},{regex:new RegExp("^https?://".concat(s,"/").concat("v[A-Za-z0-9_]+","/b/").concat(i,"/o").concat("(/([^?#]*).*)?$"),"i"),indices:{bucket:1,path:3},postModify:o},{regex:new RegExp("^https?://".concat(n===Wn?"(?:storage.googleapis.com|storage.cloud.google.com)":n,"/").concat(i,"/").concat("([^?#]*)"),"i"),indices:{bucket:1,path:2},postModify:o}],c=0;c<u.length;c++){var l=u[c],f=l.regex.exec(t);if(f){var h=f[l.indices.bucket],d=f[l.indices.path];d||(d=""),r=new e(h,d),l.postModify(r);break}}if(null==r)throw function(e){return new Gn(Hn.INVALID_URL,"Invalid URL '"+e+"'.")}(t);return r}}]),e}(),nr=function(){function e(t){u(this,e),this.promise_=Promise.reject(t)}return h(e,[{key:"getPromise",value:function(){return this.promise_}},{key:"cancel",value:function(){}}]),e}();function rr(e,t,n,r){if(r<t)throw Jn("Invalid value for '".concat(e,"'. Expected ").concat(t," or greater."));if(r>n)throw Jn("Invalid value for '".concat(e,"'. Expected ").concat(n," or less."))}function ir(e){var t=encodeURIComponent,n="?";for(var r in e){if(e.hasOwnProperty(r))n=n+(t(r)+"="+t(e[r]))+"&"}return n=n.slice(0,-1)}function ar(e,t){var n=e>=500&&e<600,r=-1!==[408,429].indexOf(e),i=-1!==t.indexOf(e);return n||r||i}!function(e){e[e.NO_ERROR=0]="NO_ERROR",e[e.NETWORK_ERROR=1]="NETWORK_ERROR",e[e.ABORT=2]="ABORT"}(er||(er={}));var or=function(){function e(t,n,r,i,a,o,s,c,l,f,h){var d=this,p=!(arguments.length>11&&void 0!==arguments[11])||arguments[11];u(this,e),this.url_=t,this.method_=n,this.headers_=r,this.body_=i,this.successCodes_=a,this.additionalRetryCodes_=o,this.callback_=s,this.errorCallback_=c,this.timeout_=l,this.progressCallback_=f,this.connectionFactory_=h,this.retry=p,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((function(e,t){d.resolve_=e,d.reject_=t,d.start_()}))}return h(e,[{key:"start_",value:function(){var e=this,t=function(t,n){var r=e.resolve_,i=e.reject_,a=n.connection;if(n.wasSuccessCode)try{var o=e.callback_(a,a.getResponse());!function(e){return void 0!==e}(o)?r():r(o)}catch(u){i(u)}else if(null!==a){var s=$n();s.serverResponse=a.getErrorText(),e.errorCallback_?i(e.errorCallback_(a,s)):i(s)}else{if(n.canceled)i(e.appDelete_?Zn():Yn());else i(Xn())}};this.canceled_?t(0,new sr(!1,null,!0)):this.backoffId_=function(e,t,n){var r=1,i=null,a=null,o=!1,s=0;function u(){return 2===s}var c=!1;function l(){if(!c){c=!0;for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.apply(null,n)}}function f(t){i=setTimeout((function(){i=null,e(d,u())}),t)}function h(){a&&clearTimeout(a)}function d(e){if(c)h();else{for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];if(e)return h(),void l.call.apply(l,[null,e].concat(n));var a;if(u()||o)return h(),void l.call.apply(l,[null,e].concat(n));r<64&&(r*=2),1===s?(s=2,a=0):a=1e3*(r+Math.random()),f(a)}}var p=!1;function v(e){p||(p=!0,h(),c||(null!==i?(e||(s=2),clearTimeout(i),f(0)):e||(s=1)))}return f(0),a=setTimeout((function(){o=!0,v(!0)}),n),v}((function(t,n){if(n)t(!1,new sr(!1,null,!0));else{var r=e.connectionFactory_();e.pendingConnection_=r;var i=function(t){var n=t.loaded,r=t.lengthComputable?t.total:-1;null!==e.progressCallback_&&e.progressCallback_(n,r)};null!==e.progressCallback_&&r.addUploadProgressListener(i),r.send(e.url_,e.method_,e.body_,e.headers_).then((function(){null!==e.progressCallback_&&r.removeUploadProgressListener(i),e.pendingConnection_=null;var n=r.getErrorCode()===er.NO_ERROR,a=r.getStatus();if(!n||ar(a,e.additionalRetryCodes_)&&e.retry){var o=r.getErrorCode()===er.ABORT;t(!1,new sr(!1,null,o))}else{var s=-1!==e.successCodes_.indexOf(a);t(!0,new sr(s,r))}}))}}),t,this.timeout_)}},{key:"getPromise",value:function(){return this.promise_}},{key:"cancel",value:function(e){this.canceled_=!0,this.appDelete_=e||!1,null!==this.backoffId_&&function(e){e(!1)}(this.backoffId_),null!==this.pendingConnection_&&this.pendingConnection_.abort()}}]),e}(),sr=h((function e(t,n,r){u(this,e),this.wasSuccessCode=t,this.connection=n,this.canceled=!!r}));function ur(e){var t=e.lastIndexOf("/",e.length-2);return-1===t?e:e.slice(t+1)}var cr=function(){function e(t,n){u(this,e),this._service=t,this._location=n instanceof tr?n:tr.makeFromUrl(n,t.host)}return h(e,[{key:"toString",value:function(){return"gs://"+this._location.bucket+"/"+this._location.path}},{key:"_newRef",value:function(t,n){return new e(t,n)}},{key:"root",get:function(){var e=new tr(this._location.bucket,"");return this._newRef(this._service,e)}},{key:"bucket",get:function(){return this._location.bucket}},{key:"fullPath",get:function(){return this._location.path}},{key:"name",get:function(){return ur(this._location.path)}},{key:"storage",get:function(){return this._service}},{key:"parent",get:function(){var t=function(e){if(0===e.length)return null;var t=e.lastIndexOf("/");return-1===t?"":e.slice(0,t)}(this._location.path);if(null===t)return null;var n=new tr(this._location.bucket,t);return new e(this._service,n)}},{key:"_throwIfRoot",value:function(e){if(""===this._location.path)throw function(e){return new Gn(Hn.INVALID_ROOT_OPERATION,"The operation '"+e+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}(e)}}]),e}();function lr(e,t){var n=null===t||void 0===t?void 0:t[Kn];return null==n?null:tr.makeFromBucketSpec(n,e)}var fr=function(){function e(t,n,r,i,a){u(this,e),this.app=t,this._authProvider=n,this._appCheckProvider=r,this._url=i,this._firebaseVersion=a,this._bucket=null,this._host=Wn,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,this._bucket=null!=i?tr.makeFromBucketSpec(i,this._host):lr(this._host,this.app.options)}return h(e,[{key:"host",get:function(){return this._host},set:function(e){this._host=e,null!=this._url?this._bucket=tr.makeFromBucketSpec(this._url,e):this._bucket=lr(e,this.app.options)}},{key:"maxUploadRetryTime",get:function(){return this._maxUploadRetryTime},set:function(e){rr("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}},{key:"maxOperationRetryTime",get:function(){return this._maxOperationRetryTime},set:function(e){rr("time",0,Number.POSITIVE_INFINITY,e),this._maxOperationRetryTime=e}},{key:"_getAuthToken",value:function(){var e=Ue(Me().mark((function e(){var t,n;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._overrideAuthToken){e.next=2;break}return e.abrupt("return",this._overrideAuthToken);case 2:if(!(t=this._authProvider.getImmediate({optional:!0}))){e.next=9;break}return e.next=6,t.getToken();case 6:if(null===(n=e.sent)){e.next=9;break}return e.abrupt("return",n.accessToken);case 9:return e.abrupt("return",null);case 10:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_getAppCheckToken",value:function(){var e=Ue(Me().mark((function e(){var t,n;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=this._appCheckProvider.getImmediate({optional:!0}))){e.next=6;break}return e.next=4,t.getToken();case 4:return n=e.sent,e.abrupt("return",n.token);case 6:return e.abrupt("return",null);case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_delete",value:function(){return this._deleted||(this._deleted=!0,this._requests.forEach((function(e){return e.cancel()})),this._requests.clear()),Promise.resolve()}},{key:"_makeStorageReference",value:function(e){return new cr(this,e)}},{key:"_makeRequest",value:function(e,t,n,r){var i=this,a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(this._deleted)return new nr(Zn());var o=function(e,t,n,r,i,a){var o=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],s=ir(e.urlParams),u=e.url+s,c=Object.assign({},e.headers);return function(e,t){t&&(e["X-Firebase-GMPID"]=t)}(c,t),function(e,t){null!==t&&t.length>0&&(e.Authorization="Firebase "+t)}(c,n),function(e,t){e["X-Firebase-Storage-Version"]="webjs/"+(null!==t&&void 0!==t?t:"AppManager")}(c,a),function(e,t){null!==t&&(e["X-Firebase-AppCheck"]=t)}(c,r),new or(u,e.method,c,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,i,o)}(e,this._appId,n,r,t,this._firebaseVersion,a);return this._requests.add(o),o.getPromise().then((function(){return i._requests.delete(o)}),(function(){return i._requests.delete(o)})),o}},{key:"makeRequestWithTokens",value:function(){var e=Ue(Me().mark((function e(t,n){var r,i,a,o;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([this._getAuthToken(),this._getAppCheckToken()]);case 2:return r=e.sent,i=E(r,2),a=i[0],o=i[1],e.abrupt("return",this._makeRequest(t,n,a,o).getPromise());case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}]),e}(),hr="@firebase/storage",dr="0.11.2",pr="storage";function vr(e,t,n){!function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};e.host="".concat(t,":").concat(n),e._protocol="http";var i=r.mockUserToken;i&&(e._overrideAuthToken="string"===typeof i?i:ut(i,e.app.options.projectId))}(e,t,n,arguments.length>3&&void 0!==arguments[3]?arguments[3]:{})}function mr(e,t){var n=t.instanceIdentifier,r=e.getProvider("app").getImmediate(),i=e.getProvider("auth-internal"),a=e.getProvider("app-check-internal");return new fr(r,i,a,n,_n)}kn(new At(pr,mr,"PUBLIC").setMultipleInstances(!0)),Cn(hr,dr,""),Cn(hr,dr,"esm2017");var yr,gr,kr=function(e,t){return t.some((function(t){return e instanceof t}))};var br=new WeakMap,wr=new WeakMap,xr=new WeakMap,Er=new WeakMap,_r=new WeakMap;var Sr={get:function(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return wr.get(e);if("objectStoreNames"===t)return e.objectStoreNames||xr.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Ir(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 Tr(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(gr||(gr=[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(Nr(this),n),Ir(br.get(this))}:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ir(e.apply(Nr(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,[Nr(this),t].concat(r));return xr.set(a,t.sort?t.sort():[t]),Ir(a)}}function Cr(e){return"function"===typeof e?Tr(e):(e instanceof IDBTransaction&&function(e){if(!wr.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)}));wr.set(e,t)}}(e),kr(e,yr||(yr=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,Sr):e)}function Ir(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(Ir(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&&br.set(t,e)})).catch((function(){})),_r.set(t,e),t}(e);if(Er.has(e))return Er.get(e);var t=Cr(e);return t!==e&&(Er.set(e,t),_r.set(t,e)),t}var Nr=function(e){return _r.get(e)};var Ar,Rr=["get","getKey","getAll","getAllKeys","count"],Or=["put","add","delete","clear"],Pr=new Map;function Dr(e,t){if(e instanceof IDBDatabase&&!(t in e)&&"string"===typeof t){if(Pr.get(t))return Pr.get(t);var n=t.replace(/FromIndex$/,""),r=t!==n,i=Or.includes(n);if(n in(r?IDBIndex:IDBObjectStore).prototype&&(i||Rr.includes(n))){var a=function(){var e=Ue(Me().mark((function e(t){var a,o,s,u,c,l,f=arguments;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(o=this.transaction(t,i?"readwrite":"readonly"),s=o.store,u=f.length,c=new Array(u>1?u-1:0),l=1;l<u;l++)c[l-1]=f[l];return r&&(s=s.index(c.shift())),e.next=6,Promise.all([(a=s)[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 Pr.set(t,a),a}}}!function(e){Sr=e(Sr)}((function(e){return qt(qt({},e),{},{get:function(t,n,r){return Dr(t,n)||e.get(t,n,r)},has:function(t,n){return!!Dr(t,n)||e.has(t,n)}})}));var Lr="@firebase/installations",jr="0.6.4",Mr=1e4,Fr="w:".concat(jr),Ur="FIS_v2",Vr="https://firebaseinstallations.googleapis.com/v1",zr=36e5,Br=($e(Ar={},"missing-app-config-values",'Missing App configuration value: "{$valueName}"'),$e(Ar,"not-registered","Firebase Installation is not registered."),$e(Ar,"installation-not-found","Firebase Installation not found."),$e(Ar,"request-failed",'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"'),$e(Ar,"app-offline","Could not process request. Application offline."),$e(Ar,"delete-pending-registration","Can't delete installation while there is a pending registration request."),Ar),qr=new pt("installations","Installations",Br);function Hr(e){return e instanceof dt&&e.code.includes("request-failed")}function Wr(e){var t=e.projectId;return"".concat(Vr,"/projects/").concat(t,"/installations")}function Kr(e){return{token:e.token,requestStatus:2,expiresIn:(t=e.expiresIn,Number(t.replace("s","000"))),creationTime:Date.now()};var t}function Gr(e,t){return Qr.apply(this,arguments)}function Qr(){return(Qr=Ue(Me().mark((function e(t,n){var r,i;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.json();case 2:return r=e.sent,i=r.error,e.abrupt("return",qr.create("request-failed",{requestName:t,serverCode:i.code,serverMessage:i.message,serverStatus:i.status}));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function $r(e){var t=e.apiKey;return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t})}function Xr(e,t){var n=t.refreshToken,r=$r(e);return r.append("Authorization",function(e){return"".concat(Ur," ").concat(e)}(n)),r}function Yr(e){return Jr.apply(this,arguments)}function Jr(){return Jr=Ue(Me().mark((function e(t){var n;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t();case 2:if(!((n=e.sent).status>=500&&n.status<600)){e.next=5;break}return e.abrupt("return",t());case 5:return e.abrupt("return",n);case 6:case"end":return e.stop()}}),e)}))),Jr.apply(this,arguments)}function Zr(e,t){return ei.apply(this,arguments)}function ei(){return(ei=Ue(Me().mark((function e(t,n){var r,i,a,o,s,u,c,l,f,h,d,p;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.appConfig,i=t.heartbeatServiceProvider,a=n.fid,o=Wr(r),s=$r(r),!(u=i.getImmediate({optional:!0}))){e.next=10;break}return e.next=8,u.getHeartbeatsHeader();case 8:(c=e.sent)&&s.append("x-firebase-client",c);case 10:return l={fid:a,authVersion:Ur,appId:r.appId,sdkVersion:Fr},f={method:"POST",headers:s,body:JSON.stringify(l)},e.next=14,Yr((function(){return fetch(o,f)}));case 14:if(!(h=e.sent).ok){e.next=23;break}return e.next=18,h.json();case 18:return d=e.sent,p={fid:d.fid||a,registrationStatus:2,refreshToken:d.refreshToken,authToken:Kr(d.authToken)},e.abrupt("return",p);case 23:return e.next=25,Gr("Create Installation",h);case 25:throw e.sent;case 26:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ti(e){return new Promise((function(t){setTimeout(t,e)}))}var ni=/^[cdef][\w-]{21}$/,ri="";function ii(){try{var e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;var t=function(e){var t=(n=e,btoa(String.fromCharCode.apply(String,s(n))).replace(/\+/g,"-").replace(/\//g,"_"));var n;return t.substr(0,22)}(e);return ni.test(t)?t:ri}catch(n){return ri}}function ai(e){return"".concat(e.appName,"!").concat(e.appId)}var oi=new Map;function si(e,t){var n=ai(e);ui(n,t),function(e,t){var n=li();n&&n.postMessage({key:e,fid:t});fi()}(n,t)}function ui(e,t){var n=oi.get(e);if(n){var r,i=_(n);try{for(i.s();!(r=i.n()).done;){(0,r.value)(t)}}catch(a){i.e(a)}finally{i.f()}}}var ci=null;function li(){return!ci&&"BroadcastChannel"in self&&((ci=new BroadcastChannel("[Firebase] FID Change")).onmessage=function(e){ui(e.data.key,e.data.fid)}),ci}function fi(){0===oi.size&&ci&&(ci.close(),ci=null)}var hi="firebase-installations-database",di=1,pi="firebase-installations-store",vi=null;function mi(){return vi||(vi=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,s=indexedDB.open(e,t),u=Ir(s);return i&&s.addEventListener("upgradeneeded",(function(e){i(Ir(s.result),e.oldVersion,e.newVersion,Ir(s.transaction))})),r&&s.addEventListener("blocked",(function(){return r()})),u.then((function(e){o&&e.addEventListener("close",(function(){return o()})),a&&e.addEventListener("versionchange",(function(){return a()}))})).catch((function(){})),u}(hi,di,{upgrade:function(e,t){if(0===t)e.createObjectStore(pi)}})),vi}function yi(e,t){return gi.apply(this,arguments)}function gi(){return gi=Ue(Me().mark((function e(t,n){var r,i,a,o,s;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=ai(t),e.next=3,mi();case 3:return i=e.sent,a=i.transaction(pi,"readwrite"),o=a.objectStore(pi),e.next=8,o.get(r);case 8:return s=e.sent,e.next=11,o.put(n,r);case 11:return e.next=13,a.done;case 13:return s&&s.fid===n.fid||si(t,n.fid),e.abrupt("return",n);case 15:case"end":return e.stop()}}),e)}))),gi.apply(this,arguments)}function ki(e){return bi.apply(this,arguments)}function bi(){return bi=Ue(Me().mark((function e(t){var n,r,i;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=ai(t),e.next=3,mi();case 3:return r=e.sent,i=r.transaction(pi,"readwrite"),e.next=7,i.objectStore(pi).delete(n);case 7:return e.next=9,i.done;case 9:case"end":return e.stop()}}),e)}))),bi.apply(this,arguments)}function wi(e,t){return xi.apply(this,arguments)}function xi(){return xi=Ue(Me().mark((function e(t,n){var r,i,a,o,s,u;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=ai(t),e.next=3,mi();case 3:return i=e.sent,a=i.transaction(pi,"readwrite"),o=a.objectStore(pi),e.next=8,o.get(r);case 8:if(s=e.sent,void 0!==(u=n(s))){e.next=15;break}return e.next=13,o.delete(r);case 13:e.next=17;break;case 15:return e.next=17,o.put(u,r);case 17:return e.next=19,a.done;case 19:return!u||s&&s.fid===u.fid||si(t,u.fid),e.abrupt("return",u);case 21:case"end":return e.stop()}}),e)}))),xi.apply(this,arguments)}function Ei(e){return _i.apply(this,arguments)}function _i(){return(_i=Ue(Me().mark((function e(t){var n,r;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wi(t.appConfig,(function(e){var r=Si(e),i=Ti(t,r);return n=i.registrationPromise,i.installationEntry}));case 2:if((r=e.sent).fid!==ri){e.next=8;break}return e.next=6,n;case 6:return e.t0=e.sent,e.abrupt("return",{installationEntry:e.t0});case 8:return e.abrupt("return",{installationEntry:r,registrationPromise:n});case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Si(e){return Ri(e||{fid:ii(),registrationStatus:0})}function Ti(e,t){if(0===t.registrationStatus){if(!navigator.onLine)return{installationEntry:t,registrationPromise:Promise.reject(qr.create("app-offline"))};var n={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},r=function(e,t){return Ci.apply(this,arguments)}(e,n);return{installationEntry:n,registrationPromise:r}}return 1===t.registrationStatus?{installationEntry:t,registrationPromise:Ii(e)}:{installationEntry:t}}function Ci(){return(Ci=Ue(Me().mark((function e(t,n){var r;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Zr(t,n);case 3:return r=e.sent,e.abrupt("return",yi(t.appConfig,r));case 7:if(e.prev=7,e.t0=e.catch(0),!Hr(e.t0)||409!==e.t0.customData.serverCode){e.next=14;break}return e.next=12,ki(t.appConfig);case 12:e.next=16;break;case 14:return e.next=16,yi(t.appConfig,{fid:n.fid,registrationStatus:0});case 16:throw e.t0;case 17:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)}function Ii(e){return Ni.apply(this,arguments)}function Ni(){return(Ni=Ue(Me().mark((function e(t){var n,r,i,a;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ai(t.appConfig);case 2:n=e.sent;case 3:if(1!==n.registrationStatus){e.next=11;break}return e.next=6,ti(100);case 6:return e.next=8,Ai(t.appConfig);case 8:n=e.sent,e.next=3;break;case 11:if(0!==n.registrationStatus){e.next=22;break}return e.next=14,Ei(t);case 14:if(r=e.sent,i=r.installationEntry,!(a=r.registrationPromise)){e.next=21;break}return e.abrupt("return",a);case 21:return e.abrupt("return",i);case 22:return e.abrupt("return",n);case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ai(e){return wi(e,(function(e){if(!e)throw qr.create("installation-not-found");return Ri(e)}))}function Ri(e){return 1===(t=e).registrationStatus&&t.registrationTime+Mr<Date.now()?{fid:e.fid,registrationStatus:0}:e;var t}function Oi(e,t){return Pi.apply(this,arguments)}function Pi(){return(Pi=Ue(Me().mark((function e(t,n){var r,i,a,o,s,u,c,l,f,h,d;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.appConfig,i=t.heartbeatServiceProvider,a=Di(r,n),o=Xr(r,n),!(s=i.getImmediate({optional:!0}))){e.next=9;break}return e.next=7,s.getHeartbeatsHeader();case 7:(u=e.sent)&&o.append("x-firebase-client",u);case 9:return c={installation:{sdkVersion:Fr,appId:r.appId}},l={method:"POST",headers:o,body:JSON.stringify(c)},e.next=13,Yr((function(){return fetch(a,l)}));case 13:if(!(f=e.sent).ok){e.next=22;break}return e.next=17,f.json();case 17:return h=e.sent,d=Kr(h),e.abrupt("return",d);case 22:return e.next=24,Gr("Generate Auth Token",f);case 24:throw e.sent;case 25:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Di(e,t){var n=t.fid;return"".concat(Wr(e),"/").concat(n,"/authTokens:generate")}function Li(e){return ji.apply(this,arguments)}function ji(){return ji=Ue(Me().mark((function e(t){var n,r,i,a,o=arguments;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.length>1&&void 0!==o[1]&&o[1],e.next=3,wi(t.appConfig,(function(e){if(!Bi(e))throw qr.create("not-registered");var i=e.authToken;if(!n&&qi(i))return e;if(1===i.requestStatus)return r=Mi(t,n),e;if(!navigator.onLine)throw qr.create("app-offline");var a=Hi(e);return r=Vi(t,a),a}));case 3:if(i=e.sent,!r){e.next=10;break}return e.next=7,r;case 7:e.t0=e.sent,e.next=11;break;case 10:e.t0=i.authToken;case 11:return a=e.t0,e.abrupt("return",a);case 13:case"end":return e.stop()}}),e)}))),ji.apply(this,arguments)}function Mi(e,t){return Fi.apply(this,arguments)}function Fi(){return(Fi=Ue(Me().mark((function e(t,n){var r,i;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ui(t.appConfig);case 2:r=e.sent;case 3:if(1!==r.authToken.requestStatus){e.next=11;break}return e.next=6,ti(100);case 6:return e.next=8,Ui(t.appConfig);case 8:r=e.sent,e.next=3;break;case 11:if(0!==(i=r.authToken).requestStatus){e.next=16;break}return e.abrupt("return",Li(t,n));case 16:return e.abrupt("return",i);case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ui(e){return wi(e,(function(e){if(!Bi(e))throw qr.create("not-registered");var t,n=e.authToken;return 1===(t=n).requestStatus&&t.requestTime+Mr<Date.now()?Object.assign(Object.assign({},e),{authToken:{requestStatus:0}}):e}))}function Vi(e,t){return zi.apply(this,arguments)}function zi(){return(zi=Ue(Me().mark((function e(t,n){var r,i,a;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Oi(t,n);case 3:return r=e.sent,i=Object.assign(Object.assign({},n),{authToken:r}),e.next=7,yi(t.appConfig,i);case 7:return e.abrupt("return",r);case 10:if(e.prev=10,e.t0=e.catch(0),!Hr(e.t0)||401!==e.t0.customData.serverCode&&404!==e.t0.customData.serverCode){e.next=17;break}return e.next=15,ki(t.appConfig);case 15:e.next=20;break;case 17:return a=Object.assign(Object.assign({},n),{authToken:{requestStatus:0}}),e.next=20,yi(t.appConfig,a);case 20:throw e.t0;case 21:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function Bi(e){return void 0!==e&&2===e.registrationStatus}function qi(e){return 2===e.requestStatus&&!function(e){var t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+zr}(e)}function Hi(e){var t={requestStatus:1,requestTime:Date.now()};return Object.assign(Object.assign({},e),{authToken:t})}function Wi(){return(Wi=Ue(Me().mark((function e(t){var n,r,i,a;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t,e.next=3,Ei(n);case 3:return r=e.sent,i=r.installationEntry,(a=r.registrationPromise)?a.catch(console.error):Li(n).catch(console.error),e.abrupt("return",i.fid);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ki(){return Ki=Ue(Me().mark((function e(t){var n,r,i,a=arguments;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]&&a[1],r=t,e.next=4,Gi(r);case 4:return e.next=6,Li(r,n);case 6:return i=e.sent,e.abrupt("return",i.token);case 8:case"end":return e.stop()}}),e)}))),Ki.apply(this,arguments)}function Gi(e){return Qi.apply(this,arguments)}function Qi(){return(Qi=Ue(Me().mark((function e(t){var n,r;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ei(t);case 2:if(n=e.sent,!(r=n.registrationPromise)){e.next=7;break}return e.next=7,r;case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function $i(e){return qr.create("missing-app-config-values",{valueName:e})}var Xi,Yi="installations",Ji=function(e){var t=e.getProvider("app").getImmediate(),n=function(e){if(!e||!e.options)throw $i("App Configuration");if(!e.name)throw $i("App Name");for(var t=0,n=["projectId","apiKey","appId"];t<n.length;t++){var r=n[t];if(!e.options[r])throw $i(r)}return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t);return{app:t,appConfig:n,heartbeatServiceProvider:bn(t,"heartbeat"),_delete:function(){return Promise.resolve()}}},Zi=function(e){var t=bn(e.getProvider("app").getImmediate(),Yi).getImmediate(),n={getId:function(){return function(e){return Wi.apply(this,arguments)}(t)},getToken:function(e){return function(e){return Ki.apply(this,arguments)}(t,e)}};return n};kn(new At(Yi,Ji,"PUBLIC")),kn(new At("installations-internal",Zi,"PRIVATE")),Cn(Lr,jr),Cn(Lr,jr,"esm2017");var ea="analytics",ta="firebase_id",na="origin",ra=6e4,ia="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig",aa="https://www.googletagmanager.com/gtag/js",oa=new zt("@firebase/analytics"),sa=($e(Xi={},"already-exists","A Firebase Analytics instance with the appId {$id}  already exists. Only one Firebase Analytics instance can be created for each appId."),$e(Xi,"already-initialized","initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-intialized instance."),$e(Xi,"already-initialized-settings","Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect."),$e(Xi,"interop-component-reg-failed","Firebase Analytics Interop Component failed to instantiate: {$reason}"),$e(Xi,"invalid-analytics-context","Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}"),$e(Xi,"indexeddb-unavailable","IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}"),$e(Xi,"fetch-throttle","The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}."),$e(Xi,"config-fetch-failed","Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}"),$e(Xi,"no-api-key",'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.'),$e(Xi,"no-app-id",'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.'),$e(Xi,"no-client-id",'The "client_id" field is empty.'),$e(Xi,"invalid-gtag-resource","Trusted Types detected an invalid gtag resource: {$gtagURL}."),Xi),ua=new pt("analytics","Analytics",sa);function ca(e){if(!e.startsWith(aa)){var t=ua.create("invalid-gtag-resource",{gtagURL:e});return oa.warn(t.message),""}return e}function la(e){return Promise.all(e.map((function(e){return e.catch((function(e){return e}))})))}function fa(e,t){var n=function(e,t){var n;return window.trustedTypes&&(n=window.trustedTypes.createPolicy(e,t)),n}("firebase-js-sdk-policy",{createScriptURL:ca}),r=document.createElement("script"),i="".concat(aa,"?l=").concat(e,"&id=").concat(t);r.src=n?null===n||void 0===n?void 0:n.createScriptURL(i):i,r.async=!0,document.head.appendChild(r)}function ha(e,t,n,r,i,a){return da.apply(this,arguments)}function da(){return da=Ue(Me().mark((function e(t,n,r,i,a,o){var s,u,c;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=i[a],e.prev=1,!s){e.next=7;break}return e.next=5,n[s];case 5:e.next=14;break;case 7:return e.next=9,la(r);case 9:if(u=e.sent,!(c=u.find((function(e){return e.measurementId===a})))){e.next=14;break}return e.next=14,n[c.appId];case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(1),oa.error(e.t0);case 19:t("config",a,o);case 20:case"end":return e.stop()}}),e,null,[[1,16]])}))),da.apply(this,arguments)}function pa(e,t,n,r,i){return va.apply(this,arguments)}function va(){return va=Ue(Me().mark((function e(t,n,r,i,a){var o,s,u,c,l,f;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,o=[],!a||!a.send_to){e.next=27;break}return s=a.send_to,Array.isArray(s)||(s=[s]),e.next=7,la(r);case 7:u=e.sent,c=_(s),e.prev=9,f=Me().mark((function e(){var t,r,i;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=l.value,r=u.find((function(e){return e.measurementId===t})),!(i=r&&n[r.appId])){e.next=7;break}o.push(i),e.next=9;break;case 7:return o=[],e.abrupt("return","break");case 9:case"end":return e.stop()}}),e)})),c.s();case 12:if((l=c.n()).done){e.next=19;break}return e.delegateYield(f(),"t0",14);case 14:if("break"!==e.t0){e.next=17;break}return e.abrupt("break",19);case 17:e.next=12;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(9),c.e(e.t1);case 24:return e.prev=24,c.f(),e.finish(24);case 27:return 0===o.length&&(o=Object.values(n)),e.next=30,Promise.all(o);case 30:t("event",i,a||{}),e.next=36;break;case 33:e.prev=33,e.t2=e.catch(0),oa.error(e.t2);case 36:case"end":return e.stop()}}),e,null,[[0,33],[9,21,24,27]])}))),va.apply(this,arguments)}function ma(e,t,n,r,i){var a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];window[r].push(arguments)};return window[i]&&"function"===typeof window[i]&&(a=window[i]),window[i]=function(e,t,n,r){function i(){return i=Ue(Me().mark((function i(a){var o,s,u,c,l,f,h,d,p,v,m,y,g=arguments;return Me().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:for(i.prev=0,o=g.length,s=new Array(o>1?o-1:0),u=1;u<o;u++)s[u-1]=g[u];if("event"!==a){i.next=8;break}return c=s[0],l=s[1],i.next=6,pa(e,t,n,c,l);case 6:i.next=15;break;case 8:if("config"!==a){i.next=14;break}return f=s[0],h=s[1],i.next=12,ha(e,t,n,r,f,h);case 12:i.next=15;break;case 14:"consent"===a?(d=s[0],e("consent","update",d)):"get"===a?(p=s[0],v=s[1],m=s[2],e("get",p,v,m)):"set"===a?(y=s[0],e("set",y)):e.apply(void 0,[a].concat(s));case 15:i.next=20;break;case 17:i.prev=17,i.t0=i.catch(0),oa.error(i.t0);case 20:case"end":return i.stop()}}),i,null,[[0,17]])}))),i.apply(this,arguments)}return function(e){return i.apply(this,arguments)}}(a,e,t,n),{gtagCore:a,wrappedGtag:window[i]}}function ya(e){for(var t=window.document.getElementsByTagName("script"),n=0,r=Object.values(t);n<r.length;n++){var i=r[n];if(i.src&&i.src.includes(aa)&&i.src.includes(e))return i}return null}var ga=30,ka=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;u(this,e),this.throttleMetadata=t,this.intervalMillis=n}return h(e,[{key:"getThrottleMetadata",value:function(e){return this.throttleMetadata[e]}},{key:"setThrottleMetadata",value:function(e,t){this.throttleMetadata[e]=t}},{key:"deleteThrottleMetadata",value:function(e){delete this.throttleMetadata[e]}}]),e}(),ba=new ka;function wa(e){return new Headers({Accept:"application/json","x-goog-api-key":e})}function xa(e){return Ea.apply(this,arguments)}function Ea(){return Ea=Ue(Me().mark((function e(t){var n,r,i,a,o,s,u,c;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.appId,i=t.apiKey,a={method:"GET",headers:wa(i)},o=ia.replace("{app-id}",r),e.next=5,fetch(o,a);case 5:if(200===(s=e.sent).status||304===s.status){e.next=18;break}return u="",e.prev=8,e.next=11,s.json();case 11:c=e.sent,(null===(n=c.error)||void 0===n?void 0:n.message)&&(u=c.error.message),e.next=17;break;case 15:e.prev=15,e.t0=e.catch(8);case 17:throw ua.create("config-fetch-failed",{httpStatus:s.status,responseMessage:u});case 18:return e.abrupt("return",s.json());case 19:case"end":return e.stop()}}),e,null,[[8,15]])}))),Ea.apply(this,arguments)}function _a(e){return Sa.apply(this,arguments)}function Sa(){return Sa=Ue(Me().mark((function e(t){var n,r,i,a,o,s,u,c,l=arguments;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=l.length>1&&void 0!==l[1]?l[1]:ba,r=l.length>2?l[2]:void 0,i=t.options,a=i.appId,o=i.apiKey,s=i.measurementId,a){e.next=5;break}throw ua.create("no-app-id");case 5:if(o){e.next=9;break}if(!s){e.next=8;break}return e.abrupt("return",{measurementId:s,appId:a});case 8:throw ua.create("no-api-key");case 9:return u=n.getThrottleMetadata(a)||{backoffCount:0,throttleEndTimeMillis:Date.now()},c=new Oa,setTimeout(Ue(Me().mark((function e(){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c.abort();case 1:case"end":return e.stop()}}),e)}))),void 0!==r?r:ra),e.abrupt("return",Ta({appId:a,apiKey:o,measurementId:s},u,c,n));case 13:case"end":return e.stop()}}),e)}))),Sa.apply(this,arguments)}function Ta(e,t,n){return Ca.apply(this,arguments)}function Ca(){return Ca=Ue(Me().mark((function e(t,n,r){var i,a,o,s,u,c,l,f,h,d,p=arguments;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=n.throttleEndTimeMillis,a=n.backoffCount,o=p.length>3&&void 0!==p[3]?p[3]:ba,u=t.appId,c=t.measurementId,e.prev=3,e.next=6,Ia(r,i);case 6:e.next=14;break;case 8:if(e.prev=8,e.t0=e.catch(3),!c){e.next=13;break}return oa.warn("Timed out fetching this Firebase app's measurement ID from the server."+" Falling back to the measurement ID ".concat(c)+' provided in the "measurementId" field in the local Firebase config. ['.concat(null===e.t0||void 0===e.t0?void 0:e.t0.message,"]")),e.abrupt("return",{appId:u,measurementId:c});case 13:throw e.t0;case 14:return e.prev=14,e.next=17,xa(t);case 17:return l=e.sent,o.deleteThrottleMetadata(u),e.abrupt("return",l);case 22:if(e.prev=22,e.t1=e.catch(14),Na(f=e.t1)){e.next=33;break}if(o.deleteThrottleMetadata(u),!c){e.next=32;break}return oa.warn("Failed to fetch this Firebase app's measurement ID from the server."+" Falling back to the measurement ID ".concat(c)+' provided in the "measurementId" field in the local Firebase config. ['.concat(null===f||void 0===f?void 0:f.message,"]")),e.abrupt("return",{appId:u,measurementId:c});case 32:throw e.t1;case 33:return h=503===Number(null===(s=null===f||void 0===f?void 0:f.customData)||void 0===s?void 0:s.httpStatus)?It(a,o.intervalMillis,ga):It(a,o.intervalMillis),d={throttleEndTimeMillis:Date.now()+h,backoffCount:a+1},o.setThrottleMetadata(u,d),oa.debug("Calling attemptFetch again in ".concat(h," millis")),e.abrupt("return",Ta(t,d,r,o));case 38:case"end":return e.stop()}}),e,null,[[3,8],[14,22]])}))),Ca.apply(this,arguments)}function Ia(e,t){return new Promise((function(n,r){var i=Math.max(t-Date.now(),0),a=setTimeout(n,i);e.addEventListener((function(){clearTimeout(a),r(ua.create("fetch-throttle",{throttleEndTimeMillis:t}))}))}))}function Na(e){if(!(e instanceof dt)||!e.customData)return!1;var t=Number(e.customData.httpStatus);return 429===t||500===t||503===t||504===t}var Aa,Ra,Oa=function(){function e(){u(this,e),this.listeners=[]}return h(e,[{key:"addEventListener",value:function(e){this.listeners.push(e)}},{key:"abort",value:function(){this.listeners.forEach((function(e){return e()}))}}]),e}();function Pa(){return(Pa=Ue(Me().mark((function e(t,n,r,i,a){var o,s;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a||!a.global){e.next=5;break}return t("event",r,i),e.abrupt("return");case 5:return e.next=7,n;case 7:o=e.sent,s=Object.assign(Object.assign({},i),{send_to:o}),t("event",r,s);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Da(e){Ra=e}function La(e){Aa=e}function ja(){return Ma.apply(this,arguments)}function Ma(){return(Ma=Ue(Me().mark((function e(){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ft()){e.next=5;break}return oa.warn(ua.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),e.abrupt("return",!1);case 5:return e.prev=5,e.next=8,ht();case 8:e.next=14;break;case 10:return e.prev=10,e.t0=e.catch(5),oa.warn(ua.create("indexeddb-unavailable",{errorInfo:null===e.t0||void 0===e.t0?void 0:e.t0.toString()}).message),e.abrupt("return",!1);case 14:return e.abrupt("return",!0);case 15:case"end":return e.stop()}}),e,null,[[5,10]])})))).apply(this,arguments)}function Fa(){return Fa=Ue(Me().mark((function e(t,n,r,i,a,o,s){var u,c,l,f,h,d,p,v;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(c=_a(t)).then((function(e){r[e.measurementId]=e.appId,t.options.measurementId&&e.measurementId!==t.options.measurementId&&oa.warn("The measurement ID in the local Firebase config (".concat(t.options.measurementId,")")+" does not match the measurement ID fetched from the server (".concat(e.measurementId,").")+" To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.")})).catch((function(e){return oa.error(e)})),n.push(c),l=ja().then((function(e){return e?i.getId():void 0})),e.next=6,Promise.all([c,l]);case 6:return f=e.sent,h=E(f,2),d=h[0],p=h[1],ya(o)||fa(o,d.measurementId),Ra&&(a("consent","default",Ra),Da(void 0)),a("js",new Date),(v=null!==(u=null===s||void 0===s?void 0:s.config)&&void 0!==u?u:{})[na]="firebase",v.update=!0,null!=p&&(v[ta]=p),a("config",d.measurementId,v),Aa&&(a("set",Aa),La(void 0)),e.abrupt("return",d.measurementId);case 20:case"end":return e.stop()}}),e)}))),Fa.apply(this,arguments)}var Ua,Va,za=function(){function e(t){u(this,e),this.app=t}return h(e,[{key:"_delete",value:function(){return delete Ba[this.app.options.appId],Promise.resolve()}}]),e}(),Ba={},qa=[],Ha={},Wa="dataLayer",Ka="gtag",Ga=!1;function Qa(){var e=[];if(lt()&&e.push("This is a browser extension environment."),"undefined"!==typeof navigator&&navigator.cookieEnabled||e.push("Cookies are not available."),e.length>0){var t=e.map((function(e,t){return"(".concat(t+1,") ").concat(e)})).join(" "),n=ua.create("invalid-analytics-context",{errorInfo:t});oa.warn(n.message)}}function $a(e,t,n){Qa();var r=e.options.appId;if(!r)throw ua.create("no-app-id");if(!e.options.apiKey){if(!e.options.measurementId)throw ua.create("no-api-key");oa.warn('The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest'+" measurement ID for this Firebase app. Falling back to the measurement ID ".concat(e.options.measurementId)+' provided in the "measurementId" field in the local Firebase config.')}if(null!=Ba[r])throw ua.create("already-exists",{id:r});if(!Ga){!function(e){var t=[];Array.isArray(window[e])?t=window[e]:window[e]=t}(Wa);var i=ma(Ba,qa,Ha,Wa,Ka),a=i.wrappedGtag,o=i.gtagCore;Va=a,Ua=o,Ga=!0}return Ba[r]=function(e,t,n,r,i,a,o){return Fa.apply(this,arguments)}(e,qa,Ha,t,Ua,Wa,n),new za(e)}function Xa(e,t,n,r){e=Nt(e),function(e,t,n,r,i){return Pa.apply(this,arguments)}(Va,Ba[e.app.options.appId],t,n,r).catch((function(e){return oa.error(e)}))}var Ya="@firebase/analytics",Ja="0.10.0";function Za(){return Za="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=v(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Za.apply(this,arguments)}kn(new At(ea,(function(e,t){var n=t.options;return $a(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),n)}),"PUBLIC")),kn(new At("analytics-internal",(function(e){try{var t=e.getProvider(ea).getImmediate();return{logEvent:function(e,n,r){return Xa(t,e,n,r)}}}catch(n){throw ua.create("interop-component-reg-failed",{reason:n})}}),"PRIVATE")),Cn(Ya,Ja),Cn(Ya,Ja,"esm2017");function eo(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 to;Object.create;function no(){return $e({},"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 ro=no,io=new pt("auth","Firebase",no()),ao=new zt("@firebase/auth");function oo(e){if(ao.logLevel<=Dt.WARN){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];ao.warn.apply(ao,["Auth (".concat(_n,"): ").concat(e)].concat(n))}}function so(e){if(ao.logLevel<=Dt.ERROR){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];ao.error.apply(ao,["Auth (".concat(_n,"): ").concat(e)].concat(n))}}function uo(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 ho.apply(void 0,[e].concat(n))}function co(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 ho.apply(void 0,[e].concat(n))}function lo(e,t,n){var r=Object.assign(Object.assign({},ro()),$e({},t,n));return new pt("auth","Firebase",r).create(t,{appName:e.name})}function fo(e,t,n){if(!(t instanceof n))throw n.name!==t.constructor.name&&uo(e,"argument-error"),lo(e,"argument-error","Type of ".concat(t.constructor.name," does not match expected instance.")+"Did you pass a reference from a different Auth SDK?")}function ho(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=s(n.slice(1));return o[0]&&(o[0].appName=e.name),(i=e._errorFactory).create.apply(i,[a].concat(s(o)))}return io.create.apply(io,[e].concat(n))}function po(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 ho.apply(void 0,[t].concat(r))}}function vo(e){var t="INTERNAL ASSERTION FAILED: "+e;throw so(t),new Error(t)}function mo(e,t){e||vo(t)}function yo(){var e;return"undefined"!==typeof self&&(null===(e=self.location)||void 0===e?void 0:e.href)||""}function go(){return"http:"===ko()||"https:"===ko()}function ko(){var e;return"undefined"!==typeof self&&(null===(e=self.location)||void 0===e?void 0:e.protocol)||null}var bo=function(){function e(t,n){u(this,e),this.shortDelay=t,this.longDelay=n,mo(n>t,"Short delay should be less than long delay!"),this.isMobile="undefined"!==typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(ct())||"object"===typeof navigator&&"ReactNative"===navigator.product}return h(e,[{key:"get",value:function(){return"undefined"!==typeof navigator&&navigator&&"onLine"in navigator&&"boolean"===typeof navigator.onLine&&(go()||lt()||"connection"in navigator)&&!navigator.onLine?Math.min(5e3,this.shortDelay):this.isMobile?this.longDelay:this.shortDelay}}]),e}();function wo(e,t){mo(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 xo=function(){function e(){u(this,e)}return h(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 vo("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 vo("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 vo("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}]),e}(),Eo=($e(to={},"CREDENTIAL_MISMATCH","custom-token-mismatch"),$e(to,"MISSING_CUSTOM_TOKEN","internal-error"),$e(to,"INVALID_IDENTIFIER","invalid-email"),$e(to,"MISSING_CONTINUE_URI","internal-error"),$e(to,"INVALID_PASSWORD","wrong-password"),$e(to,"MISSING_PASSWORD","missing-password"),$e(to,"EMAIL_EXISTS","email-already-in-use"),$e(to,"PASSWORD_LOGIN_DISABLED","operation-not-allowed"),$e(to,"INVALID_IDP_RESPONSE","invalid-credential"),$e(to,"INVALID_PENDING_TOKEN","invalid-credential"),$e(to,"FEDERATED_USER_ID_ALREADY_LINKED","credential-already-in-use"),$e(to,"MISSING_REQ_TYPE","internal-error"),$e(to,"EMAIL_NOT_FOUND","user-not-found"),$e(to,"RESET_PASSWORD_EXCEED_LIMIT","too-many-requests"),$e(to,"EXPIRED_OOB_CODE","expired-action-code"),$e(to,"INVALID_OOB_CODE","invalid-action-code"),$e(to,"MISSING_OOB_CODE","internal-error"),$e(to,"CREDENTIAL_TOO_OLD_LOGIN_AGAIN","requires-recent-login"),$e(to,"INVALID_ID_TOKEN","invalid-user-token"),$e(to,"TOKEN_EXPIRED","user-token-expired"),$e(to,"USER_NOT_FOUND","user-token-expired"),$e(to,"TOO_MANY_ATTEMPTS_TRY_LATER","too-many-requests"),$e(to,"INVALID_CODE","invalid-verification-code"),$e(to,"INVALID_SESSION_INFO","invalid-verification-id"),$e(to,"INVALID_TEMPORARY_PROOF","invalid-credential"),$e(to,"MISSING_SESSION_INFO","missing-verification-id"),$e(to,"SESSION_EXPIRED","code-expired"),$e(to,"MISSING_ANDROID_PACKAGE_NAME","missing-android-pkg-name"),$e(to,"UNAUTHORIZED_DOMAIN","unauthorized-continue-uri"),$e(to,"INVALID_OAUTH_CLIENT_ID","invalid-oauth-client-id"),$e(to,"ADMIN_ONLY_OPERATION","admin-restricted-operation"),$e(to,"INVALID_MFA_PENDING_CREDENTIAL","invalid-multi-factor-session"),$e(to,"MFA_ENROLLMENT_NOT_FOUND","multi-factor-info-not-found"),$e(to,"MISSING_MFA_ENROLLMENT_ID","missing-multi-factor-info"),$e(to,"MISSING_MFA_PENDING_CREDENTIAL","missing-multi-factor-session"),$e(to,"SECOND_FACTOR_EXISTS","second-factor-already-in-use"),$e(to,"SECOND_FACTOR_LIMIT_EXCEEDED","maximum-second-factor-count-exceeded"),$e(to,"BLOCKING_FUNCTION_ERROR_RESPONSE","internal-error"),$e(to,"RECAPTCHA_NOT_ENABLED","recaptcha-not-enabled"),$e(to,"MISSING_RECAPTCHA_TOKEN","missing-recaptcha-token"),$e(to,"INVALID_RECAPTCHA_TOKEN","invalid-recaptcha-token"),$e(to,"INVALID_RECAPTCHA_ACTION","invalid-recaptcha-action"),$e(to,"MISSING_CLIENT_TYPE","missing-client-type"),$e(to,"MISSING_RECAPTCHA_VERSION","missing-recaptcha-version"),$e(to,"INVALID_RECAPTCHA_VERSION","invalid-recaptcha-version"),$e(to,"INVALID_REQ_TYPE","invalid-req-type"),to),_o=new bo(3e4,6e4);function So(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}function To(e,t,n,r){return Co.apply(this,arguments)}function Co(){return Co=Ue(Me().mark((function e(t,n,r,i){var a,o=arguments;return Me().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",Io(t,a,Ue(Me().mark((function e(){var a,o,s,u;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a={},o={},i&&("GET"===n?o=i:a={body:JSON.stringify(i)}),s=kt(Object.assign({key:t.config.apiKey},o)).slice(1),e.next=6,t._getAdditionalHeaders();case 6:return(u=e.sent)["Content-Type"]="application/json",t.languageCode&&(u["X-Firebase-Locale"]=t.languageCode),e.abrupt("return",xo.fetch()(Oo(t,t.config.apiHost,r,s),Object.assign({method:n,headers:u,referrerPolicy:"no-referrer"},a)));case 10:case"end":return e.stop()}}),e)})))));case 2:case"end":return e.stop()}}),e)}))),Co.apply(this,arguments)}function Io(e,t,n){return No.apply(this,arguments)}function No(){return No=Ue(Me().mark((function e(t,n,r){var i,a,o,s,u,c,l,f,h,d;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t._canInitEmulator=!1,i=Object.assign(Object.assign({},Eo),n),e.prev=2,a=new Po(t),e.next=6,Promise.race([r(),a.promise]);case 6:return o=e.sent,a.clearNetworkTimeout(),e.next=10,o.json();case 10:if(!("needConfirmation"in(s=e.sent))){e.next=13;break}throw Do(t,"account-exists-with-different-credential",s);case 13:if(!o.ok||"errorMessage"in s){e.next=17;break}return e.abrupt("return",s);case 17:if(u=o.ok?s.errorMessage:s.error.message,c=u.split(" : "),l=E(c,2),f=l[0],h=l[1],"FEDERATED_USER_ID_ALREADY_LINKED"!==f){e.next=23;break}throw Do(t,"credential-already-in-use",s);case 23:if("EMAIL_EXISTS"!==f){e.next=27;break}throw Do(t,"email-already-in-use",s);case 27:if("USER_DISABLED"!==f){e.next=29;break}throw Do(t,"user-disabled",s);case 29:if(d=i[f]||f.toLowerCase().replace(/[_\s]+/g,"-"),!h){e.next=34;break}throw lo(t,d,h);case 34:uo(t,d);case 35:e.next=42;break;case 37:if(e.prev=37,e.t0=e.catch(2),!(e.t0 instanceof dt)){e.next=41;break}throw e.t0;case 41:uo(t,"network-request-failed",{message:String(e.t0)});case 42:case"end":return e.stop()}}),e,null,[[2,37]])}))),No.apply(this,arguments)}function Ao(e,t,n,r){return Ro.apply(this,arguments)}function Ro(){return Ro=Ue(Me().mark((function e(t,n,r,i){var a,o,s=arguments;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=s.length>4&&void 0!==s[4]?s[4]:{},e.next=3,To(t,n,r,i,a);case 3:return"mfaPendingCredential"in(o=e.sent)&&uo(t,"multi-factor-auth-required",{_serverResponse:o}),e.abrupt("return",o);case 6:case"end":return e.stop()}}),e)}))),Ro.apply(this,arguments)}function Oo(e,t,n,r){var i="".concat(t).concat(n,"?").concat(r);return e.config.emulator?wo(e.config,i):"".concat(e.config.apiScheme,"://").concat(i)}var Po=function(){function e(t){var n=this;u(this,e),this.auth=t,this.timer=null,this.promise=new Promise((function(e,t){n.timer=setTimeout((function(){return t(co(n.auth,"network-request-failed"))}),_o.get())}))}return h(e,[{key:"clearNetworkTimeout",value:function(){clearTimeout(this.timer)}}]),e}();function Do(e,t,n){var r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);var i=co(e,t,r);return i.customData._tokenResponse=n,i}function Lo(e,t){return jo.apply(this,arguments)}function jo(){return jo=Ue(Me().mark((function e(t,n){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",To(t,"POST","/v1/accounts:delete",n));case 1:case"end":return e.stop()}}),e)}))),jo.apply(this,arguments)}function Mo(e,t){return Fo.apply(this,arguments)}function Fo(){return Fo=Ue(Me().mark((function e(t,n){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",To(t,"POST","/v1/accounts:lookup",n));case 1:case"end":return e.stop()}}),e)}))),Fo.apply(this,arguments)}function Uo(e){if(e)try{var t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(n){}}function Vo(){return Vo=Ue(Me().mark((function e(t){var n,r,i,a,o,s,u=arguments;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=u.length>1&&void 0!==u[1]&&u[1],r=Nt(t),e.next=4,r.getIdToken(n);case 4:return i=e.sent,po((a=Bo(i))&&a.exp&&a.auth_time&&a.iat,r.auth,"internal-error"),o="object"===typeof a.firebase?a.firebase:void 0,s=null===o||void 0===o?void 0:o.sign_in_provider,e.abrupt("return",{claims:a,token:i,authTime:Uo(zo(a.auth_time)),issuedAtTime:Uo(zo(a.iat)),expirationTime:Uo(zo(a.exp)),signInProvider:s||null,signInSecondFactor:(null===o||void 0===o?void 0:o.sign_in_second_factor)||null});case 10:case"end":return e.stop()}}),e)}))),Vo.apply(this,arguments)}function zo(e){return 1e3*Number(e)}function Bo(e){var t=E(e.split("."),3),n=t[0],r=t[1],i=t[2];if(void 0===n||void 0===r||void 0===i)return so("JWT malformed, contained fewer than 3 sections"),null;try{var a=et(r);return a?JSON.parse(a):(so("Failed to decode base64 JWT payload"),null)}catch(o){return so("Caught error parsing JWT payload as JSON",null===o||void 0===o?void 0:o.toString()),null}}function qo(e,t){return Ho.apply(this,arguments)}function Ho(){return Ho=Ue(Me().mark((function e(t,n){var r=arguments;return Me().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 dt&&Wo(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]])}))),Ho.apply(this,arguments)}function Wo(e){var t=e.code;return t==="auth/".concat("user-disabled")||t==="auth/".concat("user-token-expired")}var Ko=function(){function e(t){u(this,e),this.user=t,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}return h(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(Ue(Me().mark((function t(){return Me().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=Ue(Me().mark((function e(){return Me().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===e.t0||void 0===e.t0?void 0:e.t0.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}(),Go=function(){function e(t,n){u(this,e),this.createdAt=t,this.lastLoginAt=n,this._initializeTime()}return h(e,[{key:"_initializeTime",value:function(){this.lastSignInTime=Uo(this.lastLoginAt),this.creationTime=Uo(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 Qo(e){return $o.apply(this,arguments)}function $o(){return $o=Ue(Me().mark((function e(t){var n,r,i,a,o,s,u,c,l,f,h;return Me().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,qo(t,Mo(r,{idToken:i}));case 6:po(null===(a=e.sent)||void 0===a?void 0:a.users.length,r,"internal-error"),o=a.users[0],t._notifyReloadListener(o),s=(null===(n=o.providerUserInfo)||void 0===n?void 0:n.length)?o.providerUserInfo.map((function(e){var t=e.providerId,n=eo(e,["providerId"]);return{providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}})):[],u=Yo(t.providerData,s),c=t.isAnonymous,l=!(t.email&&o.passwordHash)&&!(null===u||void 0===u?void 0:u.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:u,metadata:new Go(o.createdAt,o.lastLoginAt),isAnonymous:f},Object.assign(t,h);case 17:case"end":return e.stop()}}),e)}))),$o.apply(this,arguments)}function Xo(){return(Xo=Ue(Me().mark((function e(t){var n;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Nt(t),e.next=3,Qo(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 Yo(e,t){var n=e.filter((function(e){return!t.some((function(t){return t.providerId===e.providerId}))}));return[].concat(s(n),s(t))}function Jo(e,t){return Zo.apply(this,arguments)}function Zo(){return Zo=Ue(Me().mark((function e(t,n){var r;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Io(t,{},Ue(Me().mark((function e(){var r,i,a,o,s,u;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=kt({grant_type:"refresh_token",refresh_token:n}).slice(1),i=t.config,a=i.tokenApiHost,o=i.apiKey,s=Oo(t,a,"/v1/token","key=".concat(o)),e.next=5,t._getAdditionalHeaders();case 5:return(u=e.sent)["Content-Type"]="application/x-www-form-urlencoded",e.abrupt("return",xo.fetch()(s,{method:"POST",headers:u,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)}))),Zo.apply(this,arguments)}var es=function(){function e(){u(this,e),this.refreshToken=null,this.accessToken=null,this.expirationTime=null}return h(e,[{key:"isExpired",get:function(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}},{key:"updateFromServerResponse",value:function(e){po(e.idToken,"internal-error"),po("undefined"!==typeof e.idToken,"internal-error"),po("undefined"!==typeof e.refreshToken,"internal-error");var t="expiresIn"in e&&"undefined"!==typeof e.expiresIn?Number(e.expiresIn):function(e){var t=Bo(e);return po(t,"internal-error"),po("undefined"!==typeof t.exp,"internal-error"),po("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=Ue(Me().mark((function e(t){var n,r=arguments;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.length>1&&void 0!==r[1]&&r[1],po(!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=Ue(Me().mark((function e(t,n){var r,i,a,o;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Jo(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 vo("not implemented")}}],[{key:"fromJSON",value:function(t,n){var r=n.refreshToken,i=n.accessToken,a=n.expirationTime,o=new e;return r&&(po("string"===typeof r,"internal-error",{appName:t}),o.refreshToken=r),i&&(po("string"===typeof i,"internal-error",{appName:t}),o.accessToken=i),a&&(po("number"===typeof a,"internal-error",{appName:t}),o.expirationTime=a),o}}]),e}();function ts(e,t){po("string"===typeof e||"undefined"===typeof e,"internal-error",{appName:t})}var ns=function(){function e(t){u(this,e);var n=t.uid,r=t.auth,i=t.stsTokenManager,a=eo(t,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new Ko(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?s(a.providerData):[],this.metadata=new Go(a.createdAt||void 0,a.lastLoginAt||void 0)}return h(e,[{key:"getIdToken",value:function(){var e=Ue(Me().mark((function e(t){var n;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,qo(this,this.stsTokenManager.getToken(this.auth,t));case 2:if(po(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 Vo.apply(this,arguments)}(this,e)}},{key:"reload",value:function(){return function(e){return Xo.apply(this,arguments)}(this)}},{key:"_assign",value:function(e){this!==e&&(po(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map((function(e){return Object.assign({},e)})),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}},{key:"_clone",value:function(t){var n=new e(Object.assign(Object.assign({},this),{auth:t,stsTokenManager:this.stsTokenManager._clone()}));return n.metadata._copy(this.metadata),n}},{key:"_onReload",value:function(e){po(!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=Ue(Me().mark((function e(t){var n,r,i=arguments;return Me().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,Qo(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=Ue(Me().mark((function e(){var t;return Me().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,qo(this,Lo(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,s,u,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!==(s=n.tenantId)&&void 0!==s?s:void 0,m=null!==(u=n._redirectEventId)&&void 0!==u?u:void 0,y=null!==(c=n.createdAt)&&void 0!==c?c:void 0,g=null!==(l=n.lastLoginAt)&&void 0!==l?l:void 0,k=n.uid,b=n.emailVerified,w=n.isAnonymous,x=n.providerData,E=n.stsTokenManager;po(k&&E,t,"internal-error");var _=es.fromJSON(this.name,E);po("string"===typeof k,t,"internal-error"),ts(f,t.name),ts(h,t.name),po("boolean"===typeof b,t,"internal-error"),po("boolean"===typeof w,t,"internal-error"),ts(d,t.name),ts(p,t.name),ts(v,t.name),ts(m,t.name),ts(y,t.name),ts(g,t.name);var S=new e({uid:k,auth:t,email:h,emailVerified:b,displayName:f,isAnonymous:w,photoURL:p,phoneNumber:d,tenantId:v,stsTokenManager:_,createdAt:y,lastLoginAt:g});return x&&Array.isArray(x)&&(S.providerData=x.map((function(e){return Object.assign({},e)}))),m&&(S._redirectEventId=m),S}},{key:"_fromIdTokenResponse",value:function(){var t=Ue(Me().mark((function t(n,r){var i,a,o,s=arguments;return Me().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=s.length>2&&void 0!==s[2]&&s[2],(a=new es).updateFromServerResponse(r),o=new e({uid:r.localId,auth:n,stsTokenManager:a,isAnonymous:i}),t.next=6,Qo(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}(),rs=new Map;function is(e){mo(e instanceof Function,"Expected a class definition");var t=rs.get(e);return t?(mo(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,rs.set(e,t),t)}var as=function(){function e(){u(this,e),this.type="NONE",this.storage={}}return h(e,[{key:"_isAvailable",value:function(){var e=Ue(Me().mark((function e(){return Me().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=Ue(Me().mark((function e(t,n){return Me().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=Ue(Me().mark((function e(t){var n;return Me().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=Ue(Me().mark((function e(t){return Me().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}();as.type="NONE";var os=as;function ss(e,t,n){return"firebase".concat(":",e,":").concat(t,":").concat(n)}var us=function(){function e(t,n,r){u(this,e),this.persistence=t,this.auth=n,this.userKey=r;var i=this.auth,a=i.config,o=i.name;this.fullUserKey=ss(this.userKey,a.apiKey,o),this.fullPersistenceKey=ss("persistence",a.apiKey,o),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}return h(e,[{key:"setCurrentUser",value:function(e){return this.persistence._set(this.fullUserKey,e.toJSON())}},{key:"getCurrentUser",value:function(){var e=Ue(Me().mark((function e(){var t;return Me().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?ns._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=Ue(Me().mark((function e(t){var n;return Me().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=Ue(Me().mark((function t(n,r){var i,a,o,s,u,c,l,f,h,d,p,v=arguments;return Me().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(is(os),n,i));case 3:return t.next=5,Promise.all(r.map(function(){var e=Ue(Me().mark((function e(t){return Me().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]||is(os),s=ss(i,n.config.apiKey,n.name),u=null,c=_(r),t.prev=10,c.s();case 12:if((l=c.n()).done){t.next=29;break}return f=l.value,t.prev=14,t.next=17,f._get(s);case 17:if(!(h=t.sent)){t.next=23;break}return d=ns._fromJSON(n,h),f!==o&&(u=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],!u){t.next=44;break}return t.next=44,o._set(s,u.toJSON());case 44:return t.next=46,Promise.all(r.map(function(){var e=Ue(Me().mark((function e(t){return Me().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(s);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 cs(e){var t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(ds(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(ls(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(vs(t))return"Blackberry";if(ms(t))return"Webos";if(fs(t))return"Safari";if((t.includes("chrome/")||hs(t))&&!t.includes("edge/"))return"Chrome";if(ps(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 ls(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ct();return/firefox\//i.test(e)}function fs(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:ct()).toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function hs(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ct();return/crios\//i.test(e)}function ds(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ct();return/iemobile/i.test(e)}function ps(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ct();return/android/i.test(e)}function vs(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ct();return/blackberry/i.test(e)}function ms(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ct();return/webos/i.test(e)}function ys(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ct();return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function gs(){return function(){var e=ct();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}()&&10===document.documentMode}function ks(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ct();return ys(e)||ps(e)||ms(e)||vs(e)||/windows phone/i.test(e)||ds(e)}function bs(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];switch(e){case"Browser":t=cs(ct());break;case"Worker":t="".concat(cs(ct()),"-").concat(e);break;default:t=e}var r=n.length?n.join(","):"FirebaseCore-web";return"".concat(t,"/","JsCore","/").concat(_n,"/").concat(r)}function ws(e,t){return xs.apply(this,arguments)}function xs(){return xs=Ue(Me().mark((function e(t,n){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",To(t,"GET","/v2/recaptchaConfig",So(t,n)));case 1:case"end":return e.stop()}}),e)}))),xs.apply(this,arguments)}function Es(e){return void 0!==e&&void 0!==e.enterprise}var _s=h((function e(t){if(u(this,e),this.siteKey="",this.emailPasswordEnabled=!1,void 0===t.recaptchaKey)throw new Error("recaptchaKey undefined");this.siteKey=t.recaptchaKey.split("/")[3],this.emailPasswordEnabled=t.recaptchaEnforcementState.some((function(e){return"EMAIL_PASSWORD_PROVIDER"===e.provider&&"OFF"!==e.enforcementState}))}));function Ss(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=co("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 Ts(e){return"__".concat(e).concat(Math.floor(1e6*Math.random()))}var Cs=function(){function e(t){u(this,e),this.type="recaptcha-enterprise",this.auth=Os(t)}return h(e,[{key:"verify",value:function(){var e=Ue(Me().mark((function e(){var t,n,r,i,a,o=this,s=arguments;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=function(e,n,r){var i=window.grecaptcha;Es(i)?i.enterprise.ready((function(){i.enterprise.execute(e,{action:t}).then((function(e){n(e)})).catch((function(){n("NO_RECAPTCHA")}))})):r(Error("No reCAPTCHA enterprise script loaded."))},i=function(){return i=Ue(Me().mark((function e(t){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=5;break}if(null!=t.tenantId||null==t._agentRecaptchaConfig){e.next=3;break}return e.abrupt("return",t._agentRecaptchaConfig.siteKey);case 3:if(null==t.tenantId||void 0===t._tenantRecaptchaConfigs[t.tenantId]){e.next=5;break}return e.abrupt("return",t._tenantRecaptchaConfigs[t.tenantId].siteKey);case 5:return e.abrupt("return",new Promise(function(){var e=Ue(Me().mark((function e(n,r){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ws(t,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then((function(e){if(void 0!==e.recaptchaKey){var i=new _s(e);return null==t.tenantId?t._agentRecaptchaConfig=i:t._tenantRecaptchaConfigs[t.tenantId]=i,n(i.siteKey)}r(new Error("recaptcha Enterprise site key undefined"))})).catch((function(e){r(e)}));case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()));case 6:case"end":return e.stop()}}),e)}))),i.apply(this,arguments)},r=function(e){return i.apply(this,arguments)},t=s.length>0&&void 0!==s[0]?s[0]:"verify",n=s.length>1&&void 0!==s[1]&&s[1],e.abrupt("return",new Promise((function(e,t){r(o.auth).then((function(r){if(!n&&Es(window.grecaptcha))a(r,e,t);else{if("undefined"===typeof window)return void t(new Error("RecaptchaVerifier is only supported in browser"));Ss("https://www.google.com/recaptcha/enterprise.js?render="+r).then((function(){a(r,e,t)})).catch((function(e){t(e)}))}})).catch((function(e){t(e)}))})));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}]),e}();function Is(e,t,n){return Ns.apply(this,arguments)}function Ns(){return Ns=Ue(Me().mark((function e(t,n,r){var i,a,o,s,u=arguments;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=u.length>3&&void 0!==u[3]&&u[3],a=new Cs(t),e.prev=2,e.next=5,a.verify(r);case 5:o=e.sent,e.next=13;break;case 8:return e.prev=8,e.t0=e.catch(2),e.next=12,a.verify(r,!0);case 12:o=e.sent;case 13:return s=Object.assign({},n),i?Object.assign(s,{captchaResp:o}):Object.assign(s,{captchaResponse:o}),Object.assign(s,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(s,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),e.abrupt("return",s);case 18:case"end":return e.stop()}}),e,null,[[2,8]])}))),Ns.apply(this,arguments)}var As=function(){function e(t){u(this,e),this.auth=t,this.queue=[]}return h(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=Ue(Me().mark((function e(t){var n,r,i,a,o,s,u;return Me().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:n=[],e.prev=3,r=_(this.queue),e.prev=5,r.s();case 7:if((i=r.n()).done){e.next=14;break}return a=i.value,e.next=11,a(t);case 11:a.onAbort&&n.push(a.onAbort);case 12:e.next=7;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(5),r.e(e.t0);case 19:return e.prev=19,r.f(),e.finish(19);case 22:e.next=30;break;case 24:e.prev=24,e.t1=e.catch(3),n.reverse(),o=_(n);try{for(o.s();!(s=o.n()).done;){u=s.value;try{u()}catch(c){}}}catch(l){o.e(l)}finally{o.f()}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null===e.t1||void 0===e.t1?void 0:e.t1.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}(),Rs=function(){function e(t,n,r,i){u(this,e),this.app=t,this.heartbeatServiceProvider=n,this.appCheckServiceProvider=r,this.config=i,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Ps(this),this.idTokenSubscription=new Ps(this),this.beforeStateQueue=new As(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=io,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=t.name,this.clientVersion=i.sdkClientVersion}return h(e,[{key:"_initializeWithPersistence",value:function(e,t){var n=this;return t&&(this._popupRedirectResolver=is(t)),this._initializationPromise=this.queue(Ue(Me().mark((function r(){var i,a;return Me().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,us.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=Ue(Me().mark((function e(){var t;return Me().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=Ue(Me().mark((function e(t){var n,r,i,a,o,s,u;return Me().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,s=null===i||void 0===i?void 0:i._redirectEventId,e.next=12,this.tryRedirectSignIn(t);case 12:u=e.sent,o&&o!==s||!(null===u||void 0===u?void 0:u.user)||(i=u.user,a=!0);case 14:if(i){e.next=16;break}return e.abrupt("return",this.directlySetCurrentUser(null));case 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 po(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=Ue(Me().mark((function e(t){var n;return Me().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=Ue(Me().mark((function e(t){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Qo(t);case 3:e.next=9;break;case 5:if(e.prev=5,e.t0=e.catch(0),(null===e.t0||void 0===e.t0?void 0:e.t0.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=Ue(Me().mark((function e(){return Me().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=Ue(Me().mark((function e(t){var n;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=t?Nt(t):null)&&po(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=Ue(Me().mark((function e(t){var n,r=this,i=arguments;return Me().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&&po(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(Ue(Me().mark((function e(){return Me().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=Ue(Me().mark((function e(){return Me().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(Ue(Me().mark((function n(){return Me().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.assertedPersistence.setPersistence(is(e));case 2:case"end":return n.stop()}}),n)}))))}},{key:"initializeRecaptchaConfig",value:function(){var e=Ue(Me().mark((function e(){var t,n;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ws(this,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"});case 2:t=e.sent,n=new _s(t),null==this.tenantId?this._agentRecaptchaConfig=n:this._tenantRecaptchaConfigs[this.tenantId]=n,n.emailPasswordEnabled&&new Cs(this).verify();case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_getRecaptchaConfig",value:function(){return null==this.tenantId?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}},{key:"_getPersistence",value:function(){return this.assertedPersistence.persistence.type}},{key:"_updateErrorMap",value:function(e){this._errorFactory=new pt("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=Ue(Me().mark((function e(t,n){var r;return Me().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=Ue(Me().mark((function e(t){var n;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.redirectPersistenceManager){e.next=9;break}return po(n=t&&is(t)||this._popupRedirectResolver,this,"argument-error"),e.next=5,us.create(this,[is(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=Ue(Me().mark((function e(t){var n,r;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isInitialized){e.next=3;break}return e.next=3,this.queue(Ue(Me().mark((function e(){return Me().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=Ue(Me().mark((function e(t){var n=this;return Me().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(Ue(Me().mark((function e(){return Me().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 po(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=Ue(Me().mark((function e(t){return Me().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=8;break}return e.next=6,this.assertedPersistence.setCurrentUser(t);case 6:e.next=10;break;case 8:return e.next=10,this.assertedPersistence.removeCurrentUser();case 10: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 po(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=bs(this.config.clientPlatform,this._getFrameworks()))}},{key:"_getFrameworks",value:function(){return this.frameworks}},{key:"_getAdditionalHeaders",value:function(){var e=Ue(Me().mark((function e(){var t,n,r,i;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=$e({},"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.next=8,this._getAppCheckToken();case 8:return(i=e.sent)&&(n["X-Firebase-AppCheck"]=i),e.abrupt("return",n);case 11:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_getAppCheckToken",value:function(){var e=Ue(Me().mark((function e(){var t,n;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(t=this.appCheckServiceProvider.getImmediate({optional:!0}))||void 0===t?void 0:t.getToken();case 2:return(null===(n=e.sent)||void 0===n?void 0:n.error)&&oo("Error while retrieving App Check token: ".concat(n.error)),e.abrupt("return",null===n||void 0===n?void 0:n.token);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}();function Os(e){return Nt(e)}var Ps=function(){function e(t){var n=this;u(this,e),this.auth=t,this.observer=null,this.addObserver=function(e,t){var n=new xt(e,t);return n.subscribe.bind(n)}((function(e){return n.observer=e}))}return h(e,[{key:"next",get:function(){return po(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}]),e}();function Ds(e,t,n){var r=Os(e);po(r._canInitEmulator,r,"emulator-config-failed"),po(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");var i=!!(null===n||void 0===n?void 0:n.disableWarnings),a=Ls(t),o=function(e){var t=Ls(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};var r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){var a=i[1];return{host:a,port:js(r.substr(a.length+1))}}var o=E(r.split(":"),2);return{host:o[0],port:js(o[1])}}(t),s=o.host,u=o.port,c=null===u?"":":".concat(u);r.config.emulator={url:"".concat(a,"//").concat(s).concat(c,"/")},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:s,port:u,protocol:a.replace(":",""),options:Object.freeze({disableWarnings:i})}),i||function(){function e(){var e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}"undefined"!==typeof console&&"function"===typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only.  Do not use with production credentials.");"undefined"!==typeof window&&"undefined"!==typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}()}function Ls(e){var t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function js(e){if(!e)return null;var t=Number(e);return isNaN(t)?null:t}var Ms=function(){function e(t,n){u(this,e),this.providerId=t,this.signInMethod=n}return h(e,[{key:"toJSON",value:function(){return vo("not implemented")}},{key:"_getIdTokenResponse",value:function(e){return vo("not implemented")}},{key:"_linkToIdToken",value:function(e,t){return vo("not implemented")}},{key:"_getReauthenticationResolver",value:function(e){return vo("not implemented")}}]),e}();function Fs(e,t){return Us.apply(this,arguments)}function Us(){return Us=Ue(Me().mark((function e(t,n){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",To(t,"POST","/v1/accounts:update",n));case 1:case"end":return e.stop()}}),e)}))),Us.apply(this,arguments)}function Vs(e,t){return zs.apply(this,arguments)}function zs(){return zs=Ue(Me().mark((function e(t,n){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Ao(t,"POST","/v1/accounts:signInWithPassword",So(t,n)));case 1:case"end":return e.stop()}}),e)}))),zs.apply(this,arguments)}function Bs(e,t){return qs.apply(this,arguments)}function qs(){return qs=Ue(Me().mark((function e(t,n){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Ao(t,"POST","/v1/accounts:signInWithEmailLink",So(t,n)));case 1:case"end":return e.stop()}}),e)}))),qs.apply(this,arguments)}function Hs(e,t){return Ws.apply(this,arguments)}function Ws(){return Ws=Ue(Me().mark((function e(t,n){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Ao(t,"POST","/v1/accounts:signInWithEmailLink",So(t,n)));case 1:case"end":return e.stop()}}),e)}))),Ws.apply(this,arguments)}var Ks=function(e){p(n,e);var t=g(n);function n(e,r,i){var a,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return u(this,n),(a=t.call(this,"password",i))._email=e,a._password=r,a._tenantId=o,a}return h(n,[{key:"toJSON",value:function(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}},{key:"_getIdTokenResponse",value:function(){var e=Ue(Me().mark((function e(t){var n,r,i;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=this.signInMethod,e.next="password"===e.t0?3:"emailLink"===e.t0?12:13;break;case 3:if(r={returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},!(null===(n=t._getRecaptchaConfig())||void 0===n?void 0:n.emailPasswordEnabled)){e.next=11;break}return e.next=7,Is(t,r,"signInWithPassword");case 7:return i=e.sent,e.abrupt("return",Vs(t,i));case 11:return e.abrupt("return",Vs(t,r).catch(function(){var e=Ue(Me().mark((function e(n){var i;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.code!=="auth/".concat("missing-recaptcha-token")){e.next=8;break}return console.log("Sign-in with email address and password is protected by reCAPTCHA for this project. Automatically triggering the reCAPTCHA flow and restarting the sign-in flow."),e.next=4,Is(t,r,"signInWithPassword");case 4:return i=e.sent,e.abrupt("return",Vs(t,i));case 8:return e.abrupt("return",Promise.reject(n));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 12:return e.abrupt("return",Bs(t,{email:this._email,oobCode:this._password}));case 13:uo(t,"internal-error");case 14:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_linkToIdToken",value:function(){var e=Ue(Me().mark((function e(t,n){return Me().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",Fs(t,{idToken:n,returnSecureToken:!0,email:this._email,password:this._password}));case 4:return e.abrupt("return",Hs(t,{idToken:n,email:this._email,oobCode:this._password}));case 5:uo(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){return new n(e,t,"emailLink",arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)}},{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}(Ms);function Gs(e,t){return Qs.apply(this,arguments)}function Qs(){return Qs=Ue(Me().mark((function e(t,n){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Ao(t,"POST","/v1/accounts:signInWithIdp",So(t,n)));case 1:case"end":return e.stop()}}),e)}))),Qs.apply(this,arguments)}var $s=function(e){p(n,e);var t=g(n);function n(){var e;return u(this,n),(e=t.apply(this,arguments)).pendingToken=null,e}return h(n,[{key:"toJSON",value:function(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}},{key:"_getIdTokenResponse",value:function(e){return Gs(e,this.buildRequest())}},{key:"_linkToIdToken",value:function(e,t){var n=this.buildRequest();return n.idToken=t,Gs(e,n)}},{key:"_getReauthenticationResolver",value:function(e){var t=this.buildRequest();return t.autoCreate=!1,Gs(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=kt(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):uo("argument-error"),t}},{key:"fromJSON",value:function(e){var t="string"===typeof e?JSON.parse(e):e,r=t.providerId,i=t.signInMethod,a=eo(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}(Ms);function Xs(e,t){return Ys.apply(this,arguments)}function Ys(){return Ys=Ue(Me().mark((function e(t,n){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",To(t,"POST","/v1/accounts:sendVerificationCode",So(t,n)));case 1:case"end":return e.stop()}}),e)}))),Ys.apply(this,arguments)}function Js(){return Js=Ue(Me().mark((function e(t,n){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Ao(t,"POST","/v1/accounts:signInWithPhoneNumber",So(t,n)));case 1:case"end":return e.stop()}}),e)}))),Js.apply(this,arguments)}function Zs(){return Zs=Ue(Me().mark((function e(t,n){var r;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ao(t,"POST","/v1/accounts:signInWithPhoneNumber",So(t,n));case 2:if(!(r=e.sent).temporaryProof){e.next=5;break}throw Do(t,"account-exists-with-different-credential",r);case 5:return e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)}))),Zs.apply(this,arguments)}var eu=$e({},"USER_NOT_FOUND","user-not-found");function tu(){return tu=Ue(Me().mark((function e(t,n){var r;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object.assign(Object.assign({},n),{operation:"REAUTH"}),e.abrupt("return",Ao(t,"POST","/v1/accounts:signInWithPhoneNumber",So(t,r),eu));case 2:case"end":return e.stop()}}),e)}))),tu.apply(this,arguments)}var nu=function(e){p(n,e);var t=g(n);function n(e){var r;return u(this,n),(r=t.call(this,"phone","phone")).params=e,r}return h(n,[{key:"_getIdTokenResponse",value:function(e){return function(e,t){return Js.apply(this,arguments)}(e,this._makeVerificationRequest())}},{key:"_linkToIdToken",value:function(e,t){return function(e,t){return Zs.apply(this,arguments)}(e,Object.assign({idToken:t},this._makeVerificationRequest()))}},{key:"_getReauthenticationResolver",value:function(e){return function(e,t){return tu.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})}},{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}(Ms);var ru=function(){function e(t){var n,r,i,a,o,s;u(this,e);var c=bt(wt(t)),l=null!==(n=c.apiKey)&&void 0!==n?n:null,f=null!==(r=c.oobCode)&&void 0!==r?r:null,h=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=c.mode)&&void 0!==i?i:null);po(l&&f&&h,"argument-error"),this.apiKey=l,this.operation=h,this.code=f,this.continueUrl=null!==(a=c.continueUrl)&&void 0!==a?a:null,this.languageCode=null!==(o=c.languageCode)&&void 0!==o?o:null,this.tenantId=null!==(s=c.tenantId)&&void 0!==s?s:null}return h(e,null,[{key:"parseLink",value:function(t){var n=function(e){var t=bt(wt(e)).link,n=t?bt(wt(t)).deep_link_id:null,r=bt(wt(e)).deep_link_id;return(r?bt(wt(r)).link:null)||r||n||t||e}(t);try{return new e(n)}catch(r){return null}}}]),e}();var iu=function(){function e(){u(this,e),this.providerId=e.PROVIDER_ID}return h(e,null,[{key:"credential",value:function(e,t){return Ks._fromEmailAndPassword(e,t)}},{key:"credentialWithLink",value:function(e,t){var n=ru.parseLink(t);return po(n,"argument-error"),Ks._fromEmailAndCode(e,n.code,n.tenantId)}}]),e}();iu.PROVIDER_ID="password",iu.EMAIL_PASSWORD_SIGN_IN_METHOD="password",iu.EMAIL_LINK_SIGN_IN_METHOD="emailLink";var au=function(){function e(t){u(this,e),this.providerId=t,this.defaultLanguageCode=null,this.customParameters={}}return h(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}(),ou=function(e){p(n,e);var t=g(n);function n(){var e;return u(this,n),(e=t.apply(this,arguments)).scopes=[],e}return h(n,[{key:"addScope",value:function(e){return this.scopes.includes(e)||this.scopes.push(e),this}},{key:"getScopes",value:function(){return s(this.scopes)}}]),n}(au),su=function(e){p(n,e);var t=g(n);function n(){return u(this,n),t.call(this,"facebook.com")}return h(n,null,[{key:"credential",value:function(e){return $s._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(r){return null}}}]),n}(ou);su.FACEBOOK_SIGN_IN_METHOD="facebook.com",su.PROVIDER_ID="facebook.com";var uu=function(e){p(n,e);var t=g(n);function n(){var e;return u(this,n),(e=t.call(this,"google.com")).addScope("profile"),e}return h(n,null,[{key:"credential",value:function(e,t){return $s._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(a){return null}}}]),n}(ou);uu.GOOGLE_SIGN_IN_METHOD="google.com",uu.PROVIDER_ID="google.com";var cu=function(e){p(n,e);var t=g(n);function n(){return u(this,n),t.call(this,"github.com")}return h(n,null,[{key:"credential",value:function(e){return $s._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(r){return null}}}]),n}(ou);cu.GITHUB_SIGN_IN_METHOD="github.com",cu.PROVIDER_ID="github.com";var lu=function(e){p(n,e);var t=g(n);function n(){return u(this,n),t.call(this,"twitter.com")}return h(n,null,[{key:"credential",value:function(e,t){return $s._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(a){return null}}}]),n}(ou);function fu(e,t){return hu.apply(this,arguments)}function hu(){return hu=Ue(Me().mark((function e(t,n){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Ao(t,"POST","/v1/accounts:signUp",So(t,n)));case 1:case"end":return e.stop()}}),e)}))),hu.apply(this,arguments)}lu.TWITTER_SIGN_IN_METHOD="twitter.com",lu.PROVIDER_ID="twitter.com";var du=function(){function e(t){u(this,e),this.user=t.user,this.providerId=t.providerId,this._tokenResponse=t._tokenResponse,this.operationType=t.operationType}return h(e,null,[{key:"_fromIdTokenResponse",value:function(){var t=Ue(Me().mark((function t(n,r,i){var a,o,s,u,c=arguments;return Me().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,ns._fromIdTokenResponse(n,i,a);case 3:return o=t.sent,s=pu(i),u=new e({user:o,providerId:s,_tokenResponse:i,operationType:r}),t.abrupt("return",u);case 7:case"end":return t.stop()}}),t)})));return function(e,n,r){return t.apply(this,arguments)}}()},{key:"_forOperation",value:function(){var t=Ue(Me().mark((function t(n,r,i){var a;return Me().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n._updateTokensIfNecessary(i,!0);case 2:return a=pu(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 pu(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}var vu=function(e){p(n,e);var t=g(n);function n(e,r,i,a){var o,s;return u(this,n),(o=t.call(this,r.code,r.message)).operationType=i,o.user=a,Object.setPrototypeOf(y(o),n.prototype),o.customData={appName:e.name,tenantId:null!==(s=e.tenantId)&&void 0!==s?s:void 0,_serverResponse:r.customData._serverResponse,operationType:i},o}return h(n,null,[{key:"_fromErrorAndOperation",value:function(e,t,r,i){return new n(e,t,r,i)}}]),n}(dt);function mu(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 vu._fromErrorAndOperation(e,n,t,r);throw n}))}function yu(e,t){return gu.apply(this,arguments)}function gu(){return gu=Ue(Me().mark((function e(t,n){var r,i,a=arguments;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.length>2&&void 0!==a[2]&&a[2],e.t0=qo,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",du._forOperation(t,"link",i));case 14:case"end":return e.stop()}}),e)}))),gu.apply(this,arguments)}function ku(e,t){return bu.apply(this,arguments)}function bu(){return bu=Ue(Me().mark((function e(t,n){var r,i,a,o,s,u,c=arguments;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=c.length>2&&void 0!==c[2]&&c[2],i=t.auth,a="reauthenticate",e.prev=3,e.next=6,qo(t,mu(i,a,n,t),r);case 6:return po((o=e.sent).idToken,i,"internal-error"),po(s=Bo(o.idToken),i,"internal-error"),u=s.sub,po(t.uid===u,i,"user-mismatch"),e.abrupt("return",du._forOperation(t,a,o));case 15:throw e.prev=15,e.t0=e.catch(3),(null===e.t0||void 0===e.t0?void 0:e.t0.code)==="auth/".concat("user-not-found")&&uo(i,"user-mismatch"),e.t0;case 19:case"end":return e.stop()}}),e,null,[[3,15]])}))),bu.apply(this,arguments)}function wu(e,t){return xu.apply(this,arguments)}function xu(){return xu=Ue(Me().mark((function e(t,n){var r,i,a,o,s=arguments;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=s.length>2&&void 0!==s[2]&&s[2],i="signIn",e.next=4,mu(t,i,n);case 4:return a=e.sent,e.next=7,du._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)}))),xu.apply(this,arguments)}function Eu(e,t){return _u.apply(this,arguments)}function _u(){return _u=Ue(Me().mark((function e(t,n){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",wu(Os(t),n));case 1:case"end":return e.stop()}}),e)}))),_u.apply(this,arguments)}function Su(e,t,n){return Tu.apply(this,arguments)}function Tu(){return Tu=Ue(Me().mark((function e(t,n,r){var i,a,o,s,u,c,l;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=Os(t),o={returnSecureToken:!0,email:n,password:r,clientType:"CLIENT_TYPE_WEB"},!(null===(i=a._getRecaptchaConfig())||void 0===i?void 0:i.emailPasswordEnabled)){e.next=9;break}return e.next=5,Is(a,o,"signUpPassword");case 5:u=e.sent,s=fu(a,u),e.next=10;break;case 9:s=fu(a,o).catch(function(){var e=Ue(Me().mark((function e(t){var n;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.code!=="auth/".concat("missing-recaptcha-token")){e.next=8;break}return console.log("Sign-up is protected by reCAPTCHA for this project. Automatically triggering the reCAPTCHA flow and restarting the sign-up flow."),e.next=4,Is(a,o,"signUpPassword");case 4:return n=e.sent,e.abrupt("return",fu(a,n));case 8:return e.abrupt("return",Promise.reject(t));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 10:return e.next=12,s.catch((function(e){return Promise.reject(e)}));case 12:return c=e.sent,e.next=15,du._fromIdTokenResponse(a,"signIn",c);case 15:return l=e.sent,e.next=18,a._updateCurrentUser(l.user);case 18:return e.abrupt("return",l);case 19:case"end":return e.stop()}}),e)}))),Tu.apply(this,arguments)}function Cu(e,t,n){return Eu(Nt(e),iu.credential(t,n))}function Iu(e){return Nt(e).signOut()}function Nu(e,t){return To(e,"POST","/v2/accounts/mfaEnrollment:start",So(e,t))}function Au(e,t){return To(e,"POST","/v2/accounts/mfaEnrollment:start",So(e,t))}function Ru(e,t){return To(e,"POST","/v2/accounts/mfaEnrollment:finalize",So(e,t))}new WeakMap;var Ou="__sak",Pu=function(){function e(t,n){u(this,e),this.storageRetriever=t,this.type=n}return h(e,[{key:"_isAvailable",value:function(){try{return this.storage?(this.storage.setItem(Ou,"1"),this.storage.removeItem(Ou),Promise.resolve(!0)):Promise.resolve(!1)}catch(e){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 Du=function(e){p(n,e);var t=g(n);function n(){var e;return u(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=ct();return fs(e)||ys(e)}()&&function(){try{return!(!window||window===window.top)}catch(e){return!1}}(),e.fallbackToPolling=ks(),e._shouldAllowMigration=!0,e}return h(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);gs()&&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=Ue(Me().mark((function e(t,r){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Za(v(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=Ue(Me().mark((function e(t){var r;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Za(v(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=Ue(Me().mark((function e(t){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Za(v(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}(Pu);Du.type="LOCAL";var Lu=Du,ju=function(e){p(n,e);var t=g(n);function n(){return u(this,n),t.call(this,(function(){return window.sessionStorage}),"SESSION")}return h(n,[{key:"_addListener",value:function(e,t){}},{key:"_removeListener",value:function(e,t){}}]),n}(Pu);ju.type="SESSION";var Mu=ju;function Fu(e){return Promise.all(e.map(function(){var e=Ue(Me().mark((function e(t){var n;return Me().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 Uu=function(){function e(t){u(this,e),this.eventTarget=t,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}return h(e,[{key:"isListeningto",value:function(e){return this.eventTarget===e}},{key:"handleEvent",value:function(){var e=Ue(Me().mark((function e(t){var n,r,i,a,o,s,u,c;return Me().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===(s=this.handlersMap[a])||void 0===s?void 0:s.size){e.next=5;break}return e.abrupt("return");case 5:return n.ports[0].postMessage({status:"ack",eventId:i,eventType:a}),u=Array.from(s).map(function(){var e=Ue(Me().mark((function e(t){return Me().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,Fu(u);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 Vu(){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}Uu.receivers=[];var zu=function(){function e(t){u(this,e),this.target=t,this.handlers=new Set}return h(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=Ue(Me().mark((function e(t,n){var r,i,a,o,s=this,u=arguments;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=u.length>2&&void 0!==u[2]?u[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,u){var c=Vu("",20);i.port1.start();var l=setTimeout((function(){u(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(){u(new Error("timeout"))}),3e3);break;case"done":clearTimeout(a),e(n.data.response);break;default:clearTimeout(l),clearTimeout(a),u(new Error("invalid_response"))}}},s.handlers.add(o),i.port1.addEventListener("message",o.onMessage),s.target.postMessage({eventType:t,eventId:c,data:n},[i.port2])})).finally((function(){o&&s.removeMessageHandler(o)})));case 5:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()}]),e}();function Bu(){return window}function qu(e){Bu().location.href=e}function Hu(){return"undefined"!==typeof Bu().WorkerGlobalScope&&"function"===typeof Bu().importScripts}function Wu(){return Ku.apply(this,arguments)}function Ku(){return(Ku=Ue(Me().mark((function e(){var t;return Me().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 Gu(){var e;return(null===(e=null===navigator||void 0===navigator?void 0:navigator.serviceWorker)||void 0===e?void 0:e.controller)||null}var Qu="firebaseLocalStorageDb",$u="firebaseLocalStorage",Xu="fbase_key",Yu=function(){function e(t){u(this,e),this.request=t}return h(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 Ju(e,t){return e.transaction([$u],t?"readwrite":"readonly").objectStore($u)}function Zu(){var e=indexedDB.deleteDatabase(Qu);return new Yu(e).toPromise()}function ec(){var e=indexedDB.open(Qu,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($u,{keyPath:Xu})}catch(r){n(r)}})),e.addEventListener("success",Ue(Me().mark((function n(){var r;return Me().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if((r=e.result).objectStoreNames.contains($u)){n.next=12;break}return r.close(),n.next=5,Zu();case 5:return n.t0=t,n.next=8,ec();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 tc(e,t,n){return nc.apply(this,arguments)}function nc(){return nc=Ue(Me().mark((function e(t,n,r){var i,a;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=Ju(t,!0).put(($e(i={},Xu,n),$e(i,"value",r),i)),e.abrupt("return",new Yu(a).toPromise());case 2:case"end":return e.stop()}}),e)}))),nc.apply(this,arguments)}function rc(e,t){return ic.apply(this,arguments)}function ic(){return ic=Ue(Me().mark((function e(t,n){var r,i;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Ju(t,!1).get(n),e.next=3,new Yu(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)}))),ic.apply(this,arguments)}function ac(e,t){var n=Ju(e,!0).delete(t);return new Yu(n).toPromise()}var oc=function(){function e(){u(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 h(e,[{key:"_openDb",value:function(){var e=Ue(Me().mark((function e(){return Me().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,ec();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=Ue(Me().mark((function e(t){var n,r;return Me().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=Ue(Me().mark((function e(){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Hu()?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=Ue(Me().mark((function e(){var t=this;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.receiver=Uu._getInstance(Hu()?self:null),this.receiver._subscribe("keyChanged",function(){var e=Ue(Me().mark((function e(n,r){var i;return Me().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=Ue(Me().mark((function e(t,n){return Me().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=Ue(Me().mark((function e(){var t,n,r;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Wu();case 2:if(this.activeServiceWorker=e.sent,this.activeServiceWorker){e.next=5;break}return e.abrupt("return");case 5:return this.sender=new zu(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=Ue(Me().mark((function e(t){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.sender&&this.activeServiceWorker&&Gu()===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=Ue(Me().mark((function e(){var t;return Me().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,ec();case 5:return t=e.sent,e.next=8,tc(t,Ou,"1");case 8:return e.next=10,ac(t,Ou);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=Ue(Me().mark((function e(t){return Me().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=Ue(Me().mark((function e(t,n){var r=this;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._withPendingWrite(Ue(Me().mark((function e(){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r._withRetries((function(e){return tc(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=Ue(Me().mark((function e(t){var n;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._withRetries((function(e){return rc(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=Ue(Me().mark((function e(t){var n=this;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._withPendingWrite(Ue(Me().mark((function e(){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n._withRetries((function(e){return ac(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=Ue(Me().mark((function e(){var t,n,r,i,a,o,s,u,c,l,f;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._withRetries((function(e){var t=Ju(e,!1).getAll();return new Yu(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);try{for(i.s();!(a=i.n()).done;)o=a.value,s=o.fbase_key,u=o.value,r.add(s),JSON.stringify(this.localCache[s])!==JSON.stringify(u)&&(this.notifyListeners(s,u),n.push(s))}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(Ue(Me().mark((function t(){return Me().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}();oc.type="LOCAL";var sc=oc;function uc(e,t){return To(e,"POST","/v2/accounts/mfaSignIn:start",So(e,t))}function cc(e,t){return To(e,"POST","/v2/accounts/mfaSignIn:finalize",So(e,t))}Ts("rcb"),new bo(3e4,6e4);var lc="recaptcha";function fc(e,t,n){return hc.apply(this,arguments)}function hc(){return hc=Ue(Me().mark((function e(t,n,r){var i,a,o,s,u,c,l,f,h;return Me().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,po("string"===typeof a,t,"argument-error"),po(r.type===lc,t,"argument-error"),!("session"in(o="string"===typeof n?{phoneNumber:n}:n))){e.next=26;break}if(s=o.session,!("phoneNumber"in o)){e.next=17;break}return po("enroll"===s.type,t,"internal-error"),e.next=13,Nu(t,{idToken:s.credential,phoneEnrollmentInfo:{phoneNumber:o.phoneNumber,recaptchaToken:a}});case 13:return u=e.sent,e.abrupt("return",u.phoneSessionInfo.sessionInfo);case 17:return po("signin"===s.type,t,"internal-error"),po(c=(null===(i=o.multiFactorHint)||void 0===i?void 0:i.uid)||o.multiFactorUid,t,"missing-multi-factor-info"),e.next=22,uc(t,{mfaPendingCredential:s.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,Xs(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]])}))),hc.apply(this,arguments)}var dc=function(){function e(t){u(this,e),this.providerId=e.PROVIDER_ID,this.auth=Os(t)}return h(e,[{key:"verifyPhoneNumber",value:function(e,t){return fc(this.auth,e,Nt(t))}}],[{key:"credential",value:function(e,t){return nu._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?nu._fromTokenResponse(n,r):null}}]),e}();function pc(e,t){return t?is(t):(po(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}dc.PROVIDER_ID="phone",dc.PHONE_SIGN_IN_METHOD="phone";var vc=function(e){p(n,e);var t=g(n);function n(e){var r;return u(this,n),(r=t.call(this,"custom","custom")).params=e,r}return h(n,[{key:"_getIdTokenResponse",value:function(e){return Gs(e,this._buildIdpRequest())}},{key:"_linkToIdToken",value:function(e,t){return Gs(e,this._buildIdpRequest(t))}},{key:"_getReauthenticationResolver",value:function(e){return Gs(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}(Ms);function mc(e){return wu(e.auth,new vc(e),e.bypassAuthState)}function yc(e){var t=e.auth,n=e.user;return po(n,t,"internal-error"),ku(n,new vc(e),e.bypassAuthState)}function gc(e){return kc.apply(this,arguments)}function kc(){return kc=Ue(Me().mark((function e(t){var n,r;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.auth,po(r=t.user,n,"internal-error"),e.abrupt("return",yu(r,new vc(t),t.bypassAuthState));case 3:case"end":return e.stop()}}),e)}))),kc.apply(this,arguments)}var bc=function(){function e(t,n,r,i){var a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];u(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 h(e,[{key:"execute",value:function(){var e=this;return new Promise(function(){var t=Ue(Me().mark((function t(n,r){return Me().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=Ue(Me().mark((function e(t){var n,r,i,a,o,s,u;return Me().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,s=t.type,!o){e.next=4;break}return this.reject(o),e.abrupt("return");case 4:return u={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(s)(u);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 mc;case"linkViaPopup":case"linkViaRedirect":return gc;case"reauthViaPopup":case"reauthViaRedirect":return yc;default:uo(this.auth,"internal-error")}}},{key:"resolve",value:function(e){mo(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}},{key:"reject",value:function(e){mo(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}(),wc=new bo(2e3,1e4);function xc(e,t,n){return Ec.apply(this,arguments)}function Ec(){return Ec=Ue(Me().mark((function e(t,n,r){var i,a,o;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Os(t),fo(t,n,au),a=pc(i,r),o=new _c(i,"signInViaPopup",n,a),e.abrupt("return",o.executeNotNull());case 5:case"end":return e.stop()}}),e)}))),Ec.apply(this,arguments)}var _c=function(e){p(n,e);var t=g(n);function n(e,r,i,a,o){var s;return u(this,n),(s=t.call(this,e,r,a,o)).provider=i,s.authWindow=null,s.pollId=null,n.currentPopupAction&&n.currentPopupAction.cancel(),n.currentPopupAction=y(s),s}return h(n,[{key:"executeNotNull",value:function(){var e=Ue(Me().mark((function e(){var t;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.execute();case 2:return po(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=Ue(Me().mark((function e(){var t,n=this;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return mo(1===this.filter.length,"Popup operations only handle one event"),t=Vu(),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(co(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(co(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(co(e.auth,"popup-closed-by-user"))}),8e3):e.pollId=window.setTimeout(t,wc.get())}()}}]),n}(bc);_c.currentPopupAction=null;var Sc="pendingRedirect",Tc=new Map,Cc=function(e){p(n,e);var t=g(n);function n(e,r){var i,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return u(this,n),(i=t.call(this,e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],r,void 0,a)).eventId=null,i}return h(n,[{key:"execute",value:function(){var e=Ue(Me().mark((function e(){var t,r;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Tc.get(this.auth._key())){e.next=21;break}return e.prev=2,e.next=5,Ic(this.resolver,this.auth);case 5:if(!e.sent){e.next=12;break}return e.next=9,Za(v(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:Tc.set(this.auth._key(),t);case 21:return this.bypassAuthState||Tc.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=Ue(Me().mark((function e(t){var r;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("signInViaRedirect"!==t.type){e.next=4;break}return e.abrupt("return",Za(v(n.prototype),"onAuthEvent",this).call(this,t));case 4:if("unknown"!==t.type){e.next=7;break}return this.resolve(null),e.abrupt("return");case 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",Za(v(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=Ue(Me().mark((function e(){return Me().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}(bc);function Ic(e,t){return Nc.apply(this,arguments)}function Nc(){return Nc=Ue(Me().mark((function e(t,n){var r,i,a;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Oc(n),i=Rc(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)}))),Nc.apply(this,arguments)}function Ac(e,t){Tc.set(e._key(),t)}function Rc(e){return is(e._redirectPersistence)}function Oc(e){return ss(Sc,e.config.apiKey,e.name)}function Pc(e,t){return Dc.apply(this,arguments)}function Dc(){return Dc=Ue(Me().mark((function e(t,n){var r,i,a,o,s,u=arguments;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=u.length>2&&void 0!==u[2]&&u[2],i=Os(t),a=pc(i,n),o=new Cc(i,a,r),e.next=6,o.execute();case 6:if(!(s=e.sent)||r){e.next=13;break}return delete s.user._redirectEventId,e.next=11,i._persistUserIfCurrent(s.user);case 11:return e.next=13,i._setRedirectUser(null,n);case 13:return e.abrupt("return",s);case 14:case"end":return e.stop()}}),e)}))),Dc.apply(this,arguments)}var Lc=function(){function e(t){u(this,e),this.auth=t,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}return h(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 Mc(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&&!Mc(e)){var r=(null===(n=e.error.code)||void 0===n?void 0:n.split("auth/")[1])||"internal-error";t.onError(co(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(jc(e))}},{key:"saveEventToCache",value:function(e){this.cachedEventUids.add(jc(e)),this.lastProcessedEventTime=Date.now()}}]),e}();function jc(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter((function(e){return e})).join("-")}function Mc(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 Fc(e){return Uc.apply(this,arguments)}function Uc(){return Uc=Ue(Me().mark((function e(t){var n,r=arguments;return Me().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",To(t,"GET","/v1/projects",n));case 2:case"end":return e.stop()}}),e)}))),Uc.apply(this,arguments)}var Vc=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,zc=/^https?/;function Bc(){return Bc=Ue(Me().mark((function e(t){var n,r,i,a,o;return Me().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,Fc(t);case 4:n=e.sent,r=n.authorizedDomains,i=_(r),e.prev=7,i.s();case 9:if((a=i.n()).done){e.next=20;break}if(o=a.value,e.prev=11,!qc(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:uo(t,"unauthorized-domain");case 29:case"end":return e.stop()}}),e,null,[[7,22,25,28],[11,16]])}))),Bc.apply(this,arguments)}function qc(e){var t=yo(),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(!zc.test(r))return!1;if(Vc.test(e))return i===e;var o=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+o+"|"+o+")$","i").test(i)}var Hc=new bo(3e4,6e4);function Wc(){var e=Bu().___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=s(e.H[r].L),e.CP)for(var i=0;i<e.CP.length;i++)e.CP[i]=null}}var Kc=null;function Gc(e){return Kc=Kc||function(e){return new Promise((function(t,n){var r,i,a;function o(){Wc(),gapi.load("gapi.iframes",{callback:function(){t(gapi.iframes.getContext())},ontimeout:function(){Wc(),n(co(e,"network-request-failed"))},timeout:Hc.get()})}if(null===(i=null===(r=Bu().gapi)||void 0===r?void 0:r.iframes)||void 0===i?void 0:i.Iframe)t(gapi.iframes.getContext());else{if(!(null===(a=Bu().gapi)||void 0===a?void 0:a.load)){var s=Ts("iframefcb");return Bu()[s]=function(){gapi.load?o():n(co(e,"network-request-failed"))},Ss("https://apis.google.com/js/api.js?onload=".concat(s)).catch((function(e){return n(e)}))}o()}})).catch((function(e){throw Kc=null,e}))}(e),Kc}var Qc=new bo(5e3,15e3),$c="__/auth/iframe",Xc="emulator/auth/iframe",Yc={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},Jc=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function Zc(e){var t=e.config;po(t.authDomain,e,"auth-domain-config-required");var n=t.emulator?wo(t,Xc):"https://".concat(e.config.authDomain,"/").concat($c),r={apiKey:t.apiKey,appName:e.name,v:_n},i=Jc.get(e.config.apiHost);i&&(r.eid=i);var a=e._getFrameworks();return a.length&&(r.fw=a.join(",")),"".concat(n,"?").concat(kt(r).slice(1))}function el(e){return tl.apply(this,arguments)}function tl(){return tl=Ue(Me().mark((function e(t){var n,r;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Gc(t);case 2:return n=e.sent,po(r=Bu().gapi,t,"internal-error"),e.abrupt("return",n.open({where:document.body,url:Zc(t),messageHandlersFilter:r.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:Yc,dontclear:!0},(function(e){return new Promise(function(){var n=Ue(Me().mark((function n(r,i){var a,o,s;return Me().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return s=function(){Bu().clearTimeout(o),r(e)},n.next=3,e.restyle({setHideOnLeave:!1});case 3:a=co(t,"network-request-failed"),o=Bu().setTimeout((function(){i(a)}),Qc.get()),e.ping(s).then(s,(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)}))),tl.apply(this,arguments)}var nl={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},rl=function(){function e(t){u(this,e),this.window=t,this.associatedEvent=null}return h(e,[{key:"close",value:function(){if(this.window)try{this.window.close()}catch(e){}}}]),e}();function il(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(),o=Math.max((window.screen.availWidth-r)/2,0).toString(),s="",u=Object.assign(Object.assign({},nl),{width:r.toString(),height:i.toString(),top:a,left:o}),c=ct().toLowerCase();n&&(s=hs(c)?"_blank":n),ls(c)&&(t=t||"http://localhost",u.scrollbars="yes");var l=Object.entries(u).reduce((function(e,t){var n=E(t,2),r=n[0],i=n[1];return"".concat(e).concat(r,"=").concat(i,",")}),"");if(function(){var e;return ys(arguments.length>0&&void 0!==arguments[0]?arguments[0]:ct())&&!!(null===(e=window.navigator)||void 0===e?void 0:e.standalone)}(c)&&"_self"!==s)return function(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)}(t||"",s),new rl(null);var f=window.open(t||"",s,l);po(f,e,"popup-blocked");try{f.focus()}catch(h){}return new rl(f)}var al="__/auth/handler",ol="emulator/auth/handler",sl=encodeURIComponent("fac");function ul(e,t,n,r,i,a){return cl.apply(this,arguments)}function cl(){return cl=Ue(Me().mark((function e(t,n,r,i,a,o){var s,u,c,l,f,h,d,p,v,m,y,g,k;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(po(t.config.authDomain,t,"auth-domain-config-required"),po(t.config.apiKey,t,"invalid-api-key"),s={apiKey:t.config.apiKey,appName:t.name,authType:r,redirectUrl:i,v:_n,eventId:a},n instanceof au)for(n.setDefaultLanguage(t.languageCode),s.providerId=n.providerId||"",mt(n.getCustomParameters())||(s.customParameters=JSON.stringify(n.getCustomParameters())),u=0,c=Object.entries(o||{});u<c.length;u++)l=E(c[u],2),f=l[0],h=l[1],s[f]=h;for(n instanceof ou&&(d=n.getScopes().filter((function(e){return""!==e}))).length>0&&(s.scopes=d.join(",")),t.tenantId&&(s.tid=t.tenantId),p=s,v=0,m=Object.keys(p);v<m.length;v++)y=m[v],void 0===p[y]&&delete p[y];return e.next=10,t._getAppCheckToken();case 10:return g=e.sent,k=g?"#".concat(sl,"=").concat(encodeURIComponent(g)):"",e.abrupt("return","".concat(ll(t),"?").concat(kt(p).slice(1)).concat(k));case 13:case"end":return e.stop()}}),e)}))),cl.apply(this,arguments)}function ll(e){var t=e.config;return t.emulator?wo(t,ol):"https://".concat(t.authDomain,"/").concat(al)}var fl="webStorageSupport",hl=function(){function e(){u(this,e),this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Mu,this._completeRedirectFn=Pc,this._overrideRedirectResult=Ac}return h(e,[{key:"_openPopup",value:function(){var e=Ue(Me().mark((function e(t,n,r,i){var a,o;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return mo(null===(a=this.eventManagers[t._key()])||void 0===a?void 0:a.manager,"_initialize() not called before _openPopup()"),e.next=3,ul(t,n,r,yo(),i);case 3:return o=e.sent,e.abrupt("return",il(t,o,Vu()));case 5:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i){return e.apply(this,arguments)}}()},{key:"_openRedirect",value:function(){var e=Ue(Me().mark((function e(t,n,r,i){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._originValidation(t);case 2:return e.next=4,ul(t,n,r,yo(),i);case 4:return qu(e.sent),e.abrupt("return",new Promise((function(){})));case 7:case"end":return e.stop()}}),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):(mo(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=Ue(Me().mark((function e(t){var n,r;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,el(t);case 2:return n=e.sent,r=new Lc(t),n.register("authEvent",(function(e){return po(null===e||void 0===e?void 0:e.authEvent,t,"invalid-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(fl,{type:fl},(function(n){var r,i=null===(r=null===n||void 0===n?void 0:n[0])||void 0===r?void 0:r[fl];void 0!==i&&t(!!i),uo(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 Bc.apply(this,arguments)}(e)),this.originValidationPromises[t]}},{key:"_shouldInitProactively",get:function(){return ks()||fs()||ys()}}]),e}(),dl=hl,pl=function(){function e(t){u(this,e),this.factorId=t}return h(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 vo("unexpected MultiFactorSessionType")}}}]),e}(),vl=function(e){p(n,e);var t=g(n);function n(e){var r;return u(this,n),(r=t.call(this,"phone")).credential=e,r}return h(n,[{key:"_finalizeEnroll",value:function(e,t,n){return function(e,t){return To(e,"POST","/v2/accounts/mfaEnrollment:finalize",So(e,t))}(e,{idToken:t,displayName:n,phoneVerificationInfo:this.credential._makeVerificationRequest()})}},{key:"_finalizeSignIn",value:function(e,t){return function(e,t){return To(e,"POST","/v2/accounts/mfaSignIn:finalize",So(e,t))}(e,{mfaPendingCredential:t,phoneVerificationInfo:this.credential._makeVerificationRequest()})}}],[{key:"_fromCredential",value:function(e){return new n(e)}}]),n}(pl);(function(){function e(){u(this,e)}return h(e,null,[{key:"assertion",value:function(e){return vl._fromCredential(e)}}]),e}()).FACTOR_ID="phone";var ml=function(){function e(){u(this,e)}return h(e,null,[{key:"assertionForEnrollment",value:function(e,t){return yl._fromSecret(e,t)}},{key:"assertionForSignIn",value:function(e,t){return yl._fromEnrollmentId(e,t)}},{key:"generateSecret",value:function(){var e=Ue(Me().mark((function e(t){var n,r;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return po("undefined"!==typeof(n=t).auth,"internal-error"),e.next=4,Au(n.auth,{idToken:n.credential,totpEnrollmentInfo:{}});case 4:return r=e.sent,e.abrupt("return",gl._fromStartTotpMfaEnrollmentResponse(r,n.auth));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}]),e}();ml.FACTOR_ID="totp";var yl=function(e){p(n,e);var t=g(n);function n(e,r,i){var a;return u(this,n),(a=t.call(this,"totp")).otp=e,a.enrollmentId=r,a.secret=i,a}return h(n,[{key:"_finalizeEnroll",value:function(){var e=Ue(Me().mark((function e(t,n,r){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return po("undefined"!==typeof this.secret,t,"argument-error"),e.abrupt("return",Ru(t,{idToken:n,displayName:r,totpVerificationInfo:this.secret._makeTotpVerificationInfo(this.otp)}));case 2:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"_finalizeSignIn",value:function(){var e=Ue(Me().mark((function e(t,n){var r;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return po(void 0!==this.enrollmentId&&void 0!==this.otp,t,"argument-error"),r={verificationCode:this.otp},e.abrupt("return",cc(t,{mfaPendingCredential:n,mfaEnrollmentId:this.enrollmentId,totpVerificationInfo:r}));case 3:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}],[{key:"_fromSecret",value:function(e,t){return new n(t,void 0,e)}},{key:"_fromEnrollmentId",value:function(e,t){return new n(t,e)}}]),n}(pl),gl=function(){function e(t,n,r,i,a,o,s){u(this,e),this.sessionInfo=o,this.auth=s,this.secretKey=t,this.hashingAlgorithm=n,this.codeLength=r,this.codeIntervalSeconds=i,this.enrollmentCompletionDeadline=a}return h(e,[{key:"_makeTotpVerificationInfo",value:function(e){return{sessionInfo:this.sessionInfo,verificationCode:e}}},{key:"generateQrCodeUrl",value:function(e,t){var n,r=!1;return(kl(e)||kl(t))&&(r=!0),r&&(kl(e)&&(e=(null===(n=this.auth.currentUser)||void 0===n?void 0:n.email)||"unknownuser"),kl(t)&&(t=this.auth.name)),"otpauth://totp/".concat(t,":").concat(e,"?secret=").concat(this.secretKey,"&issuer=").concat(t,"&algorithm=").concat(this.hashingAlgorithm,"&digits=").concat(this.codeLength)}}],[{key:"_fromStartTotpMfaEnrollmentResponse",value:function(t,n){return new e(t.totpSessionInfo.sharedSecretKey,t.totpSessionInfo.hashingAlgorithm,t.totpSessionInfo.verificationCodeLength,t.totpSessionInfo.periodSec,new Date(t.totpSessionInfo.finalizeEnrollmentTime).toUTCString(),t.totpSessionInfo.sessionInfo,n)}}]),e}();function kl(e){return"undefined"===typeof e||0===(null===e||void 0===e?void 0:e.length)}var bl="@firebase/auth",wl="0.23.1",xl=function(){function e(t){u(this,e),this.auth=t,this.internalListeners=new Map}return h(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=Ue(Me().mark((function e(t){var n;return Me().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){e((null===t||void 0===t?void 0:t.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(){po(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}},{key:"updateProactiveRefresh",value:function(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}]),e}();var El,_l=ot("authIdTokenMaxAge")||300,Sl=null;El="Browser",kn(new At("auth",(function(e,t){var n=t.options,r=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),a=e.getProvider("app-check-internal"),o=r.options,s=o.apiKey,u=o.authDomain;po(s&&!s.includes(":"),"invalid-api-key",{appName:r.name}),po(!(null===u||void 0===u?void 0:u.includes(":")),"argument-error",{appName:r.name});var c={apiKey:s,authDomain:u,clientPlatform:El,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:bs(El)},l=new Rs(r,i,a,c);return function(e,t){var n=(null===t||void 0===t?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(is);(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)}(l,n),l}),"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((function(e,t,n){e.getProvider("auth-internal").initialize()}))),kn(new At("auth-internal",(function(e){return function(e){return new xl(e)}(Os(e.getProvider("auth").getImmediate()))}),"PRIVATE").setInstantiationMode("EXPLICIT")),Cn(bl,wl,function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";default:return}}(El)),Cn(bl,wl,"esm2017");var Tl,Cl="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{},Il={},Nl=Nl||{},Al=Cl||self;function Rl(){}function Ol(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 Pl(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}var Dl="closure_uid_"+(1e9*Math.random()>>>0),Ll=0;function jl(e,t,n){return e.call.apply(e.bind,arguments)}function Ml(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 Fl(e,t,n){return(Fl=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?jl:Ml).apply(null,arguments)}function Ul(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 Vl(e,t){function n(){}n.prototype=t.prototype,e.$=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.ac=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 zl(){this.s=this.s,this.o=this.o}zl.prototype.s=!1,zl.prototype.ra=function(){var e;!this.s&&(this.s=!0,this.N(),0)&&(e=this,Object.prototype.hasOwnProperty.call(e,Dl)&&e[Dl]||(e[Dl]=++Ll))},zl.prototype.N=function(){if(this.o)for(;this.o.length;)this.o.shift()()};var Bl=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};function ql(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 Hl(e,t){for(var n=1;n<arguments.length;n++){var r=arguments[n];if(Ol(r)){var i=e.length||0,a=r.length||0;e.length=i+a;for(var o=0;o<a;o++)e[i+o]=r[o]}else e.push(r)}}function Wl(e,t){this.type=e,this.g=this.target=t,this.defaultPrevented=!1}Wl.prototype.h=function(){this.defaultPrevented=!0};var Kl=function(){if(!Al.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{Al.addEventListener("test",Rl,t),Al.removeEventListener("test",Rl,t)}catch(n){}return e}();function Gl(e){return/^[\s\xa0]*$/.test(e)}var Ql=String.prototype.trim?function(e){return e.trim()}:function(e){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]};function $l(e,t){return e<t?-1:e>t?1:0}function Xl(){var e=Al.navigator;return e&&(e=e.userAgent)?e:""}function Yl(e){return-1!=Xl().indexOf(e)}function Jl(e){return Jl[" "](e),e}function Zl(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:e[t]=n(t)}Jl[" "]=Rl;var ef,tf=Yl("Opera"),nf=Yl("Trident")||Yl("MSIE"),rf=Yl("Edge"),af=rf||nf,of=Yl("Gecko")&&!(-1!=Xl().toLowerCase().indexOf("webkit")&&!Yl("Edge"))&&!(Yl("Trident")||Yl("MSIE"))&&!Yl("Edge"),sf=-1!=Xl().toLowerCase().indexOf("webkit")&&!Yl("Edge");function uf(){var e=Al.document;return e?e.documentMode:void 0}e:{var cf="",lf=function(){var e=Xl();return of?/rv:([^\);]+)(\)|;)/.exec(e):rf?/Edge\/([\d\.]+)/.exec(e):nf?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):sf?/WebKit\/(\S+)/.exec(e):tf?/(?:Version)[ \/]?(\S+)/.exec(e):void 0}();if(lf&&(cf=lf?lf[1]:""),nf){var ff=uf();if(null!=ff&&ff>parseFloat(cf)){ef=String(ff);break e}}ef=cf}var hf,df={};if(Al.document&&nf){var pf=uf();hf=pf||(parseInt(ef,10)||void 0)}else hf=void 0;var vf=hf;function mf(e,t){if(Wl.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(of){e:{try{Jl(t.nodeName);var i=!0;break e}catch(a){}i=!1}i||(t=null)}}else"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:yf[e.pointerType]||"",this.state=e.state,this.i=e,e.defaultPrevented&&mf.$.h.call(this)}}Vl(mf,Wl);var yf={2:"touch",3:"pen",4:"mouse"};mf.prototype.h=function(){mf.$.h.call(this);var e=this.i;e.preventDefault?e.preventDefault():e.returnValue=!1};var gf="closure_listenable_"+(1e6*Math.random()|0),kf=0;function bf(e,t,n,r,i){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!r,this.la=i,this.key=++kf,this.fa=this.ia=!1}function wf(e){e.fa=!0,e.listener=null,e.proxy=null,e.src=null,e.la=null}function xf(e,t,n){for(var r in e)t.call(n,e[r],r,e)}function Ef(e){var t={};for(var n in e)t[n]=e[n];return t}var _f="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Sf(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<_f.length;a++)n=_f[a],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function Tf(e){this.src=e,this.g={},this.h=0}function Cf(e,t){var n=t.type;if(n in e.g){var r,i=e.g[n],a=Bl(i,t);(r=0<=a)&&Array.prototype.splice.call(i,a,1),r&&(wf(t),0==e.g[n].length&&(delete e.g[n],e.h--))}}function If(e,t,n,r){for(var i=0;i<e.length;++i){var a=e[i];if(!a.fa&&a.listener==t&&a.capture==!!n&&a.la==r)return i}return-1}Tf.prototype.add=function(e,t,n,r,i){var a=e.toString();(e=this.g[a])||(e=this.g[a]=[],this.h++);var o=If(e,t,r,i);return-1<o?(t=e[o],n||(t.ia=!1)):((t=new bf(t,this.src,a,!!r,i)).ia=n,e.push(t)),t};var Nf="closure_lm_"+(1e6*Math.random()|0),Af={};function Rf(e,t,n,r,i){if(r&&r.once)return Pf(e,t,n,r,i);if(Array.isArray(t)){for(var a=0;a<t.length;a++)Rf(e,t[a],n,r,i);return null}return n=Vf(n),e&&e[gf]?e.O(t,n,Pl(r)?!!r.capture:!!r,i):Of(e,t,n,!1,r,i)}function Of(e,t,n,r,i,a){if(!t)throw Error("Invalid event type");var o=Pl(i)?!!i.capture:!!i,s=Ff(e);if(s||(e[Nf]=s=new Tf(e)),(n=s.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=Mf;return e}(),n.proxy=r,r.src=e,r.listener=n,e.addEventListener)Kl||(i=o),void 0===i&&(i=!1),e.addEventListener(t.toString(),r,i);else if(e.attachEvent)e.attachEvent(jf(t.toString()),r);else{if(!e.addListener||!e.removeListener)throw Error("addEventListener and attachEvent are unavailable.");e.addListener(r)}return n}function Pf(e,t,n,r,i){if(Array.isArray(t)){for(var a=0;a<t.length;a++)Pf(e,t[a],n,r,i);return null}return n=Vf(n),e&&e[gf]?e.P(t,n,Pl(r)?!!r.capture:!!r,i):Of(e,t,n,!0,r,i)}function Df(e,t,n,r,i){if(Array.isArray(t))for(var a=0;a<t.length;a++)Df(e,t[a],n,r,i);else r=Pl(r)?!!r.capture:!!r,n=Vf(n),e&&e[gf]?(e=e.i,(t=String(t).toString())in e.g&&(-1<(n=If(a=e.g[t],n,r,i))&&(wf(a[n]),Array.prototype.splice.call(a,n,1),0==a.length&&(delete e.g[t],e.h--)))):e&&(e=Ff(e))&&(t=e.g[t.toString()],e=-1,t&&(e=If(t,n,r,i)),(n=-1<e?t[e]:null)&&Lf(n))}function Lf(e){if("number"!==typeof e&&e&&!e.fa){var t=e.src;if(t&&t[gf])Cf(t.i,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(jf(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=Ff(t))?(Cf(n,e),0==n.h&&(n.src=null,t[Nf]=null)):wf(e)}}}function jf(e){return e in Af?Af[e]:Af[e]="on"+e}function Mf(e,t){if(e.fa)e=!0;else{t=new mf(t,this);var n=e.listener,r=e.la||e.src;e.ia&&Lf(e),e=n.call(r,t)}return e}function Ff(e){return(e=e[Nf])instanceof Tf?e:null}var Uf="__closure_events_fn_"+(1e9*Math.random()>>>0);function Vf(e){return"function"===typeof e?e:(e[Uf]||(e[Uf]=function(t){return e.handleEvent(t)}),e[Uf])}function zf(){zl.call(this),this.i=new Tf(this),this.S=this,this.J=null}function Bf(e,t){var n,r=e.J;if(r)for(n=[];r;r=r.J)n.push(r);if(e=e.S,r=t.type||t,"string"===typeof t)t=new Wl(t,e);else if(t instanceof Wl)t.target=t.target||e;else{var i=t;Sf(t=new Wl(r,e),i)}if(i=!0,n)for(var a=n.length-1;0<=a;a--){var o=t.g=n[a];i=qf(o,r,!0,t)&&i}if(i=qf(o=t.g=e,r,!0,t)&&i,i=qf(o,r,!1,t)&&i,n)for(a=0;a<n.length;a++)i=qf(o=t.g=n[a],r,!1,t)&&i}function qf(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.fa&&o.capture==n){var s=o.listener,u=o.la||o.src;o.ia&&Cf(e.i,o),i=!1!==s.call(u,r)&&i}}return i&&!r.defaultPrevented}Vl(zf,zl),zf.prototype[gf]=!0,zf.prototype.removeEventListener=function(e,t,n,r){Df(this,e,t,n,r)},zf.prototype.N=function(){if(zf.$.N.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++)wf(n[r]);delete t.g[e],t.h--}}this.J=null},zf.prototype.O=function(e,t,n,r){return this.i.add(String(e),t,!1,n,r)},zf.prototype.P=function(e,t,n,r){return this.i.add(String(e),t,!0,n,r)};var Hf=Al.JSON.stringify;function Wf(){var e=Zf,t=null;return e.g&&(t=e.g,e.g=e.g.next,e.g||(e.h=null),t.next=null),t}var Kf,Gf=function(){function e(){u(this,e),this.h=this.g=null}return h(e,[{key:"add",value:function(e,t){var n=Qf.get();n.set(e,t),this.h?this.h.next=n:this.g=n,this.h=n}}]),e}(),Qf=new(function(){function e(t,n){u(this,e),this.i=t,this.j=n,this.h=0,this.g=null}return h(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 $f}),(function(e){return e.reset()})),$f=function(){function e(){u(this,e),this.next=this.g=this.h=null}return h(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 Xf(e){Al.setTimeout((function(){throw e}),0)}function Yf(e,t){Kf||function(){var e=Al.Promise.resolve(void 0);Kf=function(){e.then(eh)}}(),Jf||(Kf(),Jf=!0),Zf.add(e,t)}var Jf=!1,Zf=new Gf;function eh(){for(var e;e=Wf();){try{e.h.call(e.g)}catch(n){Xf(n)}var t=Qf;t.j(e),100>t.h&&(t.h++,e.next=t.g,t.g=e)}Jf=!1}function th(e,t){zf.call(this),this.h=e||1,this.g=t||Al,this.j=Fl(this.qb,this),this.l=Date.now()}function nh(e){e.ga=!1,e.T&&(e.g.clearTimeout(e.T),e.T=null)}function rh(e,t,n){if("function"===typeof e)n&&(e=Fl(e,n));else{if(!e||"function"!=typeof e.handleEvent)throw Error("Invalid listener argument");e=Fl(e.handleEvent,e)}return 2147483647<Number(t)?-1:Al.setTimeout(e,t||0)}function ih(e){e.g=rh((function(){e.g=null,e.i&&(e.i=!1,ih(e))}),e.j);var t=e.h;e.h=null,e.m.apply(null,t)}Vl(th,zf),(Tl=th.prototype).ga=!1,Tl.T=null,Tl.qb=function(){if(this.ga){var e=Date.now()-this.l;0<e&&e<.8*this.h?this.T=this.g.setTimeout(this.j,this.h-e):(this.T&&(this.g.clearTimeout(this.T),this.T=null),Bf(this,"tick"),this.ga&&(nh(this),this.start()))}},Tl.start=function(){this.ga=!0,this.T||(this.T=this.g.setTimeout(this.j,this.h),this.l=Date.now())},Tl.N=function(){th.$.N.call(this),nh(this),delete this.g};var ah=function(e){p(n,e);var t=g(n);function n(e,r){var i;return u(this,n),(i=t.call(this)).m=e,i.j=r,i.h=null,i.i=!1,i.g=null,i}return h(n,[{key:"l",value:function(e){this.h=arguments,this.g?this.i=!0:ih(this)}},{key:"N",value:function(){Za(v(n.prototype),"N",this).call(this),this.g&&(Al.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}]),n}(zl);function oh(e){zl.call(this),this.h=e,this.g={}}Vl(oh,zl);var sh=[];function uh(e,t,n,r){Array.isArray(n)||(n&&(sh[0]=n.toString()),n=sh);for(var i=0;i<n.length;i++){var a=Rf(t,n[i],r||e.handleEvent,!1,e.h||e);if(!a)break;e.g[a.key]=a}}function ch(e){xf(e.g,(function(e,t){this.g.hasOwnProperty(t)&&Lf(e)}),e),e.g={}}function lh(){this.g=!0}function fh(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 Hf(n)}catch(s){return t}}(e,n)+(r?" "+r:"")}))}oh.prototype.N=function(){oh.$.N.call(this),ch(this)},oh.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},lh.prototype.Ea=function(){this.g=!1},lh.prototype.info=function(){};var hh={},dh=null;function ph(){return dh=dh||new zf}function vh(e){Wl.call(this,hh.Ta,e)}function mh(e){var t=ph();Bf(t,new vh(t))}function yh(e,t){Wl.call(this,hh.STAT_EVENT,e),this.stat=t}function gh(e){var t=ph();Bf(t,new yh(t,e))}function kh(e,t){Wl.call(this,hh.Ua,e),this.size=t}function bh(e,t){if("function"!==typeof e)throw Error("Fn must not be null and must be a function");return Al.setTimeout((function(){e()}),t)}hh.Ta="serverreachability",Vl(vh,Wl),hh.STAT_EVENT="statevent",Vl(yh,Wl),hh.Ua="timingevent",Vl(kh,Wl);var wh={NO_ERROR:0,rb:1,Eb:2,Db:3,yb:4,Cb:5,Fb:6,Qa:7,TIMEOUT:8,Ib:9},xh={wb:"complete",Sb:"success",Ra:"error",Qa:"abort",Kb:"ready",Lb:"readystatechange",TIMEOUT:"timeout",Gb:"incrementaldata",Jb:"progress",zb:"downloadprogress",$b:"uploadprogress"};function Eh(){}function _h(e){return e.h||(e.h=e.i())}function Sh(){}Eh.prototype.h=null;var Th,Ch={OPEN:"a",vb:"b",Ra:"c",Hb:"d"};function Ih(){Wl.call(this,"d")}function Nh(){Wl.call(this,"c")}function Ah(){}function Rh(e,t,n,r){this.l=e,this.j=t,this.m=n,this.W=r||1,this.U=new oh(this),this.P=Ph,e=af?125:void 0,this.V=new th(e),this.I=null,this.i=!1,this.s=this.A=this.v=this.L=this.G=this.Y=this.B=null,this.F=[],this.g=null,this.C=0,this.o=this.u=null,this.aa=-1,this.J=!1,this.O=0,this.M=null,this.ca=this.K=this.ba=this.S=!1,this.h=new Oh}function Oh(){this.i=null,this.g="",this.h=!1}Vl(Ih,Wl),Vl(Nh,Wl),Vl(Ah,Eh),Ah.prototype.g=function(){return new XMLHttpRequest},Ah.prototype.i=function(){return{}},Th=new Ah;var Ph=45e3,Dh={},Lh={};function jh(e,t,n){e.L=1,e.v=td(Xh(t)),e.s=n,e.S=!0,Mh(e,null)}function Mh(e,t){e.G=Date.now(),zh(e),e.A=Xh(e.v);var n=e.A,r=e.W;Array.isArray(r)||(r=[String(r)]),pd(n.i,"t",r),e.C=0,n=e.l.I,e.h=new Oh,e.g=vp(e.l,n?t:null,!e.s),0<e.O&&(e.M=new ah(Fl(e.Pa,e,e.g),e.O)),uh(e.U,e.g,"readystatechange",e.nb),t=e.I?Ef(e.I):{},e.s?(e.u||(e.u="POST"),t["Content-Type"]="application/x-www-form-urlencoded",e.g.ha(e.A,e.u,e.s,t)):(e.u="GET",e.g.ha(e.A,e.u,null,t)),mh(),function(e,t,n,r,i,a){e.info((function(){if(e.g)if(a)for(var o="",s=a.split("&"),u=0;u<s.length;u++){var c=s[u].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.W,e.s)}function Fh(e){return!!e.g&&("GET"==e.u&&2!=e.L&&e.l.Ha)}function Uh(e,t,n){for(var r,i=!0;!e.J&&e.C<n.length;){if((r=Vh(e,n))==Lh){4==t&&(e.o=4,gh(14),i=!1),fh(e.j,e.m,null,"[Incomplete Response]");break}if(r==Dh){e.o=4,gh(15),fh(e.j,e.m,n,"[Invalid Chunk]"),i=!1;break}fh(e.j,e.m,r,null),Kh(e,r)}Fh(e)&&r!=Lh&&r!=Dh&&(e.h.g="",e.C=0),4!=t||0!=n.length||e.h.h||(e.o=1,gh(16),i=!1),e.i=e.i&&i,i?0<n.length&&!e.ca&&(e.ca=!0,(t=e.l).g==e&&t.ca&&!t.L&&(t.j.info("Great, no buffering proxy detected. Bytes received: "+n.length),sp(t),t.L=!0,gh(11))):(fh(e.j,e.m,n,"[Invalid Chunked Response]"),Wh(e),Hh(e))}function Vh(e,t){var n=e.C,r=t.indexOf("\n",n);return-1==r?Lh:(n=Number(t.substring(n,r)),isNaN(n)?Dh:(r+=1)+n>t.length?Lh:(t=t.substr(r,n),e.C=r+n,t))}function zh(e){e.Y=Date.now()+e.P,Bh(e,e.P)}function Bh(e,t){if(null!=e.B)throw Error("WatchDog timer not null");e.B=bh(Fl(e.lb,e),t)}function qh(e){e.B&&(Al.clearTimeout(e.B),e.B=null)}function Hh(e){0==e.l.H||e.J||lp(e.l,e)}function Wh(e){qh(e);var t=e.M;t&&"function"==typeof t.ra&&t.ra(),e.M=null,nh(e.V),ch(e.U),e.g&&(t=e.g,e.g=null,t.abort(),t.ra())}function Kh(e,t){try{var n=e.l;if(0!=n.H&&(n.g==e||xd(n.h,e)))if(!e.K&&xd(n.h,e)&&3==n.H){try{var r=n.Ja.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.G+3e3<e.G))break e;cp(n),Zd(n)}op(n),gh(18)}}else n.Fa=i[1],0<n.Fa-n.V&&37500>i[2]&&n.M&&0==n.A&&!n.v&&(n.v=bh(Fl(n.ib,n),6e3));if(1>=wd(n.h)&&n.na){try{n.na()}catch(a){}n.na=void 0}}else hp(n,11)}else if((e.K||n.g==e)&&cp(n),!Gl(t))for(i=n.Ja.g.parse(t),t=0;t<i.length;t++){var a=i[t];if(n.V=a[0],a=a[1],2==n.H)if("c"==a[0]){n.J=a[1],n.oa=a[2];var o=a[3];null!=o&&(n.qa=o,n.j.info("VER="+n.qa));var s=a[4];null!=s&&(n.Ga=s,n.j.info("SVER="+n.Ga));var u=a[5];null!=u&&"number"===typeof u&&0<u&&(r=1.5*u,n.K=r,n.j.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.h;f.g||-1==l.indexOf("spdy")&&-1==l.indexOf("quic")&&-1==l.indexOf("h2")||(f.j=f.l,f.g=new Set,f.h&&(Ed(f,f.h),f.h=null))}if(r.F){var h=c.g?c.g.getResponseHeader("X-HTTP-Session-Id"):null;h&&(r.Da=h,ed(r.G,r.F,h))}}n.H=3,n.l&&n.l.Ba(),n.ca&&(n.S=Date.now()-e.G,n.j.info("Handshake RTT: "+n.S+"ms"));var d=e;if((r=n).wa=pp(r,r.I?r.oa:null,r.Y),d.K){_d(r.h,d);var p=d,v=r.K;v&&p.setTimeout(v),p.B&&(qh(p),zh(p)),r.g=d}else ap(r);0<n.i.length&&tp(n)}else"stop"!=a[0]&&"close"!=a[0]||hp(n,7);else 3==n.H&&("stop"==a[0]||"close"==a[0]?"stop"==a[0]?hp(n,7):Jd(n):"noop"!=a[0]&&n.l&&n.l.Aa(a),n.A=0)}mh()}catch(a){}}function Gh(e,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(t,void 0);else if(Ol(e)||"string"===typeof e)Array.prototype.forEach.call(e,t,void 0);else for(var n=function(e){if(e.sa&&"function"==typeof e.sa)return e.sa();if(!e.Z||"function"!=typeof e.Z){if("undefined"!==typeof Map&&e instanceof Map)return Array.from(e.keys());if(!("undefined"!==typeof Set&&e instanceof Set)){if(Ol(e)||"string"===typeof e){var t=[];e=e.length;for(var n=0;n<e;n++)t.push(n);return t}for(var r in t=[],n=0,e)t[n++]=r;return t}}}(e),r=function(e){if(e.Z&&"function"==typeof e.Z)return e.Z();if("undefined"!==typeof Map&&e instanceof Map||"undefined"!==typeof Set&&e instanceof Set)return Array.from(e.values());if("string"===typeof e)return e.split("");if(Ol(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,a=0;a<i;a++)t.call(void 0,r[a],n&&n[a],e)}(Tl=Rh.prototype).setTimeout=function(e){this.P=e},Tl.nb=function(e){e=e.target;var t=this.M;t&&3==Kd(e)?t.l():this.Pa(e)},Tl.Pa=function(e){try{if(e==this.g)e:{var t=Kd(this.g),n=this.g.Ia();this.g.da();if(!(3>t)&&(3!=t||af||this.g&&(this.h.h||this.g.ja()||Gd(this.g)))){this.J||4!=t||7==n||mh(),qh(this);var r=this.g.da();this.aa=r;t:if(Fh(this)){var i=Gd(this.g);e="";var a=i.length,o=4==Kd(this.g);if(!this.h.i){if("undefined"===typeof TextDecoder){Wh(this),Hh(this);var s="";break t}this.h.i=new Al.TextDecoder}for(n=0;n<a;n++)this.h.h=!0,e+=this.h.i.decode(i[n],{stream:o&&n==a-1});i.splice(0,a),this.h.g+=e,this.C=0,s=this.h.g}else s=this.g.ja();if(this.i=200==r,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.W,t,r),this.i){if(this.ba&&!this.K){t:{if(this.g){var u,c=this.g;if((u=c.g?c.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!Gl(u)){var l=u;break t}}l=null}if(!(r=l)){this.i=!1,this.o=3,gh(12),Wh(this),Hh(this);break e}fh(this.j,this.m,r,"Initial handshake response via X-HTTP-Initial-Response"),this.K=!0,Kh(this,r)}this.S?(Uh(this,t,s),af&&this.i&&3==t&&(uh(this.U,this.V,"tick",this.mb),this.V.start())):(fh(this.j,this.m,s,null),Kh(this,s)),4==t&&Wh(this),this.i&&!this.J&&(4==t?lp(this.l,this):(this.i=!1,zh(this)))}else 400==r&&0<s.indexOf("Unknown SID")?(this.o=3,gh(12)):(this.o=0,gh(13)),Wh(this),Hh(this)}}}catch(t){}},Tl.mb=function(){if(this.g){var e=Kd(this.g),t=this.g.ja();this.C<t.length&&(qh(this),Uh(this,e,t),this.i&&4!=e&&zh(this))}},Tl.cancel=function(){this.J=!0,Wh(this)},Tl.lb=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.L&&(mh(),gh(17)),Wh(this),this.o=2,Hh(this)):Bh(this,this.Y-e)};var Qh=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function $h(e,t){if(this.g=this.s=this.j="",this.m=null,this.o=this.l="",this.h=!1,e instanceof $h){this.h=void 0!==t?t:e.h,Yh(this,e.j),this.s=e.s,this.g=e.g,Jh(this,e.m),this.l=e.l,t=e.i;var n=new ld;n.i=t.i,t.g&&(n.g=new Map(t.g),n.h=t.h),Zh(this,n),this.o=e.o}else e&&(n=String(e).match(Qh))?(this.h=!!t,Yh(this,n[1]||"",!0),this.s=nd(n[2]||""),this.g=nd(n[3]||"",!0),Jh(this,n[4]),this.l=nd(n[5]||"",!0),Zh(this,n[6]||"",!0),this.o=nd(n[7]||"")):(this.h=!!t,this.i=new ld(null,this.h))}function Xh(e){return new $h(e)}function Yh(e,t,n){e.j=n?nd(t,!0):t,e.j&&(e.j=e.j.replace(/:$/,""))}function Jh(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 Zh(e,t,n){t instanceof ld?(e.i=t,function(e,t){t&&!e.j&&(fd(e),e.i=null,e.g.forEach((function(e,t){var n=t.toLowerCase();t!=n&&(hd(this,t),pd(this,n,e))}),e)),e.j=t}(e.i,e.h)):(n||(t=rd(t,ud)),e.i=new ld(t,e.h))}function ed(e,t,n){e.i.set(t,n)}function td(e){return ed(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),e}function nd(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function rd(e,t,n){return"string"===typeof e?(e=encodeURI(e).replace(t,id),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function id(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}$h.prototype.toString=function(){var e=[],t=this.j;t&&e.push(rd(t,ad,!0),":");var n=this.g;return(n||"file"==t)&&(e.push("//"),(t=this.s)&&e.push(rd(t,ad,!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.g&&"/"!=n.charAt(0)&&e.push("/"),e.push(rd(n,"/"==n.charAt(0)?sd:od,!0))),(n=this.i.toString())&&e.push("?",n),(n=this.o)&&e.push("#",rd(n,cd)),e.join("")};var ad=/[#\/\?@]/g,od=/[#\?:]/g,sd=/[#\?]/g,ud=/[#\?@]/g,cd=/#/g;function ld(e,t){this.h=this.g=null,this.i=e||null,this.j=!!t}function fd(e){e.g||(e.g=new Map,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 hd(e,t){fd(e),t=vd(e,t),e.g.has(t)&&(e.i=null,e.h-=e.g.get(t).length,e.g.delete(t))}function dd(e,t){return fd(e),t=vd(e,t),e.g.has(t)}function pd(e,t,n){hd(e,t),0<n.length&&(e.i=null,e.g.set(vd(e,t),ql(n)),e.h+=n.length)}function vd(e,t){return t=String(t),e.j&&(t=t.toLowerCase()),t}(Tl=ld.prototype).add=function(e,t){fd(this),this.i=null,e=vd(this,e);var n=this.g.get(e);return n||this.g.set(e,n=[]),n.push(t),this.h+=1,this},Tl.forEach=function(e,t){fd(this),this.g.forEach((function(n,r){n.forEach((function(n){e.call(t,n,r,this)}),this)}),this)},Tl.sa=function(){fd(this);for(var e=Array.from(this.g.values()),t=Array.from(this.g.keys()),n=[],r=0;r<t.length;r++)for(var i=e[r],a=0;a<i.length;a++)n.push(t[r]);return n},Tl.Z=function(e){fd(this);var t=[];if("string"===typeof e)dd(this,e)&&(t=t.concat(this.g.get(vd(this,e))));else{e=Array.from(this.g.values());for(var n=0;n<e.length;n++)t=t.concat(e[n])}return t},Tl.set=function(e,t){return fd(this),this.i=null,dd(this,e=vd(this,e))&&(this.h-=this.g.get(e).length),this.g.set(e,[t]),this.h+=1,this},Tl.get=function(e,t){return e&&0<(e=this.Z(e)).length?String(e[0]):t},Tl.toString=function(){if(this.i)return this.i;if(!this.g)return"";for(var e=[],t=Array.from(this.g.keys()),n=0;n<t.length;n++){var r=t[n],i=encodeURIComponent(String(r)),a=this.Z(r);for(r=0;r<a.length;r++){var o=i;""!==a[r]&&(o+="="+encodeURIComponent(String(a[r]))),e.push(o)}}return this.i=e.join("&")};var md=h((function e(t,n){u(this,e),this.h=t,this.g=n}));function yd(e){this.l=e||kd,Al.PerformanceNavigationTiming?e=0<(e=Al.performance.getEntriesByType("navigation")).length&&("hq"==e[0].nextHopProtocol||"h2"==e[0].nextHopProtocol):e=!!(Al.g&&Al.g.Ka&&Al.g.Ka()&&Al.g.Ka().ec),this.j=e?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}var gd,kd=10;function bd(e){return!!e.h||!!e.g&&e.g.size>=e.j}function wd(e){return e.h?1:e.g?e.g.size:0}function xd(e,t){return e.h?e.h==t:!!e.g&&e.g.has(t)}function Ed(e,t){e.g?e.g.add(t):e.h=t}function _d(e,t){e.h&&e.h==t?e.h=null:e.g&&e.g.has(t)&&e.g.delete(t)}function Sd(e){if(null!=e.h)return e.i.concat(e.h.F);if(null!=e.g&&0!==e.g.size){var t,n=e.i,r=_(e.g.values());try{for(r.s();!(t=r.n()).done;){var i=t.value;n=n.concat(i.F)}}catch(a){r.e(a)}finally{r.f()}return n}return ql(e.i)}function Td(){}function Cd(){this.g=new Td}function Id(e,t,n){var r=n||"";try{Gh(e,(function(e,n){var i=e;Pl(e)&&(i=Hf(e)),t.push(r+n+"="+encodeURIComponent(i))}))}catch(i){throw t.push(r+"type="+encodeURIComponent("_badmap")),i}}function Nd(e,t,n,r,i){try{t.onload=null,t.onerror=null,t.onabort=null,t.ontimeout=null,i(r)}catch(a){}}function Ad(e){this.l=e.fc||null,this.j=e.ob||!1}function Rd(e,t){zf.call(this),this.F=e,this.u=t,this.m=void 0,this.readyState=Od,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}yd.prototype.cancel=function(){if(this.i=Sd(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){var e,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()}},Td.prototype.stringify=function(e){return Al.JSON.stringify(e,void 0)},Td.prototype.parse=function(e){return Al.JSON.parse(e,void 0)},Vl(Ad,Eh),Ad.prototype.g=function(){return new Rd(this.l,this.j)},Ad.prototype.i=(gd={},function(){return gd}),Vl(Rd,zf);var Od=0;function Pd(e){e.j.read().then(e.Xa.bind(e)).catch(e.ka.bind(e))}function Dd(e){e.readyState=4,e.l=null,e.j=null,e.A=null,Ld(e)}function Ld(e){e.onreadystatechange&&e.onreadystatechange.call(e)}(Tl=Rd.prototype).open=function(e,t){if(this.readyState!=Od)throw this.abort(),Error("Error reopening a connection");this.C=e,this.B=t,this.readyState=1,Ld(this)},Tl.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.F||Al).fetch(new Request(this.B,t)).then(this.$a.bind(this),this.ka.bind(this))},Tl.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch((function(){})),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,Dd(this)),this.readyState=Od},Tl.$a=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,Ld(this)),this.g&&(this.readyState=3,Ld(this),this.g)))if("arraybuffer"===this.responseType)e.arrayBuffer().then(this.Ya.bind(this),this.ka.bind(this));else if("undefined"!==typeof Al.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;Pd(this)}else e.text().then(this.Za.bind(this),this.ka.bind(this))},Tl.Xa=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?Dd(this):Ld(this),3==this.readyState&&Pd(this)}},Tl.Za=function(e){this.g&&(this.response=this.responseText=e,Dd(this))},Tl.Ya=function(e){this.g&&(this.response=e,Dd(this))},Tl.ka=function(){this.g&&Dd(this)},Tl.setRequestHeader=function(e,t){this.v.append(e,t)},Tl.getResponseHeader=function(e){return this.h&&this.h.get(e.toLowerCase())||""},Tl.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(Rd.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(e){this.m=e?"include":"same-origin"}});var jd=Al.JSON.parse;function Md(e){zf.call(this),this.headers=new Map,this.u=e||null,this.h=!1,this.C=this.g=null,this.I="",this.m=0,this.j="",this.l=this.G=this.v=this.F=!1,this.B=0,this.A=null,this.K=Fd,this.L=this.M=!1}Vl(Md,zf);var Fd="",Ud=/^https?$/i,Vd=["POST","PUT"];function zd(e,t){e.h=!1,e.g&&(e.l=!0,e.g.abort(),e.l=!1),e.j=t,e.m=5,Bd(e),Hd(e)}function Bd(e){e.F||(e.F=!0,Bf(e,"complete"),Bf(e,"error"))}function qd(e){if(e.h&&"undefined"!=typeof Nl&&(!e.C[1]||4!=Kd(e)||2!=e.da()))if(e.v&&4==Kd(e))rh(e.La,0,e);else if(Bf(e,"readystatechange"),4==Kd(e)){e.h=!1;try{var t,n=e.da();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.I).match(Qh)[1]||null;if(!a&&Al.self&&Al.self.location){var o=Al.self.location.protocol;a=o.substr(0,o.length-1)}i=!Ud.test(a?a.toLowerCase():"")}t=i}if(t)Bf(e,"complete"),Bf(e,"success");else{e.m=6;try{var s=2<Kd(e)?e.g.statusText:""}catch(u){s=""}e.j=s+" ["+e.da()+"]",Bd(e)}}finally{Hd(e)}}}function Hd(e,t){if(e.g){Wd(e);var n=e.g,r=e.C[0]?Rl:null;e.g=null,e.C=null,t||Bf(e,"ready");try{n.onreadystatechange=r}catch(i){}}}function Wd(e){e.g&&e.L&&(e.g.ontimeout=null),e.A&&(Al.clearTimeout(e.A),e.A=null)}function Kd(e){return e.g?e.g.readyState:0}function Gd(e){try{if(!e.g)return null;if("response"in e.g)return e.g.response;switch(e.K){case Fd:case"text":return e.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in e.g)return e.g.mozResponseArrayBuffer}return null}catch(Jp){return null}}function Qd(e){var t="";return xf(e,(function(e,n){t+=n,t+=":",t+=e,t+="\r\n"})),t}function $d(e,t,n){e:{for(r in n){var r=!1;break e}r=!0}r||(n=Qd(n),"string"===typeof e?null!=n&&encodeURIComponent(String(n)):ed(e,t,n))}function Xd(e,t,n){return n&&n.internalChannelParams&&n.internalChannelParams[e]||t}function Yd(e){this.Ga=0,this.i=[],this.j=new lh,this.oa=this.wa=this.G=this.Y=this.g=this.Da=this.F=this.ma=this.o=this.U=this.s=null,this.fb=this.W=0,this.cb=Xd("failFast",!1,e),this.M=this.v=this.u=this.m=this.l=null,this.aa=!0,this.ta=this.Fa=this.V=-1,this.ba=this.A=this.C=0,this.ab=Xd("baseRetryDelayMs",5e3,e),this.hb=Xd("retryDelaySeedMs",1e4,e),this.eb=Xd("forwardChannelMaxRetries",2,e),this.xa=Xd("forwardChannelRequestTimeoutMs",2e4,e),this.va=e&&e.xmlHttpFactory||void 0,this.Ha=e&&e.dc||!1,this.K=void 0,this.I=e&&e.supportsCrossDomainXhr||!1,this.J="",this.h=new yd(e&&e.concurrentRequestLimit),this.Ja=new Cd,this.P=e&&e.fastHandshake||!1,this.O=e&&e.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.bb=e&&e.bc||!1,e&&e.Ea&&this.j.Ea(),e&&e.forceLongPolling&&(this.aa=!1),this.ca=!this.P&&this.aa&&e&&e.detectBufferingProxy||!1,this.na=void 0,this.S=0,this.L=!1,this.pa=this.B=null}function Jd(e){if(ep(e),3==e.H){var t=e.W++,n=Xh(e.G);ed(n,"SID",e.J),ed(n,"RID",t),ed(n,"TYPE","terminate"),rp(e,n),(t=new Rh(e,e.j,t,void 0)).L=2,t.v=td(Xh(n)),n=!1,Al.navigator&&Al.navigator.sendBeacon&&(n=Al.navigator.sendBeacon(t.v.toString(),"")),!n&&Al.Image&&((new Image).src=t.v,n=!0),n||(t.g=vp(t.l,null),t.g.ha(t.v)),t.G=Date.now(),zh(t)}dp(e)}function Zd(e){e.g&&(sp(e),e.g.cancel(),e.g=null)}function ep(e){Zd(e),e.u&&(Al.clearTimeout(e.u),e.u=null),cp(e),e.h.cancel(),e.m&&("number"===typeof e.m&&Al.clearTimeout(e.m),e.m=null)}function tp(e){bd(e.h)||e.m||(e.m=!0,Yf(e.Na,e),e.C=0)}function np(e,t){var n;n=t?t.m:e.W++;var r=Xh(e.G);ed(r,"SID",e.J),ed(r,"RID",n),ed(r,"AID",e.V),rp(e,r),e.o&&e.s&&$d(r,e.o,e.s),n=new Rh(e,e.j,n,e.C+1),null===e.o&&(n.I=e.s),t&&(e.i=t.F.concat(e.i)),t=ip(e,n,1e3),n.setTimeout(Math.round(.5*e.xa)+Math.round(.5*e.xa*Math.random())),Ed(e.h,n),jh(n,r,t)}function rp(e,t){e.ma&&xf(e.ma,(function(e,n){ed(t,n,e)})),e.l&&Gh({},(function(e,n){ed(t,n,e)}))}function ip(e,t,n){n=Math.min(e.i.length,n);var r=e.l?Fl(e.l.Va,e.l,e):null;e:for(var i=e.i,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 s=!0,u=0;u<n;u++){var c=i[u].h,l=i[u].g;if(0>(c-=a))a=Math.max(0,i[u].h-100),s=!1;else try{Id(l,o,"req"+c+"_")}catch(cv){r&&r(l)}}if(s){r=o.join("&");break e}}return e=e.i.splice(0,n),t.F=e,r}function ap(e){e.g||e.u||(e.ba=1,Yf(e.Ma,e),e.A=0)}function op(e){return!(e.g||e.u||3<=e.A)&&(e.ba++,e.u=bh(Fl(e.Ma,e),fp(e,e.A)),e.A++,!0)}function sp(e){null!=e.B&&(Al.clearTimeout(e.B),e.B=null)}function up(e){e.g=new Rh(e,e.j,"rpc",e.ba),null===e.o&&(e.g.I=e.s),e.g.O=0;var t=Xh(e.wa);ed(t,"RID","rpc"),ed(t,"SID",e.J),ed(t,"CI",e.M?"0":"1"),ed(t,"AID",e.V),ed(t,"TYPE","xmlhttp"),rp(e,t),e.o&&e.s&&$d(t,e.o,e.s),e.K&&e.g.setTimeout(e.K);var n=e.g;e=e.oa,n.L=1,n.v=td(Xh(t)),n.s=null,n.S=!0,Mh(n,e)}function cp(e){null!=e.v&&(Al.clearTimeout(e.v),e.v=null)}function lp(e,t){var n=null;if(e.g==t){cp(e),sp(e),e.g=null;var r=2}else{if(!xd(e.h,t))return;n=t.F,_d(e.h,t),r=1}if(0!=e.H)if(e.ta=t.aa,t.i)if(1==r){n=t.s?t.s.length:0,t=Date.now()-t.G;var i=e.C;Bf(r=ph(),new kh(r,n)),tp(e)}else ap(e);else if(3==(i=t.o)||0==i&&0<e.ta||!(1==r&&function(e,t){return!(wd(e.h)>=e.h.j-(e.m?1:0))&&(e.m?(e.i=t.F.concat(e.i),!0):!(1==e.H||2==e.H||e.C>=(e.cb?0:e.eb))&&(e.m=bh(Fl(e.Na,e,t),fp(e,e.C)),e.C++,!0))}(e,t)||2==r&&op(e)))switch(n&&0<n.length&&(t=e.h,t.i=t.i.concat(n)),i){case 1:hp(e,5);break;case 4:hp(e,10);break;case 3:hp(e,6);break;default:hp(e,2)}}function fp(e,t){var n=e.ab+Math.floor(Math.random()*e.hb);return e.l||(n*=2),n*t}function hp(e,t){if(e.j.info("Error code "+t),2==t){var n=null;e.l&&(n=null);var r=Fl(e.pb,e);n||(n=new $h("//www.google.com/images/cleardot.gif"),Al.location&&"http"==Al.location.protocol||Yh(n,"https"),td(n)),function(e,t){var n=new lh;if(Al.Image){var r=new Image;r.onload=Ul(Nd,n,r,"TestLoadImage: loaded",!0,t),r.onerror=Ul(Nd,n,r,"TestLoadImage: error",!1,t),r.onabort=Ul(Nd,n,r,"TestLoadImage: abort",!1,t),r.ontimeout=Ul(Nd,n,r,"TestLoadImage: timeout",!1,t),Al.setTimeout((function(){r.ontimeout&&r.ontimeout()}),1e4),r.src=e}else t(!1)}(n.toString(),r)}else gh(2);e.H=0,e.l&&e.l.za(t),dp(e),ep(e)}function dp(e){if(e.H=0,e.pa=[],e.l){var t=Sd(e.h);0==t.length&&0==e.i.length||(Hl(e.pa,t),Hl(e.pa,e.i),e.h.i.length=0,ql(e.i),e.i.length=0),e.l.ya()}}function pp(e,t,n){var r=n instanceof $h?Xh(n):new $h(n,void 0);if(""!=r.g)t&&(r.g=t+"."+r.g),Jh(r,r.m);else{var i=Al.location;r=i.protocol,t=t?t+"."+i.hostname:i.hostname,i=+i.port;var a=new $h(null,void 0);r&&Yh(a,r),t&&(a.g=t),i&&Jh(a,i),n&&(a.l=n),r=a}return n=e.F,t=e.Da,n&&t&&ed(r,n,t),ed(r,"VER",e.qa),rp(e,r),r}function vp(e,t,n){if(t&&!e.I)throw Error("Can't create secondary domain capable XhrIo object.");return(t=n&&e.Ha&&!e.va?new Md(new Ad({ob:!0})):new Md(e.va)).Oa(e.I),t}function mp(){}function yp(){if(nf&&!(10<=Number(vf)))throw Error("Environmental error: no available transport.")}function gp(e,t){zf.call(this),this.g=new Yd(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.Ca&&(e?e["X-WebChannel-Client-Profile"]=t.Ca:e={"X-WebChannel-Client-Profile":t.Ca}),this.g.U=e,(e=t&&t.cc)&&!Gl(e)&&(this.g.o=e),this.A=t&&t.supportsCrossDomainXhr||!1,this.v=t&&t.sendRawJson||!1,(t=t&&t.httpSessionIdParam)&&!Gl(t)&&(this.g.F=t,null!==(e=this.h)&&t in e&&(t in(e=this.h)&&delete e[t])),this.j=new wp(this)}function kp(e){Ih.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 bp(){Nh.call(this),this.status=1}function wp(e){this.g=e}function xp(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.m=Array(this.blockSize),this.i=this.h=0,this.reset()}function Ep(e,t,n){n||(n=0);var r=Array(16);if("string"===typeof t)for(var i=0;16>i;++i)r[i]=t.charCodeAt(n++)|t.charCodeAt(n++)<<8|t.charCodeAt(n++)<<16|t.charCodeAt(n++)<<24;else for(i=0;16>i;++i)r[i]=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24;t=e.g[0],n=e.g[1],i=e.g[2];var a=e.g[3],o=t+(a^n&(i^a))+r[0]+3614090360&4294967295;o=(n=(i=(a=(t=(n=(i=(a=(t=(n=(i=(a=(t=(n=(i=(a=(t=(n=(i=(a=(t=(n=(i=(a=(t=(n=(i=(a=(t=(n=(i=(a=(t=(n=(i=(a=(t=(n=(i=(a=(t=(n=(i=(a=(t=(n=(i=(a=(t=(n=(i=(a=(t=(n=(i=(a=(t=(n=(i=(a=(t=n+(o<<7&4294967295|o>>>25))+((o=a+(i^t&(n^i))+r[1]+3905402710&4294967295)<<12&4294967295|o>>>20))+((o=i+(n^a&(t^n))+r[2]+606105819&4294967295)<<17&4294967295|o>>>15))+((o=n+(t^i&(a^t))+r[3]+3250441966&4294967295)<<22&4294967295|o>>>10))+((o=t+(a^n&(i^a))+r[4]+4118548399&4294967295)<<7&4294967295|o>>>25))+((o=a+(i^t&(n^i))+r[5]+1200080426&4294967295)<<12&4294967295|o>>>20))+((o=i+(n^a&(t^n))+r[6]+2821735955&4294967295)<<17&4294967295|o>>>15))+((o=n+(t^i&(a^t))+r[7]+4249261313&4294967295)<<22&4294967295|o>>>10))+((o=t+(a^n&(i^a))+r[8]+1770035416&4294967295)<<7&4294967295|o>>>25))+((o=a+(i^t&(n^i))+r[9]+2336552879&4294967295)<<12&4294967295|o>>>20))+((o=i+(n^a&(t^n))+r[10]+4294925233&4294967295)<<17&4294967295|o>>>15))+((o=n+(t^i&(a^t))+r[11]+2304563134&4294967295)<<22&4294967295|o>>>10))+((o=t+(a^n&(i^a))+r[12]+1804603682&4294967295)<<7&4294967295|o>>>25))+((o=a+(i^t&(n^i))+r[13]+4254626195&4294967295)<<12&4294967295|o>>>20))+((o=i+(n^a&(t^n))+r[14]+2792965006&4294967295)<<17&4294967295|o>>>15))+((o=n+(t^i&(a^t))+r[15]+1236535329&4294967295)<<22&4294967295|o>>>10))+((o=t+(i^a&(n^i))+r[1]+4129170786&4294967295)<<5&4294967295|o>>>27))+((o=a+(n^i&(t^n))+r[6]+3225465664&4294967295)<<9&4294967295|o>>>23))+((o=i+(t^n&(a^t))+r[11]+643717713&4294967295)<<14&4294967295|o>>>18))+((o=n+(a^t&(i^a))+r[0]+3921069994&4294967295)<<20&4294967295|o>>>12))+((o=t+(i^a&(n^i))+r[5]+3593408605&4294967295)<<5&4294967295|o>>>27))+((o=a+(n^i&(t^n))+r[10]+38016083&4294967295)<<9&4294967295|o>>>23))+((o=i+(t^n&(a^t))+r[15]+3634488961&4294967295)<<14&4294967295|o>>>18))+((o=n+(a^t&(i^a))+r[4]+3889429448&4294967295)<<20&4294967295|o>>>12))+((o=t+(i^a&(n^i))+r[9]+568446438&4294967295)<<5&4294967295|o>>>27))+((o=a+(n^i&(t^n))+r[14]+3275163606&4294967295)<<9&4294967295|o>>>23))+((o=i+(t^n&(a^t))+r[3]+4107603335&4294967295)<<14&4294967295|o>>>18))+((o=n+(a^t&(i^a))+r[8]+1163531501&4294967295)<<20&4294967295|o>>>12))+((o=t+(i^a&(n^i))+r[13]+2850285829&4294967295)<<5&4294967295|o>>>27))+((o=a+(n^i&(t^n))+r[2]+4243563512&4294967295)<<9&4294967295|o>>>23))+((o=i+(t^n&(a^t))+r[7]+1735328473&4294967295)<<14&4294967295|o>>>18))+((o=n+(a^t&(i^a))+r[12]+2368359562&4294967295)<<20&4294967295|o>>>12))+((o=t+(n^i^a)+r[5]+4294588738&4294967295)<<4&4294967295|o>>>28))+((o=a+(t^n^i)+r[8]+2272392833&4294967295)<<11&4294967295|o>>>21))+((o=i+(a^t^n)+r[11]+1839030562&4294967295)<<16&4294967295|o>>>16))+((o=n+(i^a^t)+r[14]+4259657740&4294967295)<<23&4294967295|o>>>9))+((o=t+(n^i^a)+r[1]+2763975236&4294967295)<<4&4294967295|o>>>28))+((o=a+(t^n^i)+r[4]+1272893353&4294967295)<<11&4294967295|o>>>21))+((o=i+(a^t^n)+r[7]+4139469664&4294967295)<<16&4294967295|o>>>16))+((o=n+(i^a^t)+r[10]+3200236656&4294967295)<<23&4294967295|o>>>9))+((o=t+(n^i^a)+r[13]+681279174&4294967295)<<4&4294967295|o>>>28))+((o=a+(t^n^i)+r[0]+3936430074&4294967295)<<11&4294967295|o>>>21))+((o=i+(a^t^n)+r[3]+3572445317&4294967295)<<16&4294967295|o>>>16))+((o=n+(i^a^t)+r[6]+76029189&4294967295)<<23&4294967295|o>>>9))+((o=t+(n^i^a)+r[9]+3654602809&4294967295)<<4&4294967295|o>>>28))+((o=a+(t^n^i)+r[12]+3873151461&4294967295)<<11&4294967295|o>>>21))+((o=i+(a^t^n)+r[15]+530742520&4294967295)<<16&4294967295|o>>>16))+((o=n+(i^a^t)+r[2]+3299628645&4294967295)<<23&4294967295|o>>>9))+((o=t+(i^(n|~a))+r[0]+4096336452&4294967295)<<6&4294967295|o>>>26))+((o=a+(n^(t|~i))+r[7]+1126891415&4294967295)<<10&4294967295|o>>>22))+((o=i+(t^(a|~n))+r[14]+2878612391&4294967295)<<15&4294967295|o>>>17))+((o=n+(a^(i|~t))+r[5]+4237533241&4294967295)<<21&4294967295|o>>>11))+((o=t+(i^(n|~a))+r[12]+1700485571&4294967295)<<6&4294967295|o>>>26))+((o=a+(n^(t|~i))+r[3]+2399980690&4294967295)<<10&4294967295|o>>>22))+((o=i+(t^(a|~n))+r[10]+4293915773&4294967295)<<15&4294967295|o>>>17))+((o=n+(a^(i|~t))+r[1]+2240044497&4294967295)<<21&4294967295|o>>>11))+((o=t+(i^(n|~a))+r[8]+1873313359&4294967295)<<6&4294967295|o>>>26))+((o=a+(n^(t|~i))+r[15]+4264355552&4294967295)<<10&4294967295|o>>>22))+((o=i+(t^(a|~n))+r[6]+2734768916&4294967295)<<15&4294967295|o>>>17))+((o=n+(a^(i|~t))+r[13]+1309151649&4294967295)<<21&4294967295|o>>>11))+((a=(t=n+((o=t+(i^(n|~a))+r[4]+4149444226&4294967295)<<6&4294967295|o>>>26))+((o=a+(n^(t|~i))+r[11]+3174756917&4294967295)<<10&4294967295|o>>>22))^((i=a+((o=i+(t^(a|~n))+r[2]+718787259&4294967295)<<15&4294967295|o>>>17))|~t))+r[9]+3951481745&4294967295,e.g[0]=e.g[0]+t&4294967295,e.g[1]=e.g[1]+(i+(o<<21&4294967295|o>>>11))&4294967295,e.g[2]=e.g[2]+i&4294967295,e.g[3]=e.g[3]+a&4294967295}function _p(e,t){this.h=t;for(var n=[],r=!0,i=e.length-1;0<=i;i--){var a=0|e[i];r&&a==t||(n[i]=a,r=!1)}this.g=n}(Tl=Md.prototype).Oa=function(e){this.M=e},Tl.ha=function(e,t,n,r){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.I+"; newUri="+e);t=t?t.toUpperCase():"GET",this.I=e,this.j="",this.m=0,this.F=!1,this.h=!0,this.g=this.u?this.u.g():Th.g(),this.C=this.u?_h(this.u):_h(Th),this.g.onreadystatechange=Fl(this.La,this);try{this.G=!0,this.g.open(t,String(e),!0),this.G=!1}catch(s){return void zd(this,s)}if(e=n||"",n=new Map(this.headers),r)if(Object.getPrototypeOf(r)===Object.prototype)for(var i in r)n.set(i,r[i]);else{if("function"!==typeof r.keys||"function"!==typeof r.get)throw Error("Unknown input type for opt_headers: "+String(r));var a,o=_(r.keys());try{for(o.s();!(a=o.n()).done;){var s=a.value;n.set(s,r.get(s))}}catch(d){o.e(d)}finally{o.f()}}r=Array.from(n.keys()).find((function(e){return"content-type"==e.toLowerCase()})),i=Al.FormData&&e instanceof Al.FormData,!(0<=Bl(Vd,t))||r||i||n.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");var u,c=_(n);try{for(c.s();!(u=c.n()).done;){var l=E(u.value,2),f=l[0],h=l[1];this.g.setRequestHeader(f,h)}}catch(d){c.e(d)}finally{c.f()}this.K&&(this.g.responseType=this.K),"withCredentials"in this.g&&this.g.withCredentials!==this.M&&(this.g.withCredentials=this.M);try{Wd(this),0<this.B&&((this.L=function(e){return nf&&Zl(df,9,(function(){for(var e=0,t=Ql(String(ef)).split("."),n=Ql("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=$l(0==a[1].length?0:parseInt(a[1],10),0==o[1].length?0:parseInt(o[1],10))||$l(0==a[2].length,0==o[2].length)||$l(a[2],o[2]),a=a[3],o=o[3]}while(0==e)}return 0<=e}))&&"number"===typeof e.timeout&&void 0!==e.ontimeout}(this.g))?(this.g.timeout=this.B,this.g.ontimeout=Fl(this.ua,this)):this.A=rh(this.ua,this.B,this)),this.v=!0,this.g.send(e),this.v=!1}catch(s){zd(this,s)}},Tl.ua=function(){"undefined"!=typeof Nl&&this.g&&(this.j="Timed out after "+this.B+"ms, aborting",this.m=8,Bf(this,"timeout"),this.abort(8))},Tl.abort=function(e){this.g&&this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1,this.m=e||7,Bf(this,"complete"),Bf(this,"abort"),Hd(this))},Tl.N=function(){this.g&&(this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1),Hd(this,!0)),Md.$.N.call(this)},Tl.La=function(){this.s||(this.G||this.v||this.l?qd(this):this.kb())},Tl.kb=function(){qd(this)},Tl.da=function(){try{return 2<Kd(this)?this.g.status:-1}catch(gd){return-1}},Tl.ja=function(){try{return this.g?this.g.responseText:""}catch(gd){return""}},Tl.Wa=function(e){if(this.g){var t=this.g.responseText;return e&&0==t.indexOf(e)&&(t=t.substring(e.length)),jd(t)}},Tl.Ia=function(){return this.m},Tl.Sa=function(){return"string"===typeof this.j?this.j:String(this.j)},(Tl=Yd.prototype).qa=8,Tl.H=1,Tl.Na=function(e){if(this.m)if(this.m=null,1==this.H){if(!e){this.W=Math.floor(1e5*Math.random()),e=this.W++;var t=new Rh(this,this.j,e,void 0),n=this.s;if(this.U&&(n?Sf(n=Ef(n),this.U):n=this.U),null!==this.o||this.O||(t.I=n,n=null),this.P)e:{for(var r=0,i=0;i<this.i.length;i++){var a=this.i[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.i.length-1){r=i+1;break e}}r=1e3}else r=1e3;r=ip(this,t,r),ed(i=Xh(this.G),"RID",e),ed(i,"CVER",22),this.F&&ed(i,"X-HTTP-Session-Id",this.F),rp(this,i),n&&(this.O?r="headers="+encodeURIComponent(String(Qd(n)))+"&"+r:this.o&&$d(i,this.o,n)),Ed(this.h,t),this.bb&&ed(i,"TYPE","init"),this.P?(ed(i,"$req",r),ed(i,"SID","null"),t.ba=!0,jh(t,i,null)):jh(t,i,r),this.H=2}}else 3==this.H&&(e?np(this,e):0==this.i.length||bd(this.h)||np(this))},Tl.Ma=function(){if(this.u=null,up(this),this.ca&&!(this.L||null==this.g||0>=this.S)){var e=2*this.S;this.j.info("BP detection timer enabled: "+e),this.B=bh(Fl(this.jb,this),e)}},Tl.jb=function(){this.B&&(this.B=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.M=!1,this.L=!0,gh(10),Zd(this),up(this))},Tl.ib=function(){null!=this.v&&(this.v=null,Zd(this),op(this),gh(19))},Tl.pb=function(e){e?(this.j.info("Successfully pinged google.com"),gh(2)):(this.j.info("Failed to ping google.com"),gh(1))},(Tl=mp.prototype).Ba=function(){},Tl.Aa=function(){},Tl.za=function(){},Tl.ya=function(){},Tl.Va=function(){},yp.prototype.g=function(e,t){return new gp(e,t)},Vl(gp,zf),gp.prototype.m=function(){this.g.l=this.j,this.A&&(this.g.I=!0);var e=this.g,t=this.l,n=this.h||void 0;gh(0),e.Y=t,e.ma=n||{},e.M=e.aa,e.G=pp(e,null,e.Y),tp(e)},gp.prototype.close=function(){Jd(this.g)},gp.prototype.u=function(e){var t=this.g;if("string"===typeof e){var n={};n.__data__=e,e=n}else this.v&&((n={}).__data__=Hf(e),e=n);t.i.push(new md(t.fb++,e)),3==t.H&&tp(t)},gp.prototype.N=function(){this.g.l=null,delete this.j,Jd(this.g),delete this.g,gp.$.N.call(this)},Vl(kp,Ih),Vl(bp,Nh),Vl(wp,mp),wp.prototype.Ba=function(){Bf(this.g,"a")},wp.prototype.Aa=function(e){Bf(this.g,new kp(e))},wp.prototype.za=function(e){Bf(this.g,new bp)},wp.prototype.ya=function(){Bf(this.g,"b")},Vl(xp,(function(){this.blockSize=-1})),xp.prototype.reset=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.i=this.h=0},xp.prototype.j=function(e,t){void 0===t&&(t=e.length);for(var n=t-this.blockSize,r=this.m,i=this.h,a=0;a<t;){if(0==i)for(;a<=n;)Ep(this,e,a),a+=this.blockSize;if("string"===typeof e){for(;a<t;)if(r[i++]=e.charCodeAt(a++),i==this.blockSize){Ep(this,r),i=0;break}}else for(;a<t;)if(r[i++]=e[a++],i==this.blockSize){Ep(this,r),i=0;break}}this.h=i,this.i+=t},xp.prototype.l=function(){var e=Array((56>this.h?this.blockSize:2*this.blockSize)-this.h);e[0]=128;for(var t=1;t<e.length-8;++t)e[t]=0;var n=8*this.i;for(t=e.length-8;t<e.length;++t)e[t]=255&n,n/=256;for(this.j(e),e=Array(16),t=n=0;4>t;++t)for(var r=0;32>r;r+=8)e[n++]=this.g[t]>>>r&255;return e};var Sp={};function Tp(e){return-128<=e&&128>e?Zl(Sp,e,(function(e){return new _p([0|e],0>e?-1:0)})):new _p([0|e],0>e?-1:0)}function Cp(e){if(isNaN(e)||!isFinite(e))return Np;if(0>e)return Dp(Cp(-e));for(var t=[],n=1,r=0;e>=n;r++)t[r]=e/n|0,n*=Ip;return new _p(t,0)}var Ip=4294967296,Np=Tp(0),Ap=Tp(1),Rp=Tp(16777216);function Op(e){if(0!=e.h)return!1;for(var t=0;t<e.g.length;t++)if(0!=e.g[t])return!1;return!0}function Pp(e){return-1==e.h}function Dp(e){for(var t=e.g.length,n=[],r=0;r<t;r++)n[r]=~e.g[r];return new _p(n,~e.h).add(Ap)}function Lp(e,t){return e.add(Dp(t))}function jp(e,t){for(;(65535&e[t])!=e[t];)e[t+1]+=e[t]>>>16,e[t]&=65535,t++}function Mp(e,t){this.g=e,this.h=t}function Fp(e,t){if(Op(t))throw Error("division by zero");if(Op(e))return new Mp(Np,Np);if(Pp(e))return t=Fp(Dp(e),t),new Mp(Dp(t.g),Dp(t.h));if(Pp(t))return t=Fp(e,Dp(t)),new Mp(Dp(t.g),t.h);if(30<e.g.length){if(Pp(e)||Pp(t))throw Error("slowDivide_ only works with positive integers.");for(var n=Ap,r=t;0>=r.X(e);)n=Up(n),r=Up(r);var i=Vp(n,1),a=Vp(r,1);for(r=Vp(r,2),n=Vp(n,2);!Op(r);){var o=a.add(r);0>=o.X(e)&&(i=i.add(n),a=o),r=Vp(r,1),n=Vp(n,1)}return t=Lp(e,i.R(t)),new Mp(i,t)}for(i=Np;0<=e.X(t);){for(n=Math.max(1,Math.floor(e.ea()/t.ea())),r=48>=(r=Math.ceil(Math.log(n)/Math.LN2))?1:Math.pow(2,r-48),o=(a=Cp(n)).R(t);Pp(o)||0<o.X(e);)o=(a=Cp(n-=r)).R(t);Op(a)&&(a=Ap),i=i.add(a),e=Lp(e,o)}return new Mp(i,e)}function Up(e){for(var t=e.g.length+1,n=[],r=0;r<t;r++)n[r]=e.D(r)<<1|e.D(r-1)>>>31;return new _p(n,e.h)}function Vp(e,t){var n=t>>5;t%=32;for(var r=e.g.length-n,i=[],a=0;a<r;a++)i[a]=0<t?e.D(a+n)>>>t|e.D(a+n+1)<<32-t:e.D(a+n);return new _p(i,e.h)}(Tl=_p.prototype).ea=function(){if(Pp(this))return-Dp(this).ea();for(var e=0,t=1,n=0;n<this.g.length;n++){var r=this.D(n);e+=(0<=r?r:Ip+r)*t,t*=Ip}return e},Tl.toString=function(e){if(2>(e=e||10)||36<e)throw Error("radix out of range: "+e);if(Op(this))return"0";if(Pp(this))return"-"+Dp(this).toString(e);for(var t=Cp(Math.pow(e,6)),n=this,r="";;){var i=Fp(n,t).g,a=((0<(n=Lp(n,i.R(t))).g.length?n.g[0]:n.h)>>>0).toString(e);if(Op(n=i))return a+r;for(;6>a.length;)a="0"+a;r=a+r}},Tl.D=function(e){return 0>e?0:e<this.g.length?this.g[e]:this.h},Tl.X=function(e){return Pp(e=Lp(this,e))?-1:Op(e)?0:1},Tl.abs=function(){return Pp(this)?Dp(this):this},Tl.add=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],r=0,i=0;i<=t;i++){var a=r+(65535&this.D(i))+(65535&e.D(i)),o=(a>>>16)+(this.D(i)>>>16)+(e.D(i)>>>16);r=o>>>16,a&=65535,o&=65535,n[i]=o<<16|a}return new _p(n,-2147483648&n[n.length-1]?-1:0)},Tl.R=function(e){if(Op(this)||Op(e))return Np;if(Pp(this))return Pp(e)?Dp(this).R(Dp(e)):Dp(Dp(this).R(e));if(Pp(e))return Dp(this.R(Dp(e)));if(0>this.X(Rp)&&0>e.X(Rp))return Cp(this.ea()*e.ea());for(var t=this.g.length+e.g.length,n=[],r=0;r<2*t;r++)n[r]=0;for(r=0;r<this.g.length;r++)for(var i=0;i<e.g.length;i++){var a=this.D(r)>>>16,o=65535&this.D(r),s=e.D(i)>>>16,u=65535&e.D(i);n[2*r+2*i]+=o*u,jp(n,2*r+2*i),n[2*r+2*i+1]+=a*u,jp(n,2*r+2*i+1),n[2*r+2*i+1]+=o*s,jp(n,2*r+2*i+1),n[2*r+2*i+2]+=a*s,jp(n,2*r+2*i+2)}for(r=0;r<t;r++)n[r]=n[2*r+1]<<16|n[2*r];for(r=t;r<2*t;r++)n[r]=0;return new _p(n,0)},Tl.gb=function(e){return Fp(this,e).h},Tl.and=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],r=0;r<t;r++)n[r]=this.D(r)&e.D(r);return new _p(n,this.h&e.h)},Tl.or=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],r=0;r<t;r++)n[r]=this.D(r)|e.D(r);return new _p(n,this.h|e.h)},Tl.xor=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],r=0;r<t;r++)n[r]=this.D(r)^e.D(r);return new _p(n,this.h^e.h)},yp.prototype.createWebChannel=yp.prototype.g,gp.prototype.send=gp.prototype.u,gp.prototype.open=gp.prototype.m,gp.prototype.close=gp.prototype.close,wh.NO_ERROR=0,wh.TIMEOUT=8,wh.HTTP_ERROR=6,xh.COMPLETE="complete",Sh.EventType=Ch,Ch.OPEN="a",Ch.CLOSE="b",Ch.ERROR="c",Ch.MESSAGE="d",zf.prototype.listen=zf.prototype.O,Md.prototype.listenOnce=Md.prototype.P,Md.prototype.getLastError=Md.prototype.Sa,Md.prototype.getLastErrorCode=Md.prototype.Ia,Md.prototype.getStatus=Md.prototype.da,Md.prototype.getResponseJson=Md.prototype.Wa,Md.prototype.getResponseText=Md.prototype.ja,Md.prototype.send=Md.prototype.ha,Md.prototype.setWithCredentials=Md.prototype.Oa,xp.prototype.digest=xp.prototype.l,xp.prototype.reset=xp.prototype.reset,xp.prototype.update=xp.prototype.j,_p.prototype.add=_p.prototype.add,_p.prototype.multiply=_p.prototype.R,_p.prototype.modulo=_p.prototype.gb,_p.prototype.compare=_p.prototype.X,_p.prototype.toNumber=_p.prototype.ea,_p.prototype.toString=_p.prototype.toString,_p.prototype.getBits=_p.prototype.D,_p.fromNumber=Cp,_p.fromString=function e(t,n){if(0==t.length)throw Error("number format error: empty string");if(2>(n=n||10)||36<n)throw Error("radix out of range: "+n);if("-"==t.charAt(0))return Dp(e(t.substring(1),n));if(0<=t.indexOf("-"))throw Error('number format error: interior "-" character');for(var r=Cp(Math.pow(n,8)),i=Np,a=0;a<t.length;a+=8){var o=Math.min(8,t.length-a),s=parseInt(t.substring(a,a+o),n);8>o?(o=Cp(Math.pow(n,o)),i=i.R(o).add(Cp(s))):i=(i=i.R(r)).add(Cp(s))}return i};var zp=Il.createWebChannelTransport=function(){return new yp},Bp=Il.getStatEventTarget=function(){return ph()},qp=Il.ErrorCode=wh,Hp=Il.EventType=xh,Wp=Il.Event=hh,Kp=Il.Stat={xb:0,Ab:1,Bb:2,Ub:3,Zb:4,Wb:5,Xb:6,Vb:7,Tb:8,Yb:9,PROXY:10,NOPROXY:11,Rb:12,Nb:13,Ob:14,Mb:15,Pb:16,Qb:17,tb:18,sb:19,ub:20},Gp=Il.FetchXmlHttpFactory=Ad,Qp=Il.WebChannel=Sh,$p=Il.XhrIo=Md,Xp=Il.Md5=xp,Yp=Il.Integer=_p,Jp="@firebase/firestore",Zp=function(){function e(t){u(this,e),this.uid=t}return h(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}();Zp.UNAUTHENTICATED=new Zp(null),Zp.GOOGLE_CREDENTIALS=new Zp("google-credentials-uid"),Zp.FIRST_PARTY=new Zp("first-party-uid"),Zp.MOCK_USER=new Zp("mock-user");var ev="9.21.0",tv=new zt("@firebase/firestore");function nv(){return tv.logLevel}function rv(e){if(tv.logLevel<=Dt.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(ov);tv.debug.apply(tv,["Firestore (".concat(ev,"): ").concat(e)].concat(s(i)))}}function iv(e){if(tv.logLevel<=Dt.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(ov);tv.error.apply(tv,["Firestore (".concat(ev,"): ").concat(e)].concat(s(i)))}}function av(e){if(tv.logLevel<=Dt.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(ov);tv.warn.apply(tv,["Firestore (".concat(ev,"): ").concat(e)].concat(s(i)))}}function ov(e){if("string"==typeof e)return e;try{return t=e,JSON.stringify(t)}catch(t){return e}var t}function sv(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Unexpected state",t="FIRESTORE (".concat(ev,") INTERNAL ASSERTION FAILED: ")+e;throw iv(t),new Error(t)}function uv(e,t){e||sv()}function cv(e,t){return e}var lv={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"},fv=function(e){p(n,e);var t=g(n);function n(e,r){var i;return u(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 h(n)}(dt),hv=h((function e(){var t=this;u(this,e),this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))})),dv=h((function e(t,n){u(this,e),this.user=n,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization","Bearer ".concat(t))})),pv=function(){function e(){u(this,e)}return h(e,[{key:"getToken",value:function(){return Promise.resolve(null)}},{key:"invalidateToken",value:function(){}},{key:"start",value:function(e,t){e.enqueueRetryable((function(){return t(Zp.UNAUTHENTICATED)}))}},{key:"shutdown",value:function(){}}]),e}(),vv=function(){function e(t){u(this,e),this.token=t,this.changeListener=null}return h(e,[{key:"getToken",value:function(){return Promise.resolve(this.token)}},{key:"invalidateToken",value:function(){}},{key:"start",value:function(e,t){var n=this;this.changeListener=t,e.enqueueRetryable((function(){return t(n.token.user)}))}},{key:"shutdown",value:function(){this.changeListener=null}}]),e}(),mv=function(){function e(t){u(this,e),this.t=t,this.currentUser=Zp.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}return h(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 hv;this.o=function(){n.i++,n.currentUser=n.u(),a.resolve(),a=new hv,e.enqueueRetryable((function(){return i(n.currentUser)}))};var o=function(){var t=a;e.enqueueRetryable(Ue(Me().mark((function e(){return Me().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)}))))},s=function(e){rv("FirebaseAuthCredentialsProvider","Auth detected"),n.auth=e,n.auth.addAuthTokenListener(n.o),o()};this.t.onInit((function(e){return s(e)})),setTimeout((function(){if(!n.auth){var e=n.t.getImmediate({optional:!0});e?s(e):(rv("FirebaseAuthCredentialsProvider","Auth not yet detected"),a.resolve(),a=new hv)}}),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?(rv("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),e.getToken()):n?(uv("string"==typeof n.accessToken),new dv(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 uv(null===e||"string"==typeof e),new Zp(e)}}]),e}(),yv=function(){function e(t,n,r){u(this,e),this.h=t,this.l=n,this.m=r,this.type="FirstParty",this.user=Zp.FIRST_PARTY,this.g=new Map}return h(e,[{key:"p",value:function(){return this.m?this.m():null}},{key:"headers",get:function(){this.g.set("X-Goog-AuthUser",this.h);var e=this.p();return e&&this.g.set("Authorization",e),this.l&&this.g.set("X-Goog-Iam-Authorization-Token",this.l),this.g}}]),e}(),gv=function(){function e(t,n,r){u(this,e),this.h=t,this.l=n,this.m=r}return h(e,[{key:"getToken",value:function(){return Promise.resolve(new yv(this.h,this.l,this.m))}},{key:"start",value:function(e,t){e.enqueueRetryable((function(){return t(Zp.FIRST_PARTY)}))}},{key:"shutdown",value:function(){}},{key:"invalidateToken",value:function(){}}]),e}(),kv=h((function e(t){u(this,e),this.value=t,this.type="AppCheck",this.headers=new Map,t&&t.length>0&&this.headers.set("x-firebase-appcheck",this.value)})),bv=function(){function e(t){u(this,e),this.I=t,this.forceRefresh=!1,this.appCheck=null,this.T=null}return h(e,[{key:"start",value:function(e,t){var n=this,r=function(e){null!=e.error&&rv("FirebaseAppCheckTokenProvider","Error getting App Check token; using placeholder token instead. Error: ".concat(e.error.message));var r=e.token!==n.T;return n.T=e.token,rv("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){rv("FirebaseAppCheckTokenProvider","AppCheck detected"),n.appCheck=e,n.appCheck.addTokenListener(n.o)};this.I.onInit((function(e){return i(e)})),setTimeout((function(){if(!n.appCheck){var e=n.I.getImmediate({optional:!0});e?i(e):rv("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?(uv("string"==typeof t.token),e.T=t.token,new kv(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 wv(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;r++)n[r]=Math.floor(256*Math.random());return n}var xv=function(){function e(){u(this,e)}return h(e,null,[{key:"A",value:function(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=62*Math.floor(256/62),n="";n.length<20;)for(var r=wv(40),i=0;i<r.length;++i)n.length<20&&r[i]<t&&(n+=e.charAt(r[i]%62));return n}}]),e}();function Ev(e,t){return e<t?-1:e>t?1:0}function _v(e,t,n){return e.length===t.length&&e.every((function(e,r){return n(e,t[r])}))}var Sv=function(){function e(t,n){if(u(this,e),this.seconds=t,this.nanoseconds=n,n<0)throw new fv(lv.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new fv(lv.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(t<-62135596800)throw new fv(lv.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new fv(lv.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}return h(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?Ev(this.nanoseconds,e.nanoseconds):Ev(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}(),Tv=function(){function e(t){u(this,e),this.timestamp=t}return h(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 Sv(0,0))}},{key:"max",value:function(){return new e(new Sv(253402300799,999999999))}}]),e}(),Cv=function(){function e(t,n,r){u(this,e),void 0===n?n=0:n>t.length&&sv(),void 0===r?r=t.length-n:r>t.length-n&&sv(),this.segments=t,this.offset=n,this.len=r}return h(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}(),Iv=function(e){p(n,e);var t=g(n);function n(){return u(this,n),t.apply(this,arguments)}return h(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 fv(lv.INVALID_ARGUMENT,"Invalid segment (".concat(u,"). Paths must not contain // in them."));e.push.apply(e,s(u.split("/").filter((function(e){return e.length>0}))))}return new n(e)}},{key:"emptyPath",value:function(){return new n([])}}]),n}(Cv),Nv=/^[_a-zA-Z][_a-zA-Z0-9]*$/,Av=function(e){p(n,e);var t=g(n);function n(){return u(this,n),t.apply(this,arguments)}return h(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 Nv.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 fv(lv.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 s=e[i];if("\\"===s){if(i+1===e.length)throw new fv(lv.INVALID_ARGUMENT,"Path has trailing escape character: "+e);var u=e[i+1];if("\\"!==u&&"."!==u&&"`"!==u)throw new fv(lv.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);r+=u,i+=2}else"`"===s?(o=!o,i++):"."!==s||o?(r+=s,i++):(a(),i++)}if(a(),o)throw new fv(lv.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new n(t)}},{key:"emptyPath",value:function(){return new n([])}}]),n}(Cv),Rv=function(){function e(t){u(this,e),this.path=t}return h(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===Iv.comparator(this.path,e.path)}},{key:"toString",value:function(){return this.path.toString()}}],[{key:"fromPath",value:function(t){return new e(Iv.fromString(t))}},{key:"fromName",value:function(t){return new e(Iv.fromString(t).popFirst(5))}},{key:"empty",value:function(){return new e(Iv.emptyPath())}},{key:"comparator",value:function(e,t){return Iv.comparator(e.path,t.path)}},{key:"isDocumentKey",value:function(e){return e.length%2==0}},{key:"fromSegments",value:function(t){return new e(new Iv(t.slice()))}}]),e}(),Ov=h((function e(t,n,r,i){u(this,e),this.indexId=t,this.collectionGroup=n,this.fields=r,this.indexState=i}));Ov.UNKNOWN_ID=-1;function Pv(e,t){var n=e.toTimestamp().seconds,r=e.toTimestamp().nanoseconds+1,i=Tv.fromTimestamp(1e9===r?new Sv(n+1,0):new Sv(n,r));return new Lv(i,Rv.empty(),t)}function Dv(e){return new Lv(e.readTime,e.key,-1)}var Lv=function(){function e(t,n,r){u(this,e),this.readTime=t,this.documentKey=n,this.largestBatchId=r}return h(e,null,[{key:"min",value:function(){return new e(Tv.min(),Rv.empty(),-1)}},{key:"max",value:function(){return new e(Tv.max(),Rv.empty(),-1)}}]),e}();function jv(e,t){var n=e.readTime.compareTo(t.readTime);return 0!==n?n:0!==(n=Rv.comparator(e.documentKey,t.documentKey))?n:Ev(e.largestBatchId,t.largestBatchId)}var Mv="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.",Fv=function(){function e(){u(this,e),this.onCommittedListeners=[]}return h(e,[{key:"addOnCommittedListener",value:function(e){this.onCommittedListeners.push(e)}},{key:"raiseOnCommittedEvent",value:function(){this.onCommittedListeners.forEach((function(e){return e()}))}}]),e}();function Uv(e){return Vv.apply(this,arguments)}function Vv(){return(Vv=Ue(Me().mark((function e(t){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.code===lv.FAILED_PRECONDITION&&t.message===Mv){e.next=2;break}throw t;case 2:rv("LocalStore","Unexpectedly lost primary lease");case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var zv=function(){function e(t){var n=this;u(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 h(e,[{key:"catch",value:function(e){return this.next(void 0,e)}},{key:"next",value:function(t,n){var r=this;return this.callbackAttached&&sv(),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)}))}},{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);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,s=function(){var s=u;n(t[s]).next((function(t){a[s]=t,++o===i&&e(a)}),(function(e){return r(e)}))},u=0;u<i;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 Bv(e){return"IndexedDbTransactionError"===e.name}var qv=function(){function e(t,n){var r=this;u(this,e),this.previousValue=t,n&&(n.sequenceNumberHandler=function(e){return r.ot(e)},this.ut=function(e){return n.writeSequenceNumber(e)})}return h(e,[{key:"ot",value:function(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}},{key:"next",value:function(){var e=++this.previousValue;return this.ut&&this.ut(e),e}}]),e}();function Hv(e){return null==e}function Wv(e){return 0===e&&1/e==-1/0}function Kv(e){return"number"==typeof e&&Number.isInteger(e)&&!Wv(e)&&e<=Number.MAX_SAFE_INTEGER&&e>=Number.MIN_SAFE_INTEGER}qv.ct=-1;var Gv=["mutationQueues","mutations","documentMutations","remoteDocuments","targets","owner","targetGlobal","targetDocuments"].concat(["clientMetadata"]).concat(["remoteDocumentGlobal"]).concat(["collectionParents"]).concat(["bundles","namedQueries"]),Qv=([].concat(s(Gv),["documentOverlays"]),["mutationQueues","mutations","documentMutations","remoteDocumentsV14","targets","owner","targetGlobal","targetDocuments","clientMetadata","remoteDocumentGlobal","collectionParents","bundles","namedQueries","documentOverlays"]),$v=Qv;[].concat($v,["indexConfiguration","indexState","indexEntries"]);function Xv(e){var t=0;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function Yv(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])}function Jv(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}var Zv=function(){function e(t,n){u(this,e),this.comparator=t,this.root=n||tm.EMPTY}return h(e,[{key:"insert",value:function(t,n){return new e(this.comparator,this.root.insert(t,n,this.comparator).copy(null,null,tm.BLACK,null,null))}},{key:"remove",value:function(t){return new e(this.comparator,this.root.remove(t,this.comparator).copy(null,null,tm.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 em(this.root,null,this.comparator,!1)}},{key:"getIteratorFrom",value:function(e){return new em(this.root,e,this.comparator,!1)}},{key:"getReverseIterator",value:function(){return new em(this.root,null,this.comparator,!0)}},{key:"getReverseIteratorFrom",value:function(e){return new em(this.root,e,this.comparator,!0)}}]),e}(),em=function(){function e(t,n,r,i){u(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 h(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}(),tm=function(){function e(t,n,r,i,a){u(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}return h(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 sv();if(this.right.isRed())throw sv();var e=this.left.check();if(e!==this.right.check())throw sv();return e+(this.isRed()?0:1)}}]),e}();tm.EMPTY=null,tm.RED=!0,tm.BLACK=!1,tm.EMPTY=new(function(){function e(){u(this,e),this.size=0}return h(e,[{key:"key",get:function(){throw sv()}},{key:"value",get:function(){throw sv()}},{key:"color",get:function(){throw sv()}},{key:"left",get:function(){throw sv()}},{key:"right",get:function(){throw sv()}},{key:"copy",value:function(e,t,n,r,i){return this}},{key:"insert",value:function(e,t,n){return new tm(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 nm=function(){function e(t){u(this,e),this.comparator=t,this.data=new Zv(this.comparator)}return h(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)}},{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 rm(this.data.getIterator())}},{key:"getIteratorFrom",value:function(e){return new rm(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}(),rm=function(){function e(t){u(this,e),this.iter=t}return h(e,[{key:"getNext",value:function(){return this.iter.getNext().key}},{key:"hasNext",value:function(){return this.iter.hasNext()}}]),e}();var im=function(){function e(t){u(this,e),this.fields=t,t.sort(Av.comparator)}return h(e,[{key:"unionWith",value:function(t){var n,r=new nm(Av.comparator),i=_(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,s=_(t);try{for(s.s();!(o=s.n()).done;){var u=o.value;r=r.add(u)}}catch(c){s.e(c)}finally{s.f()}return new e(r.toArray())}},{key:"covers",value:function(e){var t,n=_(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 _v(this.fields,e.fields,(function(e,t){return e.isEqual(t)}))}}],[{key:"empty",value:function(){return new e([])}}]),e}(),am=function(e){p(n,e);var t=g(n);function n(){var e;return u(this,n),(e=t.apply(this,arguments)).name="Base64DecodeError",e}return h(n)}(b(Error));var om=function(e){function t(e){u(this,t),this.binaryString=e}return h(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 Ev(this.binaryString,e.binaryString)}},{key:"isEqual",value:function(e){return this.binaryString===e.binaryString}}],[{key:"fromBase64String",value:function(e){var n=function(e){try{return atob(e)}catch(e){throw"undefined"!=typeof DOMException&&e instanceof DOMException?new am("Invalid base64 string: "+e):e}}(e);return new t(n)}},{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}();om.EMPTY_BYTE_STRING=new om("");var sm=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function um(e){if(uv(!!e),"string"==typeof e){var t=0,n=sm.exec(e);if(uv(!!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:cm(e.seconds),nanos:cm(e.nanos)}}function cm(e){return"number"==typeof e?e:"string"==typeof e?Number(e):0}function lm(e){return"string"==typeof e?om.fromBase64String(e):om.fromUint8Array(e)}function fm(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 hm(e){var t=e.mapValue.fields.__previous_value__;return fm(t)?hm(t):t}function dm(e){var t=um(e.mapValue.fields.__local_write_time__.timestampValue);return new Sv(t.seconds,t.nanos)}var pm=h((function e(t,n,r,i,a,o,s,c){u(this,e),this.databaseId=t,this.appId=n,this.persistenceKey=r,this.host=i,this.ssl=a,this.forceLongPolling=o,this.autoDetectLongPolling=s,this.useFetchStreams=c})),vm=function(){function e(t,n){u(this,e),this.projectId=t,this.database=n||"(default)"}return h(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}(),mm={mapValue:{fields:{__type__:{stringValue:"__max__"}}}};function ym(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?fm(e)?4:Rm(e)?9007199254740991:10:sv()}function gm(e,t){if(e===t)return!0;var n=ym(e);if(n!==ym(t))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return e.booleanValue===t.booleanValue;case 4:return dm(e).isEqual(dm(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=um(e.timestampValue),r=um(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 lm(e.bytesValue).isEqual(lm(t.bytesValue))}(e,t);case 7:return e.referenceValue===t.referenceValue;case 8:return function(e,t){return cm(e.geoPointValue.latitude)===cm(t.geoPointValue.latitude)&&cm(e.geoPointValue.longitude)===cm(t.geoPointValue.longitude)}(e,t);case 2:return function(e,t){if("integerValue"in e&&"integerValue"in t)return cm(e.integerValue)===cm(t.integerValue);if("doubleValue"in e&&"doubleValue"in t){var n=cm(e.doubleValue),r=cm(t.doubleValue);return n===r?Wv(n)===Wv(r):isNaN(n)&&isNaN(r)}return!1}(e,t);case 9:return _v(e.arrayValue.values||[],t.arrayValue.values||[],gm);case 10:return function(e,t){var n=e.mapValue.fields||{},r=t.mapValue.fields||{};if(Xv(n)!==Xv(r))return!1;for(var i in n)if(n.hasOwnProperty(i)&&(void 0===r[i]||!gm(n[i],r[i])))return!1;return!0}(e,t);default:return sv()}}function km(e,t){return void 0!==(e.values||[]).find((function(e){return gm(e,t)}))}function bm(e,t){if(e===t)return 0;var n=ym(e),r=ym(t);if(n!==r)return Ev(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return Ev(e.booleanValue,t.booleanValue);case 2:return function(e,t){var n=cm(e.integerValue||e.doubleValue),r=cm(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 wm(e.timestampValue,t.timestampValue);case 4:return wm(dm(e),dm(t));case 5:return Ev(e.stringValue,t.stringValue);case 6:return function(e,t){var n=lm(e),r=lm(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=Ev(n[i],r[i]);if(0!==a)return a}return Ev(n.length,r.length)}(e.referenceValue,t.referenceValue);case 8:return function(e,t){var n=Ev(cm(e.latitude),cm(t.latitude));return 0!==n?n:Ev(cm(e.longitude),cm(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=bm(n[i],r[i]);if(a)return a}return Ev(n.length,r.length)}(e.arrayValue,t.arrayValue);case 10:return function(e,t){if(e===mm.mapValue&&t===mm.mapValue)return 0;if(e===mm.mapValue)return 1;if(t===mm.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 s=Ev(r[o],a[o]);if(0!==s)return s;var u=bm(n[r[o]],i[a[o]]);if(0!==u)return u}return Ev(r.length,a.length)}(e.mapValue,t.mapValue);default:throw sv()}}function wm(e,t){if("string"==typeof e&&"string"==typeof t&&e.length===t.length)return Ev(e,t);var n=um(e),r=um(t),i=Ev(n.seconds,r.seconds);return 0!==i?i:Ev(n.nanos,r.nanos)}function xm(e){return Em(e)}function Em(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=um(e);return"time(".concat(t.seconds,",").concat(t.nanos,")")}(e.timestampValue):"stringValue"in e?e.stringValue:"bytesValue"in e?lm(e.bytesValue).toBase64():"referenceValue"in e?(n=e.referenceValue,Rv.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=_(e.values||[]);try{for(i.s();!(t=i.n()).done;){var a=t.value;r?r=!1:n+=",",n+=Em(a)}}catch(o){i.e(o)}finally{i.f()}return n+"]"}(e.arrayValue):"mapValue"in e?function(e){var t,n="{",r=!0,i=_(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(Em(e.fields[a]))}}catch(o){i.e(o)}finally{i.f()}return n+"}"}(e.mapValue):sv();var t,n}function _m(e,t){return{referenceValue:"projects/".concat(e.projectId,"/databases/").concat(e.database,"/documents/").concat(t.path.canonicalString())}}function Sm(e){return!!e&&"integerValue"in e}function Tm(e){return!!e&&"arrayValue"in e}function Cm(e){return!!e&&"nullValue"in e}function Im(e){return!!e&&"doubleValue"in e&&isNaN(Number(e.doubleValue))}function Nm(e){return!!e&&"mapValue"in e}function Am(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 Yv(e.mapValue.fields,(function(e,n){return t.mapValue.fields[e]=Am(n)})),t}if(e.arrayValue){for(var n={arrayValue:{values:[]}},r=0;r<(e.arrayValue.values||[]).length;++r)n.arrayValue.values[r]=Am(e.arrayValue.values[r]);return n}return Object.assign({},e)}function Rm(e){return"__max__"===(((e.mapValue||{}).fields||{}).__type__||{}).stringValue}var Om=function(){function e(t){u(this,e),this.value=t}return h(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(!Nm(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()]=Am(t)}},{key:"setAll",value:function(e){var t=this,n=Av.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()]=Am(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());Nm(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]}},{key:"isEqual",value:function(e){return gm(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)];Nm(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){Yv(t,(function(t,n){return e[t]=n}));var r,i=_(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(Am(this.value))}}],[{key:"empty",value:function(){return new e({mapValue:{}})}}]),e}();function Pm(e){var t=[];return Yv(e.fields,(function(e,n){var r=new Av([e]);if(Nm(n)){var i=Pm(n.mapValue).fields;if(0===i.length)t.push(r);else{var a,o=_(i);try{for(o.s();!(a=o.n()).done;){var s=a.value;t.push(r.child(s))}}catch(u){o.e(u)}finally{o.f()}}}else t.push(r)})),new im(t)}var Dm=function(){function e(t,n,r,i,a,o,s){u(this,e),this.key=t,this.documentType=n,this.version=r,this.readTime=i,this.createTime=a,this.data=o,this.documentState=s}return h(e,[{key:"convertToFoundDocument",value:function(e,t){return!this.createTime.isEqual(Tv.min())||2!==this.documentType&&0!==this.documentType||(this.createTime=e),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=Om.empty(),this.documentState=0,this}},{key:"convertToUnknownDocument",value:function(e){return this.version=e,this.documentType=3,this.data=Om.empty(),this.documentState=2,this}},{key:"setHasCommittedMutations",value:function(){return this.documentState=2,this}},{key:"setHasLocalMutations",value:function(){return this.documentState=1,this.version=Tv.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.createTime,this.data.clone(),this.documentState)}},{key:"toString",value:function(){return"Document(".concat(this.key,", ").concat(this.version,", ").concat(JSON.stringify(this.data.value),", {createTime: ").concat(this.createTime,"}), {documentType: ").concat(this.documentType,"}), {documentState: ").concat(this.documentState,"})")}}],[{key:"newInvalidDocument",value:function(t){return new e(t,0,Tv.min(),Tv.min(),Tv.min(),Om.empty(),0)}},{key:"newFoundDocument",value:function(t,n,r,i){return new e(t,1,n,Tv.min(),r,i,0)}},{key:"newNoDocument",value:function(t,n){return new e(t,2,n,Tv.min(),Tv.min(),Om.empty(),0)}},{key:"newUnknownDocument",value:function(t,n){return new e(t,3,n,Tv.min(),Tv.min(),Om.empty(),2)}}]),e}(),Lm=h((function e(t,n){u(this,e),this.position=t,this.inclusive=n}));function jm(e,t,n){for(var r=0,i=0;i<e.position.length;i++){var a=t[i],o=e.position[i];if(r=a.field.isKeyField()?Rv.comparator(Rv.fromName(o.referenceValue),n.key):bm(o,n.data.field(a.field)),"desc"===a.dir&&(r*=-1),0!==r)break}return r}function Mm(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(!gm(e.position[n],t.position[n]))return!1;return!0}var Fm=h((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc";u(this,e),this.field=t,this.dir=n}));function Um(e,t){return e.dir===t.dir&&e.field.isEqual(t.field)}var Vm=h((function e(){u(this,e)})),zm=function(e){p(n,e);var t=g(n);function n(e,r,i){var a;return u(this,n),(a=t.call(this)).field=e,a.op=r,a.value=i,a}return h(n,[{key:"matches",value:function(e){var t=e.data.field(this.field);return"!="===this.op?null!==t&&this.matchesComparison(bm(t,this.value)):null!==t&&ym(this.value)===ym(t)&&this.matchesComparison(bm(t,this.value))}},{key:"matchesComparison",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 sv()}}},{key:"isInequality",value:function(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}},{key:"getFlattenedFilters",value:function(){return[this]}},{key:"getFilters",value:function(){return[this]}},{key:"getFirstInequalityField",value:function(){return this.isInequality()?this.field:null}}],[{key:"create",value:function(e,t,r){return e.isKeyField()?"in"===t||"not-in"===t?this.createKeyFieldInFilter(e,t,r):new $m(e,t,r):"array-contains"===t?new Zm(e,r):"in"===t?new ey(e,r):"not-in"===t?new ty(e,r):"array-contains-any"===t?new ny(e,r):new n(e,t,r)}},{key:"createKeyFieldInFilter",value:function(e,t,n){return"in"===t?new Xm(e,n):new Ym(e,n)}}]),n}(Vm),Bm=function(e){p(n,e);var t=g(n);function n(e,r){var i;return u(this,n),(i=t.call(this)).filters=e,i.op=r,i.ht=null,i}return h(n,[{key:"matches",value:function(e){return qm(this)?void 0===this.filters.find((function(t){return!t.matches(e)})):void 0!==this.filters.find((function(t){return t.matches(e)}))}},{key:"getFlattenedFilters",value:function(){return null!==this.ht||(this.ht=this.filters.reduce((function(e,t){return e.concat(t.getFlattenedFilters())}),[])),this.ht}},{key:"getFilters",value:function(){return Object.assign([],this.filters)}},{key:"getFirstInequalityField",value:function(){var e=this.lt((function(e){return e.isInequality()}));return null!==e?e.field:null}},{key:"lt",value:function(e){var t,n=_(this.getFlattenedFilters());try{for(n.s();!(t=n.n()).done;){var r=t.value;if(e(r))return r}}catch(i){n.e(i)}finally{n.f()}return null}}],[{key:"create",value:function(e,t){return new n(e,t)}}]),n}(Vm);function qm(e){return"and"===e.op}function Hm(e){return Wm(e)&&qm(e)}function Wm(e){var t,n=_(e.filters);try{for(n.s();!(t=n.n()).done;){if(t.value instanceof Bm)return!1}}catch(r){n.e(r)}finally{n.f()}return!0}function Km(e){if(e instanceof zm)return e.field.canonicalString()+e.op.toString()+xm(e.value);if(Hm(e))return e.filters.map((function(e){return Km(e)})).join(",");var t=e.filters.map((function(e){return Km(e)})).join(",");return"".concat(e.op,"(").concat(t,")")}function Gm(e,t){return e instanceof zm?function(e,t){return t instanceof zm&&e.op===t.op&&e.field.isEqual(t.field)&&gm(e.value,t.value)}(e,t):e instanceof Bm?function(e,t){return t instanceof Bm&&e.op===t.op&&e.filters.length===t.filters.length&&e.filters.reduce((function(e,n,r){return e&&Gm(n,t.filters[r])}),!0)}(e,t):void sv()}function Qm(e){return e instanceof zm?function(e){return"".concat(e.field.canonicalString()," ").concat(e.op," ").concat(xm(e.value))}(e):e instanceof Bm?function(e){return e.op.toString()+" {"+e.getFilters().map(Qm).join(" ,")+"}"}(e):"Filter"}var $m=function(e){p(n,e);var t=g(n);function n(e,r,i){var a;return u(this,n),(a=t.call(this,e,r,i)).key=Rv.fromName(i.referenceValue),a}return h(n,[{key:"matches",value:function(e){var t=Rv.comparator(e.key,this.key);return this.matchesComparison(t)}}]),n}(zm),Xm=function(e){p(n,e);var t=g(n);function n(e,r){var i;return u(this,n),(i=t.call(this,e,"in",r)).keys=Jm("in",r),i}return h(n,[{key:"matches",value:function(e){return this.keys.some((function(t){return t.isEqual(e.key)}))}}]),n}(zm),Ym=function(e){p(n,e);var t=g(n);function n(e,r){var i;return u(this,n),(i=t.call(this,e,"not-in",r)).keys=Jm("not-in",r),i}return h(n,[{key:"matches",value:function(e){return!this.keys.some((function(t){return t.isEqual(e.key)}))}}]),n}(zm);function Jm(e,t){var n;return((null===(n=t.arrayValue)||void 0===n?void 0:n.values)||[]).map((function(e){return Rv.fromName(e.referenceValue)}))}var Zm=function(e){p(n,e);var t=g(n);function n(e,r){return u(this,n),t.call(this,e,"array-contains",r)}return h(n,[{key:"matches",value:function(e){var t=e.data.field(this.field);return Tm(t)&&km(t.arrayValue,this.value)}}]),n}(zm),ey=function(e){p(n,e);var t=g(n);function n(e,r){return u(this,n),t.call(this,e,"in",r)}return h(n,[{key:"matches",value:function(e){var t=e.data.field(this.field);return null!==t&&km(this.value.arrayValue,t)}}]),n}(zm),ty=function(e){p(n,e);var t=g(n);function n(e,r){return u(this,n),t.call(this,e,"not-in",r)}return h(n,[{key:"matches",value:function(e){if(km(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;var t=e.data.field(this.field);return null!==t&&!km(this.value.arrayValue,t)}}]),n}(zm),ny=function(e){p(n,e);var t=g(n);function n(e,r){return u(this,n),t.call(this,e,"array-contains-any",r)}return h(n,[{key:"matches",value:function(e){var t=this,n=e.data.field(this.field);return!(!Tm(n)||!n.arrayValue.values)&&n.arrayValue.values.some((function(e){return km(t.value.arrayValue,e)}))}}]),n}(zm),ry=h((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,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;u(this,e),this.path=t,this.collectionGroup=n,this.orderBy=r,this.filters=i,this.limit=a,this.startAt=o,this.endAt=s,this.ft=null}));function iy(e){return new ry(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,arguments.length>6&&void 0!==arguments[6]?arguments[6]:null)}function ay(e){var t=cv(e);if(null===t.ft){var n=t.path.canonicalString();null!==t.collectionGroup&&(n+="|cg:"+t.collectionGroup),n+="|f:",n+=t.filters.map((function(e){return Km(e)})).join(","),n+="|ob:",n+=t.orderBy.map((function(e){return function(e){return e.field.canonicalString()+e.dir}(e)})).join(","),Hv(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 xm(e)})).join(",")),t.endAt&&(n+="|ub:",n+=t.endAt.inclusive?"a:":"b:",n+=t.endAt.position.map((function(e){return xm(e)})).join(",")),t.ft=n}return t.ft}function oy(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(!Um(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(!Gm(e.filters[r],t.filters[r]))return!1;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!Mm(e.startAt,t.startAt)&&Mm(e.endAt,t.endAt)}function sy(e){return Rv.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}var uy=h((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",s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;u(this,e),this.path=t,this.collectionGroup=n,this.explicitOrderBy=r,this.filters=i,this.limit=a,this.limitType=o,this.startAt=s,this.endAt=c,this.dt=null,this._t=null,this.startAt,this.endAt}));function cy(e,t,n,r,i,a,o,s){return new uy(e,t,n,r,i,a,o,s)}function ly(e){return new uy(e)}function fy(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())}function hy(e){return e.explicitOrderBy.length>0?e.explicitOrderBy[0].field:null}function dy(e){var t,n=_(e.filters);try{for(n.s();!(t=n.n()).done;){var r=t.value.getFirstInequalityField();if(null!==r)return r}}catch(i){n.e(i)}finally{n.f()}return null}function py(e){return null!==e.collectionGroup}function vy(e){var t=cv(e);if(null===t.dt){t.dt=[];var n=dy(t),r=hy(t);if(null!==n&&null===r)n.isKeyField()||t.dt.push(new Fm(n)),t.dt.push(new Fm(Av.keyField(),"asc"));else{var i,a=!1,o=_(t.explicitOrderBy);try{for(o.s();!(i=o.n()).done;){var s=i.value;t.dt.push(s),s.field.isKeyField()&&(a=!0)}}catch(c){o.e(c)}finally{o.f()}if(!a){var u=t.explicitOrderBy.length>0?t.explicitOrderBy[t.explicitOrderBy.length-1].dir:"asc";t.dt.push(new Fm(Av.keyField(),u))}}}return t.dt}function my(e){var t=cv(e);if(!t._t)if("F"===t.limitType)t._t=iy(t.path,t.collectionGroup,vy(t),t.filters,t.limit,t.startAt,t.endAt);else{var n,r=[],i=_(vy(t));try{for(i.s();!(n=i.n()).done;){var a=n.value,o="desc"===a.dir?"asc":"desc";r.push(new Fm(a.field,o))}}catch(c){i.e(c)}finally{i.f()}var s=t.endAt?new Lm(t.endAt.position,t.endAt.inclusive):null,u=t.startAt?new Lm(t.startAt.position,t.startAt.inclusive):null;t._t=iy(t.path,t.collectionGroup,r,t.filters,t.limit,s,u)}return t._t}function yy(e,t){t.getFirstInequalityField(),dy(e);var n=e.filters.concat([t]);return new uy(e.path,e.collectionGroup,e.explicitOrderBy.slice(),n,e.limit,e.limitType,e.startAt,e.endAt)}function gy(e,t,n){return new uy(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),t,n,e.startAt,e.endAt)}function ky(e,t){return oy(my(e),my(t))&&e.limitType===t.limitType}function by(e){return"".concat(ay(my(e)),"|lt:").concat(e.limitType)}function wy(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 Qm(e)})).join(", "),"]")),Hv(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 xm(e)})).join(",")),e.endAt&&(t+=", endAt: ",t+=e.endAt.inclusive?"a:":"b:",t+=e.endAt.position.map((function(e){return xm(e)})).join(",")),"Target(".concat(t,")")}(my(e)),"; limitType=").concat(e.limitType,")")}function xy(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):Rv.isDocumentKey(e.path)?e.path.isEqual(n):e.path.isImmediateParentOf(n)}(e,t)&&function(e,t){var n,r=_(vy(e));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=_(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=jm(e,t,n);return e.inclusive?r<=0:r<0}(e.startAt,vy(e),t))&&!(e.endAt&&!function(e,t,n){var r=jm(e,t,n);return e.inclusive?r>=0:r>0}(e.endAt,vy(e),t))}(e,t)}function Ey(e){return e.collectionGroup||(e.path.length%2==1?e.path.lastSegment():e.path.get(e.path.length-2))}function _y(e){return function(t,n){var r,i=!1,a=_(vy(e));try{for(a.s();!(r=a.n()).done;){var o=r.value,s=Sy(o,t,n);if(0!==s)return s;i=i||o.field.isKeyField()}}catch(u){a.e(u)}finally{a.f()}return 0}}function Sy(e,t,n){var r=e.field.isKeyField()?Rv.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?bm(r,i):sv()}(e.field,t,n);switch(e.dir){case"asc":return r;case"desc":return-1*r;default:return sv()}}var Ty=function(){function e(t,n){u(this,e),this.mapKeyFn=t,this.equalsFn=n,this.inner={},this.innerSize=0}return h(e,[{key:"get",value:function(e){var t=this.mapKeyFn(e),n=this.inner[t];if(void 0!==n){var r,i=_(n);try{for(i.s();!(r=i.n()).done;){var a=E(r.value,2),o=a[0],s=a[1];if(this.equalsFn(o,e))return s}}catch(u){i.e(u)}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}},{key:"forEach",value:function(e){Yv(this.inner,(function(t,n){var r,i=_(n);try{for(i.s();!(r=i.n()).done;){var a=E(r.value,2),o=a[0],s=a[1];e(o,s)}}catch(u){i.e(u)}finally{i.f()}}))}},{key:"isEmpty",value:function(){return Jv(this.inner)}},{key:"size",value:function(){return this.innerSize}}]),e}(),Cy=new Zv(Rv.comparator);function Iy(){return Cy}var Ny=new Zv(Rv.comparator);function Ay(){for(var e=Ny,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 Ry(e){var t=Ny;return e.forEach((function(e,n){return t=t.insert(e,n.overlayedDocument)})),t}function Oy(){return Dy()}function Py(){return Dy()}function Dy(){return new Ty((function(e){return e.toString()}),(function(e,t){return e.isEqual(t)}))}var Ly=new Zv(Rv.comparator),jy=new nm(Rv.comparator);function My(){for(var e=jy,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 Fy=new nm(Ev);function Uy(){return Fy}function Vy(e,t){if(e.useProto3Json){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:Wv(t)?"-0":t}}function zy(e){return{integerValue:""+e}}function By(e,t){return Kv(t)?zy(t):Vy(e,t)}var qy=h((function e(){u(this,e),this._=void 0}));function Hy(e,t,n){return e instanceof Gy?function(e,t){var n={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:e.seconds,nanos:e.nanoseconds}}}};return t&&fm(t)&&(t=hm(t)),t&&(n.fields.__previous_value__=t),{mapValue:n}}(n,t):e instanceof Qy?$y(e,t):e instanceof Xy?Yy(e,t):function(e,t){var n=Ky(e,t),r=Zy(n)+Zy(e.wt);return Sm(n)&&Sm(e.wt)?zy(r):Vy(e.serializer,r)}(e,t)}function Wy(e,t,n){return e instanceof Qy?$y(e,t):e instanceof Xy?Yy(e,t):n}function Ky(e,t){return e instanceof Jy?Sm(n=t)||function(e){return!!e&&"doubleValue"in e}(n)?t:{integerValue:0}:null;var n}var Gy=function(e){p(n,e);var t=g(n);function n(){return u(this,n),t.apply(this,arguments)}return h(n)}(qy),Qy=function(e){p(n,e);var t=g(n);function n(e){var r;return u(this,n),(r=t.call(this)).elements=e,r}return h(n)}(qy);function $y(e,t){var n,r=eg(t),i=_(e.elements);try{var a=function(){var e=n.value;r.some((function(t){return gm(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 Xy=function(e){p(n,e);var t=g(n);function n(e){var r;return u(this,n),(r=t.call(this)).elements=e,r}return h(n)}(qy);function Yy(e,t){var n,r=eg(t),i=_(e.elements);try{var a=function(){var e=n.value;r=r.filter((function(t){return!gm(t,e)}))};for(i.s();!(n=i.n()).done;)a()}catch(o){i.e(o)}finally{i.f()}return{arrayValue:{values:r}}}var Jy=function(e){p(n,e);var t=g(n);function n(e,r){var i;return u(this,n),(i=t.call(this)).serializer=e,i.wt=r,i}return h(n)}(qy);function Zy(e){return cm(e.integerValue||e.doubleValue)}function eg(e){return Tm(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}var tg=h((function e(t,n){u(this,e),this.field=t,this.transform=n}));var ng=h((function e(t,n){u(this,e),this.version=t,this.transformResults=n})),rg=function(){function e(t,n){u(this,e),this.updateTime=t,this.exists=n}return h(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 ig(e,t){return void 0!==e.updateTime?t.isFoundDocument()&&t.version.isEqual(e.updateTime):void 0===e.exists||e.exists===t.isFoundDocument()}var ag=h((function e(){u(this,e)}));function og(e,t){if(!e.hasLocalMutations||t&&0===t.fields.length)return null;if(null===t)return e.isNoDocument()?new gg(e.key,rg.none()):new fg(e.key,e.data,rg.none());var n,r=e.data,i=Om.empty(),a=new nm(Av.comparator),o=_(t.fields);try{for(o.s();!(n=o.n()).done;){var s=n.value;if(!a.has(s)){var u=r.field(s);null===u&&s.length>1&&(s=s.popLast(),u=r.field(s)),null===u?i.delete(s):i.set(s,u),a=a.add(s)}}}catch(c){o.e(c)}finally{o.f()}return new hg(e.key,i,new im(a.toArray()),rg.none())}function sg(e,t,n){e instanceof fg?function(e,t,n){var r=e.value.clone(),i=pg(e.fieldTransforms,t,n.transformResults);r.setAll(i),t.convertToFoundDocument(n.version,r).setHasCommittedMutations()}(e,t,n):e instanceof hg?function(e,t,n){if(ig(e.precondition,t)){var r=pg(e.fieldTransforms,t,n.transformResults),i=t.data;i.setAll(dg(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 ug(e,t,n,r){return e instanceof fg?function(e,t,n,r){if(!ig(e.precondition,t))return n;var i=e.value.clone(),a=vg(e.fieldTransforms,r,t);return i.setAll(a),t.convertToFoundDocument(t.version,i).setHasLocalMutations(),null}(e,t,n,r):e instanceof hg?function(e,t,n,r){if(!ig(e.precondition,t))return n;var i=vg(e.fieldTransforms,r,t),a=t.data;return a.setAll(dg(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 ig(e.precondition,t)?(t.convertToNoDocument(t.version).setHasLocalMutations(),null):n}(e,t,n)}function cg(e,t){var n,r=null,i=_(e.fieldTransforms);try{for(i.s();!(n=i.n()).done;){var a=n.value,o=t.data.field(a.field),s=Ky(a.transform,o||null);null!=s&&(null===r&&(r=Om.empty()),r.set(a.field,s))}}catch(u){i.e(u)}finally{i.f()}return r||null}function lg(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)&&_v(e,t,(function(e,t){return function(e,t){return e.field.isEqual(t.field)&&function(e,t){return e instanceof Qy&&t instanceof Qy||e instanceof Xy&&t instanceof Xy?_v(e.elements,t.elements,gm):e instanceof Jy&&t instanceof Jy?gm(e.wt,t.wt):e instanceof Gy&&t instanceof Gy}(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 fg=function(e){p(n,e);var t=g(n);function n(e,r,i){var a,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return u(this,n),(a=t.call(this)).key=e,a.value=r,a.precondition=i,a.fieldTransforms=o,a.type=0,a}return h(n,[{key:"getFieldMask",value:function(){return null}}]),n}(ag),hg=function(e){p(n,e);var t=g(n);function n(e,r,i,a){var o,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];return u(this,n),(o=t.call(this)).key=e,o.data=r,o.fieldMask=i,o.precondition=a,o.fieldTransforms=s,o.type=1,o}return h(n,[{key:"getFieldMask",value:function(){return this.fieldMask}}]),n}(ag);function dg(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 pg(e,t,n){var r=new Map;uv(e.length===n.length);for(var i=0;i<n.length;i++){var a=e[i],o=a.transform,s=t.data.field(a.field);r.set(a.field,Wy(o,s,n[i]))}return r}function vg(e,t,n){var r,i=new Map,a=_(e);try{for(a.s();!(r=a.n()).done;){var o=r.value,s=o.transform,u=n.data.field(o.field);i.set(o.field,Hy(s,u,t))}}catch(c){a.e(c)}finally{a.f()}return i}var mg,yg,gg=function(e){p(n,e);var t=g(n);function n(e,r){var i;return u(this,n),(i=t.call(this)).key=e,i.precondition=r,i.type=2,i.fieldTransforms=[],i}return h(n,[{key:"getFieldMask",value:function(){return null}}]),n}(ag),kg=function(e){p(n,e);var t=g(n);function n(e,r){var i;return u(this,n),(i=t.call(this)).key=e,i.precondition=r,i.type=3,i.fieldTransforms=[],i}return h(n,[{key:"getFieldMask",value:function(){return null}}]),n}(ag),bg=function(){function e(t,n,r,i){u(this,e),this.batchId=t,this.localWriteTime=n,this.baseMutations=r,this.mutations=i}return h(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)&&sg(i,e,n[r])}}},{key:"applyToLocalView",value:function(e,t){var n,r=_(this.baseMutations);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.key.isEqual(e.key)&&(t=ug(i,e,t,this.localWriteTime))}}catch(u){r.e(u)}finally{r.f()}var a,o=_(this.mutations);try{for(o.s();!(a=o.n()).done;){var s=a.value;s.key.isEqual(e.key)&&(t=ug(s,e,t,this.localWriteTime))}}catch(u){o.e(u)}finally{o.f()}return t}},{key:"applyToLocalDocumentSet",value:function(e,t){var n=this,r=Py();return this.mutations.forEach((function(i){var a=e.get(i.key),o=a.overlayedDocument,s=n.applyToLocalView(o,a.mutatedFields),u=og(o,s=t.has(i.key)?null:s);null!==u&&r.set(i.key,u),o.isValidDocument()||o.convertToNoDocument(Tv.min())})),r}},{key:"keys",value:function(){return this.mutations.reduce((function(e,t){return e.add(t.key)}),My())}},{key:"isEqual",value:function(e){return this.batchId===e.batchId&&_v(this.mutations,e.mutations,(function(e,t){return lg(e,t)}))&&_v(this.baseMutations,e.baseMutations,(function(e,t){return lg(e,t)}))}}]),e}(),wg=function(){function e(t,n,r,i){u(this,e),this.batch=t,this.commitVersion=n,this.mutationResults=r,this.docVersions=i}return h(e,null,[{key:"from",value:function(t,n,r){uv(t.mutations.length===r.length);for(var i=Ly,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}(),xg=function(){function e(t,n){u(this,e),this.largestBatchId=t,this.mutation=n}return h(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}(),Eg=h((function e(t,n){u(this,e),this.count=t,this.unchangedNames=n}));function _g(e){switch(e){default:return sv();case lv.CANCELLED:case lv.UNKNOWN:case lv.DEADLINE_EXCEEDED:case lv.RESOURCE_EXHAUSTED:case lv.INTERNAL:case lv.UNAVAILABLE:case lv.UNAUTHENTICATED:return!1;case lv.INVALID_ARGUMENT:case lv.NOT_FOUND:case lv.ALREADY_EXISTS:case lv.PERMISSION_DENIED:case lv.FAILED_PRECONDITION:case lv.ABORTED:case lv.OUT_OF_RANGE:case lv.UNIMPLEMENTED:case lv.DATA_LOSS:return!0}}function Sg(e){if(void 0===e)return iv("GRPC error has no .code"),lv.UNKNOWN;switch(e){case mg.OK:return lv.OK;case mg.CANCELLED:return lv.CANCELLED;case mg.UNKNOWN:return lv.UNKNOWN;case mg.DEADLINE_EXCEEDED:return lv.DEADLINE_EXCEEDED;case mg.RESOURCE_EXHAUSTED:return lv.RESOURCE_EXHAUSTED;case mg.INTERNAL:return lv.INTERNAL;case mg.UNAVAILABLE:return lv.UNAVAILABLE;case mg.UNAUTHENTICATED:return lv.UNAUTHENTICATED;case mg.INVALID_ARGUMENT:return lv.INVALID_ARGUMENT;case mg.NOT_FOUND:return lv.NOT_FOUND;case mg.ALREADY_EXISTS:return lv.ALREADY_EXISTS;case mg.PERMISSION_DENIED:return lv.PERMISSION_DENIED;case mg.FAILED_PRECONDITION:return lv.FAILED_PRECONDITION;case mg.ABORTED:return lv.ABORTED;case mg.OUT_OF_RANGE:return lv.OUT_OF_RANGE;case mg.UNIMPLEMENTED:return lv.UNIMPLEMENTED;case mg.DATA_LOSS:return lv.DATA_LOSS;default:return sv()}}(yg=mg||(mg={}))[yg.OK=0]="OK",yg[yg.CANCELLED=1]="CANCELLED",yg[yg.UNKNOWN=2]="UNKNOWN",yg[yg.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",yg[yg.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",yg[yg.NOT_FOUND=5]="NOT_FOUND",yg[yg.ALREADY_EXISTS=6]="ALREADY_EXISTS",yg[yg.PERMISSION_DENIED=7]="PERMISSION_DENIED",yg[yg.UNAUTHENTICATED=16]="UNAUTHENTICATED",yg[yg.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",yg[yg.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",yg[yg.ABORTED=10]="ABORTED",yg[yg.OUT_OF_RANGE=11]="OUT_OF_RANGE",yg[yg.UNIMPLEMENTED=12]="UNIMPLEMENTED",yg[yg.INTERNAL=13]="INTERNAL",yg[yg.UNAVAILABLE=14]="UNAVAILABLE",yg[yg.DATA_LOSS=15]="DATA_LOSS";var Tg=function(){function e(){u(this,e),this.onExistenceFilterMismatchCallbacks=new Map}return h(e,[{key:"onExistenceFilterMismatch",value:function(e){var t=this,n=Symbol();return this.onExistenceFilterMismatchCallbacks.set(n,e),function(){return t.onExistenceFilterMismatchCallbacks.delete(n)}}},{key:"notifyOnExistenceFilterMismatch",value:function(e){this.onExistenceFilterMismatchCallbacks.forEach((function(t){return t(e)}))}}],[{key:"instance",get:function(){return Cg}},{key:"getOrCreateInstance",value:function(){return null===Cg&&(Cg=new e),Cg}}]),e}(),Cg=null;function Ig(){return new TextEncoder}var Ng=new Yp([4294967295,4294967295],0);function Ag(e){var t=Ig().encode(e),n=new Xp;return n.update(t),new Uint8Array(n.digest())}function Rg(e){var t=new DataView(e.buffer),n=t.getUint32(0,!0),r=t.getUint32(4,!0),i=t.getUint32(8,!0),a=t.getUint32(12,!0);return[new Yp([n,r],0),new Yp([i,a],0)]}var Og=function(){function e(t,n,r){if(u(this,e),this.bitmap=t,this.padding=n,this.hashCount=r,n<0||n>=8)throw new Pg("Invalid padding: ".concat(n));if(r<0)throw new Pg("Invalid hash count: ".concat(r));if(t.length>0&&0===this.hashCount)throw new Pg("Invalid hash count: ".concat(r));if(0===t.length&&0!==n)throw new Pg("Invalid padding when bitmap length is 0: ".concat(n));this.yt=8*t.length-n,this.It=Yp.fromNumber(this.yt)}return h(e,[{key:"Tt",value:function(e,t,n){var r=e.add(t.multiply(Yp.fromNumber(n)));return 1===r.compare(Ng)&&(r=new Yp([r.getBits(0),r.getBits(1)],0)),r.modulo(this.It).toNumber()}},{key:"Et",value:function(e){return 0!=(this.bitmap[Math.floor(e/8)]&1<<e%8)}},{key:"At",value:function(e){if(0===this.yt)return!1;for(var t=E(Rg(Ag(e)),2),n=t[0],r=t[1],i=0;i<this.hashCount;i++){var a=this.Tt(n,r,i);if(!this.Et(a))return!1}return!0}},{key:"insert",value:function(e){if(0!==this.yt)for(var t=E(Rg(Ag(e)),2),n=t[0],r=t[1],i=0;i<this.hashCount;i++){var a=this.Tt(n,r,i);this.Rt(a)}}},{key:"Rt",value:function(e){var t=Math.floor(e/8),n=e%8;this.bitmap[t]|=1<<n}}],[{key:"create",value:function(t,n,r){var i=t%8==0?0:8-t%8,a=new e(new Uint8Array(Math.ceil(t/8)),i,n);return r.forEach((function(e){return a.insert(e)})),a}}]),e}(),Pg=function(e){p(n,e);var t=g(n);function n(){var e;return u(this,n),(e=t.apply(this,arguments)).name="BloomFilterError",e}return h(n)}(b(Error)),Dg=function(){function e(t,n,r,i,a){u(this,e),this.snapshotVersion=t,this.targetChanges=n,this.targetMismatches=r,this.documentUpdates=i,this.resolvedLimboDocuments=a}return h(e,null,[{key:"createSynthesizedRemoteEventForCurrentChange",value:function(t,n,r){var i=new Map;return i.set(t,Lg.createSynthesizedTargetChangeForCurrentChange(t,n,r)),new e(Tv.min(),i,new Zv(Ev),Iy(),My())}}]),e}(),Lg=function(){function e(t,n,r,i,a){u(this,e),this.resumeToken=t,this.current=n,this.addedDocuments=r,this.modifiedDocuments=i,this.removedDocuments=a}return h(e,null,[{key:"createSynthesizedTargetChangeForCurrentChange",value:function(t,n,r){return new e(r,n,My(),My(),My())}}]),e}(),jg=h((function e(t,n,r,i){u(this,e),this.vt=t,this.removedTargetIds=n,this.key=r,this.Pt=i})),Mg=h((function e(t,n){u(this,e),this.targetId=t,this.bt=n})),Fg=h((function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:om.EMPTY_BYTE_STRING,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;u(this,e),this.state=t,this.targetIds=n,this.resumeToken=r,this.cause=i})),Ug=function(){function e(){u(this,e),this.Vt=0,this.St=Bg(),this.Dt=om.EMPTY_BYTE_STRING,this.Ct=!1,this.xt=!0}return h(e,[{key:"current",get:function(){return this.Ct}},{key:"resumeToken",get:function(){return this.Dt}},{key:"Nt",get:function(){return 0!==this.Vt}},{key:"kt",get:function(){return this.xt}},{key:"Mt",value:function(e){e.approximateByteSize()>0&&(this.xt=!0,this.Dt=e)}},{key:"Ot",value:function(){var e=My(),t=My(),n=My();return this.St.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:sv()}})),new Lg(this.Dt,this.Ct,e,t,n)}},{key:"$t",value:function(){this.xt=!1,this.St=Bg()}},{key:"Ft",value:function(e,t){this.xt=!0,this.St=this.St.insert(e,t)}},{key:"Bt",value:function(e){this.xt=!0,this.St=this.St.remove(e)}},{key:"Lt",value:function(){this.Vt+=1}},{key:"qt",value:function(){this.Vt-=1}},{key:"Ut",value:function(){this.xt=!0,this.Ct=!0}}]),e}(),Vg=function(){function e(t){u(this,e),this.Kt=t,this.Gt=new Map,this.Qt=Iy(),this.jt=zg(),this.zt=new Zv(Ev)}return h(e,[{key:"Wt",value:function(e){var t,n=_(e.vt);try{for(n.s();!(t=n.n()).done;){var r=t.value;e.Pt&&e.Pt.isFoundDocument()?this.Ht(r,e.Pt):this.Jt(r,e.key,e.Pt)}}catch(s){n.e(s)}finally{n.f()}var i,a=_(e.removedTargetIds);try{for(a.s();!(i=a.n()).done;){var o=i.value;this.Jt(o,e.key,e.Pt)}}catch(s){a.e(s)}finally{a.f()}}},{key:"Yt",value:function(e){var t=this;this.forEachTarget(e,(function(n){var r=t.Xt(n);switch(e.state){case 0:t.Zt(n)&&r.Mt(e.resumeToken);break;case 1:r.qt(),r.Nt||r.$t(),r.Mt(e.resumeToken);break;case 2:r.qt(),r.Nt||t.removeTarget(n);break;case 3:t.Zt(n)&&(r.Ut(),r.Mt(e.resumeToken));break;case 4:t.Zt(n)&&(t.te(n),r.Mt(e.resumeToken));break;default:sv()}}))}},{key:"forEachTarget",value:function(e,t){var n=this;e.targetIds.length>0?e.targetIds.forEach(t):this.Gt.forEach((function(e,r){n.Zt(r)&&t(r)}))}},{key:"ee",value:function(e){var t,n=e.targetId,r=e.bt.count,i=this.ne(n);if(i){var a=i.target;if(sy(a))if(0===r){var o=new Rv(a.path);this.Jt(n,o,Dm.newNoDocument(o,Tv.min()))}else uv(1===r);else{var s=this.se(n);if(s!==r){var u=this.ie(e,s);if(0!==u){this.te(n);var c=2===u?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.zt=this.zt.insert(n,c)}null===(t=Tg.instance)||void 0===t||t.notifyOnExistenceFilterMismatch(function(e,t,n){var r,i,a,o,s,u,c={localCacheCount:t,existenceFilterCount:n.count},l=n.unchangedNames;return l&&(c.bloomFilter={applied:0===e,hashCount:null!==(r=null==l?void 0:l.hashCount)&&void 0!==r?r:0,bitmapLength:null!==(o=null===(a=null===(i=null==l?void 0:l.bits)||void 0===i?void 0:i.bitmap)||void 0===a?void 0:a.length)&&void 0!==o?o:0,padding:null!==(u=null===(s=null==l?void 0:l.bits)||void 0===s?void 0:s.padding)&&void 0!==u?u:0}),c}(u,s,e.bt))}}}}},{key:"ie",value:function(e,t){var n=e.bt,r=n.unchangedNames,i=n.count;if(!r||!r.bits)return 1;var a,o,s=r.bits,u=s.bitmap,c=void 0===u?"":u,l=s.padding,f=void 0===l?0:l,h=r.hashCount,d=void 0===h?0:h;try{a=lm(c).toUint8Array()}catch(e){if(e instanceof am)return av("Decoding the base64 bloom filter in existence filter failed ("+e.message+"); ignoring the bloom filter and falling back to full re-query."),1;throw e}try{o=new Og(a,f,d)}catch(e){return av(e instanceof Pg?"BloomFilter error: ":"Applying bloom filter failed: ",e),1}return 0===o.yt?1:i!==t-this.re(e.targetId,o)?2:0}},{key:"re",value:function(e,t){var n=this,r=this.Kt.getRemoteKeysForTarget(e),i=0;return r.forEach((function(r){var a=n.Kt.oe(),o="projects/".concat(a.projectId,"/databases/").concat(a.database,"/documents/").concat(r.path.canonicalString());t.At(o)||(n.Jt(e,r,null),i++)})),i}},{key:"ue",value:function(e){var t=this,n=new Map;this.Gt.forEach((function(r,i){var a=t.ne(i);if(a){if(r.current&&sy(a.target)){var o=new Rv(a.target.path);null!==t.Qt.get(o)||t.ce(i,o)||t.Jt(i,o,Dm.newNoDocument(o,e))}r.kt&&(n.set(i,r.Ot()),r.$t())}}));var r=My();this.jt.forEach((function(e,n){var i=!0;n.forEachWhile((function(e){var n=t.ne(e);return!n||"TargetPurposeLimboResolution"===n.purpose||(i=!1,!1)})),i&&(r=r.add(e))})),this.Qt.forEach((function(t,n){return n.setReadTime(e)}));var i=new Dg(e,n,this.zt,this.Qt,r);return this.Qt=Iy(),this.jt=zg(),this.zt=new Zv(Ev),i}},{key:"Ht",value:function(e,t){if(this.Zt(e)){var n=this.ce(e,t.key)?2:0;this.Xt(e).Ft(t.key,n),this.Qt=this.Qt.insert(t.key,t),this.jt=this.jt.insert(t.key,this.ae(t.key).add(e))}}},{key:"Jt",value:function(e,t,n){if(this.Zt(e)){var r=this.Xt(e);this.ce(e,t)?r.Ft(t,1):r.Bt(t),this.jt=this.jt.insert(t,this.ae(t).delete(e)),n&&(this.Qt=this.Qt.insert(t,n))}}},{key:"removeTarget",value:function(e){this.Gt.delete(e)}},{key:"se",value:function(e){var t=this.Xt(e).Ot();return this.Kt.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size}},{key:"Lt",value:function(e){this.Xt(e).Lt()}},{key:"Xt",value:function(e){var t=this.Gt.get(e);return t||(t=new Ug,this.Gt.set(e,t)),t}},{key:"ae",value:function(e){var t=this.jt.get(e);return t||(t=new nm(Ev),this.jt=this.jt.insert(e,t)),t}},{key:"Zt",value:function(e){var t=null!==this.ne(e);return t||rv("WatchChangeAggregator","Detected inactive target",e),t}},{key:"ne",value:function(e){var t=this.Gt.get(e);return t&&t.Nt?null:this.Kt.he(e)}},{key:"te",value:function(e){var t=this;this.Gt.set(e,new Ug),this.Kt.getRemoteKeysForTarget(e).forEach((function(n){t.Jt(e,n,null)}))}},{key:"ce",value:function(e,t){return this.Kt.getRemoteKeysForTarget(e).has(t)}}]),e}();function zg(){return new Zv(Rv.comparator)}function Bg(){return new Zv(Rv.comparator)}var qg={asc:"ASCENDING",desc:"DESCENDING"},Hg={"<":"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"},Wg={and:"AND",or:"OR"},Kg=h((function e(t,n){u(this,e),this.databaseId=t,this.useProto3Json=n}));function Gg(e,t){return e.useProto3Json||Hv(t)?t:{value:t}}function Qg(e,t){return e.useProto3Json?"".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 $g(e,t){return e.useProto3Json?t.toBase64():t.toUint8Array()}function Xg(e,t){return Qg(e,t.toTimestamp())}function Yg(e){return uv(!!e),Tv.fromTimestamp(function(e){var t=um(e);return new Sv(t.seconds,t.nanos)}(e))}function Jg(e,t){return function(e){return new Iv(["projects",e.projectId,"databases",e.database])}(e).child("documents").child(t).canonicalString()}function Zg(e){var t=Iv.fromString(e);return uv(kk(t)),t}function ek(e,t){return Jg(e.databaseId,t.path)}function tk(e,t){var n=Zg(t);if(n.get(1)!==e.databaseId.projectId)throw new fv(lv.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 fv(lv.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+e.databaseId.database);return new Rv(ak(n))}function nk(e,t){return Jg(e.databaseId,t)}function rk(e){var t=Zg(e);return 4===t.length?Iv.emptyPath():ak(t)}function ik(e){return new Iv(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function ak(e){return uv(e.length>4&&"documents"===e.get(4)),e.popFirst(5)}function ok(e,t,n){return{name:ek(e,t),fields:n.value.mapValue.fields}}function sk(e,t){var n;if(t instanceof fg)n={update:ok(e,t.key,t.value)};else if(t instanceof gg)n={delete:ek(e,t.key)};else if(t instanceof hg)n={update:ok(e,t.key,t.data),updateMask:gk(t.fieldMask)};else{if(!(t instanceof kg))return sv();n={verify:ek(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 Gy)return{fieldPath:t.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(n instanceof Qy)return{fieldPath:t.field.canonicalString(),appendMissingElements:{values:n.elements}};if(n instanceof Xy)return{fieldPath:t.field.canonicalString(),removeAllFromArray:{values:n.elements}};if(n instanceof Jy)return{fieldPath:t.field.canonicalString(),increment:n.wt};throw sv()}(0,e)}))),t.precondition.isNone||(n.currentDocument=function(e,t){return void 0!==t.updateTime?{updateTime:Xg(e,t.updateTime)}:void 0!==t.exists?{exists:t.exists}:sv()}(e,t.precondition)),n}function uk(e,t){return{documents:[nk(e,t.path)]}}function ck(e,t){var n={structuredQuery:{}},r=t.path;null!==t.collectionGroup?(n.parent=nk(e,r),n.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(n.parent=nk(e,r.popLast()),n.structuredQuery.from=[{collectionId:r.lastSegment()}]);var i=function(e){if(0!==e.length)return yk(Bm.create(e,"and"))}(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:vk(e.field),direction:hk(e.dir)}}(e)}))}(t.orderBy);a&&(n.structuredQuery.orderBy=a);var o,s=Gg(e,t.limit);return null!==s&&(n.structuredQuery.limit=s),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 lk(e){var t=rk(e.parent),n=e.structuredQuery,r=n.from?n.from.length:0,i=null;if(r>0){uv(1===r);var a=n.from[0];a.allDescendants?i=a.collectionId:t=t.child(a.collectionId)}var o=[];n.where&&(o=function(e){var t=fk(e);return t instanceof Bm&&Hm(t)?t.getFilters():[t]}(n.where));var s=[];n.orderBy&&(s=n.orderBy.map((function(e){return function(e){return new Fm(mk(e.field),function(e){switch(e){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(e.direction))}(e)})));var u=null;n.limit&&(u=function(e){var t;return Hv(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 Lm(n,t)}(n.startAt));var l=null;return n.endAt&&(l=function(e){var t=!e.before,n=e.values||[];return new Lm(n,t)}(n.endAt)),cy(t,i,s,o,u,"F",c,l)}function fk(e){return void 0!==e.unaryFilter?function(e){switch(e.unaryFilter.op){case"IS_NAN":var t=mk(e.unaryFilter.field);return zm.create(t,"==",{doubleValue:NaN});case"IS_NULL":var n=mk(e.unaryFilter.field);return zm.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":var r=mk(e.unaryFilter.field);return zm.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":var i=mk(e.unaryFilter.field);return zm.create(i,"!=",{nullValue:"NULL_VALUE"});default:return sv()}}(e):void 0!==e.fieldFilter?function(e){return zm.create(mk(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 sv()}}(e.fieldFilter.op),e.fieldFilter.value)}(e):void 0!==e.compositeFilter?function(e){return Bm.create(e.compositeFilter.filters.map((function(e){return fk(e)})),function(e){switch(e){case"AND":return"and";case"OR":return"or";default:return sv()}}(e.compositeFilter.op))}(e):sv()}function hk(e){return qg[e]}function dk(e){return Hg[e]}function pk(e){return Wg[e]}function vk(e){return{fieldPath:e.canonicalString()}}function mk(e){return Av.fromServerFormat(e.fieldPath)}function yk(e){return e instanceof zm?function(e){if("=="===e.op){if(Im(e.value))return{unaryFilter:{field:vk(e.field),op:"IS_NAN"}};if(Cm(e.value))return{unaryFilter:{field:vk(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(Im(e.value))return{unaryFilter:{field:vk(e.field),op:"IS_NOT_NAN"}};if(Cm(e.value))return{unaryFilter:{field:vk(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:vk(e.field),op:dk(e.op),value:e.value}}}(e):e instanceof Bm?function(e){var t=e.getFilters().map((function(e){return yk(e)}));return 1===t.length?t[0]:{compositeFilter:{op:pk(e.op),filters:t}}}(e):sv()}function gk(e){var t=[];return e.fields.forEach((function(e){return t.push(e.canonicalString())})),{fieldPaths:t}}function kk(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)}var bk=function(){function e(t,n,r,i){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Tv.min(),o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Tv.min(),s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:om.EMPTY_BYTE_STRING,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;u(this,e),this.target=t,this.targetId=n,this.purpose=r,this.sequenceNumber=i,this.snapshotVersion=a,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=s,this.expectedCount=c}return h(e,[{key:"withSequenceNumber",value:function(t){return new e(this.target,this.targetId,this.purpose,t,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}},{key:"withResumeToken",value:function(t,n){return new e(this.target,this.targetId,this.purpose,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,t,null)}},{key:"withExpectedCount",value:function(t){return new e(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,t)}},{key:"withLastLimboFreeSnapshotVersion",value:function(t){return new e(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,t,this.resumeToken,this.expectedCount)}}]),e}(),wk=h((function e(t){u(this,e),this.le=t}));function xk(e){var t=lk({parent:e.parent,structuredQuery:e.structuredQuery});return"LAST"===e.limitType?gy(t,t.limit,"L"):t}var Ek=function(){function e(){u(this,e)}return h(e,[{key:"_e",value:function(e,t){this.we(e,t),t.me()}},{key:"we",value:function(e,t){if("nullValue"in e)this.ge(t,5);else if("booleanValue"in e)this.ge(t,10),t.ye(e.booleanValue?1:0);else if("integerValue"in e)this.ge(t,15),t.ye(cm(e.integerValue));else if("doubleValue"in e){var n=cm(e.doubleValue);isNaN(n)?this.ge(t,13):(this.ge(t,15),Wv(n)?t.ye(0):t.ye(n))}else if("timestampValue"in e){var r=e.timestampValue;this.ge(t,20),"string"==typeof r?t.pe(r):(t.pe("".concat(r.seconds||"")),t.ye(r.nanos||0))}else if("stringValue"in e)this.Ie(e.stringValue,t),this.Te(t);else if("bytesValue"in e)this.ge(t,30),t.Ee(lm(e.bytesValue)),this.Te(t);else if("referenceValue"in e)this.Ae(e.referenceValue,t);else if("geoPointValue"in e){var i=e.geoPointValue;this.ge(t,45),t.ye(i.latitude||0),t.ye(i.longitude||0)}else"mapValue"in e?Rm(e)?this.ge(t,Number.MAX_SAFE_INTEGER):(this.Re(e.mapValue,t),this.Te(t)):"arrayValue"in e?(this.ve(e.arrayValue,t),this.Te(t)):sv()}},{key:"Ie",value:function(e,t){this.ge(t,25),this.Pe(e,t)}},{key:"Pe",value:function(e,t){t.pe(e)}},{key:"Re",value:function(e,t){var n=e.fields||{};this.ge(t,55);for(var r=0,i=Object.keys(n);r<i.length;r++){var a=i[r];this.Ie(a,t),this.we(n[a],t)}}},{key:"ve",value:function(e,t){var n=e.values||[];this.ge(t,50);var r,i=_(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;this.we(a,t)}}catch(o){i.e(o)}finally{i.f()}}},{key:"Ae",value:function(e,t){var n=this;this.ge(t,37),Rv.fromName(e).path.forEach((function(e){n.ge(t,60),n.Pe(e,t)}))}},{key:"ge",value:function(e,t){e.ye(t)}},{key:"Te",value:function(e){e.ye(2)}}]),e}();Ek.be=new Ek;var _k=function(){function e(){u(this,e),this.sn=new Sk}return h(e,[{key:"addToCollectionParentIndex",value:function(e,t){return this.sn.add(t),zv.resolve()}},{key:"getCollectionParents",value:function(e,t){return zv.resolve(this.sn.getEntries(t))}},{key:"addFieldIndex",value:function(e,t){return zv.resolve()}},{key:"deleteFieldIndex",value:function(e,t){return zv.resolve()}},{key:"getDocumentsMatchingTarget",value:function(e,t){return zv.resolve(null)}},{key:"getIndexType",value:function(e,t){return zv.resolve(0)}},{key:"getFieldIndexes",value:function(e,t){return zv.resolve([])}},{key:"getNextCollectionGroupToUpdate",value:function(e){return zv.resolve(null)}},{key:"getMinOffset",value:function(e,t){return zv.resolve(Lv.min())}},{key:"getMinOffsetFromCollectionGroup",value:function(e,t){return zv.resolve(Lv.min())}},{key:"updateCollectionGroup",value:function(e,t,n){return zv.resolve()}},{key:"updateIndexEntries",value:function(e,t){return zv.resolve()}}]),e}(),Sk=function(){function e(){u(this,e),this.index={}}return h(e,[{key:"add",value:function(e){var t=e.lastSegment(),n=e.popLast(),r=this.index[t]||new nm(Iv.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 nm(Iv.comparator)).toArray()}}]),e}();new Uint8Array(0);var Tk=function(){function e(t,n,r){u(this,e),this.cacheSizeCollectionThreshold=t,this.percentileToCollect=n,this.maximumSequenceNumbersToCollect=r}return h(e,null,[{key:"withCacheSize",value:function(t){return new e(t,e.DEFAULT_COLLECTION_PERCENTILE,e.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}}]),e}();Tk.DEFAULT_COLLECTION_PERCENTILE=10,Tk.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,Tk.DEFAULT=new Tk(41943040,Tk.DEFAULT_COLLECTION_PERCENTILE,Tk.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),Tk.DISABLED=new Tk(-1,0,0);var Ck=function(){function e(t){u(this,e),this.xn=t}return h(e,[{key:"next",value:function(){return this.xn+=2,this.xn}}],[{key:"Nn",value:function(){return new e(0)}},{key:"kn",value:function(){return new e(-1)}}]),e}();var Ik=function(){function e(){u(this,e),this.changes=new Ty((function(e){return e.toString()}),(function(e,t){return e.isEqual(t)})),this.changesApplied=!1}return h(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,Dm.newInvalidDocument(e).setReadTime(t))}},{key:"getEntry",value:function(e,t){this.assertNotApplied();var n=this.changes.get(t);return void 0!==n?zv.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 Nk=h((function e(t,n){u(this,e),this.overlayedDocument=t,this.mutatedFields=n})),Ak=function(){function e(t,n,r,i){u(this,e),this.remoteDocumentCache=t,this.mutationQueue=n,this.documentOverlayCache=r,this.indexManager=i}return h(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.remoteDocumentCache.getEntry(e,t)})).next((function(e){return null!==r&&ug(r.mutation,e,im.empty(),Sv.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,My()).next((function(){return t}))}))}},{key:"getLocalViewOfDocuments",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:My(),i=Oy();return this.populateOverlays(e,i,t).next((function(){return n.computeViews(e,t,i,r).next((function(e){var t=Ay();return e.forEach((function(e,n){t=t.insert(e,n.overlayedDocument)})),t}))}))}},{key:"getOverlayedDocuments",value:function(e,t){var n=this,r=Oy();return this.populateOverlays(e,r,t).next((function(){return n.computeViews(e,t,r,My())}))}},{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=Iy(),a=Dy(),o=Dy();return t.forEach((function(e,t){var o=n.get(t.key);r.has(t.key)&&(void 0===o||o.mutation instanceof hg)?i=i.insert(t.key,t):void 0!==o?(a.set(t.key,o.mutation.getFieldMask()),ug(o.mutation,t,o.mutation.getFieldMask(),Sv.now())):a.set(t.key,im.empty())})),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 Nk(t,null!==(n=a.get(e))&&void 0!==n?n:null))})),o}))}},{key:"recalculateAndSaveOverlays",value:function(e,t){var n=this,r=Dy(),i=new Zv((function(e,t){return e-t})),a=My();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,t).next((function(e){var n,a=_(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)||im.empty();o=e.applyToLocalView(a,o),r.set(n,o);var s=(i.get(e.batchId)||My()).add(n);i=i.insert(e.batchId,s)}}))};for(a.s();!(n=a.n()).done;)o()}catch(s){a.e(s)}finally{a.f()}})).next((function(){for(var o=[],s=i.getReverseIterator(),u=function(){var i=s.getNext(),u=i.key,c=i.value,l=Py();c.forEach((function(e){if(!a.has(e)){var n=og(t.get(e),r.get(e));null!==n&&l.set(e,n),a=a.add(e)}})),o.push(n.documentOverlayCache.saveOverlays(e,u,l))};s.hasNext();)u();return zv.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 Rv.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}(t)?this.getDocumentsMatchingDocumentQuery(e,t.path):py(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):zv.resolve(Oy()),s=-1,u=a;return o.next((function(t){return zv.forEach(t,(function(t,n){return s<n.largestBatchId&&(s=n.largestBatchId),a.get(t)?zv.resolve():i.remoteDocumentCache.getEntry(e,t).next((function(e){u=u.insert(t,e)}))})).next((function(){return i.populateOverlays(e,t,a)})).next((function(){return i.computeViews(e,u,t,My())})).next((function(e){return{batchId:s,changes:Ry(e)}}))}))}))}},{key:"getDocumentsMatchingDocumentQuery",value:function(e,t){return this.getDocument(e,new Rv(t)).next((function(e){var t=Ay();return e.isFoundDocument()&&(t=t.insert(e.key,e)),t}))}},{key:"getDocumentsMatchingCollectionGroupQuery",value:function(e,t,n){var r=this,i=t.collectionGroup,a=Ay();return this.indexManager.getCollectionParents(e,i).next((function(o){return zv.forEach(o,(function(o){var s=function(e,t){return new uy(t,null,e.explicitOrderBy.slice(),e.filters.slice(),e.limit,e.limitType,e.startAt,e.endAt)}(t,o.child(i));return r.getDocumentsMatchingCollectionQuery(e,s,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.documentOverlayCache.getOverlaysForCollection(e,t.path,n.largestBatchId).next((function(a){return r=a,i.remoteDocumentCache.getDocumentsMatchingQuery(e,t,n,r)})).next((function(e){r.forEach((function(t,n){var r=n.getKey();null===e.get(r)&&(e=e.insert(r,Dm.newInvalidDocument(r)))}));var n=Ay();return e.forEach((function(e,i){var a=r.get(e);void 0!==a&&ug(a.mutation,i,im.empty(),Sv.now()),xy(t,i)&&(n=n.insert(e,i))})),n}))}}]),e}(),Rk=function(){function e(t){u(this,e),this.serializer=t,this.us=new Map,this.cs=new Map}return h(e,[{key:"getBundleMetadata",value:function(e,t){return zv.resolve(this.us.get(t))}},{key:"saveBundleMetadata",value:function(e,t){var n;return this.us.set(t.id,{id:(n=t).id,version:n.version,createTime:Yg(n.createTime)}),zv.resolve()}},{key:"getNamedQuery",value:function(e,t){return zv.resolve(this.cs.get(t))}},{key:"saveNamedQuery",value:function(e,t){return this.cs.set(t.name,function(e){return{name:e.name,query:xk(e.bundledQuery),readTime:Yg(e.readTime)}}(t)),zv.resolve()}}]),e}(),Ok=function(){function e(){u(this,e),this.overlays=new Zv(Rv.comparator),this.hs=new Map}return h(e,[{key:"getOverlay",value:function(e,t){return zv.resolve(this.overlays.get(t))}},{key:"getOverlays",value:function(e,t){var n=this,r=Oy();return zv.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.de(e,t,i)})),zv.resolve()}},{key:"removeOverlaysForBatchId",value:function(e,t,n){var r=this,i=this.hs.get(n);return void 0!==i&&(i.forEach((function(e){return r.overlays=r.overlays.remove(e)})),this.hs.delete(n)),zv.resolve()}},{key:"getOverlaysForCollection",value:function(e,t,n){for(var r=Oy(),i=t.length+1,a=new Rv(t.child("")),o=this.overlays.getIteratorFrom(a);o.hasNext();){var s=o.getNext().value,u=s.getKey();if(!t.isPrefixOf(u.path))break;u.path.length===i&&s.largestBatchId>n&&r.set(s.getKey(),s)}return zv.resolve(r)}},{key:"getOverlaysForCollectionGroup",value:function(e,t,n,r){for(var i=new Zv((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 s=i.get(o.largestBatchId);null===s&&(s=Oy(),i=i.insert(o.largestBatchId,s)),s.set(o.getKey(),o)}}for(var u=Oy(),c=i.getIterator();c.hasNext()&&(c.getNext().value.forEach((function(e,t){return u.set(e,t)})),!(u.size()>=r)););return zv.resolve(u)}},{key:"de",value:function(e,t,n){var r=this.overlays.get(n.key);if(null!==r){var i=this.hs.get(r.largestBatchId).delete(n.key);this.hs.set(r.largestBatchId,i)}this.overlays=this.overlays.insert(n.key,new xg(t,n));var a=this.hs.get(t);void 0===a&&(a=My(),this.hs.set(t,a)),this.hs.set(t,a.add(n.key))}}]),e}(),Pk=function(){function e(){u(this,e),this.ls=new nm(Dk.fs),this.ds=new nm(Dk._s)}return h(e,[{key:"isEmpty",value:function(){return this.ls.isEmpty()}},{key:"addReference",value:function(e,t){var n=new Dk(e,t);this.ls=this.ls.add(n),this.ds=this.ds.add(n)}},{key:"ws",value:function(e,t){var n=this;e.forEach((function(e){return n.addReference(e,t)}))}},{key:"removeReference",value:function(e,t){this.gs(new Dk(e,t))}},{key:"ys",value:function(e,t){var n=this;e.forEach((function(e){return n.removeReference(e,t)}))}},{key:"ps",value:function(e){var t=this,n=new Rv(new Iv([])),r=new Dk(n,e),i=new Dk(n,e+1),a=[];return this.ds.forEachInRange([r,i],(function(e){t.gs(e),a.push(e.key)})),a}},{key:"Is",value:function(){var e=this;this.ls.forEach((function(t){return e.gs(t)}))}},{key:"gs",value:function(e){this.ls=this.ls.delete(e),this.ds=this.ds.delete(e)}},{key:"Ts",value:function(e){var t=new Rv(new Iv([])),n=new Dk(t,e),r=new Dk(t,e+1),i=My();return this.ds.forEachInRange([n,r],(function(e){i=i.add(e.key)})),i}},{key:"containsKey",value:function(e){var t=new Dk(e,0),n=this.ls.firstAfterOrEqual(t);return null!==n&&e.isEqual(n.key)}}]),e}(),Dk=function(){function e(t,n){u(this,e),this.key=t,this.Es=n}return h(e,null,[{key:"fs",value:function(e,t){return Rv.comparator(e.key,t.key)||Ev(e.Es,t.Es)}},{key:"_s",value:function(e,t){return Ev(e.Es,t.Es)||Rv.comparator(e.key,t.key)}}]),e}(),Lk=function(){function e(t,n){u(this,e),this.indexManager=t,this.referenceDelegate=n,this.mutationQueue=[],this.As=1,this.Rs=new nm(Dk.fs)}return h(e,[{key:"checkEmpty",value:function(e){return zv.resolve(0===this.mutationQueue.length)}},{key:"addMutationBatch",value:function(e,t,n,r){var i=this.As;this.As++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];var a=new bg(i,t,n,r);this.mutationQueue.push(a);var o,s=_(r);try{for(s.s();!(o=s.n()).done;){var u=o.value;this.Rs=this.Rs.add(new Dk(u.key,i)),this.indexManager.addToCollectionParentIndex(e,u.key.path.popLast())}}catch(c){s.e(c)}finally{s.f()}return zv.resolve(a)}},{key:"lookupMutationBatch",value:function(e,t){return zv.resolve(this.vs(t))}},{key:"getNextMutationBatchAfterBatchId",value:function(e,t){var n=t+1,r=this.Ps(n),i=r<0?0:r;return zv.resolve(this.mutationQueue.length>i?this.mutationQueue[i]:null)}},{key:"getHighestUnacknowledgedBatchId",value:function(){return zv.resolve(0===this.mutationQueue.length?-1:this.As-1)}},{key:"getAllMutationBatches",value:function(e){return zv.resolve(this.mutationQueue.slice())}},{key:"getAllMutationBatchesAffectingDocumentKey",value:function(e,t){var n=this,r=new Dk(t,0),i=new Dk(t,Number.POSITIVE_INFINITY),a=[];return this.Rs.forEachInRange([r,i],(function(e){var t=n.vs(e.Es);a.push(t)})),zv.resolve(a)}},{key:"getAllMutationBatchesAffectingDocumentKeys",value:function(e,t){var n=this,r=new nm(Ev);return t.forEach((function(e){var t=new Dk(e,0),i=new Dk(e,Number.POSITIVE_INFINITY);n.Rs.forEachInRange([t,i],(function(e){r=r.add(e.Es)}))})),zv.resolve(this.bs(r))}},{key:"getAllMutationBatchesAffectingQuery",value:function(e,t){var n=t.path,r=n.length+1,i=n;Rv.isDocumentKey(i)||(i=i.child(""));var a=new Dk(new Rv(i),0),o=new nm(Ev);return this.Rs.forEachWhile((function(e){var t=e.key.path;return!!n.isPrefixOf(t)&&(t.length===r&&(o=o.add(e.Es)),!0)}),a),zv.resolve(this.bs(o))}},{key:"bs",value:function(e){var t=this,n=[];return e.forEach((function(e){var r=t.vs(e);null!==r&&n.push(r)})),n}},{key:"removeMutationBatch",value:function(e,t){var n=this;uv(0===this.Vs(t.batchId,"removed")),this.mutationQueue.shift();var r=this.Rs;return zv.forEach(t.mutations,(function(i){var a=new Dk(i.key,t.batchId);return r=r.delete(a),n.referenceDelegate.markPotentiallyOrphaned(e,i.key)})).next((function(){n.Rs=r}))}},{key:"Dn",value:function(e){}},{key:"containsKey",value:function(e,t){var n=new Dk(t,0),r=this.Rs.firstAfterOrEqual(n);return zv.resolve(t.isEqual(r&&r.key))}},{key:"performConsistencyCheck",value:function(e){return this.mutationQueue.length,zv.resolve()}},{key:"Vs",value:function(e,t){return this.Ps(e)}},{key:"Ps",value:function(e){return 0===this.mutationQueue.length?0:e-this.mutationQueue[0].batchId}},{key:"vs",value:function(e){var t=this.Ps(e);return t<0||t>=this.mutationQueue.length?null:this.mutationQueue[t]}}]),e}(),jk=function(){function e(t){u(this,e),this.Ss=t,this.docs=new Zv(Rv.comparator),this.size=0}return h(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.Ss(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 zv.resolve(n?n.document.mutableCopy():Dm.newInvalidDocument(t))}},{key:"getEntries",value:function(e,t){var n=this,r=Iy();return t.forEach((function(e){var t=n.docs.get(e);r=r.insert(e,t?t.document.mutableCopy():Dm.newInvalidDocument(e))})),zv.resolve(r)}},{key:"getDocumentsMatchingQuery",value:function(e,t,n,r){for(var i=Iy(),a=t.path,o=new Rv(a.child("")),s=this.docs.getIteratorFrom(o);s.hasNext();){var u=s.getNext(),c=u.key,l=u.value.document;if(!a.isPrefixOf(c.path))break;c.path.length>a.length+1||jv(Dv(l),n)<=0||(r.has(l.key)||xy(t,l))&&(i=i.insert(l.key,l.mutableCopy()))}return zv.resolve(i)}},{key:"getAllFromCollectionGroup",value:function(e,t,n,r){sv()}},{key:"Ds",value:function(e,t){return zv.forEach(this.docs,(function(e){return t(e)}))}},{key:"newChangeBuffer",value:function(e){return new Mk(this)}},{key:"getSize",value:function(e){return zv.resolve(this.size)}}]),e}(),Mk=function(e){p(n,e);var t=g(n);function n(e){var r;return u(this,n),(r=t.call(this)).rs=e,r}return h(n,[{key:"applyChanges",value:function(e){var t=this,n=[];return this.changes.forEach((function(r,i){i.isValidDocument()?n.push(t.rs.addEntry(e,i)):t.rs.removeEntry(r)})),zv.waitFor(n)}},{key:"getFromCache",value:function(e,t){return this.rs.getEntry(e,t)}},{key:"getAllFromCache",value:function(e,t){return this.rs.getEntries(e,t)}}]),n}(Ik),Fk=function(){function e(t){u(this,e),this.persistence=t,this.Cs=new Ty((function(e){return ay(e)}),oy),this.lastRemoteSnapshotVersion=Tv.min(),this.highestTargetId=0,this.xs=0,this.Ns=new Pk,this.targetCount=0,this.ks=Ck.Nn()}return h(e,[{key:"forEachTarget",value:function(e,t){return this.Cs.forEach((function(e,n){return t(n)})),zv.resolve()}},{key:"getLastRemoteSnapshotVersion",value:function(e){return zv.resolve(this.lastRemoteSnapshotVersion)}},{key:"getHighestSequenceNumber",value:function(e){return zv.resolve(this.xs)}},{key:"allocateTargetId",value:function(e){return this.highestTargetId=this.ks.next(),zv.resolve(this.highestTargetId)}},{key:"setTargetsMetadata",value:function(e,t,n){return n&&(this.lastRemoteSnapshotVersion=n),t>this.xs&&(this.xs=t),zv.resolve()}},{key:"$n",value:function(e){this.Cs.set(e.target,e);var t=e.targetId;t>this.highestTargetId&&(this.ks=new Ck(t),this.highestTargetId=t),e.sequenceNumber>this.xs&&(this.xs=e.sequenceNumber)}},{key:"addTargetData",value:function(e,t){return this.$n(t),this.targetCount+=1,zv.resolve()}},{key:"updateTargetData",value:function(e,t){return this.$n(t),zv.resolve()}},{key:"removeTargetData",value:function(e,t){return this.Cs.delete(t.target),this.Ns.ps(t.targetId),this.targetCount-=1,zv.resolve()}},{key:"removeTargets",value:function(e,t,n){var r=this,i=0,a=[];return this.Cs.forEach((function(o,s){s.sequenceNumber<=t&&null===n.get(s.targetId)&&(r.Cs.delete(o),a.push(r.removeMatchingKeysForTargetId(e,s.targetId)),i++)})),zv.waitFor(a).next((function(){return i}))}},{key:"getTargetCount",value:function(e){return zv.resolve(this.targetCount)}},{key:"getTargetData",value:function(e,t){var n=this.Cs.get(t)||null;return zv.resolve(n)}},{key:"addMatchingKeys",value:function(e,t,n){return this.Ns.ws(t,n),zv.resolve()}},{key:"removeMatchingKeys",value:function(e,t,n){this.Ns.ys(t,n);var r=this.persistence.referenceDelegate,i=[];return r&&t.forEach((function(t){i.push(r.markPotentiallyOrphaned(e,t))})),zv.waitFor(i)}},{key:"removeMatchingKeysForTargetId",value:function(e,t){return this.Ns.ps(t),zv.resolve()}},{key:"getMatchingKeysForTargetId",value:function(e,t){var n=this.Ns.Ts(t);return zv.resolve(n)}},{key:"containsKey",value:function(e,t){return zv.resolve(this.Ns.containsKey(t))}}]),e}(),Uk=function(){function e(t,n){var r=this;u(this,e),this.Ms={},this.overlays={},this.Os=new qv(0),this.$s=!1,this.$s=!0,this.referenceDelegate=t(this),this.Fs=new Fk(this),this.indexManager=new _k,this.remoteDocumentCache=new jk((function(e){return r.referenceDelegate.Bs(e)})),this.serializer=new wk(n),this.Ls=new Rk(this.serializer)}return h(e,[{key:"start",value:function(){return Promise.resolve()}},{key:"shutdown",value:function(){return this.$s=!1,Promise.resolve()}},{key:"started",get:function(){return this.$s}},{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 Ok,this.overlays[e.toKey()]=t),t}},{key:"getMutationQueue",value:function(e,t){var n=this.Ms[e.toKey()];return n||(n=new Lk(t,this.referenceDelegate),this.Ms[e.toKey()]=n),n}},{key:"getTargetCache",value:function(){return this.Fs}},{key:"getRemoteDocumentCache",value:function(){return this.remoteDocumentCache}},{key:"getBundleCache",value:function(){return this.Ls}},{key:"runTransaction",value:function(e,t,n){var r=this;rv("MemoryPersistence","Starting transaction:",e);var i=new Vk(this.Os.next());return this.referenceDelegate.qs(),n(i).next((function(e){return r.referenceDelegate.Us(i).next((function(){return e}))})).toPromise().then((function(e){return i.raiseOnCommittedEvent(),e}))}},{key:"Ks",value:function(e,t){return zv.or(Object.values(this.Ms).map((function(n){return function(){return n.containsKey(e,t)}})))}}]),e}(),Vk=function(e){p(n,e);var t=g(n);function n(e){var r;return u(this,n),(r=t.call(this)).currentSequenceNumber=e,r}return h(n)}(Fv),zk=function(){function e(t){u(this,e),this.persistence=t,this.Gs=new Pk,this.Qs=null}return h(e,[{key:"zs",get:function(){if(this.Qs)return this.Qs;throw sv()}},{key:"addReference",value:function(e,t,n){return this.Gs.addReference(n,t),this.zs.delete(n.toString()),zv.resolve()}},{key:"removeReference",value:function(e,t,n){return this.Gs.removeReference(n,t),this.zs.add(n.toString()),zv.resolve()}},{key:"markPotentiallyOrphaned",value:function(e,t){return this.zs.add(t.toString()),zv.resolve()}},{key:"removeTarget",value:function(e,t){var n=this;this.Gs.ps(t.targetId).forEach((function(e){return n.zs.add(e.toString())}));var r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(e,t.targetId).next((function(e){e.forEach((function(e){return n.zs.add(e.toString())}))})).next((function(){return r.removeTargetData(e,t)}))}},{key:"qs",value:function(){this.Qs=new Set}},{key:"Us",value:function(e){var t=this,n=this.persistence.getRemoteDocumentCache().newChangeBuffer();return zv.forEach(this.zs,(function(r){var i=Rv.fromPath(r);return t.Ws(e,i).next((function(e){e||n.removeEntry(i,Tv.min())}))})).next((function(){return t.Qs=null,n.apply(e)}))}},{key:"updateLimboDocument",value:function(e,t){var n=this;return this.Ws(e,t).next((function(e){e?n.zs.delete(t.toString()):n.zs.add(t.toString())}))}},{key:"Bs",value:function(e){return 0}},{key:"Ws",value:function(e,t){var n=this;return zv.or([function(){return zv.resolve(n.Gs.containsKey(t))},function(){return n.persistence.getTargetCache().containsKey(e,t)},function(){return n.persistence.Ks(e,t)}])}}],[{key:"js",value:function(t){return new e(t)}}]),e}();var Bk=function(){function e(t,n,r,i){u(this,e),this.targetId=t,this.fromCache=n,this.$i=r,this.Fi=i}return h(e,null,[{key:"Bi",value:function(t,n){var r,i=My(),a=My(),o=_(n.docChanges);try{for(o.s();!(r=o.n()).done;){var s=r.value;switch(s.type){case 0:i=i.add(s.doc.key);break;case 1:a=a.add(s.doc.key)}}}catch(u){o.e(u)}finally{o.f()}return new e(t,n.fromCache,i,a)}}]),e}(),qk=function(){function e(){u(this,e),this.Li=!1}return h(e,[{key:"initialize",value:function(e,t){this.qi=e,this.indexManager=t,this.Li=!0}},{key:"getDocumentsMatchingQuery",value:function(e,t,n,r){var i=this;return this.Ui(e,t).next((function(a){return a||i.Ki(e,t,r,n)})).next((function(n){return n||i.Gi(e,t)}))}},{key:"Ui",value:function(e,t){var n=this;if(fy(t))return zv.resolve(null);var r=my(t);return this.indexManager.getIndexType(e,r).next((function(i){return 0===i?null:(null!==t.limit&&1===i&&(t=gy(t,null,"F"),r=my(t)),n.indexManager.getDocumentsMatchingTarget(e,r).next((function(i){var a=My.apply(void 0,s(i));return n.qi.getDocuments(e,a).next((function(i){return n.indexManager.getMinOffset(e,r).next((function(r){var o=n.Qi(t,i);return n.ji(t,o,a,r.readTime)?n.Ui(e,gy(t,null,"F")):n.zi(e,o,t,r)}))}))})))}))}},{key:"Ki",value:function(e,t,n,r){var i=this;return fy(t)||r.isEqual(Tv.min())?this.Gi(e,t):this.qi.getDocuments(e,n).next((function(a){var o=i.Qi(t,a);return i.ji(t,o,n,r)?i.Gi(e,t):(nv()<=Dt.DEBUG&&rv("QueryEngine","Re-using previous result from %s to execute query: %s",r.toString(),wy(t)),i.zi(e,o,t,Pv(r,-1)))}))}},{key:"Qi",value:function(e,t){var n=new nm(_y(e));return t.forEach((function(t,r){xy(e,r)&&(n=n.add(r))})),n}},{key:"ji",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:"Gi",value:function(e,t){return nv()<=Dt.DEBUG&&rv("QueryEngine","Using full collection scan to execute query:",wy(t)),this.qi.getDocumentsMatchingQuery(e,t,Lv.min())}},{key:"zi",value:function(e,t,n,r){return this.qi.getDocumentsMatchingQuery(e,n,r).next((function(e){return t.forEach((function(t){e=e.insert(t.key,t)})),e}))}}]),e}(),Hk=function(){function e(t,n,r,i){u(this,e),this.persistence=t,this.Wi=n,this.serializer=i,this.Hi=new Zv(Ev),this.Ji=new Ty((function(e){return ay(e)}),oy),this.Yi=new Map,this.Xi=t.getRemoteDocumentCache(),this.Fs=t.getTargetCache(),this.Ls=t.getBundleCache(),this.Zi(r)}return h(e,[{key:"Zi",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 Ak(this.Xi,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.Xi.setIndexManager(this.indexManager),this.Wi.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.Hi)}))}}]),e}();function Wk(e,t,n,r){return new Hk(e,t,n,r)}function Kk(e,t){return Gk.apply(this,arguments)}function Gk(){return Gk=Ue(Me().mark((function e(t,n){var r;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=cv(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.Zi(n),r.mutationQueue.getAllMutationBatches(e)})).next((function(n){var i,a=[],o=[],s=My(),u=_(t);try{for(u.s();!(i=u.n()).done;){var c=i.value;a.push(c.batchId);var l,f=_(c.mutations);try{for(f.s();!(l=f.n()).done;){var h=l.value;s=s.add(h.key)}}catch(k){f.e(k)}finally{f.f()}}}catch(k){u.e(k)}finally{u.f()}var d,p=_(n);try{for(p.s();!(d=p.n()).done;){var v=d.value;o.push(v.batchId);var m,y=_(v.mutations);try{for(y.s();!(m=y.n()).done;){var g=m.value;s=s.add(g.key)}}catch(k){y.e(k)}finally{y.f()}}}catch(k){p.e(k)}finally{p.f()}return r.localDocuments.getDocuments(e,s).next((function(e){return{tr:e,removedBatchIds:a,addedBatchIds:o}}))}))}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)}))),Gk.apply(this,arguments)}function Qk(e,t){var n=cv(e);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",(function(e){var r=t.batch.keys(),i=n.Xi.newChangeBuffer({trackRemovals:!0});return function(e,t,n,r){var i=n.batch,a=i.keys(),o=zv.resolve();return a.forEach((function(e){o=o.next((function(){return r.getEntry(t,e)})).next((function(t){var a=n.docVersions.get(e);uv(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)})).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=My(),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 $k(e){var t=cv(e);return t.persistence.runTransaction("Get last remote snapshot version","readonly",(function(e){return t.Fs.getLastRemoteSnapshotVersion(e)}))}function Xk(e,t){var n=cv(e),r=t.snapshotVersion,i=n.Hi;return n.persistence.runTransaction("Apply remote event","readwrite-primary",(function(e){var a=n.Xi.newChangeBuffer({trackRemovals:!0});i=n.Hi;var o=[];t.targetChanges.forEach((function(a,s){var u=i.get(s);if(u){o.push(n.Fs.removeMatchingKeys(e,a.removedDocuments,s).next((function(){return n.Fs.addMatchingKeys(e,a.addedDocuments,s)})));var c=u.withSequenceNumber(e.currentSequenceNumber);null!==t.targetMismatches.get(s)?c=c.withResumeToken(om.EMPTY_BYTE_STRING,Tv.min()).withLastLimboFreeSnapshotVersion(Tv.min()):a.resumeToken.approximateByteSize()>0&&(c=c.withResumeToken(a.resumeToken,r)),i=i.insert(s,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)}(u,c,a)&&o.push(n.Fs.updateTargetData(e,c))}}));var s=Iy(),u=My();if(t.documentUpdates.forEach((function(r){t.resolvedLimboDocuments.has(r)&&o.push(n.persistence.referenceDelegate.updateLimboDocument(e,r))})),o.push(Yk(e,a,t.documentUpdates).next((function(e){s=e.er,u=e.nr}))),!r.isEqual(Tv.min())){var c=n.Fs.getLastRemoteSnapshotVersion(e).next((function(t){return n.Fs.setTargetsMetadata(e,e.currentSequenceNumber,r)}));o.push(c)}return zv.waitFor(o).next((function(){return a.apply(e)})).next((function(){return n.localDocuments.getLocalViewOfDocuments(e,s,u)})).next((function(){return s}))})).then((function(e){return n.Hi=i,e}))}function Yk(e,t,n){var r=My(),i=My();return n.forEach((function(e){return r=r.add(e)})),t.getEntries(e,r).next((function(e){var r=Iy();return n.forEach((function(n,a){var o=e.get(n);a.isFoundDocument()!==o.isFoundDocument()&&(i=i.add(n)),a.isNoDocument()&&a.version.isEqual(Tv.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)):rv("LocalStore","Ignoring outdated watch update for ",n,". Current version:",o.version," Watch version:",a.version)})),{er:r,nr:i}}))}function Jk(e,t){var n=cv(e);return n.persistence.runTransaction("Get next mutation batch","readonly",(function(e){return void 0===t&&(t=-1),n.mutationQueue.getNextMutationBatchAfterBatchId(e,t)}))}function Zk(e,t){var n=cv(e);return n.persistence.runTransaction("Allocate target","readwrite",(function(e){var r;return n.Fs.getTargetData(e,t).next((function(i){return i?(r=i,zv.resolve(r)):n.Fs.allocateTargetId(e).next((function(i){return r=new bk(t,i,"TargetPurposeListen",e.currentSequenceNumber),n.Fs.addTargetData(e,r).next((function(){return r}))}))}))})).then((function(e){var r=n.Hi.get(e.targetId);return(null===r||e.snapshotVersion.compareTo(r.snapshotVersion)>0)&&(n.Hi=n.Hi.insert(e.targetId,e),n.Ji.set(t,e.targetId)),e}))}function eb(e,t,n){return tb.apply(this,arguments)}function tb(){return tb=Ue(Me().mark((function e(t,n,r){var i,a,o;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=cv(t),a=i.Hi.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),Bv(e.t1)){e.next=12;break}throw e.t1;case 12:rv("LocalStore","Failed to update sequence numbers for target ".concat(n,": ").concat(e.t1));case 13:i.Hi=i.Hi.remove(n),i.Ji.delete(a.target);case 14:case"end":return e.stop()}}),e,null,[[1,8]])}))),tb.apply(this,arguments)}function nb(e,t,n){var r=cv(e),i=Tv.min(),a=My();return r.persistence.runTransaction("Execute query","readonly",(function(e){return function(e,t,n){var r=cv(e),i=r.Ji.get(n);return void 0!==i?zv.resolve(r.Hi.get(i)):r.Fs.getTargetData(t,n)}(r,e,my(t)).next((function(t){if(t)return i=t.lastLimboFreeSnapshotVersion,r.Fs.getMatchingKeysForTargetId(e,t.targetId).next((function(e){a=e}))})).next((function(){return r.Wi.getDocumentsMatchingQuery(e,t,n?i:Tv.min(),n?a:My())})).next((function(e){return rb(r,Ey(t),e),{documents:e,sr:a}}))}))}function rb(e,t,n){var r=e.Yi.get(t)||Tv.min();n.forEach((function(e,t){t.readTime.compareTo(r)>0&&(r=t.readTime)})),e.Yi.set(t,r)}var ib=function(){function e(){u(this,e),this.activeTargetIds=Uy()}return h(e,[{key:"hr",value:function(e){this.activeTargetIds=this.activeTargetIds.add(e)}},{key:"lr",value:function(e){this.activeTargetIds=this.activeTargetIds.delete(e)}},{key:"ar",value:function(){var e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}]),e}(),ab=function(){function e(){u(this,e),this.Wr=new ib,this.Hr={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}return h(e,[{key:"addPendingMutation",value:function(e){}},{key:"updateMutationState",value:function(e,t,n){}},{key:"addLocalQueryTarget",value:function(e){return this.Wr.hr(e),this.Hr[e]||"not-current"}},{key:"updateQueryState",value:function(e,t,n){this.Hr[e]=t}},{key:"removeLocalQueryTarget",value:function(e){this.Wr.lr(e)}},{key:"isLocalQueryTarget",value:function(e){return this.Wr.activeTargetIds.has(e)}},{key:"clearQueryState",value:function(e){delete this.Hr[e]}},{key:"getAllActiveQueryTargets",value:function(){return this.Wr.activeTargetIds}},{key:"isActiveQueryTarget",value:function(e){return this.Wr.activeTargetIds.has(e)}},{key:"start",value:function(){return this.Wr=new ib,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}(),ob=function(){function e(){u(this,e)}return h(e,[{key:"Jr",value:function(e){}},{key:"shutdown",value:function(){}}]),e}(),sb=function(){function e(){var t=this;u(this,e),this.Yr=function(){return t.Xr()},this.Zr=function(){return t.eo()},this.no=[],this.so()}return h(e,[{key:"Jr",value:function(e){this.no.push(e)}},{key:"shutdown",value:function(){window.removeEventListener("online",this.Yr),window.removeEventListener("offline",this.Zr)}},{key:"so",value:function(){window.addEventListener("online",this.Yr),window.addEventListener("offline",this.Zr)}},{key:"Xr",value:function(){rv("ConnectivityMonitor","Network connectivity changed: AVAILABLE");var e,t=_(this.no);try{for(t.s();!(e=t.n()).done;){(0,e.value)(0)}}catch(n){t.e(n)}finally{t.f()}}},{key:"eo",value:function(){rv("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");var e,t=_(this.no);try{for(t.s();!(e=t.n()).done;){(0,e.value)(1)}}catch(n){t.e(n)}finally{t.f()}}}],[{key:"D",value:function(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}}]),e}(),ub=null;function cb(){return null===ub?ub=268435456+Math.round(2147483648*Math.random()):ub++,"0x"+ub.toString(16)}var lb={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"},fb=function(){function e(t){u(this,e),this.io=t.io,this.ro=t.ro}return h(e,[{key:"oo",value:function(e){this.uo=e}},{key:"co",value:function(e){this.ao=e}},{key:"onMessage",value:function(e){this.ho=e}},{key:"close",value:function(){this.ro()}},{key:"send",value:function(e){this.io(e)}},{key:"lo",value:function(){this.uo()}},{key:"fo",value:function(e){this.ao(e)}},{key:"_o",value:function(e){this.ho(e)}}]),e}(),hb="WebChannelConnection",db=function(e){p(n,e);var t=g(n);function n(e){var r;return u(this,n),(r=t.call(this,e)).forceLongPolling=e.forceLongPolling,r.autoDetectLongPolling=e.autoDetectLongPolling,r.useFetchStreams=e.useFetchStreams,r}return h(n,[{key:"Eo",value:function(e,t,n,r){var i=cb();return new Promise((function(a,o){var s=new $p;s.setWithCredentials(!0),s.listenOnce(Hp.COMPLETE,(function(){try{switch(s.getLastErrorCode()){case qp.NO_ERROR:var t=s.getResponseJson();rv(hb,"XHR for RPC '".concat(e,"' ").concat(i," received:"),JSON.stringify(t)),a(t);break;case qp.TIMEOUT:rv(hb,"RPC '".concat(e,"' ").concat(i," timed out")),o(new fv(lv.DEADLINE_EXCEEDED,"Request time out"));break;case qp.HTTP_ERROR:var n=s.getStatus();if(rv(hb,"RPC '".concat(e,"' ").concat(i," failed with status:"),n,"response text:",s.getResponseText()),n>0){var r=s.getResponseJson();Array.isArray(r)&&(r=r[0]);var u=null==r?void 0:r.error;if(u&&u.status&&u.message){var c=function(e){var t=e.toLowerCase().replace(/_/g,"-");return Object.values(lv).indexOf(t)>=0?t:lv.UNKNOWN}(u.status);o(new fv(c,u.message))}else o(new fv(lv.UNKNOWN,"Server responded with status "+s.getStatus()))}else o(new fv(lv.UNAVAILABLE,"Connection failed."));break;default:sv()}}finally{rv(hb,"RPC '".concat(e,"' ").concat(i," completed."))}}));var u=JSON.stringify(r);rv(hb,"RPC '".concat(e,"' ").concat(i," sending request:"),r),s.send(t,"POST",u,n,15)}))}},{key:"Ro",value:function(e,t,n){var r=cb(),i=[this.wo,"/","google.firestore.v1.Firestore","/",e,"/channel"],a=zp(),o=Bp(),s={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:"projects/".concat(this.databaseId.projectId,"/databases/").concat(this.databaseId.database)},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling};this.useFetchStreams&&(s.xmlHttpFactory=new Gp({})),this.To(s.initMessageHeaders,t,n),s.encodeInitMessageHeaders=!0;var u=i.join("");rv(hb,"Creating RPC '".concat(e,"' stream ").concat(r,": ").concat(u),s);var c=a.createWebChannel(u,s),l=!1,f=!1,h=new fb({io:function(t){f?rv(hb,"Not sending because RPC '".concat(e,"' stream ").concat(r," is closed:"),t):(l||(rv(hb,"Opening RPC '".concat(e,"' stream ").concat(r," transport.")),c.open(),l=!0),rv(hb,"RPC '".concat(e,"' stream ").concat(r," sending:"),t),c.send(t))},ro:function(){return c.close()}}),d=function(e,t,n){e.listen(t,(function(e){try{n(e)}catch(e){setTimeout((function(){throw e}),0)}}))};return d(c,Qp.EventType.OPEN,(function(){f||rv(hb,"RPC '".concat(e,"' stream ").concat(r," transport opened."))})),d(c,Qp.EventType.CLOSE,(function(){f||(f=!0,rv(hb,"RPC '".concat(e,"' stream ").concat(r," transport closed")),h.fo())})),d(c,Qp.EventType.ERROR,(function(t){f||(f=!0,av(hb,"RPC '".concat(e,"' stream ").concat(r," transport errored:"),t),h.fo(new fv(lv.UNAVAILABLE,"The operation could not be completed")))})),d(c,Qp.EventType.MESSAGE,(function(t){var n;if(!f){var i=t.data[0];uv(!!i);var a=i,o=a.error||(null===(n=a[0])||void 0===n?void 0:n.error);if(o){rv(hb,"RPC '".concat(e,"' stream ").concat(r," received error:"),o);var s=o.status,u=function(e){var t=mg[e];if(void 0!==t)return Sg(t)}(s),l=o.message;void 0===u&&(u=lv.INTERNAL,l="Unknown error status: "+s+" with message "+o.message),f=!0,h.fo(new fv(u,l)),c.close()}else rv(hb,"RPC '".concat(e,"' stream ").concat(r," received:"),i),h._o(i)}})),d(o,Wp.STAT_EVENT,(function(t){t.stat===Kp.PROXY?rv(hb,"RPC '".concat(e,"' stream ").concat(r," detected buffering proxy")):t.stat===Kp.NOPROXY&&rv(hb,"RPC '".concat(e,"' stream ").concat(r," detected no buffering proxy"))})),setTimeout((function(){h.lo()}),0),h}}]),n}(function(){function e(t){u(this,e),this.databaseInfo=t,this.databaseId=t.databaseId;var n=t.ssl?"https":"http";this.wo=n+"://"+t.host,this.mo="projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database+"/documents"}return h(e,[{key:"yo",get:function(){return!1}},{key:"po",value:function(e,t,n,r,i){var a=cb(),o=this.Io(e,t);rv("RestConnection","Sending RPC '".concat(e,"' ").concat(a,":"),o,n);var s={};return this.To(s,r,i),this.Eo(e,o,s,n).then((function(t){return rv("RestConnection","Received RPC '".concat(e,"' ").concat(a,": "),t),t}),(function(t){throw av("RestConnection","RPC '".concat(e,"' ").concat(a," failed with error: "),t,"url: ",o,"request:",n),t}))}},{key:"Ao",value:function(e,t,n,r,i,a){return this.po(e,t,n,r,i)}},{key:"To",value:function(e,t,n){e["X-Goog-Api-Client"]="gl-js/ fire/"+ev,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:"Io",value:function(e,t){var n=lb[e];return"".concat(this.wo,"/v1/").concat(t,":").concat(n)}}]),e}());function pb(){return"undefined"!=typeof document?document:null}function vb(e){return new Kg(e,!0)}var mb=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;u(this,e),this.si=t,this.timerId=n,this.vo=r,this.Po=i,this.bo=a,this.Vo=0,this.So=null,this.Do=Date.now(),this.reset()}return h(e,[{key:"reset",value:function(){this.Vo=0}},{key:"Co",value:function(){this.Vo=this.bo}},{key:"xo",value:function(e){var t=this;this.cancel();var n=Math.floor(this.Vo+this.No()),r=Math.max(0,Date.now()-this.Do),i=Math.max(0,n-r);i>0&&rv("ExponentialBackoff","Backing off for ".concat(i," ms (base delay: ").concat(this.Vo," ms, delay with jitter: ").concat(n," ms, last attempt: ").concat(r," ms ago)")),this.So=this.si.enqueueAfterDelay(this.timerId,i,(function(){return t.Do=Date.now(),e()})),this.Vo*=this.Po,this.Vo<this.vo&&(this.Vo=this.vo),this.Vo>this.bo&&(this.Vo=this.bo)}},{key:"ko",value:function(){null!==this.So&&(this.So.skipDelay(),this.So=null)}},{key:"cancel",value:function(){null!==this.So&&(this.So.cancel(),this.So=null)}},{key:"No",value:function(){return(Math.random()-.5)*this.Vo}}]),e}(),yb=function(){function e(t,n,r,i,a,o,s,c){u(this,e),this.si=t,this.Mo=r,this.Oo=i,this.connection=a,this.authCredentialsProvider=o,this.appCheckCredentialsProvider=s,this.listener=c,this.state=0,this.$o=0,this.Fo=null,this.Bo=null,this.stream=null,this.Lo=new mb(t,n)}return h(e,[{key:"qo",value:function(){return 1===this.state||5===this.state||this.Uo()}},{key:"Uo",value:function(){return 2===this.state||3===this.state}},{key:"start",value:function(){4!==this.state?this.auth():this.Ko()}},{key:"stop",value:function(){var e=Ue(Me().mark((function e(){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=this.qo(),!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:"Go",value:function(){this.state=0,this.Lo.reset()}},{key:"Qo",value:function(){var e=this;this.Uo()&&null===this.Fo&&(this.Fo=this.si.enqueueAfterDelay(this.Mo,6e4,(function(){return e.jo()})))}},{key:"zo",value:function(e){this.Wo(),this.stream.send(e)}},{key:"jo",value:function(){var e=Ue(Me().mark((function e(){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.Uo()){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:"Wo",value:function(){this.Fo&&(this.Fo.cancel(),this.Fo=null)}},{key:"Ho",value:function(){this.Bo&&(this.Bo.cancel(),this.Bo=null)}},{key:"close",value:function(){var e=Ue(Me().mark((function e(t,n){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.Wo(),this.Ho(),this.Lo.cancel(),this.$o++,4!==t?this.Lo.reset():n&&n.code===lv.RESOURCE_EXHAUSTED?(iv(n.toString()),iv("Using maximum backoff delay to prevent overloading the backend."),this.Lo.Co()):n&&n.code===lv.UNAUTHENTICATED&&3!==this.state&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),null!==this.stream&&(this.Jo(),this.stream.close(),this.stream=null),this.state=t,e.next=9,this.listener.co(n);case 9:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"Jo",value:function(){}},{key:"auth",value:function(){var e=this;this.state=1;var t=this.Yo(this.$o),n=this.$o;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then((function(t){var r=E(t,2),i=r[0],a=r[1];e.$o===n&&e.Xo(i,a)}),(function(n){t((function(){var t=new fv(lv.UNKNOWN,"Fetching auth token failed: "+n.message);return e.Zo(t)}))}))}},{key:"Xo",value:function(e,t){var n=this,r=this.Yo(this.$o);this.stream=this.tu(e,t),this.stream.oo((function(){r((function(){return n.state=2,n.Bo=n.si.enqueueAfterDelay(n.Oo,1e4,(function(){return n.Uo()&&(n.state=3),Promise.resolve()})),n.listener.oo()}))})),this.stream.co((function(e){r((function(){return n.Zo(e)}))})),this.stream.onMessage((function(e){r((function(){return n.onMessage(e)}))}))}},{key:"Ko",value:function(){var e=this;this.state=5,this.Lo.xo(Ue(Me().mark((function t(){return Me().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:"Zo",value:function(e){return rv("PersistentStream","close with error: ".concat(e)),this.stream=null,this.close(4,e)}},{key:"Yo",value:function(e){var t=this;return function(n){t.si.enqueueAndForget((function(){return t.$o===e?n():(rv("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())}))}}}]),e}(),gb=function(e){p(n,e);var t=g(n);function n(e,r,i,a,o,s){var c;return u(this,n),(c=t.call(this,e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",r,i,a,s)).serializer=o,c}return h(n,[{key:"tu",value:function(e,t){return this.connection.Ro("Listen",e,t)}},{key:"onMessage",value:function(e){this.Lo.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:sv()}(t.targetChange.targetChangeType||"NO_CHANGE"),i=t.targetChange.targetIds||[],a=function(e,t){return e.useProto3Json?(uv(void 0===t||"string"==typeof t),om.fromBase64String(t||"")):(uv(void 0===t||t instanceof Uint8Array),om.fromUint8Array(t||new Uint8Array))}(e,t.targetChange.resumeToken),o=t.targetChange.cause,s=o&&function(e){var t=void 0===e.code?lv.UNKNOWN:Sg(e.code);return new fv(t,e.message||"")}(o);n=new Fg(r,i,a,s||null)}else if("documentChange"in t){t.documentChange;var u=t.documentChange;u.document,u.document.name,u.document.updateTime;var c=tk(e,u.document.name),l=Yg(u.document.updateTime),f=u.document.createTime?Yg(u.document.createTime):Tv.min(),h=new Om({mapValue:{fields:u.document.fields}}),d=Dm.newFoundDocument(c,l,f,h),p=u.targetIds||[],v=u.removedTargetIds||[];n=new jg(p,v,d.key,d)}else if("documentDelete"in t){t.documentDelete;var m=t.documentDelete;m.document;var y=tk(e,m.document),g=m.readTime?Yg(m.readTime):Tv.min(),k=Dm.newNoDocument(y,g),b=m.removedTargetIds||[];n=new jg([],b,k.key,k)}else if("documentRemove"in t){t.documentRemove;var w=t.documentRemove;w.document;var x=tk(e,w.document),E=w.removedTargetIds||[];n=new jg([],E,x,null)}else{if(!("filter"in t))return sv();t.filter;var _=t.filter;_.targetId;var S=_.count,T=void 0===S?0:S,C=_.unchangedNames,I=new Eg(T,C),N=_.targetId;n=new Mg(N,I)}return n}(this.serializer,e),n=function(e){if(!("targetChange"in e))return Tv.min();var t=e.targetChange;return t.targetIds&&t.targetIds.length?Tv.min():t.readTime?Yg(t.readTime):Tv.min()}(e);return this.listener.eu(t,n)}},{key:"nu",value:function(e){var t={};t.database=ik(this.serializer),t.addTarget=function(e,t){var n,r=t.target;if((n=sy(r)?{documents:uk(e,r)}:{query:ck(e,r)}).targetId=t.targetId,t.resumeToken.approximateByteSize()>0){n.resumeToken=$g(e,t.resumeToken);var i=Gg(e,t.expectedCount);null!==i&&(n.expectedCount=i)}else if(t.snapshotVersion.compareTo(Tv.min())>0){n.readTime=Qg(e,t.snapshotVersion.toTimestamp());var a=Gg(e,t.expectedCount);null!==a&&(n.expectedCount=a)}return n}(this.serializer,e);var n=function(e,t){var n=function(e){switch(e){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return sv()}}(t.purpose);return null==n?null:{"goog-listen-tags":n}}(this.serializer,e);n&&(t.labels=n),this.zo(t)}},{key:"su",value:function(e){var t={};t.database=ik(this.serializer),t.removeTarget=e,this.zo(t)}}]),n}(yb),kb=function(e){p(n,e);var t=g(n);function n(e,r,i,a,o,s){var c;return u(this,n),(c=t.call(this,e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",r,i,a,s)).serializer=o,c.iu=!1,c}return h(n,[{key:"ru",get:function(){return this.iu}},{key:"start",value:function(){this.iu=!1,this.lastStreamToken=void 0,Za(v(n.prototype),"start",this).call(this)}},{key:"Jo",value:function(){this.iu&&this.ou([])}},{key:"tu",value:function(e,t){return this.connection.Ro("Write",e,t)}},{key:"onMessage",value:function(e){if(uv(!!e.streamToken),this.lastStreamToken=e.streamToken,this.iu){this.Lo.reset();var t=function(e,t){return e&&e.length>0?(uv(void 0!==t),e.map((function(e){return function(e,t){var n=e.updateTime?Yg(e.updateTime):Yg(t);return n.isEqual(Tv.min())&&(n=Yg(t)),new ng(n,e.transformResults||[])}(e,t)}))):[]}(e.writeResults,e.commitTime),n=Yg(e.commitTime);return this.listener.uu(n,t)}return uv(!e.writeResults||0===e.writeResults.length),this.iu=!0,this.listener.cu()}},{key:"au",value:function(){var e={};e.database=ik(this.serializer),this.zo(e)}},{key:"ou",value:function(e){var t=this,n={streamToken:this.lastStreamToken,writes:e.map((function(e){return sk(t.serializer,e)}))};this.zo(n)}}]),n}(yb),bb=function(e){p(n,e);var t=g(n);function n(e,r,i,a){var o;return u(this,n),(o=t.call(this)).authCredentials=e,o.appCheckCredentials=r,o.connection=i,o.serializer=a,o.hu=!1,o}return h(n,[{key:"lu",value:function(){if(this.hu)throw new fv(lv.FAILED_PRECONDITION,"The client has already been terminated.")}},{key:"po",value:function(e,t,n){var r=this;return this.lu(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((function(i){var a=E(i,2),o=a[0],s=a[1];return r.connection.po(e,t,n,o,s)})).catch((function(e){throw"FirebaseError"===e.name?(e.code===lv.UNAUTHENTICATED&&(r.authCredentials.invalidateToken(),r.appCheckCredentials.invalidateToken()),e):new fv(lv.UNKNOWN,e.toString())}))}},{key:"Ao",value:function(e,t,n,r){var i=this;return this.lu(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((function(a){var o=E(a,2),s=o[0],u=o[1];return i.connection.Ao(e,t,n,s,u,r)})).catch((function(e){throw"FirebaseError"===e.name?(e.code===lv.UNAUTHENTICATED&&(i.authCredentials.invalidateToken(),i.appCheckCredentials.invalidateToken()),e):new fv(lv.UNKNOWN,e.toString())}))}},{key:"terminate",value:function(){this.hu=!0}}]),n}(function(){return h((function e(){u(this,e)}))}());var wb=function(){function e(t,n){u(this,e),this.asyncQueue=t,this.onlineStateHandler=n,this.state="Unknown",this.du=0,this._u=null,this.wu=!0}return h(e,[{key:"mu",value:function(){var e=this;0===this.du&&(this.gu("Unknown"),this._u=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,(function(){return e._u=null,e.yu("Backend didn't respond within 10 seconds."),e.gu("Offline"),Promise.resolve()})))}},{key:"pu",value:function(e){"Online"===this.state?this.gu("Unknown"):(this.du++,this.du>=1&&(this.Iu(),this.yu("Connection failed 1 times. Most recent error: ".concat(e.toString())),this.gu("Offline")))}},{key:"set",value:function(e){this.Iu(),this.du=0,"Online"===e&&(this.wu=!1),this.gu(e)}},{key:"gu",value:function(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}},{key:"yu",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.wu?(iv(t),this.wu=!1):rv("OnlineStateTracker",t)}},{key:"Iu",value:function(){null!==this._u&&(this._u.cancel(),this._u=null)}}]),e}(),xb=h((function e(t,n,r,i,a){var o=this;u(this,e),this.localStore=t,this.datastore=n,this.asyncQueue=r,this.remoteSyncer={},this.Tu=[],this.Eu=new Map,this.Au=new Set,this.Ru=[],this.vu=a,this.vu.Jr((function(e){r.enqueueAndForget(Ue(Me().mark((function e(){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=Pb(o),!e.t0){e.next=5;break}return rv("RemoteStore","Restarting streams for network reachability change."),e.next=5,function(){var e=Ue(Me().mark((function e(t){var n;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=cv(t)).Au.add(4),e.next=4,Sb(n);case 4:return n.Pu.set("Unknown"),n.Au.delete(4),e.next=8,Eb(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.Pu=new wb(r,i)}));function Eb(e){return _b.apply(this,arguments)}function _b(){return(_b=Ue(Me().mark((function e(t){var n,r,i;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Pb(t)){e.next=18;break}n=_(t.Ru),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]])})))).apply(this,arguments)}function Sb(e){return Tb.apply(this,arguments)}function Tb(){return(Tb=Ue(Me().mark((function e(t){var n,r,i;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=_(t.Ru),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]])})))).apply(this,arguments)}function Cb(e,t){var n=cv(e);n.Eu.has(t.targetId)||(n.Eu.set(t.targetId,t),Ob(n)?Rb(n):uw(n).Uo()&&Nb(n,t))}function Ib(e,t){var n=cv(e),r=uw(n);n.Eu.delete(t),r.Uo()&&Ab(n,t),0===n.Eu.size&&(r.Uo()?r.Qo():Pb(n)&&n.Pu.set("Unknown"))}function Nb(e,t){if(e.bu.Lt(t.targetId),t.resumeToken.approximateByteSize()>0||t.snapshotVersion.compareTo(Tv.min())>0){var n=e.remoteSyncer.getRemoteKeysForTarget(t.targetId).size;t=t.withExpectedCount(n)}uw(e).nu(t)}function Ab(e,t){e.bu.Lt(t),uw(e).su(t)}function Rb(e){e.bu=new Vg({getRemoteKeysForTarget:function(t){return e.remoteSyncer.getRemoteKeysForTarget(t)},he:function(t){return e.Eu.get(t)||null},oe:function(){return e.datastore.serializer.databaseId}}),uw(e).start(),e.Pu.mu()}function Ob(e){return Pb(e)&&!uw(e).qo()&&e.Eu.size>0}function Pb(e){return 0===cv(e).Au.size}function Db(e){e.bu=void 0}function Lb(e){return jb.apply(this,arguments)}function jb(){return(jb=Ue(Me().mark((function e(t){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.Eu.forEach((function(e,n){Nb(t,e)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Mb(e,t){return Fb.apply(this,arguments)}function Fb(){return(Fb=Ue(Me().mark((function e(t,n){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Db(t),Ob(t)?(t.Pu.pu(n),Rb(t)):t.Pu.set("Unknown");case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ub(e,t,n){return Vb.apply(this,arguments)}function Vb(){return Vb=Ue(Me().mark((function e(t,n,r){var i;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.Pu.set("Online"),!(n instanceof Fg&&2===n.state&&n.cause)){e.next=13;break}return e.prev=1,e.next=4,function(){var e=Ue(Me().mark((function e(t,n){var r,i,a,o;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.cause,i=_(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.Eu.has(o),!e.t0){e.next=12;break}return e.next=10,t.remoteSyncer.rejectListen(o,r);case 10:t.Eu.delete(o),t.bu.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),rv("RemoteStore","Failed to remove targets %s: %s ",n.targetIds.join(","),e.t0),e.next=11,zb(t,e.t0);case 11:case 22:e.next=29;break;case 13:if(n instanceof jg?t.bu.Wt(n):n instanceof Mg?t.bu.ee(n):t.bu.Yt(n),r.isEqual(Tv.min())){e.next=29;break}return e.prev=14,e.next=17,$k(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.bu.ue(t);return n.targetChanges.forEach((function(n,r){if(n.resumeToken.approximateByteSize()>0){var i=e.Eu.get(r);i&&e.Eu.set(r,i.withResumeToken(n.resumeToken,t))}})),n.targetMismatches.forEach((function(t,n){var r=e.Eu.get(t);if(r){e.Eu.set(t,r.withResumeToken(om.EMPTY_BYTE_STRING,r.snapshotVersion)),Ab(e,t);var i=new bk(r.target,t,n,r.sequenceNumber);Nb(e,i)}})),e.remoteSyncer.applyRemoteEvent(n)}(t,r);case 24:return e.prev=24,e.t2=e.catch(14),rv("RemoteStore","Failed to raise snapshot:",e.t2),e.next=29,zb(t,e.t2);case 29:case"end":return e.stop()}}),e,null,[[1,6],[14,24]])}))),Vb.apply(this,arguments)}function zb(e,t,n){return Bb.apply(this,arguments)}function Bb(){return(Bb=Ue(Me().mark((function e(t,n,r){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Bv(n)){e.next=2;break}throw n;case 2:return t.Au.add(1),e.next=5,Sb(t);case 5:t.Pu.set("Offline"),r||(r=function(){return $k(t.localStore)}),t.asyncQueue.enqueueRetryable(Ue(Me().mark((function e(){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return rv("RemoteStore","Retrying IndexedDB access"),e.next=3,r();case 3:return t.Au.delete(1),e.next=6,Eb(t);case 6:case"end":return e.stop()}}),e)}))));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qb(e,t){return t().catch((function(n){return zb(e,n,t)}))}function Hb(e){return Wb.apply(this,arguments)}function Wb(){return(Wb=Ue(Me().mark((function e(t){var n,r,i,a;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=cv(t),r=cw(n),i=n.Tu.length>0?n.Tu[n.Tu.length-1].batchId:-1;case 2:if(!Kb(n)){e.next=19;break}return e.prev=3,e.next=6,Jk(n.localStore,i);case 6:if(null!==(a=e.sent)){e.next=10;break}return 0===n.Tu.length&&r.Qo(),e.abrupt("break",19);case 10:i=a.batchId,Gb(n,a),e.next=17;break;case 13:return e.prev=13,e.t0=e.catch(3),e.next=17,zb(n,e.t0);case 17:e.next=2;break;case 19:Qb(n)&&$b(n);case 20:case"end":return e.stop()}}),e,null,[[3,13]])})))).apply(this,arguments)}function Kb(e){return Pb(e)&&e.Tu.length<10}function Gb(e,t){e.Tu.push(t);var n=cw(e);n.Uo()&&n.ru&&n.ou(t.mutations)}function Qb(e){return Pb(e)&&!cw(e).qo()&&e.Tu.length>0}function $b(e){cw(e).start()}function Xb(e){return Yb.apply(this,arguments)}function Yb(){return(Yb=Ue(Me().mark((function e(t){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:cw(t).au();case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Jb(e){return Zb.apply(this,arguments)}function Zb(){return(Zb=Ue(Me().mark((function e(t){var n,r,i,a;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=cw(t),r=_(t.Tu);try{for(r.s();!(i=r.n()).done;)a=i.value,n.ou(a.mutations)}catch(o){r.e(o)}finally{r.f()}case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ew(e,t,n){return tw.apply(this,arguments)}function tw(){return(tw=Ue(Me().mark((function e(t,n,r){var i,a;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.Tu.shift(),a=wg.from(i,n,r),e.next=3,qb(t,(function(){return t.remoteSyncer.applySuccessfulWrite(a)}));case 3:return e.next=5,Hb(t);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function nw(e,t){return rw.apply(this,arguments)}function rw(){return rw=Ue(Me().mark((function e(t,n){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=n&&cw(t).ru,!e.t0){e.next=4;break}return e.next=4,function(){var e=Ue(Me().mark((function e(t,n){var r,i;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!_g(i=n.code)||i===lv.ABORTED){e.next=7;break}return r=t.Tu.shift(),cw(t).Go(),e.next=5,qb(t,(function(){return t.remoteSyncer.rejectFailedWrite(r.batchId,n)}));case 5:return e.next=7,Hb(t);case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()(t,n);case 4:Qb(t)&&$b(t);case 5:case"end":return e.stop()}}),e)}))),rw.apply(this,arguments)}function iw(e,t){return aw.apply(this,arguments)}function aw(){return(aw=Ue(Me().mark((function e(t,n){var r,i;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=cv(t)).asyncQueue.verifyOperationInProgress(),rv("RemoteStore","RemoteStore received new credentials"),i=Pb(r),r.Au.add(3),e.next=6,Sb(r);case 6:return i&&r.Pu.set("Unknown"),e.next=9,r.remoteSyncer.handleCredentialChange(n);case 9:return r.Au.delete(3),e.next=12,Eb(r);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ow(e,t){return sw.apply(this,arguments)}function sw(){return(sw=Ue(Me().mark((function e(t,n){var r;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=cv(t),!n){e.next=7;break}return r.Au.delete(2),e.next=5,Eb(r);case 5:e.next=13;break;case 7:if(e.t0=n,e.t0){e.next=13;break}return r.Au.add(2),e.next=12,Sb(r);case 12:r.Pu.set("Unknown");case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function uw(e){return e.Vu||(e.Vu=function(e,t,n){var r=cv(e);return r.lu(),new gb(t,r.connection,r.authCredentials,r.appCheckCredentials,r.serializer,n)}(e.datastore,e.asyncQueue,{oo:Lb.bind(null,e),co:Mb.bind(null,e),eu:Ub.bind(null,e)}),e.Ru.push(function(){var t=Ue(Me().mark((function t(n){return Me().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n){t.next=4;break}e.Vu.Go(),Ob(e)?Rb(e):e.Pu.set("Unknown"),t.next=7;break;case 4:return t.next=6,e.Vu.stop();case 6:Db(e);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())),e.Vu}function cw(e){return e.Su||(e.Su=function(e,t,n){var r=cv(e);return r.lu(),new kb(t,r.connection,r.authCredentials,r.appCheckCredentials,r.serializer,n)}(e.datastore,e.asyncQueue,{oo:Xb.bind(null,e),co:nw.bind(null,e),cu:Jb.bind(null,e),uu:ew.bind(null,e)}),e.Ru.push(function(){var t=Ue(Me().mark((function t(n){return Me().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n){t.next=6;break}return e.Su.Go(),t.next=4,Hb(e);case 4:t.next=9;break;case 6:return t.next=8,e.Su.stop();case 8:e.Tu.length>0&&(rv("RemoteStore","Stopping write stream with ".concat(e.Tu.length," pending writes")),e.Tu=[]);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())),e.Su}var lw=function(){function e(t,n,r,i,a){u(this,e),this.asyncQueue=t,this.timerId=n,this.targetTimeMs=r,this.op=i,this.removalCallback=a,this.deferred=new hv,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch((function(e){}))}return h(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 fv(lv.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 fw(e,t){if(iv("AsyncQueue","".concat(t,": ").concat(e)),Bv(e))return new fv(lv.UNAVAILABLE,"".concat(t,": ").concat(e));throw e}var hw=function(){function e(t){u(this,e),this.comparator=t?function(e,n){return t(e,n)||Rv.comparator(e.key,n.key)}:function(e,t){return Rv.comparator(e.key,t.key)},this.keyedMap=Ay(),this.sortedSet=new Zv(this.comparator)}return h(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}},{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}(),dw=function(){function e(){u(this,e),this.Du=new Zv(Rv.comparator)}return h(e,[{key:"track",value:function(e){var t=e.doc.key,n=this.Du.get(t);n?0!==e.type&&3===n.type?this.Du=this.Du.insert(t,e):3===e.type&&1!==n.type?this.Du=this.Du.insert(t,{type:n.type,doc:e.doc}):2===e.type&&2===n.type?this.Du=this.Du.insert(t,{type:2,doc:e.doc}):2===e.type&&0===n.type?this.Du=this.Du.insert(t,{type:0,doc:e.doc}):1===e.type&&0===n.type?this.Du=this.Du.remove(t):1===e.type&&2===n.type?this.Du=this.Du.insert(t,{type:1,doc:n.doc}):0===e.type&&1===n.type?this.Du=this.Du.insert(t,{type:2,doc:e.doc}):sv():this.Du=this.Du.insert(t,e)}},{key:"Cu",value:function(){var e=[];return this.Du.inorderTraversal((function(t,n){e.push(n)})),e}}]),e}(),pw=function(){function e(t,n,r,i,a,o,s,c,l){u(this,e),this.query=t,this.docs=n,this.oldDocs=r,this.docChanges=i,this.mutatedKeys=a,this.fromCache=o,this.syncStateChanged=s,this.excludesMetadataChanges=c,this.hasCachedResults=l}return h(e,[{key:"hasPendingWrites",get:function(){return!this.mutatedKeys.isEmpty()}},{key:"isEqual",value:function(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&ky(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,a){var o=[];return n.forEach((function(e){o.push({type:0,doc:e})})),new e(t,n,hw.emptySet(n),o,r,i,!0,!1,a)}}]),e}(),vw=h((function e(){u(this,e),this.xu=void 0,this.listeners=[]})),mw=h((function e(){u(this,e),this.queries=new Ty((function(e){return by(e)}),ky),this.onlineState="Unknown",this.Nu=new Set}));function yw(e,t){return gw.apply(this,arguments)}function gw(){return gw=Ue(Me().mark((function e(t,n){var r,i,a,o,s;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=cv(t),i=n.query,a=!1,(o=r.queries.get(i))||(a=!0,o=new vw),!a){e.next=13;break}return e.prev=3,e.next=6,r.onListen(i);case 6:o.xu=e.sent,e.next=13;break;case 9:return e.prev=9,e.t0=e.catch(3),s=fw(e.t0,"Initialization of query '".concat(wy(n.query),"' failed")),e.abrupt("return",void n.onError(s));case 13:r.queries.set(i,o),o.listeners.push(n),n.ku(r.onlineState),o.xu&&n.Mu(o.xu)&&Ew(r);case 14:case"end":return e.stop()}}),e,null,[[3,9]])}))),gw.apply(this,arguments)}function kw(e,t){return bw.apply(this,arguments)}function bw(){return bw=Ue(Me().mark((function e(t,n){var r,i,a,o,s;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=cv(t),i=n.query,a=!1,(o=r.queries.get(i))&&(s=o.listeners.indexOf(n))>=0&&(o.listeners.splice(s,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)}))),bw.apply(this,arguments)}function ww(e,t){var n,r=cv(e),i=!1,a=_(t);try{for(a.s();!(n=a.n()).done;){var o=n.value,s=o.query,u=r.queries.get(s);if(u){var c,l=_(u.listeners);try{for(l.s();!(c=l.n()).done;){c.value.Mu(o)&&(i=!0)}}catch(f){l.e(f)}finally{l.f()}u.xu=o}}}catch(f){a.e(f)}finally{a.f()}i&&Ew(r)}function xw(e,t,n){var r=cv(e),i=r.queries.get(t);if(i){var a,o=_(i.listeners);try{for(o.s();!(a=o.n()).done;){a.value.onError(n)}}catch(s){o.e(s)}finally{o.f()}}r.queries.delete(t)}function Ew(e){e.Nu.forEach((function(e){e.next()}))}var _w=function(){function e(t,n,r){u(this,e),this.query=t,this.Ou=n,this.$u=!1,this.Fu=null,this.onlineState="Unknown",this.options=r||{}}return h(e,[{key:"Mu",value:function(e){if(!this.options.includeMetadataChanges){var t,n=[],r=_(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 pw(e.query,e.docs,e.oldDocs,n,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}var a=!1;return this.$u?this.Bu(e)&&(this.Ou.next(e),a=!0):this.Lu(e,this.onlineState)&&(this.qu(e),a=!0),this.Fu=e,a}},{key:"onError",value:function(e){this.Ou.error(e)}},{key:"ku",value:function(e){this.onlineState=e;var t=!1;return this.Fu&&!this.$u&&this.Lu(this.Fu,e)&&(this.qu(this.Fu),t=!0),t}},{key:"Lu",value:function(e,t){if(!e.fromCache)return!0;var n="Offline"!==t;return(!this.options.Uu||!n)&&(!e.docs.isEmpty()||e.hasCachedResults||"Offline"===t)}},{key:"Bu",value:function(e){if(e.docChanges.length>0)return!0;var t=this.Fu&&this.Fu.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!t)&&!0===this.options.includeMetadataChanges}},{key:"qu",value:function(e){e=pw.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.$u=!0,this.Ou.next(e)}}]),e}();var Sw=h((function e(t){u(this,e),this.key=t})),Tw=h((function e(t){u(this,e),this.key=t})),Cw=function(){function e(t,n){u(this,e),this.query=t,this.Ju=n,this.Yu=null,this.hasCachedResults=!1,this.current=!1,this.Xu=My(),this.mutatedKeys=My(),this.Zu=_y(t),this.tc=new hw(this.Zu)}return h(e,[{key:"ec",get:function(){return this.Ju}},{key:"nc",value:function(e,t){var n=this,r=t?t.sc:new dw,i=t?t.tc:this.tc,a=t?t.mutatedKeys:this.mutatedKeys,o=i,s=!1,u="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=xy(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.ic(l,f)||(r.track({type:2,doc:f}),p=!0,(u&&n.Zu(f,u)>0||c&&n.Zu(f,c)<0)&&(s=!0)):!l&&f?(r.track({type:0,doc:f}),p=!0):l&&!f&&(r.track({type:1,doc:l}),p=!0,(u||c)&&(s=!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{tc:o,sc:r,ji:s,mutatedKeys:a}}},{key:"ic",value:function(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}},{key:"applyChanges",value:function(e,t,n){var r=this,i=this.tc;this.tc=e.tc,this.mutatedKeys=e.mutatedKeys;var a=e.sc.Cu();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 sv()}};return n(e)-n(t)}(e.type,t.type)||r.Zu(e.doc,t.doc)})),this.rc(n);var o=t?this.oc():[],s=0===this.Xu.size&&this.current?1:0,u=s!==this.Yu;return this.Yu=s,0!==a.length||u?{snapshot:new pw(this.query,e.tc,i,a,e.mutatedKeys,0===s,u,!1,!!n&&n.resumeToken.approximateByteSize()>0),uc:o}:{uc:o}}},{key:"ku",value:function(e){return this.current&&"Offline"===e?(this.current=!1,this.applyChanges({tc:this.tc,sc:new dw,mutatedKeys:this.mutatedKeys,ji:!1},!1)):{uc:[]}}},{key:"cc",value:function(e){return!this.Ju.has(e)&&!!this.tc.has(e)&&!this.tc.get(e).hasLocalMutations}},{key:"rc",value:function(e){var t=this;e&&(e.addedDocuments.forEach((function(e){return t.Ju=t.Ju.add(e)})),e.modifiedDocuments.forEach((function(e){})),e.removedDocuments.forEach((function(e){return t.Ju=t.Ju.delete(e)})),this.current=e.current)}},{key:"oc",value:function(){var e=this;if(!this.current)return[];var t=this.Xu;this.Xu=My(),this.tc.forEach((function(t){e.cc(t.key)&&(e.Xu=e.Xu.add(t.key))}));var n=[];return t.forEach((function(t){e.Xu.has(t)||n.push(new Tw(t))})),this.Xu.forEach((function(e){t.has(e)||n.push(new Sw(e))})),n}},{key:"ac",value:function(e){this.Ju=e.sr,this.Xu=My();var t=this.nc(e.documents);return this.applyChanges(t,!0)}},{key:"hc",value:function(){return pw.fromInitialDocuments(this.query,this.tc,this.mutatedKeys,0===this.Yu,this.hasCachedResults)}}]),e}(),Iw=h((function e(t,n,r){u(this,e),this.query=t,this.targetId=n,this.view=r})),Nw=h((function e(t){u(this,e),this.key=t,this.lc=!1})),Aw=function(){function e(t,n,r,i,a,o){u(this,e),this.localStore=t,this.remoteStore=n,this.eventManager=r,this.sharedClientState=i,this.currentUser=a,this.maxConcurrentLimboResolutions=o,this.fc={},this.dc=new Ty((function(e){return by(e)}),ky),this._c=new Map,this.wc=new Set,this.mc=new Zv(Rv.comparator),this.gc=new Map,this.yc=new Pk,this.Ic={},this.Tc=new Map,this.Ec=Ck.kn(),this.onlineState="Unknown",this.Ac=void 0}return h(e,[{key:"isPrimaryClient",get:function(){return!0===this.Ac}}]),e}();function Rw(e,t){return Ow.apply(this,arguments)}function Ow(){return Ow=Ue(Me().mark((function e(t,n){var r,i,a,o,s,u;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=ox(t),!(o=r.dc.get(n))){e.next=6;break}i=o.targetId,r.sharedClientState.addLocalQueryTarget(i),a=o.view.hc(),e.next=15;break;case 6:return e.next=8,Zk(r.localStore,my(n));case 8:return s=e.sent,u=r.sharedClientState.addLocalQueryTarget(s.targetId),i=s.targetId,e.next=13,Pw(r,n,i,"current"===u,s.resumeToken);case 13:a=e.sent,r.isPrimaryClient&&Cb(r.remoteStore,s);case 15:return e.abrupt("return",a);case 16:case"end":return e.stop()}}),e)}))),Ow.apply(this,arguments)}function Pw(e,t,n,r,i){return Dw.apply(this,arguments)}function Dw(){return Dw=Ue(Me().mark((function e(t,n,r,i,a){var o,s,u,c,l,f;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.Rc=function(e,n,r){return function(){var e=Ue(Me().mark((function e(t,n,r,i){var a,o,s;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=n.view.nc(r),e.t0=a.ji,!e.t0){e.next=6;break}return e.next=5,nb(t.localStore,n.query,!1).then((function(e){var t=e.documents;return n.view.nc(t,a)}));case 5:a=e.sent;case 6:return o=i&&i.targetChanges.get(n.targetId),s=n.view.applyChanges(a,t.isPrimaryClient,o),e.abrupt("return",(Jw(t,n.targetId,s.uc),s.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,nb(t.localStore,n,!0);case 3:return o=e.sent,s=new Cw(n,o.sr),u=s.nc(o.documents),c=Lg.createSynthesizedTargetChangeForCurrentChange(r,i&&"Offline"!==t.onlineState,a),l=s.applyChanges(u,t.isPrimaryClient,c),Jw(t,r,l.uc),f=new Iw(n,r,s),e.abrupt("return",(t.dc.set(n,f),t._c.has(r)?t._c.get(r).push(n):t._c.set(r,[n]),l.snapshot));case 11:case"end":return e.stop()}}),e)}))),Dw.apply(this,arguments)}function Lw(e,t){return jw.apply(this,arguments)}function jw(){return(jw=Ue(Me().mark((function e(t,n){var r,i,a;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=cv(t),i=r.dc.get(n),!((a=r._c.get(i.targetId)).length>1)){e.next=3;break}return e.abrupt("return",(r._c.set(i.targetId,a.filter((function(e){return!ky(e,n)}))),void r.dc.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,eb(r.localStore,i.targetId,!1).then((function(){r.sharedClientState.clearQueryState(i.targetId),Ib(r.remoteStore,i.targetId),Xw(r,i.targetId)})).catch(Uv);case 9:e.next=14;break;case 11:return Xw(r,i.targetId),e.next=14,eb(r.localStore,i.targetId,!0);case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Mw(e,t,n){return Fw.apply(this,arguments)}function Fw(){return Fw=Ue(Me().mark((function e(t,n,r){var i,a,o;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=sx(t),e.prev=1,e.next=4,function(e,t){var n,r,i=cv(e),a=Sv.now(),o=t.reduce((function(e,t){return e.add(t.key)}),My());return i.persistence.runTransaction("Locally write mutations","readwrite",(function(e){var s=Iy(),u=My();return i.Xi.getEntries(e,o).next((function(e){(s=e).forEach((function(e,t){t.isValidDocument()||(u=u.add(e))}))})).next((function(){return i.localDocuments.getOverlayedDocuments(e,s)})).next((function(r){n=r;var o,s=[],u=_(t);try{for(u.s();!(o=u.n()).done;){var c=o.value,l=cg(c,n.get(c.key).overlayedDocument);null!=l&&s.push(new hg(c.key,l,Pm(l.value.mapValue),rg.exists(!0)))}}catch(f){u.e(f)}finally{u.f()}return i.mutationQueue.addMutationBatch(e,a,s,t)})).next((function(t){r=t;var a=t.applyToLocalDocumentSet(n,u);return i.documentOverlayCache.saveOverlays(e,t.batchId,a)}))})).then((function(){return{batchId:r.batchId,changes:Ry(n)}}))}(i.localStore,n);case 4:return a=e.sent,i.sharedClientState.addPendingMutation(a.batchId),function(e,t,n){var r=e.Ic[e.currentUser.toKey()];r||(r=new Zv(Ev)),r=r.insert(t,n),e.Ic[e.currentUser.toKey()]=r}(i,a.batchId,r),e.next=9,tx(i,a.changes);case 9:return e.next=11,Hb(i.remoteStore);case 11:e.next=17;break;case 13:e.prev=13,e.t0=e.catch(1),o=fw(e.t0,"Failed to persist write"),r.reject(o);case 17:case"end":return e.stop()}}),e,null,[[1,13]])}))),Fw.apply(this,arguments)}function Uw(e,t){return Vw.apply(this,arguments)}function Vw(){return(Vw=Ue(Me().mark((function e(t,n){var r,i;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=cv(t),e.prev=1,e.next=4,Xk(r.localStore,n);case 4:return i=e.sent,n.targetChanges.forEach((function(e,t){var n=r.gc.get(t);n&&(uv(e.addedDocuments.size+e.modifiedDocuments.size+e.removedDocuments.size<=1),e.addedDocuments.size>0?n.lc=!0:e.modifiedDocuments.size>0?uv(n.lc):e.removedDocuments.size>0&&(uv(n.lc),n.lc=!1))})),e.next=8,tx(r,i,n);case 8:e.next=14;break;case 10:return e.prev=10,e.t0=e.catch(1),e.next=14,Uv(e.t0);case 14:case"end":return e.stop()}}),e,null,[[1,10]])})))).apply(this,arguments)}function zw(e,t,n){var r=cv(e);if(r.isPrimaryClient&&0===n||!r.isPrimaryClient&&1===n){var i=[];r.dc.forEach((function(e,n){var r=n.view.ku(t);r.snapshot&&i.push(r.snapshot)})),function(e,t){var n=cv(e);n.onlineState=t;var r=!1;n.queries.forEach((function(e,n){var i,a=_(n.listeners);try{for(a.s();!(i=a.n()).done;){i.value.ku(t)&&(r=!0)}}catch(o){a.e(o)}finally{a.f()}})),r&&Ew(n)}(r.eventManager,t),i.length&&r.fc.eu(i),r.onlineState=t,r.isPrimaryClient&&r.sharedClientState.setOnlineState(t)}}function Bw(e,t,n){return qw.apply(this,arguments)}function qw(){return qw=Ue(Me().mark((function e(t,n,r){var i,a,o,s,u,c;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((i=cv(t)).sharedClientState.updateQueryState(n,"rejected",r),a=i.gc.get(n),!(o=a&&a.key)){e.next=14;break}return s=(s=new Zv(Rv.comparator)).insert(o,Dm.newNoDocument(o,Tv.min())),u=My().add(o),c=new Dg(Tv.min(),new Map,new Zv(Ev),s,u),e.next=9,Uw(i,c);case 9:i.mc=i.mc.remove(o),i.gc.delete(n),ex(i),e.next=16;break;case 14:return e.next=16,eb(i.localStore,n,!1).then((function(){return Xw(i,n,r)})).catch(Uv);case 16:case"end":return e.stop()}}),e)}))),qw.apply(this,arguments)}function Hw(e,t){return Ww.apply(this,arguments)}function Ww(){return(Ww=Ue(Me().mark((function e(t,n){var r,i,a;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=cv(t),i=n.batch.batchId,e.prev=1,e.next=4,Qk(r.localStore,n);case 4:return a=e.sent,$w(r,i,null),Qw(r,i),r.sharedClientState.updateMutationState(i,"acknowledged"),e.next=10,tx(r,a);case 10:e.next=16;break;case 12:return e.prev=12,e.t0=e.catch(1),e.next=16,Uv(e.t0);case 16:case"end":return e.stop()}}),e,null,[[1,12]])})))).apply(this,arguments)}function Kw(e,t,n){return Gw.apply(this,arguments)}function Gw(){return(Gw=Ue(Me().mark((function e(t,n,r){var i,a;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=cv(t),e.prev=1,e.next=4,function(e,t){var n=cv(e);return n.persistence.runTransaction("Reject batch","readwrite-primary",(function(e){var r;return n.mutationQueue.lookupMutationBatch(e,t).next((function(t){return uv(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,$w(i,n,r),Qw(i,n),i.sharedClientState.updateMutationState(n,"rejected",r),e.next=10,tx(i,a);case 10:e.next=16;break;case 12:return e.prev=12,e.t0=e.catch(1),e.next=16,Uv(e.t0);case 16:case"end":return e.stop()}}),e,null,[[1,12]])})))).apply(this,arguments)}function Qw(e,t){(e.Tc.get(t)||[]).forEach((function(e){e.resolve()})),e.Tc.delete(t)}function $w(e,t,n){var r=cv(e),i=r.Ic[r.currentUser.toKey()];if(i){var a=i.get(t);a&&(n?a.reject(n):a.resolve(),i=i.remove(t)),r.Ic[r.currentUser.toKey()]=i}}function Xw(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e.sharedClientState.removeLocalQueryTarget(t);var r,i=_(e._c.get(t));try{for(i.s();!(r=i.n()).done;){var a=r.value;e.dc.delete(a),n&&e.fc.vc(a,n)}}catch(o){i.e(o)}finally{i.f()}e._c.delete(t),e.isPrimaryClient&&e.yc.ps(t).forEach((function(t){e.yc.containsKey(t)||Yw(e,t)}))}function Yw(e,t){e.wc.delete(t.path.canonicalString());var n=e.mc.get(t);null!==n&&(Ib(e.remoteStore,n),e.mc=e.mc.remove(t),e.gc.delete(n),ex(e))}function Jw(e,t,n){var r,i=_(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;a instanceof Sw?(e.yc.addReference(a.key,t),Zw(e,a)):a instanceof Tw?(rv("SyncEngine","Document no longer in limbo: "+a.key),e.yc.removeReference(a.key,t),e.yc.containsKey(a.key)||Yw(e,a.key)):sv()}}catch(o){i.e(o)}finally{i.f()}}function Zw(e,t){var n=t.key,r=n.path.canonicalString();e.mc.get(n)||e.wc.has(r)||(rv("SyncEngine","New document in limbo: "+n),e.wc.add(r),ex(e))}function ex(e){for(;e.wc.size>0&&e.mc.size<e.maxConcurrentLimboResolutions;){var t=e.wc.values().next().value;e.wc.delete(t);var n=new Rv(Iv.fromString(t)),r=e.Ec.next();e.gc.set(r,new Nw(n)),e.mc=e.mc.insert(n,r),Cb(e.remoteStore,new bk(my(ly(n.path)),r,"TargetPurposeLimboResolution",qv.ct))}}function tx(e,t,n){return nx.apply(this,arguments)}function nx(){return nx=Ue(Me().mark((function e(t,n,r){var i,a,o,s;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=cv(t),a=[],o=[],s=[],e.t0=i.dc.isEmpty(),e.t0){e.next=9;break}return i.dc.forEach((function(e,t){s.push(i.Rc(t,n,r).then((function(e){if((e||r)&&i.isPrimaryClient&&i.sharedClientState.updateQueryState(t.targetId,(null==e?void 0:e.fromCache)?"not-current":"current"),e){a.push(e);var n=Bk.Bi(t.targetId,e);o.push(n)}})))})),e.next=6,Promise.all(s);case 6:return i.fc.eu(a),e.next=9,function(){var e=Ue(Me().mark((function e(t,n){var r,i,a,o,s,u,c,l;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=cv(t),e.prev=1,e.next=4,r.persistence.runTransaction("notifyLocalViewChanges","readwrite",(function(e){return zv.forEach(n,(function(t){return zv.forEach(t.$i,(function(n){return r.persistence.referenceDelegate.addReference(e,t.targetId,n)})).next((function(){return zv.forEach(t.Fi,(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),Bv(e.t0)){e.next=10;break}throw e.t0;case 10:rv("LocalStore","Failed to update sequence numbers: "+e.t0);case 11:i=_(n);try{for(i.s();!(a=i.n()).done;)o=a.value,s=o.targetId,o.fromCache||(u=r.Hi.get(s),c=u.snapshotVersion,l=u.withLastLimboFreeSnapshotVersion(c),r.Hi=r.Hi.insert(s,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)}))),nx.apply(this,arguments)}function rx(e,t){return ix.apply(this,arguments)}function ix(){return(ix=Ue(Me().mark((function e(t,n){var r,i;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=cv(t)).currentUser.isEqual(n)){e.next=11;break}return rv("SyncEngine","User change. New user:",n.toKey()),e.next=5,Kk(r.localStore,n);case 5:return i=e.sent,r.currentUser=n,function(e,t){e.Tc.forEach((function(e){e.forEach((function(e){e.reject(new fv(lv.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))}))})),e.Tc.clear()}(r),r.sharedClientState.handleUserChange(n,i.removedBatchIds,i.addedBatchIds),e.next=11,tx(r,i.tr);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ax(e,t){var n=cv(e),r=n.gc.get(t);if(r&&r.lc)return My().add(r.key);var i=My(),a=n._c.get(t);if(!a)return i;var o,s=_(a);try{for(s.s();!(o=s.n()).done;){var u=o.value,c=n.dc.get(u);i=i.unionWith(c.view.ec)}}catch(l){s.e(l)}finally{s.f()}return i}function ox(e){var t=cv(e);return t.remoteStore.remoteSyncer.applyRemoteEvent=Uw.bind(null,t),t.remoteStore.remoteSyncer.getRemoteKeysForTarget=ax.bind(null,t),t.remoteStore.remoteSyncer.rejectListen=Bw.bind(null,t),t.fc.eu=ww.bind(null,t.eventManager),t.fc.vc=xw.bind(null,t.eventManager),t}function sx(e){var t=cv(e);return t.remoteStore.remoteSyncer.applySuccessfulWrite=Hw.bind(null,t),t.remoteStore.remoteSyncer.rejectFailedWrite=Kw.bind(null,t),t}var ux=function(){function e(){u(this,e),this.synchronizeTabs=!1}return h(e,[{key:"initialize",value:function(){var e=Ue(Me().mark((function e(t){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.serializer=vb(t.databaseInfo.databaseId),this.sharedClientState=this.createSharedClientState(t),this.persistence=this.createPersistence(t),e.next=5,this.persistence.start();case 5:this.localStore=this.createLocalStore(t),this.gcScheduler=this.createGarbageCollectionScheduler(t,this.localStore),this.indexBackfillerScheduler=this.createIndexBackfillerScheduler(t,this.localStore);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"createGarbageCollectionScheduler",value:function(e,t){return null}},{key:"createIndexBackfillerScheduler",value:function(e,t){return null}},{key:"createLocalStore",value:function(e){return Wk(this.persistence,new qk,e.initialUser,this.serializer)}},{key:"createPersistence",value:function(e){return new Uk(zk.js,this.serializer)}},{key:"createSharedClientState",value:function(e){return new ab}},{key:"terminate",value:function(){var e=Ue(Me().mark((function e(){return Me().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}(),cx=function(){function e(){u(this,e)}return h(e,[{key:"initialize",value:function(){var e=Ue(Me().mark((function e(t,n){var r=this;return Me().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 zw(r.syncEngine,e,1)},this.remoteStore.remoteSyncer.handleCredentialChange=rx.bind(null,this.syncEngine),e.next=12,ow(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 mw}},{key:"createDatastore",value:function(e){var t,n=vb(e.databaseInfo.databaseId),r=(t=e.databaseInfo,new db(t));return function(e,t,n,r){return new bb(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 zw(o.syncEngine,e,0)},a=sb.D()?new sb:new ob,new xb(t,n,r,i,a)}},{key:"createSyncEngine",value:function(e,t){return function(e,t,n,r,i,a,o){var s=new Aw(e,t,n,r,i,a);return o&&(s.Ac=!0),s}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,t)}},{key:"terminate",value:function(){return function(){var e=Ue(Me().mark((function e(t){var n;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=cv(t),rv("RemoteStore","RemoteStore shutting down."),n.Au.add(5),e.next=5,Sb(n);case 5:n.vu.shutdown(),n.Pu.set("Unknown");case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()(this.remoteStore)}}]),e}();var lx=function(){function e(t){u(this,e),this.observer=t,this.muted=!1}return h(e,[{key:"next",value:function(e){this.observer.next&&this.Vc(this.observer.next,e)}},{key:"error",value:function(e){this.observer.error?this.Vc(this.observer.error,e):iv("Uncaught Error in snapshot listener:",e.toString())}},{key:"Sc",value:function(){this.muted=!0}},{key:"Vc",value:function(e,t){var n=this;this.muted||setTimeout((function(){n.muted||e(t)}),0)}}]),e}(),fx=function(){function e(t,n,r,i){var a=this;u(this,e),this.authCredentials=t,this.appCheckCredentials=n,this.asyncQueue=r,this.databaseInfo=i,this.user=Zp.UNAUTHENTICATED,this.clientId=xv.A(),this.authCredentialListener=function(){return Promise.resolve()},this.appCheckCredentialListener=function(){return Promise.resolve()},this.authCredentials.start(r,function(){var e=Ue(Me().mark((function e(t){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return rv("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 rv("FirestoreClient","Received new app check token=",e),a.appCheckCredentialListener(e,a.user)}))}return h(e,[{key:"getConfiguration",value:function(){var e=Ue(Me().mark((function e(){return Me().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 fv(lv.FAILED_PRECONDITION,"The client has already been terminated.")}},{key:"terminate",value:function(){var e=this;this.asyncQueue.enterRestrictedMode();var t=new hv;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(Ue(Me().mark((function n(){var r;return Me().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=fw(n.t2,"Failed to shutdown persistence"),t.reject(r);case 18:case"end":return n.stop()}}),n,null,[[0,14]])})))),t.promise}}]),e}();function hx(e,t){return dx.apply(this,arguments)}function dx(){return dx=Ue(Me().mark((function e(t,n){var r,i;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.asyncQueue.verifyOperationInProgress(),rv("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=Ue(Me().mark((function e(t){return Me().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,Kk(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)}))),dx.apply(this,arguments)}function px(e,t){return vx.apply(this,arguments)}function vx(){return(vx=Ue(Me().mark((function e(t,n){var r,i;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.asyncQueue.verifyOperationInProgress(),e.next=3,yx(t);case 3:return r=e.sent,rv("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 iw(n.remoteStore,e)})),t.setAppCheckTokenChangeListener((function(e,t){return iw(n.remoteStore,t)})),t._onlineComponents=n;case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function mx(e){return"FirebaseError"===e.name?e.code===lv.FAILED_PRECONDITION||e.code===lv.UNIMPLEMENTED:!("undefined"!=typeof DOMException&&e instanceof DOMException)||22===e.code||20===e.code||11===e.code}function yx(e){return gx.apply(this,arguments)}function gx(){return(gx=Ue(Me().mark((function e(t){var n;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t._offlineComponents){e.next=21;break}if(!t._uninitializedComponentsProvider){e.next=18;break}return rv("FirestoreClient","Using user provided OfflineComponentProvider"),e.prev=3,e.next=6,hx(t,t._uninitializedComponentsProvider._offline);case 6:e.next=16;break;case 8:if(e.prev=8,e.t0=e.catch(3),mx(n=e.t0)){e.next=13;break}throw n;case 13:return av("Error using user provided cache. Falling back to memory cache: "+n),e.next=16,hx(t,new ux);case 16:e.next=21;break;case 18:return rv("FirestoreClient","Using default OfflineComponentProvider"),e.next=21,hx(t,new ux);case 21:return e.abrupt("return",t._offlineComponents);case 22:case"end":return e.stop()}}),e,null,[[3,8]])})))).apply(this,arguments)}function kx(e){return bx.apply(this,arguments)}function bx(){return(bx=Ue(Me().mark((function e(t){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=t._onlineComponents,e.t0){e.next=11;break}if(!t._uninitializedComponentsProvider){e.next=8;break}return rv("FirestoreClient","Using user provided OnlineComponentProvider"),e.next=6,px(t,t._uninitializedComponentsProvider._online);case 6:e.next=11;break;case 8:return rv("FirestoreClient","Using default OnlineComponentProvider"),e.next=11,px(t,new cx);case 11:return e.abrupt("return",t._onlineComponents);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function wx(e){return kx(e).then((function(e){return e.syncEngine}))}function xx(e){return Ex.apply(this,arguments)}function Ex(){return(Ex=Ue(Me().mark((function e(t){var n,r;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,kx(t);case 2:return n=e.sent,r=n.eventManager,e.abrupt("return",(r.onListen=Rw.bind(null,n.syncEngine),r.onUnlisten=Lw.bind(null,n.syncEngine),r));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _x(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=new hv;return e.asyncQueue.enqueueAndForget(Ue(Me().mark((function i(){return Me().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.t0=function(e,t,n,r,i){var a=new lx({next:function(a){t.enqueueAndForget((function(){return kw(e,o)}));var s=a.docs.has(n);!s&&a.fromCache?i.reject(new fv(lv.UNAVAILABLE,"Failed to get document because the client is offline.")):s&&a.fromCache&&r&&"server"===r.source?i.reject(new fv(lv.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):i.resolve(a)},error:function(e){return i.reject(e)}}),o=new _w(ly(n.path),a,{includeMetadataChanges:!0,Uu:!0});return yw(e,o)},i.next=3,xx(e);case 3:return i.t1=i.sent,i.t2=e.asyncQueue,i.t3=t,i.t4=n,i.t5=r,i.abrupt("return",(0,i.t0)(i.t1,i.t2,i.t3,i.t4,i.t5));case 9:case"end":return i.stop()}}),i)})))),r.promise}function Sx(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=new hv;return e.asyncQueue.enqueueAndForget(Ue(Me().mark((function i(){return Me().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.t0=function(e,t,n,r,i){var a=new lx({next:function(n){t.enqueueAndForget((function(){return kw(e,o)})),n.fromCache&&"server"===r.source?i.reject(new fv(lv.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):i.resolve(n)},error:function(e){return i.reject(e)}}),o=new _w(n,a,{includeMetadataChanges:!0,Uu:!0});return yw(e,o)},i.next=3,xx(e);case 3:return i.t1=i.sent,i.t2=e.asyncQueue,i.t3=t,i.t4=n,i.t5=r,i.abrupt("return",(0,i.t0)(i.t1,i.t2,i.t3,i.t4,i.t5));case 9:case"end":return i.stop()}}),i)})))),r.promise}var Tx=new Map;function Cx(e,t,n){if(!n)throw new fv(lv.INVALID_ARGUMENT,"Function ".concat(e,"() cannot be called with an empty ").concat(t,"."))}function Ix(e){if(!Rv.isDocumentKey(e))throw new fv(lv.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but ".concat(e," has ").concat(e.length,"."))}function Nx(e){if(Rv.isDocumentKey(e))throw new fv(lv.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but ".concat(e," has ").concat(e.length,"."))}function Ax(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":sv()}function Rx(e,t){if("_delegate"in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new fv(lv.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");var n=Ax(e);throw new fv(lv.INVALID_ARGUMENT,"Expected type '".concat(t.name,"', but it was: ").concat(n))}return e}var Ox=function(){function e(t){var n;if(u(this,e),void 0===t.host){if(void 0!==t.ssl)throw new fv(lv.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,this.cache=t.localCache,void 0===t.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==t.cacheSizeBytes&&t.cacheSizeBytes<1048576)throw new fv(lv.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=t.cacheSizeBytes}(function(e,t,n,r){if(!0===t&&!0===r)throw new fv(lv.INVALID_ARGUMENT,"".concat(e," and ").concat(n," cannot be used together."))})("experimentalForceLongPolling",t.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",t.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!t.experimentalForceLongPolling,this.experimentalForceLongPolling||void 0===t.experimentalAutoDetectLongPolling?this.experimentalAutoDetectLongPolling=!1:this.experimentalAutoDetectLongPolling=!!t.experimentalAutoDetectLongPolling,this.useFetchStreams=!!t.useFetchStreams}return h(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}(),Px=function(){function e(t,n,r,i){u(this,e),this._authCredentials=t,this._appCheckCredentials=n,this._databaseId=r,this._app=i,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new Ox({}),this._settingsFrozen=!1}return h(e,[{key:"app",get:function(){if(!this._app)throw new fv(lv.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 fv(lv.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 Ox(e),void 0!==e.credentials&&(this._authCredentials=function(e){if(!e)return new pv;switch(e.type){case"firstParty":return new gv(e.sessionIndex||"0",e.iamToken||null,e.authTokenFactory||null);case"provider":return e.client;default:throw new fv(lv.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid 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=Tx.get(e);t&&(rv("ComponentProvider","Removing Datastore"),Tx.delete(e),t.terminate())}(this),Promise.resolve()}}]),e}();function Dx(e,t,n){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=(e=Rx(e,Px))._getSettings();if("firestore.googleapis.com"!==a.host&&a.host!==t&&av("Host has been set in both settings() and useEmulator(), emulator host will be used"),e._setSettings(Object.assign(Object.assign({},a),{host:"".concat(t,":").concat(n),ssl:!1})),i.mockUserToken){var o,s;if("string"==typeof i.mockUserToken)o=i.mockUserToken,s=Zp.MOCK_USER;else{o=ut(i.mockUserToken,null===(r=e._app)||void 0===r?void 0:r.options.projectId);var u=i.mockUserToken.sub||i.mockUserToken.user_id;if(!u)throw new fv(lv.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");s=new Zp(u)}e._authCredentials=new vv(new dv(o,s))}}var Lx=function(){function e(t,n,r){u(this,e),this.converter=n,this._key=r,this.type="document",this.firestore=t}return h(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 Mx(this.firestore,this.converter,this._key.path.popLast())}},{key:"withConverter",value:function(t){return new e(this.firestore,t,this._key)}}]),e}(),jx=function(){function e(t,n,r){u(this,e),this.converter=n,this._query=r,this.type="query",this.firestore=t}return h(e,[{key:"withConverter",value:function(t){return new e(this.firestore,t,this._query)}}]),e}(),Mx=function(e){p(n,e);var t=g(n);function n(e,r,i){var a;return u(this,n),(a=t.call(this,e,r,ly(i)))._path=i,a.type="collection",a}return h(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 Lx(this.firestore,null,new Rv(e))}},{key:"withConverter",value:function(e){return new n(this.firestore,e,this._path)}}]),n}(jx);function Fx(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=Nt(e),Cx("collection","path",t),e instanceof Px){var a=Iv.fromString.apply(Iv,[t].concat(r));return Nx(a),new Mx(e,null,a)}if(!(e instanceof Lx||e instanceof Mx))throw new fv(lv.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");var o=e._path.child(Iv.fromString.apply(Iv,[t].concat(r)));return Nx(o),new Mx(e.firestore,null,o)}function Ux(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=Nt(e),1===arguments.length&&(t=xv.A()),Cx("doc","path",t),e instanceof Px){var a=Iv.fromString.apply(Iv,[t].concat(r));return Ix(a),new Lx(e,null,new Rv(a))}if(!(e instanceof Lx||e instanceof Mx))throw new fv(lv.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");var o=e._path.child(Iv.fromString.apply(Iv,[t].concat(r)));return Ix(o),new Lx(e.firestore,e instanceof Mx?e.converter:null,new Rv(o))}var Vx=function(){function e(){var t=this;u(this,e),this.Kc=Promise.resolve(),this.Gc=[],this.Qc=!1,this.jc=[],this.zc=null,this.Wc=!1,this.Hc=!1,this.Jc=[],this.Lo=new mb(this,"async_queue_retry"),this.Yc=function(){var e=pb();e&&rv("AsyncQueue","Visibility state changed to "+e.visibilityState),t.Lo.ko()};var n=pb();n&&"function"==typeof n.addEventListener&&n.addEventListener("visibilitychange",this.Yc)}return h(e,[{key:"isShuttingDown",get:function(){return this.Qc}},{key:"enqueueAndForget",value:function(e){this.enqueue(e)}},{key:"enqueueAndForgetEvenWhileRestricted",value:function(e){this.Xc(),this.Zc(e)}},{key:"enterRestrictedMode",value:function(e){if(!this.Qc){this.Qc=!0,this.Hc=e||!1;var t=pb();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.Yc)}}},{key:"enqueue",value:function(e){var t=this;if(this.Xc(),this.Qc)return new Promise((function(){}));var n=new hv;return this.Zc((function(){return t.Qc&&t.Hc?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.Gc.push(e),t.ta()}))}},{key:"ta",value:function(){var e=Ue(Me().mark((function e(){var t=this;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0===this.Gc.length){e.next=14;break}return e.prev=1,e.next=4,this.Gc[0]();case 4:this.Gc.shift(),this.Lo.reset(),e.next=13;break;case 8:if(e.prev=8,e.t0=e.catch(1),Bv(e.t0)){e.next=12;break}throw e.t0;case 12:rv("AsyncQueue","Operation failed with retryable error: "+e.t0);case 13:this.Gc.length>0&&this.Lo.xo((function(){return t.ta()}));case 14:case"end":return e.stop()}}),e,this,[[1,8]])})));return function(){return e.apply(this,arguments)}}()},{key:"Zc",value:function(e){var t=this,n=this.Kc.then((function(){return t.Wc=!0,e().catch((function(e){t.zc=e,t.Wc=!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);throw iv("INTERNAL UNHANDLED ERROR: ",n),e})).then((function(e){return t.Wc=!1,e}))}));return this.Kc=n,n}},{key:"enqueueAfterDelay",value:function(e,t,n){var r=this;this.Xc(),this.Jc.indexOf(e)>-1&&(t=0);var i=lw.createAndSchedule(this,e,t,n,(function(e){return r.ea(e)}));return this.jc.push(i),i}},{key:"Xc",value:function(){this.zc&&sv()}},{key:"verifyOperationInProgress",value:function(){}},{key:"na",value:function(){var e=Ue(Me().mark((function e(){var t;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.Kc,e.next=3,t;case 3:if(t!==this.Kc){e.next=0;break}case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"sa",value:function(e){var t,n=_(this.jc);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:"ia",value:function(e){var t=this;return this.na().then((function(){t.jc.sort((function(e,t){return e.targetTimeMs-t.targetTimeMs}));var n,r=_(t.jc);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.na()}))}},{key:"ra",value:function(e){this.Jc.push(e)}},{key:"ea",value:function(e){var t=this.jc.indexOf(e);this.jc.splice(t,1)}}]),e}();var zx=function(e){p(n,e);var t=g(n);function n(e,r,i,a){var o;return u(this,n),(o=t.call(this,e,r,i,a)).type="firestore",o._queue=new Vx,o._persistenceKey=(null==a?void 0:a.name)||"[DEFAULT]",o}return h(n,[{key:"_terminate",value:function(){return this._firestoreClient||qx(this),this._firestoreClient.terminate()}}]),n}(Px);function Bx(e){return e._firestoreClient||qx(e),e._firestoreClient.verifyNotTerminated(),e._firestoreClient}function qx(e){var t,n,r,i=e._freezeSettings(),a=function(e,t,n,r){return new pm(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,i);e._firestoreClient=new fx(e._authCredentials,e._appCheckCredentials,e._queue,a),(null===(n=i.cache)||void 0===n?void 0:n._offlineComponentProvider)&&(null===(r=i.cache)||void 0===r?void 0:r._onlineComponentProvider)&&(e._firestoreClient._uninitializedComponentsProvider={_offlineKind:i.cache.kind,_offline:i.cache._offlineComponentProvider,_online:i.cache._onlineComponentProvider})}var Hx=function(){function e(t){u(this,e),this._byteString=t}return h(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(om.fromBase64String(t))}catch(t){throw new fv(lv.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+t)}}},{key:"fromUint8Array",value:function(t){return new e(om.fromUint8Array(t))}}]),e}(),Wx=function(){function e(){u(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 fv(lv.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new Av(n)}return h(e,[{key:"isEqual",value:function(e){return this._internalPath.isEqual(e._internalPath)}}]),e}();var Kx=h((function e(t){u(this,e),this._methodName=t})),Gx=function(){function e(t,n){if(u(this,e),!isFinite(t)||t<-90||t>90)throw new fv(lv.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(n)||n<-180||n>180)throw new fv(lv.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+n);this._lat=t,this._long=n}return h(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 Ev(this._lat,e._lat)||Ev(this._long,e._long)}}]),e}(),Qx=/^__.*__$/,$x=function(){function e(t,n,r){u(this,e),this.data=t,this.fieldMask=n,this.fieldTransforms=r}return h(e,[{key:"toMutation",value:function(e,t){return null!==this.fieldMask?new hg(e,this.data,this.fieldMask,t,this.fieldTransforms):new fg(e,this.data,t,this.fieldTransforms)}}]),e}(),Xx=function(){function e(t,n,r){u(this,e),this.data=t,this.fieldMask=n,this.fieldTransforms=r}return h(e,[{key:"toMutation",value:function(e,t){return new hg(e,this.data,this.fieldMask,t,this.fieldTransforms)}}]),e}();function Yx(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw sv()}}var Jx=function(){function e(t,n,r,i,a,o){u(this,e),this.settings=t,this.databaseId=n,this.serializer=r,this.ignoreUndefinedProperties=i,void 0===a&&this.oa(),this.fieldTransforms=a||[],this.fieldMask=o||[]}return h(e,[{key:"path",get:function(){return this.settings.path}},{key:"ua",get:function(){return this.settings.ua}},{key:"ca",value:function(t){return new e(Object.assign(Object.assign({},this.settings),t),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}},{key:"aa",value:function(e){var t,n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.ca({path:n,ha:!1});return r.la(e),r}},{key:"fa",value:function(e){var t,n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.ca({path:n,ha:!1});return r.oa(),r}},{key:"da",value:function(e){return this.ca({path:void 0,ha:!0})}},{key:"_a",value:function(e){return vE(e,this.settings.methodName,this.settings.wa||!1,this.path,this.settings.ma)}},{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:"oa",value:function(){if(this.path)for(var e=0;e<this.path.length;e++)this.la(this.path.get(e))}},{key:"la",value:function(e){if(0===e.length)throw this._a("Document fields must not be empty");if(Yx(this.ua)&&Qx.test(e))throw this._a('Document fields cannot begin and end with "__"')}}]),e}(),Zx=function(){function e(t,n,r){u(this,e),this.databaseId=t,this.ignoreUndefinedProperties=n,this.serializer=r||vb(t)}return h(e,[{key:"ga",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return new Jx({ua:e,methodName:t,ma:n,path:Av.emptyPath(),ha:!1,wa:r},this.databaseId,this.serializer,this.ignoreUndefinedProperties)}}]),e}();function eE(e){var t=e._freezeSettings(),n=vb(e._databaseId);return new Zx(e._databaseId,!!t.ignoreUndefinedProperties,n)}function tE(e,t,n,r,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},o=e.ga(a.merge||a.mergeFields?2:0,t,n,i);fE("Data must be an object, but it was:",o,r);var s,u,c=cE(r,o);if(a.merge)s=new im(o.fieldMask),u=o.fieldTransforms;else if(a.mergeFields){var l,f=[],h=_(a.mergeFields);try{for(h.s();!(l=h.n()).done;){var d=hE(t,l.value,n);if(!o.contains(d))throw new fv(lv.INVALID_ARGUMENT,"Field '".concat(d,"' is specified in your field mask but missing from your input data."));mE(f,d)||f.push(d)}}catch(p){h.e(p)}finally{h.f()}s=new im(f),u=o.fieldTransforms.filter((function(e){return s.covers(e.field)}))}else s=null,u=o.fieldTransforms;return new $x(new Om(c),s,u)}var nE=function(e){p(n,e);var t=g(n);function n(){return u(this,n),t.apply(this,arguments)}return h(n,[{key:"_toFieldTransform",value:function(e){if(2!==e.ua)throw 1===e.ua?e._a("".concat(this._methodName,"() can only appear at the top level of your update data")):e._a("".concat(this._methodName,"() cannot be used with set() unless you pass {merge:true}"));return e.fieldMask.push(e.path),null}},{key:"isEqual",value:function(e){return e instanceof n}}]),n}(Kx);function rE(e,t,n){return new Jx({ua:3,ma:t.settings.ma,methodName:e._methodName,ha:n},t.databaseId,t.serializer,t.ignoreUndefinedProperties)}var iE=function(e){p(n,e);var t=g(n);function n(e,r){var i;return u(this,n),(i=t.call(this,e)).ya=r,i}return h(n,[{key:"_toFieldTransform",value:function(e){var t=rE(this,e,!0),n=this.ya.map((function(e){return uE(e,t)})),r=new Qy(n);return new tg(e.path,r)}},{key:"isEqual",value:function(e){return this===e}}]),n}(Kx);function aE(e,t,n,r){var i=e.ga(1,t,n);fE("Data must be an object, but it was:",i,r);var a=[],o=Om.empty();Yv(r,(function(e,r){var s=pE(t,e,n);r=Nt(r);var u=i.fa(s);if(r instanceof nE)a.push(s);else{var c=uE(r,u);null!=c&&(a.push(s),o.set(s,c))}}));var s=new im(a);return new Xx(o,s,i.fieldTransforms)}function oE(e,t,n,r,i,a){var o=e.ga(1,t,n),s=[hE(t,r,n)],u=[i];if(a.length%2!=0)throw new fv(lv.INVALID_ARGUMENT,"Function ".concat(t,"() needs to be called with an even number of arguments that alternate between field names and values."));for(var c=0;c<a.length;c+=2)s.push(hE(t,a[c])),u.push(a[c+1]);for(var l=[],f=Om.empty(),h=s.length-1;h>=0;--h)if(!mE(l,s[h])){var d=s[h],p=u[h];p=Nt(p);var v=o.fa(d);if(p instanceof nE)l.push(d);else{var m=uE(p,v);null!=m&&(l.push(d),f.set(d,m))}}var y=new im(l);return new Xx(f,y,o.fieldTransforms)}function sE(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return uE(n,e.ga(r?4:3,t))}function uE(e,t){if(lE(e=Nt(e)))return fE("Unsupported field value:",t,e),cE(e,t);if(e instanceof Kx)return function(e,t){if(!Yx(t.ua))throw t._a("".concat(e._methodName,"() can only be used with update() and set()"));if(!t.path)throw t._a("".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.ha&&4!==t.ua)throw t._a("Nested arrays are not supported");return function(e,t){var n,r=[],i=0,a=_(e);try{for(a.s();!(n=a.n()).done;){var o=uE(n.value,t.da(i));null==o&&(o={nullValue:"NULL_VALUE"}),r.push(o),i++}}catch(s){a.e(s)}finally{a.f()}return{arrayValue:{values:r}}}(e,t)}return function(e,t){if(null===(e=Nt(e)))return{nullValue:"NULL_VALUE"};if("number"==typeof e)return By(t.serializer,e);if("boolean"==typeof e)return{booleanValue:e};if("string"==typeof e)return{stringValue:e};if(e instanceof Date){var n=Sv.fromDate(e);return{timestampValue:Qg(t.serializer,n)}}if(e instanceof Sv){var r=new Sv(e.seconds,1e3*Math.floor(e.nanoseconds/1e3));return{timestampValue:Qg(t.serializer,r)}}if(e instanceof Gx)return{geoPointValue:{latitude:e.latitude,longitude:e.longitude}};if(e instanceof Hx)return{bytesValue:$g(t.serializer,e._byteString)};if(e instanceof Lx){var i=t.databaseId,a=e.firestore._databaseId;if(!a.isEqual(i))throw t._a("Document reference is for database ".concat(a.projectId,"/").concat(a.database," but should be for database ").concat(i.projectId,"/").concat(i.database));return{referenceValue:Jg(e.firestore._databaseId||t.databaseId,e._key.path)}}throw t._a("Unsupported field value: ".concat(Ax(e)))}(e,t)}function cE(e,t){var n={};return Jv(e)?t.path&&t.path.length>0&&t.fieldMask.push(t.path):Yv(e,(function(e,r){var i=uE(r,t.aa(e));null!=i&&(n[e]=i)})),{mapValue:{fields:n}}}function lE(e){return!("object"!=typeof e||null===e||e instanceof Array||e instanceof Date||e instanceof Sv||e instanceof Gx||e instanceof Hx||e instanceof Lx||e instanceof Kx)}function fE(e,t,n){if(!lE(n)||!function(e){return"object"==typeof e&&null!==e&&(Object.getPrototypeOf(e)===Object.prototype||null===Object.getPrototypeOf(e))}(n)){var r=Ax(n);throw"an object"===r?t._a(e+" a custom object"):t._a(e+" "+r)}}function hE(e,t,n){if((t=Nt(t))instanceof Wx)return t._internalPath;if("string"==typeof t)return pE(e,t);throw vE("Field path arguments must be of type string or ",e,!1,void 0,n)}var dE=new RegExp("[~\\*/\\[\\]]");function pE(e,t,n){if(t.search(dE)>=0)throw vE("Invalid field path (".concat(t,"). Paths must not contain '~', '*', '/', '[', or ']'"),e,!1,void 0,n);try{return k(Wx,s(t.split(".")))._internalPath}catch(r){throw vE("Invalid field path (".concat(t,"). Paths must not be empty, begin with '.', end with '.', or contain '..'"),e,!1,void 0,n)}}function vE(e,t,n,r,i){var a=r&&!r.isEmpty(),o=void 0!==i,s="Function ".concat(t,"() called with invalid data");n&&(s+=" (via `toFirestore()`)"),s+=". ";var u="";return(a||o)&&(u+=" (found",a&&(u+=" in field ".concat(r)),o&&(u+=" in document ".concat(i)),u+=")"),new fv(lv.INVALID_ARGUMENT,s+e+u)}function mE(e,t){return e.some((function(e){return e.isEqual(t)}))}var yE=function(){function e(t,n,r,i,a){u(this,e),this._firestore=t,this._userDataWriter=n,this._key=r,this._document=i,this._converter=a}return h(e,[{key:"id",get:function(){return this._key.path.lastSegment()}},{key:"ref",get:function(){return new Lx(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 gE(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(kE("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}}}]),e}(),gE=function(e){p(n,e);var t=g(n);function n(){return u(this,n),t.apply(this,arguments)}return h(n,[{key:"data",value:function(){return Za(v(n.prototype),"data",this).call(this)}}]),n}(yE);function kE(e,t){return"string"==typeof t?pE(e,t):t instanceof Wx?t._internalPath:t._delegate._internalPath}function bE(e){if("L"===e.limitType&&0===e.explicitOrderBy.length)throw new fv(lv.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}var wE=h((function e(){u(this,e)})),xE=function(e){p(n,e);var t=g(n);function n(){return u(this,n),t.apply(this,arguments)}return h(n)}(wE);function EE(e,t){for(var n=[],r=arguments.length,i=new Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a];t instanceof wE&&n.push(t),function(e){var t=e.filter((function(e){return e instanceof SE})).length,n=e.filter((function(e){return e instanceof _E})).length;if(t>1||t>0&&n>0)throw new fv(lv.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")}(n=n.concat(i));var o,s=_(n);try{for(s.s();!(o=s.n()).done;){e=o.value._apply(e)}}catch(u){s.e(u)}finally{s.f()}return e}var _E=function(e){p(n,e);var t=g(n);function n(e,r,i){var a;return u(this,n),(a=t.call(this))._field=e,a._op=r,a._value=i,a.type="where",a}return h(n,[{key:"_apply",value:function(e){var t=this._parse(e);return AE(e._query,t),new jx(e.firestore,e.converter,yy(e._query,t))}},{key:"_parse",value:function(e){var t=eE(e.firestore),n=function(e,t,n,r,i,a,o){var s;if(i.isKeyField()){if("array-contains"===a||"array-contains-any"===a)throw new fv(lv.INVALID_ARGUMENT,"Invalid Query. You can't perform '".concat(a,"' queries on documentId()."));if("in"===a||"not-in"===a){NE(o,a);var u,c=[],l=_(o);try{for(l.s();!(u=l.n()).done;){var f=u.value;c.push(IE(r,e,f))}}catch(h){l.e(h)}finally{l.f()}s={arrayValue:{values:c}}}else s=IE(r,e,o)}else"in"!==a&&"not-in"!==a&&"array-contains-any"!==a||NE(o,a),s=sE(n,"where",o,"in"===a||"not-in"===a);return zm.create(i,a,s)}(e._query,0,t,e.firestore._databaseId,this._field,this._op,this._value);return n}}],[{key:"_create",value:function(e,t,r){return new n(e,t,r)}}]),n}(xE);var SE=function(e){p(n,e);var t=g(n);function n(e,r){var i;return u(this,n),(i=t.call(this)).type=e,i._queryConstraints=r,i}return h(n,[{key:"_parse",value:function(e){var t=this._queryConstraints.map((function(t){return t._parse(e)})).filter((function(e){return e.getFilters().length>0}));return 1===t.length?t[0]:Bm.create(t,this._getOperator())}},{key:"_apply",value:function(e){var t=this._parse(e);return 0===t.getFilters().length?e:(function(e,t){var n,r=e,i=_(t.getFlattenedFilters());try{for(i.s();!(n=i.n()).done;){var a=n.value;AE(r,a),r=yy(r,a)}}catch(o){i.e(o)}finally{i.f()}}(e._query,t),new jx(e.firestore,e.converter,yy(e._query,t)))}},{key:"_getQueryConstraints",value:function(){return this._queryConstraints}},{key:"_getOperator",value:function(){return"and"===this.type?"and":"or"}}],[{key:"_create",value:function(e,t){return new n(e,t)}}]),n}(wE);var TE=function(e){p(n,e);var t=g(n);function n(e,r){var i;return u(this,n),(i=t.call(this))._field=e,i._direction=r,i.type="orderBy",i}return h(n,[{key:"_apply",value:function(e){var t=function(e,t,n){if(null!==e.startAt)throw new fv(lv.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==e.endAt)throw new fv(lv.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");var r=new Fm(t,n);return function(e,t){if(null===hy(e)){var n=dy(e);null!==n&&RE(e,n,t.field)}}(e,r),r}(e._query,this._field,this._direction);return new jx(e.firestore,e.converter,function(e,t){var n=e.explicitOrderBy.concat([t]);return new uy(e.path,e.collectionGroup,n,e.filters.slice(),e.limit,e.limitType,e.startAt,e.endAt)}(e._query,t))}}],[{key:"_create",value:function(e,t){return new n(e,t)}}]),n}(xE);function CE(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc",n=kE("orderBy",e);return TE._create(n,t)}function IE(e,t,n){if("string"==typeof(n=Nt(n))){if(""===n)throw new fv(lv.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!py(t)&&-1!==n.indexOf("/"))throw new fv(lv.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(Iv.fromString(n));if(!Rv.isDocumentKey(r))throw new fv(lv.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 _m(e,new Rv(r))}if(n instanceof Lx)return _m(e,n._key);throw new fv(lv.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ".concat(Ax(n),"."))}function NE(e,t){if(!Array.isArray(e)||0===e.length)throw new fv(lv.INVALID_ARGUMENT,"Invalid Query. A non-empty array is required for '".concat(t.toString(),"' filters."))}function AE(e,t){if(t.isInequality()){var n=dy(e),r=t.field;if(null!==n&&!n.isEqual(r))throw new fv(lv.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(r.toString(),"'"));var i=hy(e);null!==i&&RE(e,r,i)}var a=function(e,t){var n,r=_(e);try{for(r.s();!(n=r.n()).done;){var i,a=_(n.value.getFlattenedFilters());try{for(a.s();!(i=a.n()).done;){var o=i.value;if(t.indexOf(o.op)>=0)return o.op}}catch(s){a.e(s)}finally{a.f()}}}catch(s){r.e(s)}finally{r.f()}return null}(e.filters,function(e){switch(e){case"!=":return["!=","not-in"];case"array-contains-any":case"in":return["not-in"];case"not-in":return["array-contains-any","in","not-in","!="];default:return[]}}(t.op));if(null!==a)throw a===t.op?new fv(lv.INVALID_ARGUMENT,"Invalid query. You cannot use more than one '".concat(t.op.toString(),"' filter.")):new fv(lv.INVALID_ARGUMENT,"Invalid query. You cannot use '".concat(t.op.toString(),"' filters with '").concat(a.toString(),"' filters."))}function RE(e,t,n){if(!n.isEqual(t))throw new fv(lv.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 OE=function(){function e(){u(this,e)}return h(e,[{key:"convertValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";switch(ym(e)){case 0:return null;case 1:return e.booleanValue;case 2:return cm(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(lm(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 sv()}}},{key:"convertObject",value:function(e,t){return this.convertObjectMap(e.fields,t)}},{key:"convertObjectMap",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none",r={};return Yv(e,(function(e,i){r[e]=t.convertValue(i,n)})),r}},{key:"convertGeoPoint",value:function(e){return new Gx(cm(e.latitude),cm(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=hm(e);return null==n?null:this.convertValue(n,t);case"estimate":return this.convertTimestamp(dm(e));default:return null}}},{key:"convertTimestamp",value:function(e){var t=um(e);return new Sv(t.seconds,t.nanos)}},{key:"convertDocumentKey",value:function(e,t){var n=Iv.fromString(e);uv(kk(n));var r=new vm(n.get(1),n.get(3)),i=new Rv(n.popFirst(5));return r.isEqual(t)||iv("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 PE(e,t,n){return e?n&&(n.merge||n.mergeFields)?e.toFirestore(t,n):e.toFirestore(t):t}var DE=function(){function e(t,n){u(this,e),this.hasPendingWrites=t,this.fromCache=n}return h(e,[{key:"isEqual",value:function(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}]),e}(),LE=function(e){p(n,e);var t=g(n);function n(e,r,i,a,o,s){var c;return u(this,n),(c=t.call(this,e,r,i,a,s))._firestore=e,c._firestoreImpl=e,c.metadata=o,c}return h(n,[{key:"exists",value:function(){return Za(v(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 jE(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(kE("DocumentSnapshot.get",e));if(null!==n)return this._userDataWriter.convertValue(n,t.serverTimestamps)}}}]),n}(yE),jE=function(e){p(n,e);var t=g(n);function n(){return u(this,n),t.apply(this,arguments)}return h(n,[{key:"data",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Za(v(n.prototype),"data",this).call(this,e)}}]),n}(LE),ME=function(){function e(t,n,r,i){u(this,e),this._firestore=t,this._userDataWriter=n,this._snapshot=i,this.metadata=new DE(i.hasPendingWrites,i.fromCache),this.query=r}return h(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 jE(n._firestore,n._userDataWriter,r.key,r,new DE(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]:{}).includeMetadataChanges;if(e&&this._snapshot.excludesMetadataChanges)throw new fv(lv.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===e||(this._cachedChanges=function(e,t){if(e._snapshot.oldDocs.isEmpty()){var n=0;return e._snapshot.docChanges.map((function(t){var r=new jE(e._firestore,e._userDataWriter,t.doc.key,t.doc,new DE(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter);return t.doc,{type:"added",doc:r,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 jE(e._firestore,e._userDataWriter,t.doc.key,t.doc,new DE(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:FE(t.type),doc:n,oldIndex:i,newIndex:a}}))}(this,e),this._cachedChangesIncludeMetadataChanges=e),this._cachedChanges}}]),e}();function FE(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return sv()}}function UE(e){e=Rx(e,Lx);var t=Rx(e.firestore,zx);return _x(Bx(t),e._key).then((function(n){return WE(t,e,n)}))}var VE=function(e){p(n,e);var t=g(n);function n(e){var r;return u(this,n),(r=t.call(this)).firestore=e,r}return h(n,[{key:"convertBytes",value:function(e){return new Hx(e)}},{key:"convertReference",value:function(e){var t=this.convertDocumentKey(e,this.firestore._databaseId);return new Lx(this.firestore,null,t)}}]),n}(OE);function zE(e){e=Rx(e,jx);var t=Rx(e.firestore,zx),n=Bx(t),r=new VE(t);return bE(e._query),Sx(n,e._query).then((function(n){return new ME(t,r,e,n)}))}function BE(e,t,n){e=Rx(e,Lx);var r=Rx(e.firestore,zx),i=PE(e.converter,t,n);return HE(r,[tE(eE(r),"setDoc",e._key,i,null!==e.converter,n).toMutation(e._key,rg.none())])}function qE(e,t,n){e=Rx(e,Lx);for(var r=Rx(e.firestore,zx),i=eE(r),a=arguments.length,o=new Array(a>3?a-3:0),s=3;s<a;s++)o[s-3]=arguments[s];return HE(r,[("string"==typeof(t=Nt(t))||t instanceof Wx?oE(i,"updateDoc",e._key,t,n,o):aE(i,"updateDoc",e._key,t)).toMutation(e._key,rg.exists(!0))])}function HE(e,t){return function(e,t){var n=new hv;return e.asyncQueue.enqueueAndForget(Ue(Me().mark((function r(){return Me().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=Mw,r.next=3,wx(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}(Bx(e),t)}function WE(e,t,n){var r=n.docs.get(t._key),i=new VE(e);return new LE(e,i,t._key,r,new DE(n.hasPendingWrites,n.fromCache),t.converter)}function KE(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new iE("arrayUnion",t)}!function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];!function(e){ev=e}(_n),kn(new At("firestore",(function(e,n){var r=n.instanceIdentifier,i=n.options,a=e.getProvider("app").getImmediate(),o=new zx(new mv(e.getProvider("auth-internal")),new bv(e.getProvider("app-check-internal")),function(e,t){if(!Object.prototype.hasOwnProperty.apply(e.options,["projectId"]))throw new fv(lv.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new vm(e.options.projectId,t)}(a,r),a);return i=Object.assign({useFetchStreams:t},i),o._setSettings(i),o}),"PUBLIC").setMultipleInstances(!0)),Cn(Jp,"3.11.0",e),Cn(Jp,"3.11.0","esm2017")}();var GE=(0,t.createContext)(null),QE=Sn($e({apiKey:"AIzaSyD4nVnKJvgWGf9s0lmbxN9gVt_vlk7VEV8",authDomain:"no-routine.firebaseapp.com",projectId:"no-routine",storageBucket:"no-routine.appspot.com",messagingSenderId:"270374796200",appId:"1:270374796200:web:c597dd29c50e8d7fb57b9d",measurementId:"G-XYT2F9E2C4"},"storageBucket","gs://no-routine.appspot.com")),$E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Tn(),t=bn(e,"auth");if(t.isInitialized())return t.getImmediate();var n,r=function(e,t){var n=bn(e,"auth");if(n.isInitialized()){var r=n.getImmediate();if(yt(n.getOptions(),null!==t&&void 0!==t?t:{}))return r;uo(r,"already-initialized")}return n.initialize({options:t})}(e,{popupRedirectResolver:dl,persistence:[sc,Lu,Mu]}),i=ot("authTokenSyncURL");if(i){var a=(n=i,function(){var e=Ue(Me().mark((function e(t){var r,i,a;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=t,!e.t0){e.next=5;break}return e.next=4,t.getIdTokenResult();case 4:e.t0=e.sent;case 5:if(r=e.t0,!((i=r&&((new Date).getTime()-Date.parse(r.issuedAtTime))/1e3)&&i>_l)){e.next=9;break}return e.abrupt("return");case 9:if(a=null===r||void 0===r?void 0:r.token,Sl!==a){e.next=12;break}return e.abrupt("return");case 12:return Sl=a,e.next=15,fetch(n,{method:a?"POST":"DELETE",headers:a?{Authorization:"Bearer ".concat(a)}:{}});case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());!function(e,t,n){Nt(e).beforeAuthStateChanged(t,n)}(r,a,(function(){return a(r.currentUser)})),function(e,t,n,r){Nt(e).onIdTokenChanged(t,n,r)}(r,(function(e){return a(e)}))}var o=rt("auth");return o&&Ds(r,"http://".concat(o)),r}(QE),XE=new uu,YE=(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Tn(),t=bn(e=Nt(e),ea);t.isInitialized()?t.getImmediate():function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=bn(e,ea);if(n.isInitialized()){var r=n.getImmediate();if(yt(t,n.getOptions()))return r;throw ua.create("already-initialized")}var i=n.initialize({options:t})}(e)}(QE),function(e,t){var n="string"==typeof e?e:t||"(default)",r=bn("object"==typeof e?e:Tn(),"firestore").getImmediate({identifier:n});if(!r._initialized){var i=it("firestore");i&&Dx.apply(void 0,[r].concat(s(i)))}return r}(QE)),JE=(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Tn(),t=arguments.length>1?arguments[1]:void 0,n=bn(e=Nt(e),pr).getImmediate({identifier:t}),r=it("storage");r&&vr.apply(void 0,[n].concat(s(r)))}(QE),{color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0}),ZE=t.createContext&&t.createContext(JE),e_=["attr","size","title"];function t_(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var 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 n_(){return n_=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},n_.apply(this,arguments)}function r_(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 i_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r_(Object(n),!0).forEach((function(t){a_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a_(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o_(e){return e&&e.map((function(e,n){return t.createElement(e.tag,i_({key:n},e.attr),o_(e.child))}))}function s_(e){return function(n){return t.createElement(u_,n_({attr:i_({},e.attr)},n),o_(e.child))}}function u_(e){var n=function(n){var r,i=e.attr,a=e.size,o=e.title,s=t_(e,e_),u=a||n.size||"1em";return n.className&&(r=n.className),e.className&&(r=(r?r+" ":"")+e.className),t.createElement("svg",n_({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,i,s,{className:r,style:i_(i_({color:e.color||n.color},n.style),e.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),o&&t.createElement("title",null,o),e.children)};return void 0!==ZE?t.createElement(ZE.Consumer,null,(function(e){return n(e)})):n(JE)}function c_(e){return s_({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"},child:[]}]})(e)}var l_=n(184),f_=function(){return(0,l_.jsx)("button",{onClick:function(){var e="instagram://story-camera?text=".concat(encodeURIComponent("https://www.noroutinenyc.com"));window.location.href=e},className:"bg-purple-500 text-white hover:bg-purple-700 px-4 py-2 rounded-md w-full",children:"Share to Instagram"})};var h_=function(){var e=(0,t.useContext)(GE).user,n=E((0,t.useState)(!1),2),r=n[0],i=n[1],a=ge(),o=(null===e||void 0===e?void 0:e.nickname)||"Guest",s=(0,t.useRef)(null),u=function(){var e=Ue(Me().mark((function e(){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Iu($E);case 3:a("/"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error(e.t0.message);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}(),c=function(){i(!r)},l=function(e){s.current&&!s.current.contains(e.target)&&i(!1)};return(0,t.useEffect)((function(){return r?document.addEventListener("mousedown",l):document.removeEventListener("mousedown",l),function(){document.removeEventListener("mousedown",l)}}),[r]),(0,l_.jsxs)("header",{className:"py-4 relative z-50",children:[(0,l_.jsxs)("div",{className:"container mx-auto flex justify-between items-center px-4 lg:px-8",children:[(0,l_.jsx)(Ke,{to:"/",className:"text-2xl font-bold",children:"No Routine"}),(0,l_.jsxs)("div",{className:"hidden lg:flex space-x-6",children:[(0,l_.jsx)(Ke,{to:"/events",className:"text-base",children:"Events"}),(0,l_.jsx)(Ke,{to:"/about",className:"text-base",children:"About"}),(0,l_.jsxs)("div",{className:"relative",children:[(0,l_.jsxs)("button",{className:"text-base flex items-center",onClick:c,children:[(0,l_.jsx)(c_,{className:"mr-2"})," ",o,(0,l_.jsx)("svg",{className:"w-4 h-4 ml-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,l_.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})})]}),r&&(0,l_.jsxs)("ul",{ref:s,className:"absolute right-0 mt-2 w-48 bg-white rounded-md shadow-lg z-50",children:[(0,l_.jsx)(Ke,{to:"/profile",children:(0,l_.jsx)("li",{className:"px-4 py-2 text-sm text-gray-700 hover:bg-red-500 hover:text-white w-full",children:"Profile"})}),(0,l_.jsx)(Ke,{to:"/",onClick:u,children:(0,l_.jsx)("li",{className:"px-4 py-2 text-sm text-gray-700 hover:bg-red-500 hover:text-white w-full",children:"Sign Out"})})]})]})]}),(0,l_.jsx)("div",{className:"lg:hidden",children:(0,l_.jsx)("button",{className:"text-black",onClick:c,children:(0,l_.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,l_.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 6h16M4 12h16M4 18h16"})})})})]}),r&&(0,l_.jsx)("div",{ref:s,className:"lg:hidden absolute right-2 top-12 bg-white shadow-lg rounded-md z-50 w-2/3",children:(0,l_.jsxs)("nav",{className:"flex flex-col items-center text-center space-y-2 mt-2 p-4 w-full",children:[(0,l_.jsx)(Ke,{to:"/events",className:"text-base text-gray-700 hover:bg-red-500 hover:text-white px-4 py-2 rounded-md w-full",children:"Events"}),(0,l_.jsx)(Ke,{to:"/about",className:"text-base text-gray-700 hover:bg-red-500 hover:text-white px-4 py-2 rounded-md w-full",children:"About"}),(0,l_.jsx)(Ke,{to:"/profile",className:"text-base text-gray-700 hover:bg-red-500 hover:text-white px-4 py-2 rounded-md w-full",children:"Profile"}),(0,l_.jsxs)("div",{className:"flex flex-col w-full gap-2",children:[(0,l_.jsx)(f_,{})," ",(0,l_.jsx)("button",{onClick:u,className:"bg-red-500 text-white hover:bg-red-700 px-4 py-2 rounded-md w-full",children:"Sign Out"})]})]})})]})},d_=n.p+"static/media/nr2.f8ceeeb413d3d92cf47d.gif";var p_=function(){return(0,l_.jsxs)("footer",{className:"footer footer-center p-10  text-primary-content",children:[(0,l_.jsxs)("div",{children:[(0,l_.jsx)("img",{className:"lobo",src:d_,alt:"Lobo Run Cycle"}),(0,l_.jsxs)("p",{className:"font-bold",children:["No Routine ",(0,l_.jsx)("br",{}),"Having fun since 2022"]}),(0,l_.jsx)("p",{children:"Copyright \xa9 2023 - All right reserved"})]}),(0,l_.jsx)("div",{children:(0,l_.jsx)("div",{className:"grid grid-flow-col gap-4",children:(0,l_.jsx)(Ke,{to:"https://www.instagram.com/no__routine/",target:"https://www.instagram.com/no__routine/",children:(0,l_.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"42",height:"42",fill:"currentColor",class:"fill-current",children:(0,l_.jsx)("path",{d:"M8 0C5.829 0 5.556.01 4.703.048 3.85.088 3.269.222 2.76.42a3.917 3.917 0 0 0-1.417.923A3.927 3.927 0 0 0 .42 2.76C.222 3.268.087 3.85.048 4.7.01 5.555 0 5.827 0 8.001c0 2.172.01 2.444.048 3.297.04.852.174 1.433.372 1.942.205.526.478.972.923 1.417.444.445.89.719 1.416.923.51.198 1.09.333 1.942.372C5.555 15.99 5.827 16 8 16s2.444-.01 3.298-.048c.851-.04 1.434-.174 1.943-.372a3.916 3.916 0 0 0 1.416-.923c.445-.445.718-.891.923-1.417.197-.509.332-1.09.372-1.942C15.99 10.445 16 10.173 16 8s-.01-2.445-.048-3.299c-.04-.851-.175-1.433-.372-1.941a3.926 3.926 0 0 0-.923-1.417A3.911 3.911 0 0 0 13.24.42c-.51-.198-1.092-.333-1.943-.372C10.443.01 10.172 0 7.998 0h.003zm-.717 1.442h.718c2.136 0 2.389.007 3.232.046.78.035 1.204.166 1.486.275.373.145.64.319.92.599.28.28.453.546.598.92.11.281.24.705.275 1.485.039.843.047 1.096.047 3.231s-.008 2.389-.047 3.232c-.035.78-.166 1.203-.275 1.485a2.47 2.47 0 0 1-.599.919c-.28.28-.546.453-.92.598-.28.11-.704.24-1.485.276-.843.038-1.096.047-3.232.047s-2.39-.009-3.233-.047c-.78-.036-1.203-.166-1.485-.276a2.478 2.478 0 0 1-.92-.598 2.48 2.48 0 0 1-.6-.92c-.109-.281-.24-.705-.275-1.485-.038-.843-.046-1.096-.046-3.233 0-2.136.008-2.388.046-3.231.036-.78.166-1.204.276-1.486.145-.373.319-.64.599-.92.28-.28.546-.453.92-.598.282-.11.705-.24 1.485-.276.738-.034 1.024-.044 2.515-.045v.002zm4.988 1.328a.96.96 0 1 0 0 1.92.96.96 0 0 0 0-1.92zm-4.27 1.122a4.109 4.109 0 1 0 0 8.217 4.109 4.109 0 0 0 0-8.217zm0 1.441a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334"})})})})})]})};var v_=function(e){var n,r,i,a=function(){var e=t.useContext(de).matches,n=e[e.length-1];return n?n.params:{}}().event_id,o=E((0,t.useState)(null),2),s=o[0],u=o[1],c=E((0,t.useState)(!1),2),l=c[0],f=c[1],h=(0,t.useContext)(GE).user,d=ge(),p=Ux(YE,"events",a);(0,t.useEffect)((function(){var e=function(){var e=Ue(Me().mark((function e(){var t;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,UE(p);case 3:(t=e.sent).exists()?u(t.data()):console.log("No such document!"),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.error(e.t0.message);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}();e()}),[l]);var v=function(){var e=Ue(Me().mark((function e(){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(f(!l),h){e.next=4;break}return d("/login-signup"),e.abrupt("return");case 4:return e.prev=4,e.next=7,qE(p,{participants:KE({id:null===h||void 0===h?void 0:h.user_id,email:null===h||void 0===h?void 0:h.email,name:null===h||void 0===h?void 0:h.name,nickname:null===h||void 0===h?void 0:h.nickname,pronouns:null===h||void 0===h?void 0:h.pronouns})});case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(4),console.log("ERROR UPDATING DOC: ".concat(e.t0));case 12:case"end":return e.stop()}}),e,null,[[4,9]])})));return function(){return e.apply(this,arguments)}}();return(0,l_.jsx)(l_.Fragment,{children:(0,l_.jsxs)("div",{className:"hero min-h-[640px] bg-base-200 flex flex-col px-2  md:px-8 lg:px-10 xl:px-12",children:[(0,l_.jsxs)("div",{className:"mt-12 gap-12 hero-content flex-col lg:flex-row-reverse",id:"wrapper",children:[(0,l_.jsx)("img",{src:null===s||void 0===s?void 0:s.image,className:"max-w-sm shadow-xl",alt:"Event"}),(0,l_.jsxs)("div",{className:"my-5",children:[(0,l_.jsx)("h1",{className:"text-4xl font-bold",children:null===s||void 0===s?void 0:s.activity}),(0,l_.jsx)("p",{className:"py-6",children:null===s||void 0===s?void 0:s.long_description}),(0,l_.jsxs)("ul",{children:[(0,l_.jsx)("p",{className:"font-bold",children:"Event Details:"}),(0,l_.jsxs)("li",{children:["\u2605 ",null===s||void 0===s?void 0:s.date]}),(0,l_.jsxs)("li",{children:["\u2605 ",null===s||void 0===s?void 0:s.time]}),(0,l_.jsxs)("li",{children:["\u2605 ",null===s||void 0===s?void 0:s.location]}),(0,l_.jsx)("br",{}),(0,l_.jsx)("p",{className:"font-bold",children:"What to bring:"}),(0,l_.jsx)("li",{children:"\u2605 water"}),(0,l_.jsx)("li",{children:"\u2605 running shoes"}),(null===s||void 0===s?void 0:s.bring1)&&(0,l_.jsxs)("li",{children:["\u2605 ",null===s||void 0===s?void 0:s.bring1]}),(null===s||void 0===s?void 0:s.bring2)&&(0,l_.jsxs)("li",{children:["\u2605 ",null===s||void 0===s?void 0:s.bring2]}),(0,l_.jsx)("li",{children:"\u2605 good vibes"})]}),(0,l_.jsx)("button",{className:"btn btn-lg btn-primary mt-6 w-full md:w-1/2",onClick:function(){return null!==s&&void 0!==s&&s.paid?void(s&&s.paymentLink?window.open(s.paymentLink,"_blank"):console.log("Payment Link not found.")):v()},disabled:"closed"===(null===s||void 0===s?void 0:s.status)||(null===s||void 0===s||null===(n=s.participants)||void 0===n?void 0:n.find((function(e){return e.id===(null===h||void 0===h?void 0:h.user_id)}))),children:"closed"===(null===s||void 0===s?void 0:s.status)?"Event Closed":null!==s&&void 0!==s&&null!==(r=s.participants)&&void 0!==r&&r.find((function(e){return e.id===(null===h||void 0===h?void 0:h.user_id)}))?"Reserved":null!==s&&void 0!==s&&s.paid?"Pay and Reserve":"Reserve"})]})]}),(0,l_.jsxs)("div",{className:"mt-8",children:[(0,l_.jsx)("h2",{className:"font-bold text-xl",children:"Who's coming??"}),(0,l_.jsx)("div",{className:"overflow-x-auto",children:(0,l_.jsxs)("table",{className:"table table-compact w-full lg:w-1/2 mx-auto",children:[(0,l_.jsx)("thead",{children:(0,l_.jsxs)("tr",{children:[(0,l_.jsx)("th",{}),(0,l_.jsx)("th",{children:"Name"}),(0,l_.jsx)("th",{children:"Nickname"})]})}),(0,l_.jsx)("tbody",{children:null===s||void 0===s||null===(i=s.participants)||void 0===i?void 0:i.map((function(e,t){return(0,l_.jsxs)("tr",{children:[(0,l_.jsx)("th",{children:t+1}),(0,l_.jsx)("td",{children:null===e||void 0===e?void 0:e.name}),(0,l_.jsx)("td",{children:null===e||void 0===e?void 0:e.nickname})]},t)}))}),(0,l_.jsx)("tfoot",{children:(0,l_.jsx)("tr",{children:(0,l_.jsx)("th",{})})})]})})]})]})})};var m_=function(){return(0,l_.jsxs)(l_.Fragment,{children:[(0,l_.jsx)("div",{className:"min-h-[80%]  ",children:(0,l_.jsx)("div",{className:"hero  bg-base-200 background-image",children:(0,l_.jsx)("div",{className:"hero-content flex-col ",children:(0,l_.jsxs)("div",{className:"text-center lg:text-center flex flex-col gap-12",children:[(0,l_.jsx)("h1",{className:"text-5xl font-bold",children:"LET'S HAVE SOME FUN!"}),(0,l_.jsx)("p",{className:"self-center",children:"Life\u2019s too short to stick to the same old routine\u2014so let\u2019s shake things up"}),(0,l_.jsx)("img",{className:"lobo",src:d_,alt:"Lobo Run Cycle"}),(0,l_.jsx)(Ke,{to:"/login-signup",children:(0,l_.jsx)("button",{className:"btn btn-lg  btn-primary w-3/6 self-center text-white",children:"SIGN UP"})})]})})})}),(0,l_.jsx)("div",{className:"flex flex-col w-full",children:(0,l_.jsx)("div",{className:"divider"})})]})};var y_=function(){var e=E((0,t.useState)([]),2),n=e[0],r=e[1],i=me(),a=Fx(YE,"events"),o=function(){var e=Ue(Me().mark((function e(){var t,n,o;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=EE(a,CE("number","desc")),e.next=4,zE(t);case 4:n=e.sent,o=n.docs.map((function(e){return qt(qt({},e.data()),{},{event_id:e.id})})),"/"===i.pathname&&(o=o.slice(0,2)),r(o),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.error("Error fetching events: ",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(){return e.apply(this,arguments)}}();return(0,t.useEffect)((function(){o()}),[]),(0,l_.jsx)(l_.Fragment,{children:n.map((function(e){return(0,l_.jsx)(Ke,{to:"/event-details/".concat(e.event_id),children:(0,l_.jsxs)("div",{className:"card w-96 bg-base-100 shadow-xl mx-5 my-2",children:[(0,l_.jsx)("figure",{children:(0,l_.jsx)("img",{src:e.image,alt:"Event Flyer"})}),(0,l_.jsxs)("div",{className:"card-body",children:[(0,l_.jsxs)("h2",{className:"card-title",children:[e.activity,(0,l_.jsx)("div",{className:"badge ".concat("closed"===e.status?"badge-error":"badge-success"),children:e.status})]}),(0,l_.jsx)("p",{children:e.short_description}),(0,l_.jsxs)("div",{className:"card-actions justify-end",children:[(0,l_.jsx)("div",{className:"badge badge-outline",children:e.location}),(0,l_.jsx)("div",{className:"badge badge-outline",children:e.date}),(0,l_.jsx)("div",{className:"badge badge-outline",children:e.emoji})]})]})]})},e.event_id)}))})};var g_=function(){return(0,l_.jsxs)(l_.Fragment,{children:[(0,l_.jsx)(m_,{}),(0,l_.jsx)("div",{className:"stack-cards px-5 gap-12",children:(0,l_.jsx)(y_,{})})]})};var k_=function(){return(0,l_.jsx)("div",{className:"stack-cards px-5 gap-12",children:(0,l_.jsx)(y_,{})})},b_=n.p+"static/media/red.4b9e86930023faa51a43.gif";var w_=function(){return(0,l_.jsx)(l_.Fragment,{children:(0,l_.jsxs)("div",{className:"",children:[(0,l_.jsx)("h1",{className:"text-4xl my-8 mx-12",children:"About us"}),(0,l_.jsxs)("div",{className:"flex ml-12 content-between",children:[(0,l_.jsxs)("p",{className:"",children:["At No Routine, we believe that amidst the hustle and bustle of adult life, it\u2019s essential to carve out time for fun. We\u2019re here to provide a playground where you can break free from the monotony and rediscover the joy of being active and social. Whether it\u2019s dodgeball, kickball, or any other exciting activity, our events are designed to help you unleash your inner child, meet new friends, and create unforgettable memories. Our website is your go-to hub for everything No Routine. Explore upcoming events, sign up to join the fun, meet our team, and share the excitement. Life\u2019s too short to stick to the same old routine\u2014so let\u2019s shake things up and make every day a little more extraordinary with No Routine. Ready to play? Check out our events, sign up, and dive into the adventure!",(0,l_.jsx)("br",{}),(0,l_.jsx)("button",{className:"btn btn-wide my-8",onClick:function(){return window.open("mailto:noroutinenyc@gmail.com","emailWindow","width=500,height=600,top=100,left=100")},children:"Work with us"})]}),(0,l_.jsx)("div",{children:(0,l_.jsx)("img",{className:"px-12",src:b_,alt:"no-routine-gif"})})]})]})})},x_=function(){var e=E((0,t.useState)({name:"",nickname:"",pronouns:"",top_size:"",bottom_size:"",shoe_size:""}),2),n=e[0],r=e[1],i=E((0,t.useState)(""),2),a=i[0],o=i[1],s=E((0,t.useState)(""),2),u=s[0],c=s[1],l=(0,t.useContext)(GE),f=l.user,h=l.setUser;(0,t.useEffect)((function(){var e=function(){var e=Ue(Me().mark((function e(){var t,n,i;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!f||!f.user_id){e.next=12;break}return t=Ux(YE,"users",f.user_id),e.prev=2,e.next=5,UE(t);case 5:(n=e.sent).exists()&&(i=n.data(),r({name:i.name||"",nickname:i.nickname||"",pronouns:i.pronouns||"",top_size:i.top_size||"",bottom_size:i.bottom_size||"",shoe_size:i.shoe_size||""})),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),console.error(e.t0);case 12:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}();e()}),[f]);var d=function(){var e=Ue(Me().mark((function e(t){var r;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),e.prev=1,r=Ux(YE,"users",null===f||void 0===f?void 0:f.user_id),e.next=5,qE(r,n);case 5:h(qt(qt({},f),n)),o("Profile Updated"),setTimeout((function(){window.location.reload()}),3e3),e.next=15;break;case 10:e.prev=10,e.t0=e.catch(1),console.error(e.t0),c("Try Again"),setTimeout((function(){return c("")}),7e3);case 15:case"end":return e.stop()}}),e,null,[[1,10]])})));return function(t){return e.apply(this,arguments)}}(),p=function(e){r(qt(qt({},n),{},$e({},e.target.name,e.target.value)))};return(0,l_.jsxs)(l_.Fragment,{children:[a&&(0,l_.jsx)("div",{className:"alert alert-success",children:(0,l_.jsxs)("div",{children:[(0,l_.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"stroke-current flex-shrink-0 h-6 w-6",fill:"none",viewBox:"0 0 24 24",children:(0,l_.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,l_.jsx)("span",{children:a})]})}),u&&(0,l_.jsx)("div",{className:"alert alert-error ",children:(0,l_.jsxs)("div",{children:[(0,l_.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"stroke-current flex-shrink-0 h-6 w-6",fill:"none",viewBox:"0 0 24 24",children:(0,l_.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,l_.jsx)("span",{children:u})]})}),(0,l_.jsx)("form",{className:"proile-form mb-8",onSubmit:d,children:(0,l_.jsxs)("div",{className:"form-control w-full max-w-xs place-content-center flex gap-4 ",children:[(0,l_.jsxs)("div",{children:[(0,l_.jsx)("label",{className:"label",children:(0,l_.jsx)("span",{className:"label-text",children:"What is your real name?"})}),(0,l_.jsx)("input",{required:!0,name:"name",value:n.name,onChange:p,type:"text",placeholder:"Type here",className:"input input-bordered w-full max-w-xs"})]}),(0,l_.jsxs)("div",{children:[(0,l_.jsx)("label",{className:"label",children:(0,l_.jsx)("span",{className:"label-text",children:"What is your nickname?"})}),(0,l_.jsx)("input",{required:!0,name:"nickname",value:n.nickname,onChange:p,type:"text",placeholder:"Type here",className:"input input-bordered w-full max-w-xs"})]}),(0,l_.jsxs)("div",{className:"pronouns-container",children:[(0,l_.jsx)("div",{className:"form-control",children:(0,l_.jsxs)("label",{className:"label cursor-pointer",children:[(0,l_.jsx)("span",{className:"label-text",children:"She/Her"}),(0,l_.jsx)("input",{name:"pronouns",value:"she/her",checked:"she/her"===n.pronouns,onChange:p,type:"radio",className:"radio checked:bg-red-500"})]})}),(0,l_.jsx)("div",{className:"form-control",children:(0,l_.jsxs)("label",{className:"label cursor-pointer",children:[(0,l_.jsx)("span",{className:"label-text",children:"He/Him"}),(0,l_.jsx)("input",{name:"pronouns",value:"he/him",checked:"he/him"===n.pronouns,onChange:p,type:"radio",className:"radio checked:bg-blue-500"})]})}),(0,l_.jsx)("div",{className:"form-control",children:(0,l_.jsxs)("label",{className:"label cursor-pointer",children:[(0,l_.jsx)("span",{className:"label-text",children:"They/Them"}),(0,l_.jsx)("input",{name:"pronouns",value:"they/them",checked:"they/them"===n.pronouns,onChange:p,type:"radio",className:"radio checked:radio-success"})]})})]}),(0,l_.jsxs)("select",{name:"top_size",value:n.top_size,onChange:p,className:"select select-bordered w-full max-w-xs",defaultValue:"Pick your Top size",children:[(0,l_.jsx)("option",{value:"",disabled:!0,children:"Pick your Top size"}),(0,l_.jsx)("option",{children:"Small"}),(0,l_.jsx)("option",{children:"Medium"}),(0,l_.jsx)("option",{children:"Large"}),(0,l_.jsx)("option",{children:"X-Large"}),(0,l_.jsx)("option",{children:"XX-Large"}),(0,l_.jsx)("option",{children:"XXX-Large"})]}),(0,l_.jsxs)("select",{name:"bottom_size",value:n.bottom_size,onChange:p,className:"select select-bordered w-full max-w-xs",defaultValue:"Pick your Bottom size",children:[(0,l_.jsx)("option",{value:"",disabled:!0,children:"Pick your Bottom size"}),(0,l_.jsx)("option",{children:"Small"}),(0,l_.jsx)("option",{children:"Medium"}),(0,l_.jsx)("option",{children:"Large"}),(0,l_.jsx)("option",{children:"X-Large"}),(0,l_.jsx)("option",{children:"XX-Large"}),(0,l_.jsx)("option",{children:"XXX-Large"})]}),(0,l_.jsxs)("select",{name:"shoe_size",value:n.shoe_size,onChange:p,className:"select select-bordered w-full max-w-xs",defaultValue:"Pick you Shoe size",children:[(0,l_.jsx)("option",{value:"",disabled:!0,children:"Pick your Shoe size"}),(0,l_.jsx)("option",{children:"4 WMNS"}),(0,l_.jsx)("option",{children:"4.5 WMNS"}),(0,l_.jsx)("option",{children:"5 WMNS"}),(0,l_.jsx)("option",{children:"5.5 WMNS"}),(0,l_.jsx)("option",{children:"6 WMNS"}),(0,l_.jsx)("option",{children:"6.5 WMNS"}),(0,l_.jsx)("option",{children:"7 WMNS"}),(0,l_.jsx)("option",{children:"7.5 WMNS"}),(0,l_.jsx)("option",{children:"8 WMNS"}),(0,l_.jsx)("option",{children:"8.5 WMNS"}),(0,l_.jsx)("option",{children:"8.5 WMNS"}),(0,l_.jsx)("option",{children:"8.5 WMNS"}),(0,l_.jsx)("option",{children:"9 WMNS"}),(0,l_.jsx)("option",{children:"9.5 WMNS"}),(0,l_.jsx)("option",{children:"10+ WMNS"}),(0,l_.jsx)("option",{children:"8 MEN"}),(0,l_.jsx)("option",{children:"8.5 MEN"}),(0,l_.jsx)("option",{children:"9 MEN"}),(0,l_.jsx)("option",{children:"9.5 MEN"}),(0,l_.jsx)("option",{children:"10 MEN"}),(0,l_.jsx)("option",{children:"10.5 MEN"}),(0,l_.jsx)("option",{children:"11 MEN"}),(0,l_.jsx)("option",{children:"11.5 MEN"}),(0,l_.jsx)("option",{children:"12 MEN"}),(0,l_.jsx)("option",{children:"13 MEN"}),(0,l_.jsx)("option",{children:"14 MEN"}),(0,l_.jsx)("option",{children:"15+ MEN"})]}),(0,l_.jsx)("button",{className:"btn   md:btn-md lg:btn-lg",children:"Update Profile"})]})})]})},E_=n(165),__=n.n(E_),S_=function(){var e=(0,t.useContext)(GE).user,n=E((0,t.useState)({}),2),r=n[0],i=n[1],a=E((0,t.useState)(""),2),o=a[0],s=a[1];(0,t.useEffect)((function(){var t=function(){var t=Ue(Me().mark((function t(){var n,r;return Me().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e||!e.user_id){t.next=12;break}return n=Ux(YE,"users",e.user_id),t.prev=2,t.next=5,UE(n);case 5:(r=t.sent).exists()?i(r.data()):console.log("No such document!"),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(2),console.error("Error fetching user data:",t.t0);case 12:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(){return t.apply(this,arguments)}}();t()}),[e]);var u=r;return(0,t.useEffect)((function(){s(function(e){if(e)return e.nickname||e.name||e.email}(u))}),[u]),(0,l_.jsxs)(l_.Fragment,{children:[o?(0,l_.jsxs)("div",{className:"profile-intro",children:[(0,l_.jsx)("div",{className:"typwriter-wrapper",children:(0,l_.jsxs)("h1",{className:"profile-intro__heading",children:["Whats good,",(0,l_.jsx)(__(),{onInit:function(e){e.typeString("".concat(o,"?")).start()}})]})}),(0,l_.jsx)("br",{}),(0,l_.jsxs)("ul",{className:"profile-ul",children:[(0,l_.jsx)("li",{className:"profile-li",children:"We get free gear from some of your favorite brands. So, maybe its a good idea to update this form. Just saying..."}),(0,l_.jsx)("li",{className:"profile-li",children:'Click the "Update Profile" button if you ever want to update your details'}),(0,l_.jsx)("li",{className:"profile-li",children:"More updates coming soon..."})]})]}):(0,l_.jsxs)("div",{className:"profile-intro",children:[(0,l_.jsxs)("h1",{className:"profile-intro__heading",children:["Whats good ",null===e||void 0===e?void 0:e.email,"?"]}),(0,l_.jsx)("br",{}),(0,l_.jsxs)("ul",{className:"profile-ul",children:[(0,l_.jsx)("li",{className:"profile-li",children:"Sometimes we get free gear from some of your favorite brands. So, maybe its a good idea, to update this form. Just saying..."}),(0,l_.jsx)("li",{className:"profile-li",children:'Click the "Update Profile" button if you ever want to update your details'}),(0,l_.jsx)("li",{className:"profile-li",children:"More updates coming soon..."})]})]}),(0,l_.jsx)(x_,{})]})},T_=function(){var e=E((0,t.useState)(""),2),n=e[0],r=e[1],i=E((0,t.useState)(""),2),a=i[0],o=i[1],s=E((0,t.useState)(""),2),u=s[0],c=s[1],l=Fx(YE,"users"),f=ge(),h=function(){var e=Ue(Me().mark((function e(){var t,r;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Su($E,n,a);case 3:return t=e.sent,r=t.user,e.next=7,BE(Ux(l,r.uid),{email:r.email,user_id:r.uid,isAdmin:!1});case 7:f("/profile"),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(0),c("Whoops! Looks like either your email is incorrect or your\n\t\tpassword is not atleast 6 characters long. Give it another\n\t\ttry."),setTimeout((function(){c("")}),7e3);case 14:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(){return e.apply(this,arguments)}}(),d=function(){var e=Ue(Me().mark((function e(){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Cu($E,n,a);case 3:f("/profile"),e.next=10;break;case 6:e.prev=6,e.t0=e.catch(0),c("We dont know you yet. Sign-up so we can be friends!"),setTimeout((function(){c("")}),5e3);case 10:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}(),p=function(){var e=Ue(Me().mark((function e(){var t,n;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,xc($E,XE);case 3:return t=e.sent,n=t.user,e.next=7,BE(Ux(l,n.uid),{email:n.email,user_id:n.uid});case 7:f("/profile"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.error(e.t0.message);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(){return e.apply(this,arguments)}}(),v=function(){var e=Ue(Me().mark((function e(){return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Iu($E);case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error(e.t0.message);case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(){return e.apply(this,arguments)}}();return(0,l_.jsx)("div",{children:(0,l_.jsx)("div",{className:"card flex-shrink-0 w-full max-w-sm shadow-2xl bg-base-100",children:(0,l_.jsxs)("div",{className:"card-body",children:[(0,l_.jsxs)("div",{className:"form-control",children:[(0,l_.jsx)("label",{className:"label",children:(0,l_.jsx)("span",{className:"label-text ",children:"Email"})}),(0,l_.jsx)("input",{onChange:function(e){return r(e.target.value)},type:"text",placeholder:"email",className:"input input-bordered"})]}),(0,l_.jsxs)("div",{className:"form-control",children:[(0,l_.jsx)("label",{className:"label",children:(0,l_.jsx)("span",{className:"label-text",children:"Password"})}),(0,l_.jsx)("input",{onChange:function(e){return o(e.target.value)},type:"password",placeholder:"password",className:"input input-bordered"}),(0,l_.jsx)("label",{className:"label",children:(0,l_.jsx)("a",{href:"#",className:"label-text-alt link link-hover",children:"Forgot password?"})})]}),(0,l_.jsxs)("div",{className:" buttons-container",children:[(0,l_.jsx)("button",{onClick:d,className:"btn btn-secondary my-1",type:"button",children:"Login"}),(0,l_.jsx)("button",{onClick:h,className:"btn btn-primary my-1",type:"button",children:"Sign Up"}),(0,l_.jsx)("div",{onClick:p,className:"btn btn-outline google-sign my-1",children:"Sign in with Google"}),(0,l_.jsx)("div",{onClick:v,className:"btn btn-outline google-sign my-1",children:"Log Out"})]}),u&&(0,l_.jsx)("div",{className:"alert alert-error shadow-lg",children:(0,l_.jsxs)("div",{children:[(0,l_.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"stroke-current flex-shrink-0 h-6 w-6",fill:"none",viewBox:"0 0 24 24",children:(0,l_.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,l_.jsx)("span",{children:u})]})})]})})})},C_=n(764),I_="https://js.stripe.com/v3",N_=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,A_="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",R_=null,O_=function(e){return null!==R_||(R_=new Promise((function(t,n){if("undefined"!==typeof window&&"undefined"!==typeof document)if(window.Stripe&&e&&console.warn(A_),window.Stripe)t(window.Stripe);else try{var r=function(){for(var e=document.querySelectorAll('script[src^="'.concat(I_,'"]')),t=0;t<e.length;t++){var n=e[t];if(N_.test(n.src))return n}return null}();r&&e?console.warn(A_):r||(r=function(e){var t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",n=document.createElement("script");n.src="".concat(I_).concat(t);var r=document.head||document.body;if(!r)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return r.appendChild(n),n}(e)),r.addEventListener("load",(function(){window.Stripe?t(window.Stripe):n(new Error("Stripe.js not available"))})),r.addEventListener("error",(function(){n(new Error("Failed to load Stripe.js"))}))}catch(i){return void n(i)}else t(null)}))),R_},P_=Promise.resolve().then((function(){return O_(null)})),D_=!1;P_.catch((function(e){D_||console.warn(e)}));var L_=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];D_=!0;var r=Date.now();return P_.then((function(e){return function(e,t,n){if(null===e)return null;var r=e.apply(void 0,t);return function(e,t){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"2.2.0",startTime:t})}(r,n),r}(e,t,r)}))}("pk_live_51OGZQJHmtEmYyDRUh0VVIJxascH2yZEuMNlMoc10ixdsK4IdMVvqAEkqhngvVjCTV4c1ql0HLashI79FyBJ3Ghdh000A9rY3J8");var j_=function(){return(0,l_.jsx)(l_.Fragment,{children:(0,l_.jsxs)(C_.Elements,{stripe:L_,children:[(0,l_.jsx)(h_,{}),(0,l_.jsxs)(De,{children:[(0,l_.jsx)(Oe,{path:"/",element:(0,l_.jsx)(g_,{})}),(0,l_.jsx)(Oe,{path:"/event-details/:event_id",element:(0,l_.jsx)(v_,{})}),(0,l_.jsx)(Oe,{path:"/events",element:(0,l_.jsx)(k_,{})}),(0,l_.jsx)(Oe,{path:"/about",element:(0,l_.jsx)(w_,{})}),(0,l_.jsx)(Oe,{path:"/profile",element:(0,l_.jsx)(S_,{})}),(0,l_.jsx)(Oe,{path:"/login-signup",element:(0,l_.jsx)(T_,{})})]}),(0,l_.jsx)(p_,{})]})})},M_=function(e){e&&e instanceof Function&&n.e(787).then(n.bind(n,787)).then((function(t){var n=t.getCLS,r=t.getFID,i=t.getFCP,a=t.getLCP,o=t.getTTFB;n(e),r(e),i(e),a(e),o(e)}))};var F_=function(e){var n=e.children,r=E((0,t.useState)(null),2),i=r[0],a=r[1];return(0,t.useEffect)((function(){var e=$E.onAuthStateChanged(function(){var e=Ue(Me().mark((function e(t){var n,r;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=8;break}return n=Ux(YE,"users",t.uid),e.next=4,UE(n);case 4:(r=e.sent).exists()&&a(r.data()),e.next=9;break;case 8:a(null);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());return function(){return e()}}),[]),(0,l_.jsx)(GE.Provider,{value:{user:i,setUser:a},children:n})};r.createRoot(document.getElementById("root")).render((0,l_.jsx)(t.StrictMode,{children:(0,l_.jsx)(F_,{children:(0,l_.jsx)(qe,{children:(0,l_.jsx)(j_,{})})})})),M_()}()}();
//# sourceMappingURL=main.8b77f094.js.map