PageSourceSearch

https://anfin.vn/_next/static/chunks/pages/_app-aa7a2624796943be.js

js anfin.vn collected 2026-09-24 10:10:36 UTC 752,856 bytes, 2,911 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2888],{87574:function(e,t,n){"use strict";n.d(t,{Z:function(){return B}});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t;this._insertTag(((t=document.createElement("style")).setAttribute("data-emotion",this.key),void 0!==this.nonce&&t.setAttribute("nonce",this.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t))}var n=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(n);try{r.insertRule(e,r.cssRules.length)}catch(e){}}else n.appendChild(document.createTextNode(e));this.ctr++}
vendor: 4,543 bytes, line 1
1,t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),i=Math.abs,s=String.fromCharCode,o=Object.assign;function a(e,t,n){return e.replace(t,n)}function l(e,t){return e.indexOf(t)}function u(e,t){return 0|e.charCodeAt(t)}function c(e,t,n){return e.slice(t,n)}function h(e){return e.length}function d(e,t){return t.push(e),e}var f=1,p=1,m=0,g=0,v=0,y="";function b(e,t,n,r,i,s,o){return{value:e,root:t,parent:n,type:r,props:i,children:s,line:f,column:p,length:o,return:""}}function w(e,t){return o(b("",null,null,"",null,null,0),e,{length:-e.length},t)}function _(){return v=g<m?u(y,g++):0,p++,10===v&&(p=1,f++),v}function E(){return u(y,g)}function x(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function S(e){return f=p=1,m=h(y=e),g=0,[]}function k(e){var t,n;return(t=g-1,n=function e(t){for(;_();)switch(v){case t:return g;case 34:case 39:34!==t&&39!==t&&e(v);break;case 40:41===t&&e(t);break;case 92:_()}return g}(91===e?e+2:40===e?e+1:e),c(y,t,n)).trim()}var T="-ms-",I="-moz-",C="-webkit-",A="comm",O="rule",R="decl",P="@keyframes";function N(e,t){for(var n="",r=e.length,i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function D(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case R:return e.return=e.return||e.value;case A:return"";case P:return e.return=e.value+"{"+N(e.children,r)+"}";case O:e.value=e.props.join(",")}return h(n=N(e.children,r))?e.return=e.value+"{"+n+"}":""}function M(e,t,n,r,s,o,l,u,h,d,f){for(var p=s-1,m=0===s?o:[""],g=m.length,v=0,y=0,w=0;v<r;++v)for(var _=0,E=c(e,p+1,p=i(y=l[v])),x=e;_<g;++_)(x=(y>0?m[_]+" "+E:a(E,/&\f/g,m[_])).trim())&&(h[w++]=x);return b(e,t,n,0===s?O:u,h,d,f)}function L(e,t,n,r){return b(e,t,n,R,c(e,0,r),c(e,r+1,-1),r)}var Z=function(e,t,n){for(var r=0,i=0;r=i,i=E(),38===r&&12===i&&(t[n]=1),!x(i);)_();return c(y,e,g)},j=function(e,t){var n=-1,r=44;do switch(x(r)){case 0:38===r&&12===E()&&(t[n]=1),e[n]+=Z(g-1,t,n);break;case 2:e[n]+=k(r);break;case 4:if(44===r){e[++n]=58===E()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=s(r)}while(r=_());return e},F=function(e,t){var n;return n=j(S(e),t),y="",n},U=new WeakMap,V=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||U.get(n))&&!r){U.set(e,!0);for(var i=[],s=F(t,i),o=n.props,a=0,l=0;a<s.length;a++)for(var u=0;u<o.length;u++,l++)e.props[l]=i[a]?s[a].replace(/&\f/g,o[u]):o[u]+" "+s[a]}}},$=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}},z=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case R:e.return=function e(t,n){switch(45^u(t,0)?(((n<<2^u(t,0))<<2^u(t,1))<<2^u(t,2))<<2^u(t,3):0){case 5103:return C+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return C+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return C+t+I+t+T+t+t;case 6828:case 4268:return C+t+T+t+t;case 6165:return C+t+T+"flex-"+t+t;case 5187:return C+t+a(t,/(\w+).+(:[^]+)/,C+"box-$1$2"+T+"flex-$1$2")+t;case 5443:return C+t+T+"flex-item-"+a(t,/flex-|-self/,"")+t;case 4675:return C+t+T+"flex-line-pack"+a(t,/align-content|flex-|-self/,"")+t;case 5548:return C+t+T+a(t,"shrink","negative")+t;case 5292:return C+t+T+a(t,"basis","preferred-size")+t;case 6060:return C+"box-"+a(t,"-grow","")+C+t+T+a(t,"grow","positive")+t;case 4554:return C+a(t,/([^-])(transform)/g,"$1"+C+"$2")+t;case 6187:return a(a(a(t,/(zoom-|grab)/,C+"$1"),/(image-set)/,C+"$1"),t,"")+t;case 5495:case 3959:return a(t,/(image-set\([^]*)/,C+"$1$`$1");case 4968:return a(a(t,/(.+:)(flex-)?(.*)/,C+"box-pack:$3"+T+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+C+t+t;case 4095:case 3583:case 4068:case 2532:return a(t,/(.+)-inline(.+)/,C+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(h(t)-1-n>6)switch(u(t,n+1)){case 109:if(45!==u(t,n+4))break;case 102:return a(t,/(.+:)(.+)-([^]+)/,"$1"+C+"$2-$3$1"+I+(108==u(t,n+3)?"$3":"$2-$3"))+t;
1case 115:return~l(t,"stretch")?e(a(t,"stretch","fill-available"),n)+t:t}break;case 4949:if(115!==u(t,n+1))break;case 6444:switch(u(t,h(t)-3-(~l(t,"!important")&&10))){case 107:return a(t,":",":"+C)+t;case 101:return a(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+C+(45===u(t,14)?"inline-":"")+"box$3$1"+C+"$2$3$1"+T+"$2box$3")+t}break;case 5936:switch(u(t,n+11)){case 114:return C+t+T+a(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return C+t+T+a(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return C+t+T+a(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return C+t+T+t+t}return t}(e.value,e.length);break;case P:return N([w(e,{value:a(e.value,"@","@"+C)})],r);case O:if(e.length)return e.props.map(function(t){var n;switch(n=t,(n=/(::plac\w+|:read-\w+)/.exec(n))?n[0]:n){case":read-only":case":read-write":return N([w(e,{props:[a(t,/:(read-\w+)/,":"+I+"$1")]})],r);case"::placeholder":return N([w(e,{props:[a(t,/:(plac\w+)/,":"+C+"input-$1")]}),w(e,{props:[a(t,/:(plac\w+)/,":"+I+"$1")]}),w(e,{props:[a(t,/:(plac\w+)/,T+"input-$1")]})],r)}return""}).join("")}}],B=function(e){var t,n,i,o,m,w=e.key;if("css"===w){var T=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(T,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var I=e.stylisPlugins||z,C={},O=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+w+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)C[t[n]]=!0;O.push(e)});var R=(n=(t=[V,$].concat(I,[D,(i=function(e){m.insert(e)},function(e){!e.root&&(e=e.return)&&i(e)})])).length,function(e,r,i,s){for(var o="",a=0;a<n;a++)o+=t[a](e,r,i,s)||"";return o}),P=function(e){var t,n;return N((n=function e(t,n,r,i,o,m,w,S,T){for(var I,C=0,O=0,R=w,P=0,N=0,D=0,Z=1,j=1,F=1,U=0,V="",$=o,z=m,B=i,q=V;j;)switch(D=U,U=_()){case 40:if(108!=D&&58==u(q,R-1)){-1!=l(q+=a(k(U),"&","&\f"),"&\f")&&(F=-1);break}case 34:case 39:case 91:q+=k(U);break;case 9:case 10:case 13:case 32:q+=function(e){for(;v=E();)if(v<33)_();else break;return x(e)>2||x(v)>3?"":" "}(D);break;case 92:q+=function(e,t){for(var n;--t&&_()&&!(v<48)&&!(v>102)&&(!(v>57)||!(v<65))&&(!(v>70)||!(v<97)););return n=g+(t<6&&32==E()&&32==_()),c(y,e,n)}(g-1,7);continue;case 47:switch(E()){case 42:case 47:d(b(I=function(e,t){for(;_();)if(e+v===57)break;else if(e+v===84&&47===E())break;return"/*"+c(y,t,g-1)+"*"+s(47===e?e:_())}(_(),g),n,r,A,s(v),c(I,2,-2),0),T);break;default:q+="/"}break;case 123*Z:S[C++]=h(q)*F;case 125*Z:case 59:case 0:switch(U){case 0:case 125:j=0;case 59+O:-1==F&&(q=a(q,/\f/g,"")),N>0&&h(q)-R&&d(N>32?L(q+";",i,r,R-1):L(a(q," ","")+";",i,r,R-2),T);break;case 59:q+=";";default:if(d(B=M(q,n,r,C,O,o,S,V,$=[],z=[],R),m),123===U){if(0===O)e(q,n,B,B,$,m,R,S,z);else switch(99===P&&110===u(q,3)?100:P){case 100:case 108:case 109:case 115:e(t,B,B,i&&d(M(t,B,B,0,0,o,S,V,o,$=[],R),z),o,z,R,S,i?$:z);break;default:e(q,B,B,B,[""],z,0,S,z)}}}C=O=N=0,Z=F=1,V=q="",R=w;break;case 58:R=1+h(q),N=D;default:if(Z<1){if(123==U)--Z;else if(125==U&&0==Z++&&125==(v=g>0?u(y,--g):0,p--,10===v&&(p=1,f--),v))continue}switch(q+=s(U),U*Z){case 38:F=O>0?1:(q+="\f",-1);break;case 44:S[C++]=(h(q)-1)*F,F=1;break;case 64:45===E()&&(q+=k(_())),P=E(),O=R=h(V=q+=function(e){for(;!x(E());)_();return c(y,e,g)}(g)),U++;break;case 45:45===D&&2==h(q)&&(Z=0)}}return m}("",null,null,null,[""],t=S(t=e),0,[0],t),y="",n),R)},Z={key:w,sheet:new r({key:w,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:C,registered:{},insert:function(e,t,n,r){m=n,P(e?e+"{"+t.styles+"}":t.styles),r&&(Z.inserted[t.name]=!0)}};return Z.sheet.hydrate(O),Z}},45042:function(e,t,n){"use strict";function r(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}n.d(t,{Z:function(){return r}})},87685:function(e,t,n){"use strict";n.d(t,{C:function(){return u},E:function(){return g},T:function(){return h},c:function(){return p},h:function(){return d},w:function(){return c}});var r=n(67294),i=n(87574),s=n(70444),o=n(17872),a=n(27278),l=r.createContext("undefined"!=typeof HTMLElement?(0,i.Z)({key:"css"}):null),u=l.Provider,c=function(e){return(0,r.forwardRef)(function(t,n){return e(t,(0,r.useContext)(l),n)})},h=r.createContext({}),d={}.hasOwnProperty,f="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",p=function(e,t){var n={};for(var r in t)d.call(t,r)&&(n[r]=t[r]);return n[f]=e,n},m=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,s.hC)(t,n,r),(0,a.L)(function(){return(0,s.My)(t,n,r)}),null},g=c(function(e,t,n){var i=e.css;"string"==typeof i&&void 0!==t.registered[i]&&(i=t.registered[i]);var a=e[f],l=[i],u="";"string"==typeof e.className?u=(0,s.fp)(t.registered,l,e.className):null!=e.className&&(u=e.className+" ");var c=(0,o.O)(l,void 0,r.useContext(h));u+=t.key+"-"+c.name;var p={};for(var g in e)d.call(e,g)&&"css"!==g&&g!==f&&(p[g]=e[g]);return p.className=u,n&&(p.ref=n),r.createElement(r.Fragment,null,r.createElement(m,{cache:t,serialized:c,isStringTag:"string"==typeof a}),r.createElement(a,p))})},70917:function(e,t,n){"use strict";n.d(t,{F4:function(){return f},iv:function(){return d},xB:function(){return h}});var r,i,s=n(87685),o=n(67294),a=n(70444),l=n(27278),u=n(17872);n(87574),n(8679);var c=function(e,t){var n=arguments;if(null==t||!s.h.call(t,"css"))return o.createElement.apply(void 0,n);var r=n.length,i=Array(r);i[0]=s.E,i[1]=(0,s.c)(e,t);for(var a=2;a<r;a++)i[a]=n[a];return o.createElement.apply(null,i)};r=c||(c={}),i||(i=r.JSX||(r.JSX={}));var h=(0,s.w)(function(e,t){var n=e.styles,r=(0,u.O)([n],void 0,o.useContext(s.T)),i=o.useRef();return(0,l.j)(function(){var e=t.key+"-global",n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),s=!1,o=document.querySelector('style[data-emotion="'+e+" "+r.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==o&&(s=!0,o.setAttribute("data-emotion",e),n.hydrate([o])),i.current=[n,s],function(){n.flush()}},[t]),(0,l.j)(function(){var e=i.current,n=e[0];if(e[1]){e[1]=!1;return}if(void 0!==r.next&&(0,a.My)(t,r.next,!0),n.tags.length){var s=n.tags[n.tags.length-1].nextElementSibling;n.before=s,n.flush()}t.insert("",r,n,!1)},[t,r.name]),null});function d(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,u.O)(t)}function f(){var e=d.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}},17872:function(e,t,n){"use strict";n.d(t,{O:function(){return p}});var r,i={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGr
1idRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},s=n(45042),o=/[A-Z]|^ms/g,a=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(e){return 45===e.charCodeAt(1)},u=function(e){return null!=e&&"boolean"!=typeof e},c=(0,s.Z)(function(e){return l(e)?e:e.replace(o,"-$&").toLowerCase()}),h=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(a,function(e,t,n){return r={name:t,styles:n,next:r},t})}return 1===i[e]||l(e)||"number"!=typeof t||0===t?t:t+"px"};function d(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return r={name:n.name,styles:n.styles,next:r},n.name;if(void 0!==n.styles){var i=n.next;if(void 0!==i)for(;void 0!==i;)r={name:i.name,styles:i.styles,next:r},i=i.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=d(e,t,n[i])+";";else for(var s in n){var o=n[s];if("object"!=typeof o)null!=t&&void 0!==t[o]?r+=s+"{"+t[o]+"}":u(o)&&(r+=c(s)+":"+h(s,o)+";");else if(Array.isArray(o)&&"string"==typeof o[0]&&(null==t||void 0===t[o[0]]))for(var a=0;a<o.length;a++)u(o[a])&&(r+=c(s)+":"+h(s,o[a])+";");else{var l=d(e,t,o);switch(s){case"animation":case"animationName":r+=c(s)+":"+l+";";break;default:r+=s+"{"+l+"}"}}}return r}(e,t,n);case"function":if(void 0!==e){var s=r,o=n(e);return r=s,d(e,t,o)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var f=/label:\s*([^\s;{]+)\s*(;|$)/g;function p(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var i,s=!0,o="";r=void 0;var a=e[0];null==a||void 0===a.raw?(s=!1,o+=d(n,t,a)):o+=a[0];for(var l=1;l<e.length;l++)o+=d(n,t,e[l]),s&&(o+=a[l]);f.lastIndex=0;for(var u="";null!==(i=f.exec(o));)u+="-"+i[1];return{name:function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))*1540483477+((t>>>16)*59797<<16),t^=t>>>24,n=(65535&t)*1540483477+((t>>>16)*59797<<16)^(65535&n)*1540483477+((n>>>16)*59797<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n^=255&e.charCodeAt(r),n=(65535&n)*1540483477+((n>>>16)*59797<<16)}return n^=n>>>13,(((n=(65535&n)*1540483477+((n>>>16)*59797<<16))^n>>>15)>>>0).toString(36)}(o)+u,styles:o,next:r}}},98604:function(e,t,n){"use strict";n.d(t,{Z:function(){return k}});var r,i=n(87462),s=n(87685),o={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},a=n(45042),l=/[A-Z]|^ms/g,u=/_EMO_([^_]+?)_([^]*?)_EMO_/g,c=function(e){return 45===e.charCodeAt(1)},h=function(e){return null!=e&&"boolean"!=typeof e},d=(0,a.Z)(function(e){return c(e)?e:e.replace(l,"-$&").toLowerCase()}),f=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(u,function(e,t,n){return r={name:t,styles:n,next:r},t})}return 1===o[e]||c(e)||"number"!=typeof t||0===t?t:t+"px"};function p(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return r={name:n.name,styles:n.styles,next:r},n.name;if(void 0!==n.styles){var i=n.next;if(void 0!==i)for(;void 0!==i;)r={name:i.name,styles:i.styles,next:r},i=i.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=p(e,t,n[i])+";";else for(var s in n){var o=n[s];if("object"!=typeof o)null!=t&&void 0!==t[o]?r+=s+"{"+t[o]+"}":h(o)&&(r+=d(s)+":"+f(s,o)+";");else if(Array.isArray(o)&&"string"==typeof o[0]&&(null==t||void 0===t[o[0]]))for(var a=0;a<o.length;a++)h(o[a])&&(r+=d(s)+":"+f(s,o[a])+";");else{var l=p(e,t,o);switch(s){case"animation":case"animationName":r+=d(s)+":"+l+";";break;default:r+=s+"{"+l+"}"}}}return r}(e,t,n);case"function":if(void 0!==e){var s=r,o=n(e);return r=s,p(e,t,o)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var m=/label:\s*([^\s;{]+)\s*(;|$)/g,g=n(27278),v=n(70444),y=n(67294),b=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInl
1ine|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,w=(0,a.Z)(function(e){return b.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&91>e.charCodeAt(2)}),_=function(e){return"theme"!==e},E=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?w:_},x=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},S=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,v.hC)(t,n,r),(0,g.L)(function(){return(0,v.My)(t,n,r)}),null},k=(function e(t,n){var o,a,l=t.__emotion_real===t,u=l&&t.__emotion_base||t;void 0!==n&&(o=n.label,a=n.target);
1var c=x(t,n,l),h=c||E(u),d=!h("as");return function(){var f=arguments,g=l&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==o&&g.push("label:"+o+";"),null==f[0]||void 0===f[0].raw)g.push.apply(g,f);else{var b=f[0];g.push(b[0]);for(var w=f.length,_=1;_<w;_++)g.push(f[_],b[_])}var k=(0,s.w)(function(e,t,n){var i=d&&e.as||u,o="",l=[],f=e;if(null==e.theme){for(var b in f={},e)f[b]=e[b];f.theme=y.useContext(s.T)}"string"==typeof e.className?o=(0,v.fp)(t.registered,l,e.className):null!=e.className&&(o=e.className+" ");var w=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var i,s=!0,o="";r=void 0;var a=e[0];null==a||void 0===a.raw?(s=!1,o+=p(n,t,a)):o+=a[0];for(var l=1;l<e.length;l++)o+=p(n,t,e[l]),s&&(o+=a[l]);m.lastIndex=0;for(var u="";null!==(i=m.exec(o));)u+="-"+i[1];return{name:function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))*1540483477+((t>>>16)*59797<<16),t^=t>>>24,n=(65535&t)*1540483477+((t>>>16)*59797<<16)^(65535&n)*1540483477+((n>>>16)*59797<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n^=255&e.charCodeAt(r),n=(65535&n)*1540483477+((n>>>16)*59797<<16)}return n^=n>>>13,(((n=(65535&n)*1540483477+((n>>>16)*59797<<16))^n>>>15)>>>0).toString(36)}(o)+u,styles:o,next:r}}(g.concat(l),t.registered,f);o+=t.key+"-"+w.name,void 0!==a&&(o+=" "+a);var _=d&&void 0===c?E(i):h,x={};for(var k in e)(!d||"as"!==k)&&_(k)&&(x[k]=e[k]);return x.className=o,n&&(x.ref=n),y.createElement(y.Fragment,null,y.createElement(S,{cache:t,serialized:w,isStringTag:"string"==typeof i}),y.createElement(i,x))});return k.displayName=void 0!==o?o:"Styled("+("string"==typeof u?u:u.displayName||u.name||"Component")+")",k.defaultProps=t.defaultProps,k.__emotion_real=k,k.__emotion_base=u,k.__emotion_styles=g,k.__emotion_forwardProp=c,Object.defineProperty(k,"toString",{value:function(){return"."+a}}),k.withComponent=function(t,r){return e(t,(0,i.Z)({},n,r,{shouldForwardProp:x(k,r,!0)})).apply(void 0,g)},k}}).bind(null);["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){k[e]=k(e)})},27278:function(e,t,n){"use strict";n.d(t,{L:function(){return o},j:function(){return a}});var r,i=n(67294),s=!!(r||(r=n.t(i,2))).useInsertionEffect&&(r||(r=n.t(i,2))).useInsertionEffect,o=s||function(e){return e()},a=s||i.useLayoutEffect},70444:function(e,t,n){"use strict";function r(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}n.d(t,{My:function(){return s},fp:function(){return r},hC:function(){return i}});var i=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},s=function(e,t,n){i(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var s=t;do e.insert(t===s?"."+r:"",s,e.sheet,!0),s=s.next;while(void 0!==s)}}},74444:function(e,t,n){"use strict";n.d(t,{BH:function(){return b},L:function(){return u},LL:function(){return O},P0:function(){return g},Pz:function(){return y},Sg:function(){return w},UG:function(){return x},ZR:function(){return A},aH:function(){return v},b$:function(){return k},eu:function(){return C},hl:function(){return I},m9:function(){return U},ne:function(){return Z},pd:function(){return L},q4:function(){return m},ru:function(){return S},tV:function(){return c},uI:function(){return E},vZ:function(){return function e(t,n){if(t===n)return!0;let r=Object.keys(t),i=Object.keys(n);for(let s of r){if(!i.includes(s))return!1;let r=t[s],o=n[s];if(N(r)&&N(o)){if(!e(r,o))return!1}else if(r!==o)return!1}for(let e of i)if(!r.includes(e))return!1;return!0}},w1:function(){return T},xO:function(){return D},xb:function(){return P},z$:function(){return _},zd:function(){return M}});var r=n(34155);/**
2 * @license
3 * Copyright 2017 Google LLC
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 *   http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */let i=function(e){let t=[],n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):(64512&i)==55296&&r+1<e.length&&(64512&e.charCodeAt(r+1))==56320?(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},s=function(e){let t=[],n=0,r=0;for(;n<e.length;){let i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){let s=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&s)}else if(i>239&&i<365){let s=e[n++],o=e[n++],a=e[n++],l=((7&i)<<18|(63&s)<<12|(63&o)<<6|63&a)-65536;t[r++]=String.fromCharCode(55296+(l>>10)),t[r++]=String.fromCharCode(56320+(1023&l))}else{let s=e[n++],o=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&s)<<6|63&o)}}return t.join("")},o={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();let n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let t=0;t<e.length;t+=3){let i=e[t],s=t+1<e.length,o=s?e[t+1]:0,a=t+2<e.length,l=a?e[t+2]:0,u=i>>2,c=(3&i)<<4|o>>4,h=(15&o)<<2|l>>6,d=63&l;a||(d=64,s||(h=64)),r.push(n[u],n[c],n[h],n[d])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(i(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):s(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();let n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let t=0;t<e.length;){let i=n[e.charAt(t++)],s=t<e.length,o=s?n[e.charAt(t)]:0;++t;let l=t<e.length,u=l?n[e.charAt(t)]:64;++t;let c=t<e.length,h=c?n[e.charAt(t)]:64;if(++t,null==i||null==o||null==u||null==h)throw new a;let d=i<<2|o>>4;if(r.push(d),64!==u){let e=o<<4&240|u>>2;if(r.push(e),64!==h){let e=u<<6&192|h;r.push(e)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.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)}}};class a extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}let l=function(e){let t=i(e);return o.encodeByteArray(t,!0)},u=function(e){return l(e).replace(/\./g,"")},c=function(e){try{return o.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null},h=()=>/**
17 * @license
18 * Copyright 2022 Google LLC
19 *
20 * Licensed under the Apache License, Version 2.0 (the "License");
21 * you may not use this file except in compliance with the License.
22 * You may obtain a copy of the License at
23 *
24 *   http://www.apache.org/licenses/LICENSE-2.0
25 *
26 * Unless required by applicable law or agreed to in writing, software
27 * distributed under the License is distributed on an "AS IS" BASIS,
28 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 * See the License for the specific language governing permissions and
30 * limitations under the License.
31 */(function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw Error("Unable to locate global object.")})().__FIREBASE_DEFAULTS__,d=()=>
31{if(void 0===r||void 0===r.env)return;let e=r.env.__FIREBASE_DEFAULTS__;if(e)return JSON.parse(e)},f=()=>{let e;if("undefined"==typeof document)return;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(e){return}let t=e&&c(e[1]);return t&&JSON.parse(t)},p=()=>{try{return h()||d()||f()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},m=e=>{var t,n;return null===(n=null===(t=p())||void 0===t?void 0:t.emulatorHosts)||void 0===n?void 0:n[e]},g=e=>{let t=m(e);if(!t)return;let n=t.lastIndexOf(":");if(n<=0||n+1===t.length)throw Error(`Invalid host ${t} with no separate hostname and port!`);let r=parseInt(t.substring(n+1),10);return"["===t[0]?[t.substring(1,n-1),r]:[t.substring(0,n),r]},v=()=>{var e;return null===(e=p())||void 0===e?void 0:e.config},y=e=>{var t;return null===(t=p())||void 0===t?void 0:t[`_${e}`]};/**
32 * @license
33 * Copyright 2017 Google LLC
34 *
35 * Licensed under the Apache License, Version 2.0 (the "License");
36 * you may not use this file except in compliance with the License.
37 * You may obtain a copy of the License at
38 *
39 *   http://www.apache.org/licenses/LICENSE-2.0
40 *
41 * Unless required by applicable law or agreed to in writing, software
42 * distributed under the License is distributed on an "AS IS" BASIS,
43 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
44 * See the License for the specific language governing permissions and
45 * limitations under the License.
46 */class b{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}wrapCallback(e){return(t,n)=>{t?this.reject(t):this.resolve(n),"function"==typeof e&&(this.promise.catch(()=>{}),1===e.length?e(t):e(t,n))}}}/**
47 * @license
48 * Copyright 2021 Google LLC
49 *
50 * Licensed under the Apache License, Version 2.0 (the "License");
51 * you may not use this file except in compliance with the License.
52 * You may obtain a copy of the License at
53 *
54 *   http://www.apache.org/licenses/LICENSE-2.0
55 *
56 * Unless required by applicable law or agreed to in writing, software
57 * distributed under the License is distributed on an "AS IS" BASIS,
58 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
59 * See the License for the specific language governing permissions and
60 * limitations under the License.
61 */function w(e,t){if(e.uid)throw Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');let n=t||"demo-project",r=e.iat||0,i=e.sub||e.user_id;if(!i)throw Error("mockUserToken must contain 'sub' or 'user_id' field!");let s=Object.assign({iss:`https://securetoken.google.com/${n}`,aud:n,iat:r,exp:r+3600,auth_time:r,sub:i,user_id:i,firebase:{sign_in_provider:"custom",identities:{}}},e);return[u(JSON.stringify({alg:"none",type:"JWT"})),u(JSON.stringify(s)),""].join(".")}/**
62 * @license
63 * Copyright 2017 Google LLC
64 *
65 * Licensed under the Apache License, Version 2.0 (the "License");
66 * you may not use this file except in compliance with the License.
67 * You may obtain a copy of the License at
68 *
69 *   http://www.apache.org/licenses/LICENSE-2.0
70 *
71 * Unless required by applicable law or agreed to in writing, software
72 * distributed under the License is distributed on an "AS IS" BASIS,
73 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
74 * See the License for the specific language governing permissions and
75 * limitations under the License.
76 */function _(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function E(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(_())}function x(){var e;let t=null===(e=p())||void 0===e?void 0:e.forceEnvironment;if("node"===t)return!0;if("browser"===t)return!1;try{return"[object process]"===Object.prototype.toString.call(n.g.process)}catch(e){return!1}}function S(){let e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id}function k(){return"object"==typeof navigator&&"ReactNative"===navigator.product}function T(){let e=_();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function I(){try{return"object"==typeof indexedDB}catch(e){return!1}}function C(){return new Promise((e,t)=>
76{try{let n=!0,r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(e){t(e)}})}class A extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,A.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,O.prototype.create)}}class O{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){let n=t[0]||{},r=`${this.service}/${e}`,i=this.errors[e],s=i?i.replace(R,(e,t)=>{let r=n[t];return null!=r?String(r):`<${t}?>`}):"Error",o=`${this.serviceName}: ${s} (${r}).`,a=new A(r,o,n);return a}}let R=/\{\$([^}]+)}/g;function P(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function N(e){return null!==e&&"object"==typeof e}/**
77 * @license
78 * Copyright 2017 Google LLC
79 *
80 * Licensed under the Apache License, Version 2.0 (the "License");
81 * you may not use this file except in compliance with the License.
82 * You may obtain a copy of the License at
83 *
84 *   http://www.apache.org/licenses/LICENSE-2.0
85 *
86 * Unless required by applicable law or agreed to in writing, software
87 * distributed under the License is distributed on an "AS IS" BASIS,
88 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
89 * See the License for the specific language governing permissions and
90 * limitations under the License.
91 */function D(e){let t=[];for(let[n,r]of Object.entries(e))Array.isArray(r)?r.forEach(e=>{t.push(encodeURIComponent(n)+"="+encodeURIComponent(e))}):t.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return t.length?"&"+t.join("&"):""}function M(e){let t={},n=e.replace(/^\?/,"").split("&");return n.forEach(e=>{if(e){let[n,r]=e.split("=");
91t[decodeURIComponent(n)]=decodeURIComponent(r)}}),t}function L(e){let t=e.indexOf("?");if(!t)return"";let n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)}function Z(e,t){let n=new j(e,t);return n.subscribe.bind(n)}class j{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(()=>{e(this)}).catch(e=>{this.error(e)})}next(e){this.forEachObserver(t=>{t.next(e)})}error(e){this.forEachObserver(t=>{t.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,t,n){let r;if(void 0===e&&void 0===t&&void 0===n)throw Error("Missing Observer.");void 0===(r=!function(e,t){if("object"!=typeof e||null===e)return!1;for(let n of t)if(n in e&&"function"==typeof e[n])return!0;return!1}(e,["next","error","complete"])?{next:e,error:t,complete:n}:e).next&&(r.next=F),void 0===r.error&&(r.error=F),void 0===r.complete&&(r.complete=F);let i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch(e){}}),this.observers.push(r),i}unsubscribeOne(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let t=0;t<this.observers.length;t++)this.sendOne(t,e)}sendOne(e,t){this.task.then(()=>{if(void 0!==this.observers&&void 0!==this.observers[e])try{t(this.observers[e])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}})}close(e){this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function F(){}/**
92 * @license
93 * Copyright 2021 Google LLC
94 *
95 * Licensed under the Apache License, Version 2.0 (the "License");
96 * you may not use this file except in compliance with the License.
97 * You may obtain a copy of the License at
98 *
99 *   http://www.apache.org/licenses/LICENSE-2.0
100 *
101 * Unless required by applicable law or agreed to in writing, software
102 * distributed under the License is distributed on an "AS IS" BASIS,
103 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
104 * See the License for the specific language governing permissions and
105 * limitations under the License.
106 */function U(e){return e&&e._delegate?e._delegate:e}},21269:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var i=r(n(64938)),s=n(85893);t.Z=(0,i.default)((0,s.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8m-.22-13h-.06c-.4 0-.72.32-.72.72v4.72c0 .35.18.68.49.86l4.15 2.49c.34.2.78.1.98-.24.21-.34.1-.79-.25-.99l-3.87-2.3V7.72c0-.4-.32-.72-.72-.72"}),"AccessTimeRounded")},51257:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var i=r(n(64938)),s=n(85893);t.Z=(0,i.default)((0,s.jsx)("path",{d:"m19.23 15.26-2.54-.29c-.61-.07-1.21.14-1.64.57l-1.84 1.84c-2.83-1.44-5.15-3.75-6.59-6.59l1.85-1.85c.43-.43.64-1.03.57-1.64l-.29-2.52c-.12-1.01-.97-1.77-1.99-1.77H5.03c-1.13 0-2.07.94-2 2.07.53 8.54 7.36 15.36 15.89 15.89 1.13.07 2.07-.87 2.07-2v-1.73c.01-1.01-.75-1.86-1.76-1.98"}),"LocalPhoneRounded")},51803:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var i=r(n(64938)),s=n(85893);t.Z=(0,i.default)((0,s.jsx)("path",{d:"M12 2c-4.2 0-8 3.22-8 8.2 0 3.18 2.45 6.92 7.34 11.23.38.33.95.33 1.33 0C17.55 17.12 20 13.38 20 10.2 20 5.22 16.2 2 12 2m0 10c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"}),"LocationOnRounded")},56840:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var i=r(n(64938)),s=n(85893);t.Z=(0,i.default)((0,s.jsx)("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m-1 14H5c-.55 0-1-.45-1-1V8l6.94 4.34c.65.41 1.47.41 2.12 0L20 8v9c0 .55-.45 1-1 1m-7-7L4 6h16z"}),"MailOutlineRounded")},64938:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r.createSvgIcon}});var r=n(12842)},42293:function(e,t,n){"use strict";n.d(t,{Z:function(){return _}});var r=n(63366),i=n(87462),s=n(67294),o=n(90512),a=n(94780),l=n(90948),u=n(28628),c=n(98216),h=n(90629),d=n(1588),f=n(34867);function p(e){return(0,f.ZP)("MuiAppBar",e)}(0,d.Z)("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);var m=n(85893);let g=["className","color","enableColorOnDark","position"],v=e=>{let{color:t,position:n,classes:r}=e,i={root:["root",`color${(0,c.Z)(t)}`,`position${(0,c.Z)(n)}`]};return(0,a.Z)(i,p,r)},y=(e,t)=>e?`${null==e?void 0:e.replace(")","")}, ${t})`:t,b=(0,l.ZP)(h.Z,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`position${(0,c.Z)(n.position)}`],t[`color${(0,c.Z)(n.color)}`]]}})(({theme:e,ownerState:t})=>{let n="light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[900];return(0,i.Z)({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},"fixed"===t.position&&{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},"absolute"===t.position&&{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},"sticky"===t.position&&{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},"static"===t.position&&{position:"static"},"relative"===t.position&&{position:"relative"},!e.vars&&(0,i.Z)({},"default"===t.color&&{backgroundColor:n,color:e.palette.getContrastText(n)},t.color&&"default"!==t.color&&"inherit"!==t.color&&"transparent"!==t.color&&{backgroundColor:e.palette[t.color].main,color:e.palette[t.color].contrastText},"inherit"===t.color&&{color:"inherit"},"dark"===e.palette.mode&&!t.enableColorOnDark&&{backgroundColor:null,color:null},"transparent"===t.color&&(0,i.Z)({backgroundColor:"transparent",color:"inherit"},"dark"===e.palette.mode&&{backgroundImage:"none"})),e.vars&&(0,i.Z)({},"default"===t.color&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette.AppBar.defaultBg:y(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:y(e.vars.palette.AppBar.darkColor,e.vars.palette.text.primary)},t.color&&!t.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette[t.color].main:y(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:y(e.vars.palette.AppBar.darkColor,e.vars.palette[t.color].contrastText)},!["inherit","transparent"].includes(t.color)&&{backgroundColor:"var(--AppBar-background)"},{color:"inherit"===t.color?"inherit":"var(--AppBar-color)"},"transparent"===t.color&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),w=s.forwardRef(function(e,t){let n=(0,u.i)({props:e,name:"MuiAppBar"}),{className:s,color:a="primary",enableColorOnDark:l=!1,position:c="fixed"}=n,h=(0,r.Z)(n,g),d=(0,i.Z)({},n,{color:a,position:c,enableColorOnDark:l}),f=v(d);return(0,m.jsx)(b,(0,i.Z)({square:!0,component:"header",ownerState:d,elevation:4,className:(0,o.Z)(f.root,s,"fixed"===c&&"mui-fixed"),ref:t},h))});var _=w},80822:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(61354),i=n(37078),s=n(20041),o=n(10606),a=n(1588);let l=(0,a.Z)("MuiBox",["root"]),u=(0,s.Z)(),c=(0,r.Z)({themeId:o.Z,defaultTheme:u,defaultClassName:l.root,generateClassName:i.Z.generate});var h=c},69417:function(e,t,n){"use strict";n.d(t,{Z:function(){return A}});var r=n(63366),i=n(87462),s=n(67294),o=n(90512),a=n(35971),l=n(94780),u=n(2101),c=n(90948),h=n(14136),d=n(28628),f=n(49990),p=n(98216),m=n(1588),g=n(34867);function v(e){return(0,g.ZP)("MuiButton",e)}let y=(0,m.Z)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),b=s.createContext({}),w=s.createContext(void 0);var _=n(85893);let E=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],x=e=>{let{color:t,disableElevation:n,fullWidth:r,size:s,variant:o,classes:a}=e,u={root:["root",o,`${o}${(0,p.Z)(t)}`,`size${(0,p.Z)(s)}`,`${o}Size${(0,p.Z)(s)}`,`color${(0,p.Z)(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${(0,p.Z)(s)}`],endIcon:["icon","endIcon",`iconSize${(0,p.Z)(s)}`]},c=(0,l.Z)(u,v,a);return(0,i.Z)({},a,c)},S=e=>(0,i.Z)({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),k=(0,c.ZP)(f.Z,{shouldForwardProp:e=>(0,h.Z)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${(0,p.Z)(n.color)}`],t[`size${(0,p.Z)(n.size)}`],t[`${n.variant}Size${(0,p.Z)(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;let s="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],o="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return(0,i.Z)({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":(0,i.Z)({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,u.Fq)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===t.variant&&"inherit"!==t.color&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainCh
106annel} / ${e.vars.palette.action.hoverOpacity})`:(0,u.Fq)(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===t.variant&&"inherit"!==t.color&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,u.Fq)(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===t.variant&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:o,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},"contained"===t.variant&&"inherit"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":(0,i.Z)({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${y.focusVisible}`]:(0,i.Z)({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${y.disabled}`]:(0,i.Z)({color:(e.vars||e).palette.action.disabled},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"contained"===t.variant&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},"text"===t.variant&&{padding:"6px 8px"},"text"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main},"outlined"===t.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${(0,u.Fq)(e.palette[t.color].main,.5)}`},"contained"===t.variant&&{color:e.vars?e.vars.palette.text.primary:null==(n=(r=e.palette).getContrastText)?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:s,boxShadow:(e.vars||e).shadows[2]},"contained"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},"inherit"===t.color&&{color:"inherit",borderColor:"currentColor"},"small"===t.size&&"text"===t.variant&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"text"===t.variant&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"outlined"===t.variant&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"outlined"===t.variant&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"contained"===t.variant&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"contained"===t.variant&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${y.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${y.disabled}`]:{boxShadow:"none"}}),T=(0,c.ZP)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,t[`iconSize${(0,p.Z)(n.size)}`]]}})(({ownerState:e})=>(0,i.Z)({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},S(e))),I=(0,c.ZP)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.endIcon,t[`iconSize${(0,p.Z)(n.size)}`]]}})(({ownerState:e})=>(0,i.Z)({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},S(e))),C=s.forwardRef(function(e,t){let n=s.useContext(b),l=s.useContext(w),u=(0,a.Z)(n,e),c=(0,d.i)({props:u,name:"MuiButton"}),{children:h,color:f="primary",component:p="button",className:m,disabled:g=!1,disableElevation:v=!1,disableFocusRipple:y=!1,endIcon:S,focusVisibleClassName:C,fullWidth:A=!1,size:O="medium",startIcon:R,type:P,variant:N="text"}=c,D=(0,r.Z)(c,E),M=(0,i.Z)({},c,{color:f,component:p,disabled:g,disableElevation:v,disableFocusRipple:y,fullWidth:A,size:O,type:P,variant:N}),L=x(M),Z=R&&(0,_.jsx)(T,{className:L.startIcon,ownerState:M,children:R}),j=S&&(0,_.jsx)(I,{className:L.endIcon,ownerState:M,children:S});return(0,_.jsxs)(k,(0,i.Z)({ownerState:M,className:(0,o.Z)(n.className,L.root,m,l||""),component:p,disabled:g,focusRipple:!y,focusVisibleClassName:(0,o.Z)(L.focusVisible,C),ref:t,type:P},D,{classes:L,children:[Z,h,j]}))});var A=C},49990:function(e,t,n){"use strict";let r,i,s,o;n.d(t,{Z:function(){return Z}});var a=n(87462),l=n(63366),u=n(67294),c=n(90512),h=n(94780),d=n(90948),f=n(28628),p=n(51705),m=n(2068),g=n(77760),v=n(89747),y=n(70917),b=n(46271),w=n(85893),_=n(1588);let E=(0,_.Z)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),x=["center","classes","className"],S=(0,y.F4)(r||(r=(e=>e)`
107  0% {
108    transform: scale(0);
109    opacity: 0.1;
110  }
111
112  100% {
113    transform: scale(1);
114    opacity: 0.3;
115  }
116`)),k=(0,y.F4)(i||(i=(e=>e)`
117  0% {
118    opacity: 1;
119  }
120
121  100% {
122    opacity: 0;
123  }
124`)),T=(0,y.F4)(s||(s=(e=>e)`
125  0% {
126    transform: scale(1);
127  }
128
129  50% {
130    transform: scale(0.92);
131  }
132
133  100% {
134    transform: scale(1);
135  }
136`)),I=(0,d.ZP)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),C=(0,d.ZP)(function(e){let{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:s,rippleSize:o,in:a,onExited:l,timeout:h}=e,[d,f]=u.useState(!1),p=(0,c.Z)(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),m=(0,c.Z)(n.child,d&&n.childLeaving,r&&n.childPulsate);return a||d||f(!0),u.useEffect(()=>{if(!a&&null!=l){let e=setTimeout(l,h);return()=>{clearTimeout(e)}}},[l,a,h]),(0,w.jsx)("span",{className:p,style:{width:o,height:o,top:-(o/2)+s,left:-(o/2)+i},children:(0,w.jsx)("span",{className:m})})},{name:"MuiTouchRipple",slot:"Ripple"})(o||(o=(e=>e)`
137  opacity: 0;
138  position: absolute;
139
140  &.${0} {
141    opacity: 0.3;
142    transform: scale(1);
143    animation-name: ${0};
144    animation-duration: ${0}ms;
145    animation-timing-function: ${0};
146  }
147
148  &.${0} {
149    animation-duration: ${0}ms;
150  }
151
152  & .${0} {
153    opacity: 1;
154    display: block;
155    width: 100%;
156    height: 100%;
157    border-radius: 50%;
158    background-color: currentColor;
159  }
160
161  & .${0} {
162    opacity: 0;
163    animation-name: ${0};
164    animation-duration: ${0}ms;
165    animation-timing-function: ${0};
166  }
167
168  & .${0} {
169    position: absolute;
170    /* @noflip */
171    left: 0px;
172    top: 0;
173    animation-name: ${0};
174    animation-duration: 2500ms;
175    animation-timing-function: ${0};
176    animation-iteration-count: infinite;
177    animation-delay: 200ms;
178  }
179`),E.rippleVisible,S,550,({theme:e})=>e.transitions.easing.easeInOut,E.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,E.child,E.childLeaving,k,550,({theme:e})=>e.transitions.easing.easeInOut,E.childPulsate,T,({theme:e})=>e.transitions.easing.easeInOut),A=u.forwardRef(function(e,t){let n=(0,f.i)({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:i={},className:s}=n,o=(0,l.Z)(n,x),[h,d]=u.useState([]),p=u.useRef(0),m=u.useRef(null);u.useEffect(()=>{m.current&&(m.current(),m.current=null)},[h]);let g=u.useRef(!1),y=(0,b.Z)(),_=u.useRef(null),S=u.useRef(null),k=u.useCallback(e=>{let{pulsate:t,rippleX:n,rippleY:r,rippleSize:s,cb:o}=e;d(e=>[...e,(0,w.jsx)(C,{classes:{ripple:(0,c.Z)(i.ripple,E.ripple),rippleVisible:(0,c.Z)(i.rippleVisible,E.rippleVisible),ripplePulsate:(0,c.Z)(i.ripplePulsate,E.ripplePulsate),child:(0,c.Z)(i.child,E.child),childLeaving:(0,c.Z)(i.childLeaving,E.childLeaving),childPulsate:(0,c.Z)(i.childPulsate,E.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:s},p.current)]),p.current+=1,m.current=o},[i]),T=u.useCallback((e={},t={},n=()=>{})=>{let i,s,o;let{pulsate:a=!1,center:l=r||t.pulsate,fakeElement:u=!1}=t;if((null==e?void 0:e.type)==="mousedown"&&g.current){g.current=!1;return}(null==e?void 0:e.type)==="touchstart"&&(g.current=!0);let c=u?null:S.current,h=c?c.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(!l&&void 0!==e&&(0!==e.clientX||0!==e.clientY)&&(e.clientX||e.touches)){let{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;i=Math.round(t-h.left),s=Math.round(n-h.top)}else i=Math.round(h.width/2),s=Math.round(h.height/2);if(l)(o=Math.sqrt((2*h.width**2+h.height**2)/3))%2==0&&(o+=1);else{let e=2*Math.max(Math.abs((c?c.clientWidth:0)-i),i)+2,t=2*Math.max(Math.abs((c?c.clientHeight:0)-s),s)+2;o=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===_.current&&(_.current=()=>{k({pulsate:a,rippleX:i,rippleY:s,rippleSize:o,cb:n})},y.start(80,()=>{_.current&&(_.current(),_.current=null)})):k({pulsate:a,rippleX:i,rippleY:s,rippleSize:o,cb:n})},[r,k,y]),A=u.useCallback(()=>{T({},{pulsate:!0})},[T]),O=u.useCallback((e,t)=>{if(y.clear(),(null==e?void 0:e.type)==="touchend"&&_.current){_.current(),_.current=null,y.start(0,()=>{O(e,t)});return}_.current=null,d(e=>e.length>0?e.slice(1):e),m.current=t},[y]);return u.useImperativeHandle(t,()=>({pulsate:A,start:T,stop:O}
179),[A,T,O]),(0,w.jsx)(I,(0,a.Z)({className:(0,c.Z)(E.root,i.root,s),ref:S},o,{children:(0,w.jsx)(v.Z,{component:null,exit:!0,children:h})}))});var O=n(34867);function R(e){return(0,O.ZP)("MuiButtonBase",e)}let P=(0,_.Z)("MuiButtonBase",["root","disabled","focusVisible"]),N=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],D=e=>{let{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,s=(0,h.Z)({root:["root",t&&"disabled",n&&"focusVisible"]},R,i);return n&&r&&(s.root+=` ${r}`),s},M=(0,d.ZP)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${P.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),L=u.forwardRef(function(e,t){let n=(0,f.i)({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:i=!1,children:s,className:o,component:h="button",disabled:d=!1,disableRipple:v=!1,disableTouchRipple:y=!1,focusRipple:b=!1,LinkComponent:_="a",onBlur:E,onClick:x,onContextMenu:S,onDragLeave:k,onFocus:T,onFocusVisible:I,onKeyDown:C,onKeyUp:O,onMouseDown:R,onMouseLeave:P,onMouseUp:L,onTouchEnd:Z,onTouchMove:j,onTouchStart:F,tabIndex:U=0,TouchRippleProps:V,touchRippleRef:$,type:z}=n,B=(0,l.Z)(n,N),q=u.useRef(null),H=u.useRef(null),W=(0,p.Z)(H,$),{isFocusVisibleRef:G,onFocus:K,onBlur:Q,ref:Y}=(0,g.Z)(),[X,J]=u.useState(!1);d&&X&&J(!1),u.useImperativeHandle(r,()=>({focusVisible:()=>{J(!0),q.current.focus()}}),[]);let[ee,et]=u.useState(!1);function en(e,t,n=y){return(0,m.Z)(r=>(t&&t(r),!n&&H.current&&H.current[e](r),!0))}u.useEffect(()=>{et(!0)},[]),u.useEffect(()=>{X&&b&&!v&&ee&&H.current.pulsate()},[v,b,X,ee]);let er=en("start",R),ei=en("stop",S),es=en("stop",k),eo=en("stop",L),ea=en("stop",e=>{X&&e.preventDefault(),P&&P(e)}),el=en("start",F),eu=en("stop",Z),ec=en("stop",j),eh=en("stop",e=>{Q(e),!1===G.current&&J(!1),E&&E(e)},!1),ed=(0,m.Z)(e=>{q.current||(q.current=e.currentTarget),K(e),!0===G.current&&(J(!0),I&&I(e)),T&&T(e)}),ef=()=>{let e=q.current;return h&&"button"!==h&&!("A"===e.tagName&&e.href)},ep=u.useRef(!1),em=(0,m.Z)(e=>{b&&!ep.current&&X&&H.current&&" "===e.key&&(ep.current=!0,H.current.stop(e,()=>{H.current.start(e)})),e.target===e.currentTarget&&ef()&&" "===e.key&&e.preventDefault(),C&&C(e),e.target===e.currentTarget&&ef()&&"Enter"===e.key&&!d&&(e.preventDefault(),x&&x(e))}),eg=(0,m.Z)(e=>{b&&" "===e.key&&H.current&&X&&!e.defaultPrevented&&(ep.current=!1,H.current.stop(e,()=>{H.current.pulsate(e)})),O&&O(e),x&&e.target===e.currentTarget&&ef()&&" "===e.key&&!e.defaultPrevented&&x(e)}),ev=h;"button"===ev&&(B.href||B.to)&&(ev=_);let ey={};"button"===ev?(ey.type=void 0===z?"button":z,ey.disabled=d):(B.href||B.to||(ey.role="button"),d&&(ey["aria-disabled"]=d));let eb=(0,p.Z)(t,Y,q),ew=(0,a.Z)({},n,{centerRipple:i,component:h,disabled:d,disableRipple:v,disableTouchRipple:y,focusRipple:b,tabIndex:U,focusVisible:X}),e_=D(ew);return(0,w.jsxs)(M,(0,a.Z)({as:ev,className:(0,c.Z)(e_.root,o),ownerState:ew,onBlur:eh,onClick:x,onContextMenu:ei,onFocus:ed,onKeyDown:em,onKeyUp:eg,onMouseDown:er,onMouseLeave:ea,onMouseUp:eo,onDragLeave:es,onTouchEnd:eu,onTouchMove:ec,onTouchStart:el,ref:eb,tabIndex:d?-1:U,type:z},ey,B,{children:[s,!ee||v||d?null:(0,w.jsx)(A,(0,a.Z)({ref:W,center:i},V))]}))});var Z=L},7982:function(e,t,n){"use strict";n.d(t,{d:function(){return c}});var r=n(67294),i=n(33703),s=n(59948),o=n(82690),a=n(57907),l=n(85893);function u(e){return e.substring(2).toLowerCase()}function c(e){let{children:t,disableReactTree:n=!1,mouseEvent:c="onClick",onClickAway:h,touchEvent:d="onTouchEnd"}=e,f=r.useRef(!1),p=r.useRef(null),m=r.useRef(!1),g=r.useRef(!1);r.useEffect(()=>(setTimeout(()=>{m.current=!0},0),()=>{m.current=!1}),[]);let v=(0,i.Z)((0,a.Z)(t),p),y=(0,s.Z)(e=>{let t=g.current;g.current=!1;let r=(0,o.Z)(p.current);if(m.current&&p.current&&(!("clientX"in e)||!(r.documentElement.clientWidth<e.clientX)&&!(r.documentElement.clientHeight<e.clientY))){if
179(f.current){f.current=!1;return}(e.composedPath?e.composedPath().indexOf(p.current)>-1:!r.documentElement.contains(e.target)||p.current.contains(e.target))||!n&&t||h(e)}}),b=e=>n=>{g.current=!0;let r=t.props[e];r&&r(n)},w={ref:v};return!1!==d&&(w[d]=b(d)),r.useEffect(()=>{if(!1!==d){let e=u(d),t=(0,o.Z)(p.current),n=()=>{f.current=!0};return t.addEventListener(e,y),t.addEventListener("touchmove",n),()=>{t.removeEventListener(e,y),t.removeEventListener("touchmove",n)}}},[y,d]),!1!==c&&(w[c]=b(c)),r.useEffect(()=>{if(!1!==c){let e=u(c),t=(0,o.Z)(p.current);return t.addEventListener(e,y),()=>{t.removeEventListener(e,y)}}},[y,c]),(0,l.jsx)(r.Fragment,{children:r.cloneElement(t,w)})}},57922:function(e,t,n){"use strict";n.d(t,{Z:function(){return T}});var r=n(63366),i=n(87462),s=n(67294),o=n(90512),a=n(98885),l=n(46271),u=n(94780),c=n(90948),h=n(28628),d=n(96067),f=n(30577),p=n(2734),m=n(51705),g=n(1588),v=n(34867);function y(e){return(0,v.ZP)("MuiCollapse",e)}(0,g.Z)("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);var b=n(85893);let w=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],_=e=>{let{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return(0,u.Z)(r,y,n)},E=(0,c.ZP)("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation],"entered"===n.state&&t.entered,"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&t.hidden]}})(({theme:e,ownerState:t})=>(0,i.Z)({height:0,overflow:"hidden",transition:e.transitions.create("height")},"horizontal"===t.orientation&&{height:"auto",width:0,transition:e.transitions.create("width")},"entered"===t.state&&(0,i.Z)({height:"auto",overflow:"visible"},"horizontal"===t.orientation&&{width:"auto"}),"exited"===t.state&&!t.in&&"0px"===t.collapsedSize&&{visibility:"hidden"})),x=(0,c.ZP)("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})(({ownerState:e})=>(0,i.Z)({display:"flex",width:"100%"},"horizontal"===e.orientation&&{width:"auto",height:"100%"})),S=(0,c.ZP)("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})(({ownerState:e})=>(0,i.Z)({width:"100%"},"horizontal"===e.orientation&&{width:"auto",height:"100%"})),k=s.forwardRef(function(e,t){let n=(0,h.i)({props:e,name:"MuiCollapse"}),{addEndListener:u,children:c,className:g,collapsedSize:v="0px",component:y,easing:k,in:T,onEnter:I,onEntered:C,onEntering:A,onExit:O,onExited:R,onExiting:P,orientation:N="vertical",style:D,timeout:M=d.x9.standard,TransitionComponent:L=a.ZP}=n,Z=(0,r.Z)(n,w),j=(0,i.Z)({},n,{orientation:N,collapsedSize:v}),F=_(j),U=(0,p.Z)(),V=(0,l.Z)(),$=s.useRef(null),z=s.useRef(),B="number"==typeof v?`${v}px`:v,q="horizontal"===N,H=q?"width":"height",W=s.useRef(null),G=(0,m.Z)(t,W),K=e=>t=>{if(e){let n=W.current;void 0===t?e(n):e(n,t)}},Q=()=>$.current?$.current[q?"clientWidth":"clientHeight"]:0,Y=K((e,t)=>{$.current&&q&&($.current.style.position="absolute"),e.style[H]=B,I&&I(e,t)}),X=K((e,t)=>{let n=Q();$.current&&q&&($.current.style.position="");let{duration:r,easing:i}=(0,f.C)({style:D,timeout:M,easing:k},{mode:"enter"});if("auto"===M){let t=U.transitions.getAutoHeightDuration(n);e.style.transitionDuration=`${t}ms`,z.current=t}else e.style.transitionDuration="string"==typeof r?r:`${r}ms`;e.style[H]=`${n}px`,e.style.transitionTimingFunction=i,A&&A(e,t)}),J=K((e,t)=>{e.style[H]="auto",C&&C(e,t)}),ee=K(e=>{e.style[H]=`${Q()}px`,O&&O(e)}),et=K(R),en=K(e=>{let t=Q(),{duration:n,easing:r}=(0,f.C)({style:D,timeout:M,easing:k},{mode:"exit"});if("auto"===M){let n=U.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${n}ms`,z.current=n}else e.style.transitionDuration="string"==typeof n?n:`${n}ms`;e.style[H]=B,e.style.transitionTimingFunction=r,P&&P(e)}),er=e=>{"auto"===M&&V.start(z.current||0,e),u&&u(W.current,e)};return(0,b.jsx)(L,(0,i.Z)({in:T,onEnter:Y,onEntered:J,onEntering:X,onExit:ee,onExited:et,onExiting:en,addEndListener:er,nodeRef:W,timeout:"auto"===M?null:M},Z,{children:(e,t)=>(0,b.jsx)(E,(0,i.Z)({as:y,className:(0,o.Z)(F.root,g,{entered:F.entered,exited:!T&&"0px"===B&&F.hidden}[e]),style:(0,i.Z)({[q?"minWidth":"minHeight"]:B},D),ref:G},t,{ownerState:(0,i.Z)({},j,{state:e}),children:(0,b.jsx)(x,{ownerState:(0,i.Z)({},j,{state:e}),className:F.wrapper,ref:$,children:(0,b.jsx)(S,{ownerState:(0,i.Z)({},j,{state:e}),className:F.wrapperInner,children:c})})}))}))});k.muiSupportAuto=!0;var T=k},46574:function(e,t,n){"use strict";var r=n(35266),i=n(98216),s=n(90948),o=n(28628);let a=(0,r.Z)({createStyledComponent:(0,s.ZP)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`maxWidth${(0,i.Z)(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>(0,o.i)({props:e,name:"MuiContainer"})});t.Z=a},66720:function(e,t,n){"use strict";var r=n(87462),i=n(67294),s=n(28628),o=n(90068),a=n(85893);let l=(e,t)=>
179(0,r.Z)({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),u=e=>(0,r.Z)({color:(e.vars||e).palette.text.primary},e.typography.body1,{backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),c=(e,t=!1)=>{var n;let i={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([t,n])=>{var r;i[e.getColorSchemeSelector(t).replace(/\s*&/,"")]={colorScheme:null==(r=n.palette)?void 0:r.mode}});let s=(0,r.Z)({html:l(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:(0,r.Z)({margin:0},u(e),{"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}})},i),o=null==(n=e.components)||null==(n=n.MuiCssBaseline)?void 0:n.styleOverrides;return o&&(s=[s,o]),s};t.ZP=function(e){let t=(0,s.i)({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return(0,a.jsxs)(i.Fragment,{children:[(0,a.jsx)(o.Z,{styles:e=>c(e,r)}),n]})}},28628:function(e,t,n){"use strict";n.d(t,{i:function(){return i}}),n(67294);var r=n(32842);function i(e){return(0,r.i)(e)}n(85893)},67720:function(e,t,n){"use strict";var r=n(63366),i=n(87462),s=n(67294),o=n(90512),a=n(94780),l=n(2101),u=n(90948),c=n(28628),h=n(35097),d=n(85893);let f=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],p=e=>{let{absolute:t,children:n,classes:r,flexItem:i,light:s,orientation:o,textAlign:l,variant:u}=e;return(0,a.Z)({root:["root",t&&"absolute",u,s&&"light","vertical"===o&&"vertical",i&&"flexItem",n&&"withChildren",n&&"vertical"===o&&"withChildrenVertical","right"===l&&"vertical"!==o&&"textAlignRight","left"===l&&"vertical"!==o&&"textAlignLeft"],wrapper:["wrapper","vertical"===o&&"wrapperVertical"]},h.V,r)},m=(0,u.ZP)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>(0,i.Z)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:(0,l.Fq)(e.palette.divider,.08)},"inset"===t.variant&&{marginLeft:72},"middle"===t.variant&&"horizontal"===t.orientation&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},"middle"===t.variant&&"vertical"===t.orientation&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},"vertical"===t.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:e})=>(0,i.Z)({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>(0,i.Z)({},t.children&&"vertical"!==t.orientation&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}),({theme:e,ownerState:t})=>(0,i.Z)({},t.children&&"vertical"===t.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}),({ownerState:e})=>(0,i.Z)({},"right"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),g=(0,u.ZP)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>(0,i.Z)({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},"vertical"===t.orientation&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),v=s.forwardRef(function(e,t){let n=(0,c.i)({props:e,name:"MuiDivider"}),{absolute:s=!1,children:a,className:l,component:u=a?"div":"hr",flexItem:h=!1,light:v=!1,orientation:y="horizontal",role:b="hr"!==u?"separator":void 0,textAlign:w="center",variant:_="fullWidth"}=n,E=(0,r.Z)(n,f),x=(0,i.Z)({},n,{absolute:s,component:u,flexItem:h,light:v,orientation:y,role:b,textAlign:w,variant:_}),S=p(x);return(0,d.jsx)(m,(0,i.Z)({as:u,className:(0,o.Z)(S.root,l),role:b,ref:t,ownerState:x},E,{children:a?(0,d.jsx)(g,{className:S.wrapper,ownerState:x,children:a}):null}))});v.muiSkipListHighlight=!0,t.Z=v},35097:function(e,t,n){"use strict";n.d(t,{V:function(){return s}});var r=n(1588),i=n(34867);function s(e){return(0,i.ZP)("MuiDivider",e)}let o=(0,r.Z)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);t.Z=o},90068:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(87462);n(67294);var i=n(41234),s=n(96682),o=n(85893),a=function({styles:e,themeId:t,defaultTheme:n={}}){let r=(0,s.Z)(n),a="function"==typeof e?e(t&&r[t]||r):e;return(0,o.jsx)(i.Z,{styles:a})},l=n(90247),u=n(10606),c=function(e){return(0,o.jsx)(a,(0,r.Z)({},e,{defaultTheme:l.Z,themeId:u.Z}))}},86886:function(e,t,n){"use strict";n.d(t,{ZP:function(){return I}});var r=n(63366),i=n(87462),s=n(67294),o=n(90512),a=n(95408),l=n(39707),u=n(94780),c=n(90948),h=n(28628),d=n(2734);let f=s.createContext();var p=n(1588),m=n(34867);function g(e){return(0,m.ZP)("MuiGrid",e)}let v=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],y=(0,p.Z)("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map(e=>`spacing-xs-${e}`),...["column-reverse","column","row-reverse","row"].map(e=>`direction-xs-${e}`),...["nowrap","wrap-reverse","wrap"].map(e=>`wrap-xs-${e}`),...v.map(e=>`grid-xs-${e}`),...v.map(e=>`grid-sm-${e}`),...v.map(e=>`grid-md-${e}`),...v.map(e=>`grid-lg-${e}`),...v.map(e=>`grid-xl-${e}`)]);var b=y,w=n(85893);let _=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function E(e){let t=parseFloat(e);return`${t}
179${String(e).replace(String(t),"")||"px"}`}function x({breakpoints:e,values:t}){let n="";Object.keys(t).forEach(e=>{""===n&&0!==t[e]&&(n=e)});let r=Object.keys(e).sort((t,n)=>e[t]-e[n]);return r.slice(0,r.indexOf(n))}let S=(0,c.ZP)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e,{container:r,direction:i,item:s,spacing:o,wrap:a,zeroMinWidth:l,breakpoints:u}=n,c=[];r&&(c=function(e,t,n={}){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[n[`spacing-xs-${String(e)}`]];let r=[];return t.forEach(t=>{let i=e[t];Number(i)>0&&r.push(n[`spacing-${t}-${String(i)}`])}),r}(o,u,t));let h=[];return u.forEach(e=>{let r=n[e];r&&h.push(t[`grid-${e}-${String(r)}`])}),[t.root,r&&t.container,s&&t.item,l&&t.zeroMinWidth,...c,"row"!==i&&t[`direction-xs-${String(i)}`],"wrap"!==a&&t[`wrap-xs-${String(a)}`],...h]}})(({ownerState:e})=>(0,i.Z)({boxSizing:"border-box"},e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},e.item&&{margin:0},e.zeroMinWidth&&{minWidth:0},"wrap"!==e.wrap&&{flexWrap:e.wrap}),function({theme:e,ownerState:t}){let n=(0,a.P$)({values:t.direction,breakpoints:e.breakpoints.values});return(0,a.k9)({theme:e},n,e=>{let t={flexDirection:e};return 0===e.indexOf("column")&&(t[`& > .${b.item}`]={maxWidth:"none"}),t})},function({theme:e,ownerState:t}){let{container:n,rowSpacing:r}=t,i={};if(n&&0!==r){let t;let n=(0,a.P$)({values:r,breakpoints:e.breakpoints.values});"object"==typeof n&&(t=x({breakpoints:e.breakpoints.values,values:n})),i=(0,a.k9)({theme:e},n,(n,r)=>{var i;let s=e.spacing(n);return"0px"!==s?{marginTop:`-${E(s)}`,[`& > .${b.item}`]:{paddingTop:E(s)}}:null!=(i=t)&&i.includes(r)?{}:{marginTop:0,[`& > .${b.item}`]:{paddingTop:0}}})}return i},function({theme:e,ownerState:t}){let{container:n,columnSpacing:r}=t,i={};if(n&&0!==r){let t;let n=(0,a.P$)({values:r,breakpoints:e.breakpoints.values});"object"==typeof n&&(t=x({breakpoints:e.breakpoints.values,values:n})),i=(0,a.k9)({theme:e},n,(n,r)=>{var i;let s=e.spacing(n);return"0px"!==s?{width:`calc(100% + ${E(s)})`,marginLeft:`-${E(s)}`,[`& > .${b.item}`]:{paddingLeft:E(s)}}:null!=(i=t)&&i.includes(r)?{}:{width:"100%",marginLeft:0,[`& > .${b.item}`]:{paddingLeft:0}}})}return i},function({theme:e,ownerState:t}){let n;return e.breakpoints.keys.reduce((r,s)=>{let o={};if(t[s]&&(n=t[s]),!n)return r;if(!0===n)o={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===n)o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{let l=(0,a.P$)({values:t.columns,breakpoints:e.breakpoints.values}),u="object"==typeof l?l[s]:l;if(null==u)return r;let c=`${Math.round(n/u*1e8)/1e6}%`,h={};if(t.container&&t.item&&0!==t.columnSpacing){let n=e.spacing(t.columnSpacing);if("0px"!==n){let e=`calc(${c} + ${E(n)})`;h={flexBasis:e,maxWidth:e}}}o=(0,i.Z)({flexBasis:c,flexGrow:0,maxWidth:c},h)}return 0===e.breakpoints.values[s]?Object.assign(r,o):r[e.breakpoints.up(s)]=o,r},{})}),k=e=>{let{classes:t,container:n,direction:r,item:i,spacing:s,wrap:o,zeroMinWidth:a,breakpoints:l}=e,c=[];n&&(c=function(e,t){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[`spacing-xs-${String(e)}`];let n=[];return t.forEach(t=>{let r=e[t];if(Number(r)>0){let e=`spacing-${t}-${String(r)}`;n.push(e)}}),n}(s,l));let h=[];l.forEach(t=>{let n=e[t];n&&h.push(`grid-${t}-${String(n)}`)});let d={root:["root",n&&"container",i&&"item",a&&"zeroMinWidth",...c,"row"!==r&&`direction-xs-${String(r)}`,"wrap"!==o&&`wrap-xs-${String(o)}`,...h]};return(0,u.Z)(d,g,t)},T=s.forwardRef(function(e,t){let n=(0,h.i)({props:e,name:"MuiGrid"}),{breakpoints:a}=(0,d.Z)(),u=(0,l.Z)(n),{className:c,columns:p,columnSpacing:m,component:g="div",container:v=!1,direction:y="row",item:b=!1,rowSpacing:E,spacing:x=0,wrap:T="wrap",zeroMinWidth:I=!1}=u,C=(0,r.Z)(u,_),A=s.useContext(f),O=v?p||12:A,R={},P=(0,i.Z)({},C);a.keys.forEach(e=>{null!=C[e]&&(R[e]=C[e],delete P[e])});let N=(0,i.Z)({},u,{columns:O,container:v,direction:y,item:b,rowSpacing:E||x,columnSpacing:m||x,wrap:T,zeroMinWidth:I,spacing:x},R,{breakpoints:a.keys}
179),D=k(N);return(0,w.jsx)(f.Provider,{value:O,children:(0,w.jsx)(S,(0,i.Z)({ownerState:N,className:(0,o.Z)(D.root,c),as:g,ref:t},P))})});var I=T},23795:function(e,t,n){"use strict";n.d(t,{Z:function(){return C}});var r=n(63366),i=n(87462),s=n(67294),o=n(90512),a=n(94780),l=n(98216),u=n(90948),c=n(28628),h=n(77760),d=n(51705),f=n(15861),p=n(1588),m=n(34867);function g(e){return(0,m.ZP)("MuiLink",e)}let v=(0,p.Z)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var y=n(54844),b=n(2101);let w={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},_=e=>w[e]||e,E=({theme:e,ownerState:t})=>{let n=_(t.color),r=(0,y.DW)(e,`palette.${n}`,!1)||t.color,i=(0,y.DW)(e,`palette.${n}Channel`);return"vars"in e&&i?`rgba(${i} / 0.4)`:(0,b.Fq)(r,.4)};var x=n(85893);let S=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],k=e=>{let{classes:t,component:n,focusVisible:r,underline:i}=e,s={root:["root",`underline${(0,l.Z)(i)}`,"button"===n&&"button",r&&"focusVisible"]};return(0,a.Z)(s,g,t)},T=(0,u.ZP)(f.Z,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`underline${(0,l.Z)(n.underline)}`],"button"===n.component&&t.button]}})(({theme:e,ownerState:t})=>(0,i.Z)({},"none"===t.underline&&{textDecoration:"none"},"hover"===t.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===t.underline&&(0,i.Z)({textDecoration:"underline"},"inherit"!==t.color&&{textDecorationColor:E({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===t.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${v.focusVisible}`]:{outline:"auto"}})),I=s.forwardRef(function(e,t){let n=(0,c.i)({props:e,name:"MuiLink"}),{className:a,color:l="primary",component:u="a",onBlur:f,onFocus:p,TypographyClasses:m,underline:g="always",variant:v="inherit",sx:y}=n,b=(0,r.Z)(n,S),{isFocusVisibleRef:_,onBlur:E,onFocus:I,ref:C}=(0,h.Z)(),[A,O]=s.useState(!1),R=(0,d.Z)(t,C),P=e=>{E(e),!1===_.current&&O(!1),f&&f(e)},N=e=>{I(e),!0===_.current&&O(!0),p&&p(e)},D=(0,i.Z)({},n,{color:l,component:u,focusVisible:A,underline:g,variant:v}),M=k(D);return(0,x.jsx)(T,(0,i.Z)({color:l,className:(0,o.Z)(M.root,a),classes:m,component:u,onBlur:P,onFocus:N,ref:R,ownerState:D,variant:v,sx:[...Object.keys(w).includes(l)?[]:[{color:l}],...Array.isArray(y)?y:[y]]},b))});var C=I},78462:function(e,t,n){"use strict";n.d(t,{Z:function(){return b}});var r=n(63366),i=n(87462),s=n(67294),o=n(90512),a=n(94780),l=n(90948),u=n(28628),c=n(59773),h=n(1588),d=n(34867);function f(e){return(0,d.ZP)("MuiList",e)}(0,h.Z)("MuiList",["root","padding","dense","subheader"]);var p=n(85893);let m=["children","className","component","dense","disablePadding","subheader"],g=e=>{let{classes:t,disablePadding:n,dense:r,subheader:i}=e;return(0,a.Z)({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},f,t)},v=(0,l.ZP)("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>(0,i.Z)({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),y=s.forwardRef(function(e,t){let n=(0,u.i)({props:e,name:"MuiList"}),{children:a,className:l,component:h="ul",dense:d=!1,disablePadding:f=!1,subheader:y}=n,b=(0,r.Z)(n,m),w=s.useMemo(()=>({dense:d}),[d]),_=(0,i.Z)({},n,{component:h,dense:d,disablePadding:f}),E=g(_);return(0,p.jsx)(c.Z.Provider,{value:w,children:(0,p.jsxs)(v,(0,i.Z)({as:h,className:(0,o.Z)(E.root,l),ref:t,ownerState:_},b,{children:[y,a]}))})});var b=y},59773:function(e,t,n){"use strict";var r=n(67294);let i=r.createContext({});t.Z=i},97212:function(e,t,n){"use strict";n.d(t,{ZP:function(){return M}});var r=n(63366),i=n(87462),s=n(67294),o=n(90512),a=n(94780),l=n(2101),u=n(90712),c=n(90948),h=n(28628),d=n(49990),f=n(50700),p=n(
17958974),m=n(51705),g=n(59773),v=n(1588),y=n(34867);function b(e){return(0,y.ZP)("MuiListItem",e)}let w=(0,v.Z)("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);var _=n(68686);function E(e){return(0,y.ZP)("MuiListItemSecondaryAction",e)}(0,v.Z)("MuiListItemSecondaryAction",["root","disableGutters"]);var x=n(85893);let S=["className"],k=e=>{let{disableGutters:t,classes:n}=e;return(0,a.Z)({root:["root",t&&"disableGutters"]},E,n)},T=(0,c.ZP)("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})(({ownerState:e})=>(0,i.Z)({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),I=s.forwardRef(function(e,t){let n=(0,h.i)({props:e,name:"MuiListItemSecondaryAction"}),{className:a}=n,l=(0,r.Z)(n,S),u=s.useContext(g.Z),c=(0,i.Z)({},n,{disableGutters:u.disableGutters}),d=k(c);return(0,x.jsx)(T,(0,i.Z)({className:(0,o.Z)(d.root,a),ownerState:c,ref:t},l))});I.muiName="ListItemSecondaryAction";let C=["className"],A=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],O=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]},R=e=>{let{alignItems:t,button:n,classes:r,dense:i,disabled:s,disableGutters:o,disablePadding:l,divider:u,hasSecondaryAction:c,selected:h}=e;return(0,a.Z)({root:["root",i&&"dense",!o&&"gutters",!l&&"padding",u&&"divider",s&&"disabled",n&&"button","flex-start"===t&&"alignItemsFlexStart",c&&"secondaryAction",h&&"selected"],container:["container"]},b,r)},P=(0,c.ZP)("div",{name:"MuiListItem",slot:"Root",overridesResolver:O})(({theme:e,ownerState:t})=>(0,i.Z)({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&(0,i.Z)({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${_.Z.root}`]:{paddingRight:48}},{[`&.${w.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${w.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,l.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${w.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,l.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${w.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"flex-start"===t.alignItems&&{alignItems:"flex-start"},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${w.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,l.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,l.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),N=(0,c.ZP)("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),D=s.forwardRef(function(e,t){let n=(0,h.i)({props:e,name:"MuiListItem"}),{alignItems:a="center",autoFocus:l=!1,button:c=!1,children:v,className:y,component:b,components:_={},componentsProps:E={},ContainerComponent:S="li",ContainerProps:{className:k}={},dense:T=!1,disabled:O=!1,disableGutters:D=!1,disablePadding:M=!1,divider:L=!1,focusVisibleClassName:Z,secondaryAction:j,selected:F=!1,slotProps:U={},slots:V={}}=n,$=(0,r.Z)(n.ContainerProps,C),z=(0,r.Z)(n,A),B=s.useContext(g.Z),q=s.useMemo(()=>({dense:T||B.dense||!1,alignItems:a,disableGutters:D}),[a,B.dense,T,D]),H=s.useRef(null);(0,p.Z)(()=>{l&&H.current&&H.current.focus()},[l]);let W=s.Children.toArray(v),G=W.length&&(0,f.Z)(W[W.length-1],["ListItemSecondaryAction"]),K=(0,i.Z)({},n,{alignItems:a,autoFocus:l,button:c,dense:q.dense,disabled:O,disableGutters:D,disablePadding:M,divider:L,hasSecondaryAction:G,selected:F}),Q=R(K),Y=(0,m.Z)(H,t),X=V.root||_.Root||P,J=U.root||E.root||{},ee=(0,i.Z)({className:(0,o.Z)(Q.root,J.className,y),disabled:O},z),et=b||"li";return(c&&(ee.component=b||"div",ee.focusVisibleClassName=(0,o.Z)(w.focusVisible,Z),et=d.Z),G)?(et=ee.component||b?et:"div","li"===S&&("li"===et?et="div":"li"===ee.component&&(ee.component="div")),(0,x.jsx)(g.Z.Provider,{value:q,children:(0,x.jsxs)(N,(0,i.Z)({as:S,className:(0,o.Z)(Q.container,k),ref:Y,ownerState:K},$,{children:[(0,x.jsx)(X,(0,i.Z)({},J,!(0,u.Z)(X)&&{as:et,ownerState:(0,i.Z)({},K,J.ownerState)},ee,{children:W})),W.pop()]}))})):(0,x.jsx)(g.Z.Provider,{value:q,children:(0,x.jsxs)(X,(0,i.Z)({},J,{as:et,ref:Y},!(0,u.Z)(X)&&{ownerState:(0,i.Z)({},K,J.ownerState)},ee,{children:[W,j&&(0,x.jsx)(I,{children:j})]}))})});var M=D},68686:function(e,t,n){"use strict";n.d(t,{t:function(){return s}});var r=n(1588),i=n(34867);function s(e){return(0,i.ZP)("MuiListItemButton",e)}let o=(0,r.Z)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);t.Z=o},90629:function(e,t,n){"use strict";n.d(t,{Z:function(){return w}});var r=n(63366),i=n(87462),s=n(67294),o=n(90512),a=n(94780),l=n(2101),u=n(90948);let c=e=>((e<1?5.11916*e**2:4.5*Math.log(e+1)+2)/100).toFixed(2);var h=n(28628),d=n(1588),f=n(34867);function p(e){return(0,f.ZP)("MuiPaper",e)}(0,d.Z)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);var m=n(85893);let g=["className","component","elevation","square","variant"],v=e=>{let{square:t,elevation:n,variant:r,classes:i}=e,s={root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]};return(0,a.Z)(s,p,i)},y=(0,u.ZP)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;
179return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return(0,i.Z)({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.divider}`},"elevation"===t.variant&&(0,i.Z)({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&"dark"===e.palette.mode&&{backgroundImage:`linear-gradient(${(0,l.Fq)("#fff",c(t.elevation))}, ${(0,l.Fq)("#fff",c(t.elevation))})`},e.vars&&{backgroundImage:null==(n=e.vars.overlays)?void 0:n[t.elevation]}))}),b=s.forwardRef(function(e,t){let n=(0,h.i)({props:e,name:"MuiPaper"}),{className:s,component:a="div",elevation:l=1,square:u=!1,variant:c="elevation"}=n,d=(0,r.Z)(n,g),f=(0,i.Z)({},n,{component:a,elevation:l,square:u,variant:c}),p=v(f);return(0,m.jsx)(y,(0,i.Z)({as:a,ownerState:f,className:(0,o.Z)(p.root,s),ref:t},d))});var w=b},54776:function(e,t,n){"use strict";var r=n(87462),i=n(63366),s=n(67294),o=n(98885),a=n(57907),l=n(57144),u=n(51705),c=n(2734),h=n(30577),d=n(5340),f=n(85893);let p=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function m(e,t,n){let r="function"==typeof n?n():n,i=function(e,t,n){let r;let i=t.getBoundingClientRect(),s=n&&n.getBoundingClientRect(),o=(0,d.Z)(t);if(t.fakeTransform)r=t.fakeTransform;else{let e=o.getComputedStyle(t);r=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("transform")}let a=0,l=0;if(r&&"none"!==r&&"string"==typeof r){let e=r.split("(")[1].split(")")[0].split(",");a=parseInt(e[4],10),l=parseInt(e[5],10)}return"left"===e?s?`translateX(${s.right+a-i.left}px)`:`translateX(${o.innerWidth+a-i.left}px)`:"right"===e?s?`translateX(-${i.right-s.left-a}px)`:`translateX(-${i.left+i.width-a}px)`:"up"===e?s?`translateY(${s.bottom+l-i.top}px)`:`translateY(${o.innerHeight+l-i.top}px)`:s?`translateY(-${i.top-s.top+i.height-l}px)`:`translateY(-${i.top+i.height-l}px)`}(e,t,r);i&&(t.style.webkitTransform=i,t.style.transform=i)}let g=s.forwardRef(function(e,t){let n=(0,c.Z)(),g={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},v={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:y,appear:b=!0,children:w,container:_,direction:E="down",easing:x=g,in:S,onEnter:k,onEntered:T,onEntering:I,onExit:C,onExited:A,onExiting:O,style:R,timeout:P=v,TransitionComponent:N=o.ZP}=e,D=(0,i.Z)(e,p),M=s.useRef(null),L=(0,u.Z)((0,a.Z)(w),M,t),Z=e=>t=>{e&&(void 0===t?e(M.current):e(M.current,t))},j=Z((e,t)=>{m(E,e,_),(0,h.n)(e),k&&k(e,t)}),F=Z((e,t)=>{let i=(0,h.C)({timeout:P,style:R,easing:x},{mode:"enter"});e.style.webkitTransition=n.transitions.create("-webkit-transform",(0,r.Z)({},i)),e.style.transition=n.transitions.create("transform",(0,r.Z)({},i)),e.style.webkitTransform="none",e.style.transform="none",I&&I(e,t)}),U=Z(T),V=Z(O),$=Z(e=>{let t=(0,h.C)({timeout:P,style:R,easing:x},{mode:"exit"});e.style.webkitTransition=n.transitions.create("-webkit-transform",t),e.style.transition=n.transitions.create("transform",t),m(E,e,_),C&&C(e)}),z=Z(e=>{e.style.webkitTransition="",e.style.transition="",A&&A(e)}),B=e=>{y&&y(M.current,e)},q=s.useCallback(()=>{M.current&&m(E,M.current,_)},[E,_]);return s.useEffect(()=>{if(S||"down"===E||"right"===E)return;let e=(0,l.Z)(()=>{M.current&&m(E,M.current,_)}),t=(0,d.Z)(M.current);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[E,S,_]),s.useEffect(()=>{S||q()},[S,q]),(0,f.jsx)(N,(0,r.Z)({nodeRef:M,onEnter:j,onEntered:U,onEntering:F,onExit:$,onExited:z,onExiting:V,addEndListener:B,appear:b,in:S,timeout:P},D,{children:(e,t)=>s.cloneElement(w,(0,r.Z)({ref:L,style:(0,r.Z)({visibility:"exited"!==e||S?void 0:"hidden"},R,w.props.style)},t))}))});t.Z=g},51233:function(e,t,n){"use strict";n.d(t,{Z:function(){return T}});var r=n(63366),i=n(87462),s=n(67294),o=n(90512),a=n(4953),l=n(34867),u=n(94780),c=n(45098),h=n(29628),d=n(39707),f=n(17172),p=n(95408),m=n(98700),g=n(85893);let v=["component","direction","spacing","divider","children","className","useFlexGap"],y=(0,f.Z)(),b=(0,c.Z)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function w(e){return(0,h.Z)({props:e,name:"MuiStack",defaultTheme:y})}let _=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],E=({ownerState:e,theme:t})=>{let n=(0,i.Z)({display:"flex",flexDirection:"column"},(0,p.k9)({theme:t},(0,p.P$)({values:e.direction,breakpoints:t.breakpoints.values}),e=>({flexDirection:e})));if(e.spacing){let r=(0,m.hB)(t),i=Object.keys(t.breakpoints.values).reduce((t,n)=>(("object"==typeof e.spacing&&null!=e.spacing[n]||"object"==typeof e.direction&&null!=e.direction[n])&&(t[n]=!0),t),{}),s=(0,p.P$)({values:e.direction,base:i}),o=(0,p.P$)({values:e.spacing,base:i});
179"object"==typeof s&&Object.keys(s).forEach((e,t,n)=>{let r=s[e];if(!r){let r=t>0?s[n[t-1]]:"column";s[e]=r}});let l=(t,n)=>e.useFlexGap?{gap:(0,m.NA)(r,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${_(n?s[n]:e.direction)}`]:(0,m.NA)(r,t)}};n=(0,a.Z)(n,(0,p.k9)({theme:t},o,l))}return(0,p.dt)(t.breakpoints,n)};var x=n(90948),S=n(28628);let k=function(e={}){let{createStyledComponent:t=b,useThemeProps:n=w,componentName:a="MuiStack"}=e,c=()=>(0,u.Z)({root:["root"]},e=>(0,l.ZP)(a,e),{}),h=t(E),f=s.forwardRef(function(e,t){let a=n(e),l=(0,d.Z)(a),{component:u="div",direction:f="column",spacing:p=0,divider:m,children:y,className:b,useFlexGap:w=!1}=l,_=(0,r.Z)(l,v),E=c();return(0,g.jsx)(h,(0,i.Z)({as:u,ownerState:{direction:f,spacing:p,useFlexGap:w},ref:t,className:(0,o.Z)(E.root,b)},_,{children:m?function(e,t){let n=s.Children.toArray(e).filter(Boolean);return n.reduce((e,r,i)=>(e.push(r),i<n.length-1&&e.push(s.cloneElement(t,{key:`separator-${i}`})),e),[])}(y,m):y}))});return f}({createStyledComponent:(0,x.ZP)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,S.i)({props:e,name:"MuiStack"})});var T=k},53219:function(e,t,n){"use strict";n.d(t,{Z:function(){return b}});var r=n(87462),i=n(63366),s=n(67294),o=n(90512),a=n(94780),l=n(98216),u=n(28628),c=n(90948),h=n(1588),d=n(34867);function f(e){return(0,d.ZP)("MuiSvgIcon",e)}(0,h.Z)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var p=n(85893);let m=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],g=e=>{let{color:t,fontSize:n,classes:r}=e,i={root:["root","inherit"!==t&&`color${(0,l.Z)(t)}`,`fontSize${(0,l.Z)(n)}`]};return(0,a.Z)(i,f,r)},v=(0,c.ZP)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${(0,l.Z)(n.color)}`],t[`fontSize${(0,l.Z)(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,i,s,o,a,l,u,c,h,d,f,p;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(n=e.transitions)||null==(r=n.create)?void 0:r.call(n,"fill",{duration:null==(i=e.transitions)||null==(i=i.duration)?void 0:i.shorter}),fontSize:({inherit:"inherit",small:(null==(s=e.typography)||null==(o=s.pxToRem)?void 0:o.call(s,20))||"1.25rem",medium:(null==(a=e.typography)||null==(l=a.pxToRem)?void 0:l.call(a,24))||"1.5rem",large:(null==(u=e.typography)||null==(c=u.pxToRem)?void 0:c.call(u,35))||"2.1875rem"})[t.fontSize],color:null!=(h=null==(d=(e.vars||e).palette)||null==(d=d[t.color])?void 0:d.main)?h:({action:null==(f=(e.vars||e).palette)||null==(f=f.action)?void 0:f.active,disabled:null==(p=(e.vars||e).palette)||null==(p=p.action)?void 0:p.disabled,inherit:void 0})[t.color]}}),y=s.forwardRef(function(e,t){let n=(0,u.i)({props:e,name:"MuiSvgIcon"}),{children:a,className:l,color:c="inherit",component:h="svg",fontSize:d="medium",htmlColor:f,inheritViewBox:y=!1,titleAccess:b,viewBox:w="0 0 24 24"}=n,_=(0,i.Z)(n,m),E=s.isValidElement(a)&&"svg"===a.type,x=(0,r.Z)({},n,{color:c,component:h,fontSize:d,instanceFontSize:e.fontSize,inheritViewBox:y,viewBox:w,hasSvgAsChild:E}),S={};y||(S.viewBox=w);let k=g(x);return(0,p.jsxs)(v,(0,r.Z)({as:h,className:(0,o.Z)(k.root,l),focusable:"false",color:f,"aria-hidden":!b||void 0,role:b?"img":void 0,ref:t},S,_,E&&a.props,{ownerState:x,children:[E?a.props.children:a,b?(0,p.jsx)("title",{children:b}):null]}))});y.muiName="SvgIcon";var b=y},10155:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var r=n(63366),i=n(87462),s=n(67294),o=n(90512),a=n(94780),l=n(28628),u=n(90948),c=n(1588),h=n(34867);function d(e){return(0,h.ZP)("MuiToolbar",e)}(0,c.Z)("MuiToolbar",["root","gutters","regular","dense"]);var f=n(85893);let p=["className","component","disableGutters","variant"],m=e=>{let{classes:t,disableGutters:n,variant:r}=e;return(0,a.Z)({root:["root",!n&&"gutters",r]},d,t)},g=(0,u.ZP)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(({theme:e,ownerState:t})=>(0,i.Z)({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},"dense"===t.variant&&{minHeight:48}),({theme:e,ownerState:t})=>"regular"===t.variant&&e.mixins.toolbar),v=s.forwardRef(function(e,t){let n=(0,l.i)({props:e,name:"MuiToolbar"}),{className:s,component:a="div",disableGutters:u=!1,variant:c="regular"}=n,h=(0,r.Z)(n,p),d=(0,i.Z)({},n,{component:a,disableGutters:u,variant:c}),v=m(d);return(0,f.jsx)(g,(0,i.Z)({as:a,className:(0,o.Z)(v.root,s),ref:t,ownerState:d},h))});var y=v},15861:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var r=n(63366),i=n(87462),s=n(67294),o=n(90512),a=n(39707),l=n(94780),u=n(90948),c=n(28628),h=n(98216),d=n(1588),f=n(34867);function p(e){return(0,f.ZP)("MuiTypography",e)}
179(0,d.Z)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);var m=n(85893);let g=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],v=e=>{let{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:s,classes:o}=e,a={root:["root",s,"inherit"!==e.align&&`align${(0,h.Z)(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return(0,l.Z)(a,p,o)},y=(0,u.ZP)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${(0,h.Z)(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>(0,i.Z)({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),b={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},w={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},_=e=>w[e]||e,E=s.forwardRef(function(e,t){let n=(0,c.i)({props:e,name:"MuiTypography"}),s=_(n.color),l=(0,a.Z)((0,i.Z)({},n,{color:s})),{align:u="inherit",className:h,component:d,gutterBottom:f=!1,noWrap:p=!1,paragraph:w=!1,variant:E="body1",variantMapping:x=b}=l,S=(0,r.Z)(l,g),k=(0,i.Z)({},l,{align:u,color:s,className:h,component:d,gutterBottom:f,noWrap:p,paragraph:w,variant:E,variantMapping:x}),T=d||(w?"p":x[E]||b[E])||"span",I=v(k);return(0,m.jsx)(y,(0,i.Z)({as:T,ref:t,ownerState:k,className:(0,o.Z)(I.root,h)},S))});var x=E},13486:function(e,t){"use strict";t.Z={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"}},47036:function(e,t){"use strict";t.Z={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"}},60265:function(e,t){"use strict";t.Z={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"}},20041:function(e,t,n){"use strict";n.d(t,{Z:function(){return R}});var r=n(87462),i=n(63366),s=n(56535),o=n(4953),a=n(44920),l=n(86523),u=n(17172),c=n(2101),h={black:"#000",white:"#fff"},d=n(47036),f={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},p=n(60265),m={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},g={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},v={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},y=n(13486);let b=["mode","contrastThreshold","tonalOffset"],w={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:h.white,default:h.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},_={text:{primary:h.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:h.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackgroun
179d:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function E(e,t,n,r){let i=r.light||r,s=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,c.$n)(e.main,i):"dark"===t&&(e.dark=(0,c._j)(e.main,s)))}let x=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"],S={textTransform:"uppercase"},k='"Roboto", "Helvetica", "Arial", sans-serif';function T(...e){return`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2),${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14),${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`}let I=["none",T(0,2,1,-1,0,1,1,0,0,1,3,0),T(0,3,1,-2,0,2,2,0,0,1,5,0),T(0,3,3,-2,0,3,4,0,0,1,8,0),T(0,2,4,-1,0,4,5,0,0,1,10,0),T(0,3,5,-1,0,5,8,0,0,1,14,0),T(0,3,5,-1,0,6,10,0,0,1,18,0),T(0,4,5,-2,0,7,10,1,0,2,16,1),T(0,5,5,-3,0,8,10,1,0,3,14,2),T(0,5,6,-3,0,9,12,1,0,3,16,2),T(0,6,6,-3,0,10,14,1,0,4,18,3),T(0,6,7,-4,0,11,15,1,0,4,20,3),T(0,7,8,-4,0,12,17,2,0,5,22,4),T(0,7,8,-4,0,13,19,2,0,5,24,4),T(0,7,9,-4,0,14,21,2,0,5,26,4),T(0,8,9,-5,0,15,22,2,0,6,28,5),T(0,8,10,-5,0,16,24,2,0,6,30,5),T(0,8,11,-5,0,17,26,2,0,6,32,5),T(0,9,11,-5,0,18,28,2,0,7,34,6),T(0,9,12,-6,0,19,29,2,0,7,36,6),T(0,10,13,-6,0,20,31,3,0,8,38,7),T(0,10,13,-6,0,21,33,3,0,8,40,7),T(0,10,14,-6,0,22,35,3,0,8,42,7),T(0,11,14,-7,0,23,36,3,0,9,44,8),T(0,11,15,-7,0,24,38,3,0,9,46,8)];var C=n(96067),A={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};let O=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];var R=function(e={},...t){var n;let{mixins:T={},palette:R={},transitions:P={},typography:N={}}=e,D=(0,i.Z)(e,O);if(e.vars&&void 0===e.generateCssVars)throw Error((0,s.Z)(18));let M=function(e){let{mode:t="light",contrastThreshold:n=3,tonalOffset:a=.2}=e,l=(0,i.Z)(e,b),u=e.primary||function(e="light"){return"dark"===e?{main:g[200],light:g[50],dark:g[400]}:{main:g[700],light:g[400],dark:g[800]}}(t),x=e.secondary||function(e="light"){return"dark"===e?{main:f[200],light:f[50],dark:f[400]}:{main:f[500],light:f[300],dark:f[700]}}(t),S=e.error||function(e="light"){return"dark"===e?{main:p.Z[500],light:p.Z[300],dark:p.Z[700]}:{main:p.Z[700],light:p.Z[400],dark:p.Z[800]}}(t),k=e.info||function(e="light"){return"dark"===e?{main:v[400],light:v[300],dark:v[700]}:{main:v[700],light:v[500],dark:v[900]}}(t),T=e.success||function(e="light"){return"dark"===e?{main:y.Z[400],light:y.Z[300],dark:y.Z[700]}:{main:y.Z[800],light:y.Z[500],dark:y.Z[900]}}(t),I=e.warning||function(e="light"){return"dark"===e?{main:m[400],light:m[300],dark:m[700]}:{main:"#ed6c02",light:m[500],dark:m[900]}}(t);function C(e){let t=(0,c.mi)(e,_.text.primary)>=n?_.text.primary:w.text.primary;return t}let A=({color:e,name:t,mainShade:n=500,lightShade:i=300,darkShade:o=700})=>{if(!(e=(0,r.Z)({},e)).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw Error((0,s.Z)(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw Error((0,s.Z)(12,t?` (${t})`:"",JSON.stringify(e.main)));return E(e,"light",i,a),E(e,"dark",o,a),e.contrastText||(e.contrastText=C(e.main)),e},O=(0,o.Z)((0,r.Z)({common:(0,r.Z)({},h),mode:t,primary:A({color:u,name:"primary"}),secondary:A({color:x,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:A({color:S,name:"error"}),warning:A({color:I,name:"warning"}),info:A({color:k,name:"info"}),success:A({color:T,name:"success"}),grey:d.Z,contrastThreshold:n,getContrastText:C,augmentColor:A,tonalOffset:a},{dark:_,light:w}[t]),l);return O}(R),L=(0,u.Z)(e),Z=(0,o.Z)(L,{mixins:(n=L.breakpoints,(0,r.Z)({toolbar:{minHeight:56,[n.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[n.up("sm")]:{minHeight:64}}},T)),palette:M,shadows:I.slice(),typography:function(e,t){let n="function"==typeof t?t(e):t,{fontFamily:s=k,fontSize:a=14,fontWeightLight:l=300,fontWeightRegular:u=400,fontWeightMedium:c=500,fontWeightBold:h=700,htmlFontSize:d=16,allVariants:f,pxToRem:p}=n,m=(0,i.Z)(n,x),g=a/14,v=p||(e=>`${e/d*g}rem`),y=(e,t,n,i,o)=>(0,r.Z)({fontFamily:s,fontWeight:e,fontSize:v(t),lineHeight:n},s===k?{letterSpacing:`${Math.round(1e5*(i/t))/1e5}em`}:{},o,f),b={h1:y(l,96,1.167,-1.5),h2:y(l,60,1.2,-.5),h3:y(u,48,1.167,0),h4:y(u,34,1.235,.25),h5:y(u,24,1.334,0),h6:y(c,20,1.6,.15),subtitle1:y(u,16,1.75,.15),subtitle2:y(c,14,1.57,.1),body1:y(u,16,1.5,.15),body2:y(u,14,1.43,.15),button:y(c,14,1.75,.4,S),caption:y(u,12,1.66,.4),overline:y(u,12,2.66,1,S),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,o.Z)((0,r.Z)({htmlFontSize:d,pxToRem:v,fontFamily:s,fontSize:a,fontWeightLight:l,fontWeightRegular:u,fontWeightMedium:c,fontWeightBold:h},b),m,{clone:!1})}(M,N),transitions:(0,C.ZP)(P),zIndex:(0,r.Z)({},A)});return Z=(0,o.Z)(Z,D),(Z=t.reduce((e,t)=>
179(0,o.Z)(e,t),Z)).unstable_sxConfig=(0,r.Z)({},a.Z,null==D?void 0:D.unstable_sxConfig),Z.unstable_sx=function(e){return(0,l.Z)({sx:e,theme:this})},Z}},96067:function(e,t,n){"use strict";n.d(t,{ZP:function(){return c},x9:function(){return a}});var r=n(63366),i=n(87462);let s=["duration","easing","delay"],o={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},a={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function l(e){return`${Math.round(e)}ms`}function u(e){if(!e)return 0;let t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function c(e){let t=(0,i.Z)({},o,e.easing),n=(0,i.Z)({},a,e.duration),c=(e=["all"],i={})=>{let{duration:o=n.standard,easing:a=t.easeInOut,delay:u=0}=i;return(0,r.Z)(i,s),(Array.isArray(e)?e:[e]).map(e=>`${e} ${"string"==typeof o?o:l(o)} ${a} ${"string"==typeof u?u:l(u)}`).join(",")};return(0,i.Z)({getAutoHeightDuration:u,create:c},e,{easing:t,duration:n})}},90247:function(e,t,n){"use strict";var r=n(20041);let i=(0,r.Z)();t.Z=i},10606:function(e,t){"use strict";t.Z="$$material"},14136:function(e,t,n){"use strict";var r=n(75536);let i=e=>(0,r.Z)(e)&&"classes"!==e;t.Z=i},75536:function(e,t){"use strict";t.Z=function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}},90948:function(e,t,n){"use strict";var r=n(58128),i=n(90247),s=n(10606),o=n(14136);let a=(0,r.ZP)({themeId:s.Z,defaultTheme:i.Z,rootShouldForwardProp:o.Z});t.ZP=a},2734:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}}),n(67294);var r=n(96682),i=n(90247),s=n(10606);function o(){let e=(0,r.Z)(i.Z);return e[s.Z]||e}},30577:function(e,t,n){"use strict";n.d(t,{C:function(){return i},n:function(){return r}});let r=e=>e.scrollTop;function i(e,t){var n,r;let{timeout:i,easing:s,style:o={}}=e;return{duration:null!=(n=o.transitionDuration)?n:"number"==typeof i?i:i[t.mode]||0,easing:null!=(r=o.transitionTimingFunction)?r:"object"==typeof s?s[t.mode]:s,delay:o.transitionDelay}}},98216:function(e,t,n){"use strict";var r=n(14142);t.Z=r.Z},82066:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(87462),i=n(67294),s=n(53219),o=n(85893);function a(e,t){function n(n,i){return(0,o.jsx)(s.Z,(0,r.Z)({"data-testid":`${t}Icon`,ref:i},n,{children:e}))}return n.muiName=s.Z.muiName,i.memo(i.forwardRef(n))}},57144:function(e,t,n){"use strict";var r=n(39336);t.Z=r.Z},12842:function(e,t,n){"use strict";n.r(t),n.d(t,{capitalize:function(){return i.Z},createChainedFunction:function(){return s},createSvgIcon:function(){return o.Z},debounce:function(){return a.Z},deprecatedPropType:function(){return l},isMuiElement:function(){return u.Z},ownerDocument:function(){return c.Z},ownerWindow:function(){return h.Z},requirePropFactory:function(){return d},setRef:function(){return f},unstable_ClassNameGenerator:function(){return _},unstable_useEnhancedEffect:function(){return p.Z},unstable_useId:function(){return m.Z},unsupportedProp:function(){return g},useControlled:function(){return v.Z},useEventCallback:function(){return y.Z},useForkRef:function(){return b.Z},useIsFocusVisible:function(){return w.Z}});var r=n(37078),i=n(98216),s=n(91476).Z,o=n(82066),a=n(57144),l=function(e,t){return()=>null},u=n(50700),c=n(8038),h=n(5340);n(87462);var d=function(e,t){return()=>null},f=n(27364).Z,p=n(58974),m=n(27909),g=function(e,t,n,r,i){return null},v=n(49299),y=n(2068),b=n(51705),w=n(77760);let _={configure:e=>{r.Z.configure(e)}}},50700:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(67294),i=function(e,t){var n,i;return r.isValidElement(e)&&-1!==t.indexOf(null!=(n=e.type.muiName)?n:null==(i=e.type)||null==(i=i._payload)||null==(i=i.value)?void 0:i.muiName)}},8038:function(e,t,n){"use strict";var r=n(82690);t.Z=r.Z},5340:function(e,t,n){"use strict";var r=n(74161);t.Z=r.Z},49299:function(e,t,n){"use strict";var r=n(19032);t.Z=r.Z},58974:function(e,t,n){"use strict";var r=n(73546);t.Z=r.Z},2068:function(e,t,n){"use strict";var r=n(59948);t.Z=r.Z},51705:function(e,t,n){"use strict";var r=n(33703);t.Z=r.Z},27909:function(e,t,n){"use strict";var r=n(92996);t.Z=r.Z},77760:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(67294),i=n(46271);let s=!0,o=!1,a=new i.V,l={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function u(e){e.metaKey||e.altKey||e.ctrlKey||(s=!0)}function c(){s=!1}function h(){"hidden"===this.visibilityState&&o&&(s=!0)}var d=function(){let e=r.useCallback(e=>{if(null!=e){var t;(t=e.ownerDocument).addEventListener("keydown",u,!0),t.addEventListener("mousedown",c,!0),t.addEventListener("pointerdown",c,!0),t.addEventListener("touchstart",c,!0),t.addEventListener("visibilitychange",h,!0)}},[]),t=r.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!function(e){let{target:t}=e;try{return t.matches(":focus-visible")}catch(e){}return s||function(e){let{type:t,tagName:n}=e;return"INPUT"===n&&!!l[t]&&!e.readOnly||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(o=!0,a.start(100,()=>{o=!1}),t.current=!1,!0)},ref:e}}},41234:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}}),n(67294);var r=n(70917),i=n(85893);function s(e){let{styles:t,defaultTheme:n={}}=e,s="function"==typeof t?e=>t(null==e||0===Object.keys(e).length?n:e):t;return(0,i.jsx)(r.xB,{styles:s})}},32485:function(e,t,n){"use strict";let r;n.r(t),n.d(t,{GlobalStyles:function(){return c.Z},StyledEngineProvider:function(){return u},ThemeContext:function(){return o.T},css:function(){return s.iv},default:function(){return h},internal_processStyles:function(){return d},keyframes:function(){return s.F4}});var i=n(98604),s=n(70917),o=n(87685);n(67294);var a=n(87574),l=n(85893);function u(e){let{injectFirst:t,children:n}=e;return t&&r?(0,l.jsx)(o.C,{value:r,children:n}):n}
179"object"==typeof document&&(r=(0,a.Z)({key:"css",prepend:!0}));var c=n(41234);function h(e,t){let n=(0,i.Z)(e,t);return n}let d=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}},2101:function(e,t,n){"use strict";var r=n(64836);t.Fq=function(e,t){return e=a(e),t=o(t),("rgb"===e.type||"hsl"===e.type)&&(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,l(e)},t._j=c,t._4=function(e,t=.15){return u(e)>.5?c(e,t):h(e,t)},t.mi=function(e,t){let n=u(e),r=u(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},t.$n=h;var i=r(n(55480)),s=r(n(14800));function o(e,t=0,n=1){return(0,s.default)(e,t,n)}function a(e){let t;if(e.type)return e;if("#"===e.charAt(0))return a(function(e){e=e.slice(1);let t=RegExp(`.{1,${e.length>=6?2:1}}`,"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?`rgb${4===n.length?"a":""}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}(e));let n=e.indexOf("("),r=e.substring(0,n);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(r))throw Error((0,i.default)(9,e));let s=e.substring(n+1,e.length-1);if("color"===r){if(t=(s=s.split(" ")).shift(),4===s.length&&"/"===s[3].charAt(0)&&(s[3]=s[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(t))throw Error((0,i.default)(10,t))}else s=s.split(",");return{type:r,values:s=s.map(e=>parseFloat(e)),colorSpace:t}}function l(e){let{type:t,colorSpace:n}=e,{values:r}=e;return -1!==t.indexOf("rgb")?r=r.map((e,t)=>t<3?parseInt(e,10):e):-1!==t.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),`${t}(${r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`})`}function u(e){let t="hsl"===(e=a(e)).type||"hsla"===e.type?a(function(e){e=a(e);let{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,s=r*Math.min(i,1-i),o=(e,t=(e+n/30)%12)=>i-s*Math.max(Math.min(t-3,9-t,1),-1),u="rgb",c=[Math.round(255*o(0)),Math.round(255*o(8)),Math.round(255*o(4))];return"hsla"===e.type&&(u+="a",c.push(t[3])),l({type:u,values:c})}(e)).values:e.values;return Number((.2126*(t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)))[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function c(e,t){if(e=a(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return l(e)}function h(e,t){if(e=a(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return l(e)}},58128:function(e,t,n){"use strict";var r=n(64836);t.ZP=function(e={}){let{themeId:t,defaultTheme:n=m,rootShouldForwardProp:r=p,slotShouldForwardProp:l=p}=e,c=e=>(0,u.default)((0,i.default)({},e,{theme:v((0,i.default)({},e,{defaultTheme:n,themeId:t}))}));return c.__mui_systemSx=!0,(e,u={})=>{var h;let f;(0,o.internal_processStyles)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));let{name:m,slot:b,skipVariantsResolver:w,skipSx:_,overridesResolver:E=(h=g(b))?(e,t)=>t[h]:null}=u,x=(0,s.default)(u,d),S=void 0!==w?w:b&&"Root"!==b&&"root"!==b||!1,k=_||!1,T=p;"Root"===b||"root"===b?T=r:b?T=l:"string"==typeof e&&e.charCodeAt(0)>96&&(T=void 0);let I=(0,o.default)(e,(0,i.default)({shouldForwardProp:T,label:f},x)),C=e=>"function"==typeof e&&e.__emotion_real!==e||(0,a.isPlainObject)(e)?r=>y(e,(0,i.default)({},r,{theme:v({theme:r.theme,defaultTheme:n,themeId:t})})):e,A=(r,...s)=>{let o=C(r),a=s?s.map(C):[];m&&E&&a.push(e=>{let r=v((0,i.default)({},e,{defaultTheme:n,themeId:t}));if(!r.components||!r.components[m]||!r.components[m].styleOverrides)return null;let s=r.components[m].styleOverrides,o={};return Object.entries(s).forEach(([t,n])=>{o[t]=y(n,(0,i.default)({},e,{theme:r}))}),E(e,o)}),m&&!S&&a.push(e=>{var r;let s=v((0,i.default)({},e,{defaultTheme:n,themeId:t})),o=null==s||null==(r=s.components)||null==(r=r[m])?void 0:r.variants;return y({variants:o},(0,i.default)({},e,{theme:s}))}),k||a.push(c);let l=a.length-s.length;if(Array.isArray(r)&&l>0){let e=Array(l).fill("");(o=[...r,...e]).raw=[...r.raw,...e]}let u=I(o,...a);return e.muiName&&(u.muiName=e.muiName),u};return I.withConfig&&(A.withConfig=I.withConfig),A}};var i=r(n(10434)),s=r(n(7071)),o=function(e,t){if(!t&&e&&e.__esMo
179dule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var o=i?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(r,s,o):r[s]=e[s]}return r.default=e,n&&n.set(e,r),r}(n(32485)),a=n(58524);r(n(87641)),r(n(92125));var l=r(n(19926)),u=r(n(386));let c=["ownerState"],h=["variants"],d=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}function p(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}let m=(0,l.default)(),g=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function v({defaultTheme:e,theme:t,themeId:n}){return 0===Object.keys(t).length?e:t[n]||t}function y(e,t){let{ownerState:n}=t,r=(0,s.default)(t,c),o="function"==typeof e?e((0,i.default)({ownerState:n},r)):e;if(Array.isArray(o))return o.flatMap(e=>y(e,(0,i.default)({ownerState:n},r)));if(o&&"object"==typeof o&&Array.isArray(o.variants)){let{variants:e=[]}=o,t=(0,s.default)(o,h),a=t;return e.forEach(e=>{let t=!0;"function"==typeof e.props?t=e.props((0,i.default)({ownerState:n},r,n)):Object.keys(e.props).forEach(i=>{(null==n?void 0:n[i])!==e.props[i]&&r[i]!==e.props[i]&&(t=!1)}),t&&(Array.isArray(a)||(a=[a]),a.push("function"==typeof e.style?e.style((0,i.default)({ownerState:n},r,n)):e.style))}),a}return o}},35266:function(e,t,n){"use strict";n.d(t,{Z:function(){return b}});var r=n(63366),i=n(87462),s=n(67294),o=n(90512),a=n(34867),l=n(94780),u=n(14142),c=n(29628),h=n(45098),d=n(17172),f=n(85893);let p=["className","component","disableGutters","fixed","maxWidth","classes"],m=(0,d.Z)(),g=(0,h.Z)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`maxWidth${(0,u.Z)(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),v=e=>(0,c.Z)({props:e,name:"MuiContainer",defaultTheme:m}),y=(e,t)=>{let n=e=>(0,a.ZP)(t,e),{classes:r,fixed:i,disableGutters:s,maxWidth:o}=e,c={root:["root",o&&`maxWidth${(0,u.Z)(String(o))}`,i&&"fixed",s&&"disableGutters"]};return(0,l.Z)(c,n,r)};function b(e={}){let{createStyledComponent:t=g,useThemeProps:n=v,componentName:a="MuiContainer"}=e,l=t(({theme:e,ownerState:t})=>(0,i.Z)({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}),({theme:e,ownerState:t})=>t.fixed&&Object.keys(e.breakpoints.values).reduce((t,n)=>{let r=e.breakpoints.values[n];return 0!==r&&(t[e.breakpoints.up(n)]={maxWidth:`${r}${e.breakpoints.unit}`}),t},{}),({theme:e,ownerState:t})=>(0,i.Z)({},"xs"===t.maxWidth&&{[e.breakpoints.up("xs")]:{maxWidth:Math.max(e.breakpoints.values.xs,444)}},t.maxWidth&&"xs"!==t.maxWidth&&{[e.breakpoints.up(t.maxWidth)]:{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`}})),u=s.forwardRef(function(e,t){let s=n(e),{className:u,component:c="div",disableGutters:h=!1,fixed:d=!1,maxWidth:m="lg"}=s,g=(0,r.Z)(s,p),v=(0,i.Z)({},s,{component:c,disableGutters:h,fixed:d,maxWidth:m}),b=y(v,a);return(0,f.jsx)(l,(0,i.Z)({as:c,ownerState:v,className:(0,o.Z)(b.root,u),ref:t},g))});return u}},32842:function(e,t,n){"use strict";n.d(t,{i:function(){return a}});var r=n(67294),i=n(35971),s=n(85893);let o=r.createContext(void 0);function a({props:e,name:t}){let n=r.useContext(o);return function(e){let{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;let s=t.components[n];return s.defaultProps?(0,i.Z)(s.defaultProps,r):s.styleOverrides||s.variants?r:(0,i.Z)(s,r)}({props:e,name:t,theme:{components:n}})}t.Z=function({value:e,children:t}){return(0,s.jsx)(o.Provider,{value:e,children:t})}},82056:function(e,t,n){"use strict";n.d(t,{V:function(){return u}});var r=n(87462),i=n(63366),s=n(67294),o=n(85893);let a=["value"],l=s.createContext(),u=()=>{let e=s.useContext(l);return null!=e&&e};t.Z=function(e){let{value:t}=e,n=(0,i.Z)(e,a);return(0,o.jsx)(l.Provider,(0,r.Z)({value:null==t||t},n))}},95408:function(e,t,n){"use strict";n.d(t,{L7:function(){return l},P$:function(){return c},VO:function(){return i},W8:function(){return a},dt:function(){return u},k9:function(){return o}});var r=n(4953);let i={xs:0,sm:600,md:900,lg:1200,xl:1536},s={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${i[e]}px)`};function o(e,t,n){let r=e.theme||{};if(Array.isArray(t)){let e=r.breakpoints||s;return t.reduce((r,i,s)=>(r[e.up(e.keys[s])]=n(t[s]),r),{})}if("object"==typeof t){let e=r.breakpoints||s;return Object.keys(t).reduce((r,s)=>{if(-1!==Object.keys(e.values||i).indexOf(s)){let i=e.up(s);r[i]=n(t[s],s)}else r[s]=t[s];return r},{})}let o=n(t);return o}function a(e={}){var t;let n=null==(t=e.keys)?void 0:t.reduce((t,n)=>{let r=e.up(n);return t[r]={},t},{});return n||{}}function l(e,t){return e.reduce((e,t)=>
179{let n=e[t],r=!n||0===Object.keys(n).length;return r&&delete e[t],e},t)}function u(e,...t){let n=a(e),i=[n,...t].reduce((e,t)=>(0,r.Z)(e,t),{});return l(Object.keys(n),i)}function c({values:e,breakpoints:t,base:n}){let r;let i=n||function(e,t){if("object"!=typeof e)return{};let n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((t,r)=>{r<e.length&&(n[t]=!0)}):r.forEach(t=>{null!=e[t]&&(n[t]=!0)}),n}(e,t),s=Object.keys(i);return 0===s.length?e:s.reduce((t,n,i)=>(Array.isArray(e)?(t[n]=null!=e[i]?e[i]:e[r],r=i):"object"==typeof e?(t[n]=null!=e[n]?e[n]:e[r],r=n):t[n]=e,t),{})}},41796:function(e,t,n){"use strict";n.d(t,{Fq:function(){return l},_4:function(){return u}});var r=n(56535),i=n(7610);function s(e,t=0,n=1){return(0,i.Z)(e,t,n)}function o(e){let t;if(e.type)return e;if("#"===e.charAt(0))return o(function(e){e=e.slice(1);let t=RegExp(`.{1,${e.length>=6?2:1}}`,"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?`rgb${4===n.length?"a":""}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}(e));let n=e.indexOf("("),i=e.substring(0,n);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(i))throw Error((0,r.Z)(9,e));let s=e.substring(n+1,e.length-1);if("color"===i){if(t=(s=s.split(" ")).shift(),4===s.length&&"/"===s[3].charAt(0)&&(s[3]=s[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(t))throw Error((0,r.Z)(10,t))}else s=s.split(",");return{type:i,values:s=s.map(e=>parseFloat(e)),colorSpace:t}}function a(e){let{type:t,colorSpace:n}=e,{values:r}=e;return -1!==t.indexOf("rgb")?r=r.map((e,t)=>t<3?parseInt(e,10):e):-1!==t.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),`${t}(${r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`})`}function l(e,t){return e=o(e),t=s(t),("rgb"===e.type||"hsl"===e.type)&&(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,a(e)}function u(e,t=.15){var n;let r;return Number((.2126*(r=(r="hsl"===(n=o(n=e)).type||"hsla"===n.type?o(function(e){e=o(e);let{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,s=r*Math.min(i,1-i),l=(e,t=(e+n/30)%12)=>i-s*Math.max(Math.min(t-3,9-t,1),-1),u="rgb",c=[Math.round(255*l(0)),Math.round(255*l(8)),Math.round(255*l(4))];return"hsla"===e.type&&(u+="a",c.push(t[3])),a({type:u,values:c})}(n)).values:n.values).map(e=>("color"!==n.type&&(e/=255),e<=.03928?e/12.92:((e+.055)/1.055)**2.4)))[0]+.7152*r[1]+.0722*r[2]).toFixed(3))>.5?function(e,t){if(e=o(e),t=s(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return a(e)}(e,t):function(e,t){if(e=o(e),t=s(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return a(e)}(e,t)}},61354:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(87462),i=n(63366),s=n(67294),o=n(90512),a=n(32485),l=n(86523),u=n(39707),c=n(96682),h=n(85893);let d=["className","component"];function f(e={}){let{themeId:t,defaultTheme:n,defaultClassName:f="MuiBox-root",generateClassName:p}=e,m=(0,a.default)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(l.Z),g=s.forwardRef(function(e,s){let a=(0,c.Z)(n),l=(0,u.Z)(e),{className:g,component:v="div"}=l,y=(0,i.Z)(l,d);return(0,h.jsx)(m,(0,r.Z)({as:v,ref:s,className:(0,o.Z)(g,p?p(f):f),theme:t&&a[t]||a},y))});return g}},57064:function(e,t,n){"use strict";function r(e,t){if(this.vars&&"function"==typeof this.getColorSchemeSelector){let n=this.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)");return{[n]:t}}return this.palette.mode===e?t:{}}n.d(t,{Z:function(){return r}})},41512:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(63366),i=n(87462);let s=["values","unit","step"],o=e=>{let t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>(0,i.Z)({},e,{[t.key]:t.val}),{})};function a(e){let{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:a=5}=e,l=(0,r.Z)(e,s),u=o(t),c=Object.keys(u);function h(e){let r="number"==typeof t[e]?t[e]:e;return`@media (min-width:${r}${n})`}function d(e){let r="number"==typeof t[e]?t[e]:e;return`@media (max-width:${r-a/100}
179${n})`}function f(e,r){let i=c.indexOf(r);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"==typeof t[c[i]]?t[c[i]]:r)-a/100}${n})`}return(0,i.Z)({keys:c,values:u,up:h,down:d,between:f,only:function(e){return c.indexOf(e)+1<c.length?f(e,c[c.indexOf(e)+1]):h(e)},not:function(e){let t=c.indexOf(e);return 0===t?h(c[1]):t===c.length-1?d(c[t]):f(e,c[c.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},l)}},17172:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(87462),i=n(63366),s=n(4953),o=n(41512),a={borderRadius:4},l=n(98700),u=n(86523),c=n(44920),h=n(57064);let d=["breakpoints","palette","spacing","shape"];var f=function(e={},...t){let{breakpoints:n={},palette:f={},spacing:p,shape:m={}}=e,g=(0,i.Z)(e,d),v=(0,o.Z)(n),y=function(e=8){if(e.mui)return e;let t=(0,l.hB)({spacing:e}),n=(...e)=>{let n=0===e.length?[1]:e;return n.map(e=>{let n=t(e);return"number"==typeof n?`${n}px`:n}).join(" ")};return n.mui=!0,n}(p),b=(0,s.Z)({breakpoints:v,direction:"ltr",components:{},palette:(0,r.Z)({mode:"light"},f),spacing:y,shape:(0,r.Z)({},a,m)},g);return b.applyStyles=h.Z,(b=t.reduce((e,t)=>(0,s.Z)(e,t),b)).unstable_sxConfig=(0,r.Z)({},c.Z,null==g?void 0:g.unstable_sxConfig),b.unstable_sx=function(e){return(0,u.Z)({sx:e,theme:this})},b}},19926:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return r.Z},private_createBreakpoints:function(){return i.Z},unstable_applyStyles:function(){return s.Z}});var r=n(17172),i=n(41512),s=n(57064)},47730:function(e,t,n){"use strict";var r=n(4953);t.Z=function(e,t){return t?(0,r.Z)(e,t,{clone:!1}):e}},98700:function(e,t,n){"use strict";n.d(t,{hB:function(){return p},eI:function(){return f},NA:function(){return m},e6:function(){return v},o3:function(){return y}});var r=n(95408),i=n(54844),s=n(47730);let o={m:"margin",p:"padding"},a={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},u=function(e){let t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}(e=>{if(e.length>2){if(!l[e])return[e];e=l[e]}let[t,n]=e.split(""),r=o[t],i=a[n]||"";return Array.isArray(i)?i.map(e=>r+e):[r+i]}),c=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],h=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],d=[...c,...h];function f(e,t,n,r){var s;let o=null!=(s=(0,i.DW)(e,t,!1))?s:n;return"number"==typeof o?e=>"string"==typeof e?e:o*e:Array.isArray(o)?e=>"string"==typeof e?e:o[e]:"function"==typeof o?o:()=>void 0}function p(e){return f(e,"spacing",8,"spacing")}function m(e,t){if("string"==typeof t||null==t)return t;let n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:`-${n}`}function g(e,t){let n=p(e.theme);return Object.keys(e).map(i=>(function(e,t,n,i){if(-1===t.indexOf(n))return null;let s=u(n),o=e=>s.reduce((t,n)=>(t[n]=m(i,e),t),{}),a=e[n];return(0,r.k9)(e,a,o)})(e,t,i,n)).reduce(s.Z,{})}function v(e){return g(e,c)}function y(e){return g(e,h)}function b(e){return g(e,d)}v.propTypes={},v.filterProps=c,y.propTypes={},y.filterProps=h,b.propTypes={},b.filterProps=d},54844:function(e,t,n){"use strict";n.d(t,{DW:function(){return s},Jq:function(){return o}});var r=n(14142),i=n(95408);function s(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){let n=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=n)return n}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function o(e,t,n,r=n){let i;return i="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:s(e,n)||r,t&&(i=t(i,r,e)),i}t.ZP=function(e){let{prop:t,cssProperty:n=e.prop,themeKey:a,transform:l}=e,u=e=>{if(null==e[t])return null;let u=e[t],c=e.theme,h=s(c,a)||{},d=e=>{let i=o(h,l,e);return(e===i&&"string"==typeof e&&(i=o(h,l,`${t}${"default"===e?"":(0,r.Z)(e)}`,e)),!1===n)?i:{[n]:i}};return(0,i.k9)(e,u,d)};return u.propTypes={},u.filterProps=[t],u}},44920:function(e,t,n){"use strict";n.d(t,{Z:function(){return G}});var r=n(98700),i=n(54844),s=n(47730),o=function(...e){let t=e.reduce((e,t)=>
179(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>Object.keys(e).reduce((n,r)=>t[r]?(0,s.Z)(n,t[r](e)):n,{});return n.propTypes={},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n},a=n(95408);function l(e){return"number"!=typeof e?e:`${e}px solid`}function u(e,t){return(0,i.ZP)({prop:e,themeKey:"borders",transform:t})}let c=u("border",l),h=u("borderTop",l),d=u("borderRight",l),f=u("borderBottom",l),p=u("borderLeft",l),m=u("borderColor"),g=u("borderTopColor"),v=u("borderRightColor"),y=u("borderBottomColor"),b=u("borderLeftColor"),w=u("outline",l),_=u("outlineColor"),E=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){let t=(0,r.eI)(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:(0,r.NA)(t,e)});return(0,a.k9)(e,e.borderRadius,n)}return null};E.propTypes={},E.filterProps=["borderRadius"],o(c,h,d,f,p,m,g,v,y,b,E,w,_);let x=e=>{if(void 0!==e.gap&&null!==e.gap){let t=(0,r.eI)(e.theme,"spacing",8,"gap"),n=e=>({gap:(0,r.NA)(t,e)});return(0,a.k9)(e,e.gap,n)}return null};x.propTypes={},x.filterProps=["gap"];let S=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){let t=(0,r.eI)(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:(0,r.NA)(t,e)});return(0,a.k9)(e,e.columnGap,n)}return null};S.propTypes={},S.filterProps=["columnGap"];let k=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){let t=(0,r.eI)(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:(0,r.NA)(t,e)});return(0,a.k9)(e,e.rowGap,n)}return null};k.propTypes={},k.filterProps=["rowGap"];let T=(0,i.ZP)({prop:"gridColumn"}),I=(0,i.ZP)({prop:"gridRow"}),C=(0,i.ZP)({prop:"gridAutoFlow"}),A=(0,i.ZP)({prop:"gridAutoColumns"}),O=(0,i.ZP)({prop:"gridAutoRows"}),R=(0,i.ZP)({prop:"gridTemplateColumns"}),P=(0,i.ZP)({prop:"gridTemplateRows"}),N=(0,i.ZP)({prop:"gridTemplateAreas"}),D=(0,i.ZP)({prop:"gridArea"});function M(e,t){return"grey"===t?t:e}o(x,S,k,T,I,C,A,O,R,P,N,D);let L=(0,i.ZP)({prop:"color",themeKey:"palette",transform:M}),Z=(0,i.ZP)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:M}),j=(0,i.ZP)({prop:"backgroundColor",themeKey:"palette",transform:M});function F(e){return e<=1&&0!==e?`${100*e}%`:e}o(L,Z,j);let U=(0,i.ZP)({prop:"width",transform:F}),V=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){let t=t=>{var n,r;let i=(null==(n=e.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[t])||a.VO[t];return i?(null==(r=e.theme)||null==(r=r.breakpoints)?void 0:r.unit)!=="px"?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:F(t)}};return(0,a.k9)(e,e.maxWidth,t)}return null};V.filterProps=["maxWidth"];let $=(0,i.ZP)({prop:"minWidth",transform:F}),z=(0,i.ZP)({prop:"height",transform:F}),B=(0,i.ZP)({prop:"maxHeight",transform:F}),q=(0,i.ZP)({prop:"minHeight",transform:F});(0,i.ZP)({prop:"size",cssProperty:"width",transform:F}),(0,i.ZP)({prop:"size",cssProperty:"height",transform:F});let H=(0,i.ZP)({prop:"boxSizing"});o(U,V,$,z,B,q,H);let W={border:{themeKey:"borders",transform:l},borderTop:{themeKey:"borders",transform:l},borderRight:{themeKey:"borders",transform:l},borderBottom:{themeKey:"borders",transform:l},borderLeft:{themeKey:"borders",transform:l},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:l},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:E},color:{themeKey:"palette",transform:M},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:M},backgroundColor:{themeKey:"palette",transform:M},p:{style:r.o3},pt:{style:r.o3},pr:{style:r.o3},pb:{style:r.o3},pl:{style:r.o3},px:{style:r.o3},py:{style:r.o3},padding:{style:r.o3},paddingTop:{style:r.o3},paddingRight:{style:r.o3},paddingBottom:{style:r.o3},paddingLeft:{style:r.o3},paddingX:{style:r.o3},paddingY:{style:r.o3},paddingInline:{style:r.o3},paddingInlineStart:{style:r.o3},paddingInlineEnd:{style:r.o3},paddingBlock:{style:r.o3},paddingBlockStart:{style:r.o3},paddingBlockEnd:{style:r.o3},m:{style:r.e6},mt:{style:r.e6},mr:{style:r.e6},mb:{style:r.e6},ml:{style:r.e6},mx:{style:r.e6},my:{style:r.e6},margin:{style:r.e6},marginTop:{style:r.e6},marginRight:{style:r.e6},marginBottom:{style:r.e6},marginLeft:{style:r.e6},marginX:{style:r.e6},marginY:{style:r.e6},marginInline:{style:r.e6},marginInlineStart:{style:r.e6},marginInlineEnd:{style:r.e6},marginBlock:{style:r.e6},marginBlockStart:{style:r.e6},marginBlockEnd:{style:r.e6},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:x},rowGap:{style:k},columnGap:{style:S},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:F},maxWidth:{style:V},minWidth:{transform:F},height:{transform:F},maxHeight:{transform:F},minHeight:{transform:F},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};var G=W},39707:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(87462),i=n(63366),s=n(4953),o=n(44920);let a=["sx"],l=e=>{var t,n;let r={systemProps:{},otherProps:{}},i=null!=(t=null==e||null==(n=e.theme)?void 0:n.unstable_sxConfig)?t:o.Z;return Object.keys(e).forEach(t=>{i[t]?r.systemProps[t]=e[t]:r.otherProps[t]=e[t]}),r};function u(e){let t;let{sx:n}=e,o=(0,i.Z)(e,a),{systemProps:u,otherProps:c}=l(o);return t=Array.isArray(n)?[u,...n]:"function"==typeof n?(...e)=>{let t=n(...e);return(0,s.P)(t)?(0,r.Z)({},u,t):u}:(0,r.Z)({},u,n),(0,r.Z)({},c,{sx:t})}},386:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return r.Z},extendSxProp:function(){return i.Z},unstable_createStyleFunctionSx:function(){return r.n},unstable_defaultSxConfig:function(){return s.Z}});var r=n(86523),i=n(39707),s=n(44920)},86523:function(e,t,n){"use strict";n.d(t,{n:function(){return l}});var r=n(14142),i=n(47730),s=n(54844),o=n(95408),a=n(44920);function l(){function e(e,t,n,i){let a={[e]:t,theme:n},l=i[e];if(!l)return{[e]:t};let{cssProperty:u=e,themeKey:c,transform:h,style:d}=l;if(null==t)return null;if("typography"===c&&"inherit"===t)return{[e]:t};let f=(0,s.DW)(n,c)||{};if(d)return d(a);let p=t=>{let n=(0,s.Jq)(f,h,t);return(t===n&&"string"==typeof t&&(n=(0,s.Jq)(f,h,`${e}${"default"===t?"":(0,r.Z)(t)}`,t)),!1===u)?n:{[u]:n}};return(0,o.k9)(a,t,p)}return function t(n){var r;let{sx:s,theme:l={}}=n||{};if(!s)return null;let u=null!=(r=l.unstable_sxConfig)?r:a.Z;function c(n){let r=n;if("function"==typeof n)r=n(l);else if("object"!=typeof n)return n;if(!r)return null;let s=(0,o.W8)(l.breakpoints),a=Object.keys(s),c=s;return Object.keys(r).forEach(n=>{var s;let a="function"==typeof(s=r[n])?s(l):s;
179if(null!=a){if("object"==typeof a){if(u[n])c=(0,i.Z)(c,e(n,a,l,u));else{let e=(0,o.k9)({theme:l},a,e=>({[n]:e}));(function(...e){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),n=new Set(t);return e.every(e=>n.size===Object.keys(e).length)})(e,a)?c[n]=t({sx:a,theme:l}):c=(0,i.Z)(c,e)}}else c=(0,i.Z)(c,e(n,a,l,u))}}),(0,o.L7)(a,c)}return Array.isArray(s)?s.map(c):c(s)}}let u=l();u.filterProps=["sx"],t.Z=u},45098:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var r=n(87462),i=n(63366),s=n(32485),o=n(4953),a=n(17172),l=n(86523);let u=["ownerState"],c=["variants"],h=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function d(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}let f=(0,a.Z)(),p=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function m({defaultTheme:e,theme:t,themeId:n}){return 0===Object.keys(t).length?e:t[n]||t}function g(e,t){let{ownerState:n}=t,s=(0,i.Z)(t,u),o="function"==typeof e?e((0,r.Z)({ownerState:n},s)):e;if(Array.isArray(o))return o.flatMap(e=>g(e,(0,r.Z)({ownerState:n},s)));if(o&&"object"==typeof o&&Array.isArray(o.variants)){let{variants:e=[]}=o,t=(0,i.Z)(o,c),a=t;return e.forEach(e=>{let t=!0;"function"==typeof e.props?t=e.props((0,r.Z)({ownerState:n},s,n)):Object.keys(e.props).forEach(r=>{(null==n?void 0:n[r])!==e.props[r]&&s[r]!==e.props[r]&&(t=!1)}),t&&(Array.isArray(a)||(a=[a]),a.push("function"==typeof e.style?e.style((0,r.Z)({ownerState:n},s,n)):e.style))}),a}return o}let v=function(e={}){let{themeId:t,defaultTheme:n=f,rootShouldForwardProp:a=d,slotShouldForwardProp:u=d}=e,c=e=>(0,l.Z)((0,r.Z)({},e,{theme:m((0,r.Z)({},e,{defaultTheme:n,themeId:t}))}));return c.__mui_systemSx=!0,(e,l={})=>{var f;let v;(0,s.internal_processStyles)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));let{name:y,slot:b,skipVariantsResolver:w,skipSx:_,overridesResolver:E=(f=p(b))?(e,t)=>t[f]:null}=l,x=(0,i.Z)(l,h),S=void 0!==w?w:b&&"Root"!==b&&"root"!==b||!1,k=_||!1,T=d;"Root"===b||"root"===b?T=a:b?T=u:"string"==typeof e&&e.charCodeAt(0)>96&&(T=void 0);let I=(0,s.default)(e,(0,r.Z)({shouldForwardProp:T,label:v},x)),C=e=>"function"==typeof e&&e.__emotion_real!==e||(0,o.P)(e)?i=>g(e,(0,r.Z)({},i,{theme:m({theme:i.theme,defaultTheme:n,themeId:t})})):e,A=(i,...s)=>{let o=C(i),a=s?s.map(C):[];y&&E&&a.push(e=>{let i=m((0,r.Z)({},e,{defaultTheme:n,themeId:t}));if(!i.components||!i.components[y]||!i.components[y].styleOverrides)return null;let s=i.components[y].styleOverrides,o={};return Object.entries(s).forEach(([t,n])=>{o[t]=g(n,(0,r.Z)({},e,{theme:i}))}),E(e,o)}),y&&!S&&a.push(e=>{var i;let s=m((0,r.Z)({},e,{defaultTheme:n,themeId:t})),o=null==s||null==(i=s.components)||null==(i=i[y])?void 0:i.variants;return g({variants:o},(0,r.Z)({},e,{theme:s}))}),k||a.push(c);let l=a.length-s.length;if(Array.isArray(i)&&l>0){let e=Array(l).fill("");(o=[...i,...e]).raw=[...i.raw,...e]}let u=I(o,...a);return e.muiName&&(u.muiName=e.muiName),u};return I.withConfig&&(A.withConfig=I.withConfig),A}}();var y=v},96682:function(e,t,n){"use strict";var r=n(17172),i=n(34168);let s=(0,r.Z)();t.Z=function(e=s){return(0,i.Z)(e)}},20539:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(35971);function i(e){let{theme:t,name:n,props:i}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?(0,r.Z)(t.components[n].defaultProps,i):i}},29628:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(20539),i=n(96682);function s({props:e,name:t,defaultTheme:n,themeId:s}){let o=(0,i.Z)(n);s&&(o=o[s]||o);let a=(0,r.Z)({theme:o,name:t,props:e});return a}},34168:function(e,t,n){"use strict";var r=n(67294),i=n(87685);t.Z=function(e=null){let t=r.useContext(i.T);return t&&0!==Object.keys(t).length?t:e}},37078:function(e,t){"use strict";let n;let r=e=>e,i=(n=r,{configure(e){n=e},generate:e=>n(e),reset(){n=r}});t.Z=i},14142:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(56535);function i(e){if("string"!=typeof e)throw Error((0,r.Z)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},87641:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return r.Z}});var r=n(14142)},7610:function(e,t){"use strict";t.Z=function(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}},14800:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return r.Z}});var r=n(7610)},94780:function(e,t,n){"use strict";function r(e,t,n){let r={};return Object.keys(e).forEach(i=>
179{r[i]=e[i].reduce((e,r)=>{if(r){let i=t(r);""!==i&&e.push(i),n&&n[r]&&e.push(n[r])}return e},[]).join(" ")}),r}n.d(t,{Z:function(){return r}})},91476:function(e,t,n){"use strict";function r(...e){return e.reduce((e,t)=>null==t?e:function(...n){e.apply(this,n),t.apply(this,n)},()=>{})}n.d(t,{Z:function(){return r}})},39336:function(e,t,n){"use strict";function r(e,t=166){let n;function r(...i){let s=()=>{e.apply(this,i)};clearTimeout(n),n=setTimeout(s,t)}return r.clear=()=>{clearTimeout(n)},r}n.d(t,{Z:function(){return r}})},4953:function(e,t,n){"use strict";n.d(t,{P:function(){return s},Z:function(){return function e(t,n,o={clone:!0}){let a=o.clone?(0,r.Z)({},t):t;return s(t)&&s(n)&&Object.keys(n).forEach(r=>{i.isValidElement(n[r])?a[r]=n[r]:s(n[r])&&Object.prototype.hasOwnProperty.call(t,r)&&s(t[r])?a[r]=e(t[r],n[r],o):o.clone?a[r]=s(n[r])?function e(t){if(i.isValidElement(t)||!s(t))return t;let n={};return Object.keys(t).forEach(r=>{n[r]=e(t[r])}),n}(n[r]):n[r]:a[r]=n[r]}),a}}});var r=n(87462),i=n(67294);function s(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}},58524:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return r.Z},isPlainObject:function(){return r.P}});var r=n(4953)},56535:function(e,t,n){"use strict";function r(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}n.d(t,{Z:function(){return r}})},55480:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return r.Z}});var r=n(56535)},34867:function(e,t,n){"use strict";n.d(t,{ZP:function(){return s}});var r=n(37078);let i={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function s(e,t,n="Mui"){let s=i[t];return s?`${n}-${s}`:`${r.Z.generate(e)}-${t}`}},1588:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(34867);function i(e,t,n="Mui"){let i={};return t.forEach(t=>{i[t]=(0,r.ZP)(e,t,n)}),i}},92125:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return l},getFunctionName:function(){return s}});var r=n(79593);let i=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function s(e){let t=`${e}`.match(i),n=t&&t[1];return n||""}function o(e,t=""){return e.displayName||e.name||s(e)||t}function a(e,t,n){let r=o(t);return e.displayName||(""!==r?`${n}(${r})`:n)}function l(e){if(null!=e){if("string"==typeof e)return e;if("function"==typeof e)return o(e,"Component");if("object"==typeof e)switch(e.$$typeof){case r.A4:return a(e,e.render,"ForwardRef");case r._Y:return a(e,e.type,"memo")}}}},57907:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(67294);function i(e){if(parseInt(r.version,10)>=19){var t;return(null==e||null==(t=e.props)?void 0:t.ref)||null}return(null==e?void 0:e.ref)||null}},90712:function(e,t){"use strict";t.Z=function(e){return"string"==typeof e}},82690:function(e,t,n){"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,{Z:function(){return r}})},74161:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(82690);function i(e){let t=(0,r.Z)(e);return t.defaultView||window}},35971:function(e,t,n){"use strict";n.d(t,{Z:function(){return function e(t,n){let i=(0,r.Z)({},n);return Object.keys(t).forEach(s=>{if(s.toString().match(/^(components|slots)$/))i[s]=(0,r.Z)({},t[s],i[s]);else if(s.toString().match(/^(componentsProps|slotProps)$/)){let o=t[s]||{},a=n[s];i[s]={},a&&Object.keys(a)?o&&Object.keys(o)?(i[s]=(0,r.Z)({},a),Object.keys(o).forEach(t=>{i[s][t]=e(o[t],a[t])})):i[s]=a:i[s]=o}else void 0===i[s]&&(i[s]=t[s])}),i}}});var r=n(87462)},27364:function(e,t,n){"use strict";function r(e,t){"function"==typeof e?e(t):e&&(e.current=t)}n.d(t,{Z:function(){return r}})},19032:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(67294);function i({controlled:e,default:t,name:n,state:i="value"}){let{current:s}=r.useRef(void 0!==e),[o,a]=r.useState(t),l=r.useCallback(e=>{s||a(e)},[]);return[s?e:o,l]}},73546:function(e,t,n){"use strict";var r=n(67294);let i="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;t.Z=i},59948:function(e,t,n){"use strict";var r=n(67294),i=n(73546);t.Z=function(e){let t=r.useRef(e);return(0,i.Z)(()=>{t.current=e}),r.useRef((...e)=>(0,t.current)(...e)).current}},33703:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(67294),i=n(27364);function s(...e){return r.useMemo(()=>e.every(e=>null==e)?null:t=>
179{e.forEach(e=>{(0,i.Z)(e,t)})},e)}},92996:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r,i=n(67294);let s=0,o=(r||(r=n.t(i,2)))["useId".toString()];function a(e){if(void 0!==o){let t=o();return null!=e?e:t}return function(e){let[t,n]=i.useState(e);return i.useEffect(()=>{null==t&&n(`mui-${s+=1}`)},[t]),e||t}(e)}},46271:function(e,t,n){"use strict";n.d(t,{V:function(){return o},Z:function(){return a}});var r=n(67294);let i={},s=[];class o{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new o}start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}}function a(){var e;let t=function(e,t){let n=r.useRef(i);return n.current===i&&(n.current=e(void 0)),n}(o.create).current;return e=t.disposeEffect,r.useEffect(e,s),t}},76489:function(e,t){"use strict";/*!
180 * cookie
181 * Copyright(c) 2012-2014 Roman Shtylman
182 * Copyright(c) 2015 Douglas Christopher Wilson
183 * MIT Licensed
184 */t.parse=function(e,t){if("string"!=typeof e)throw TypeError("argument str must be a string");for(var r={},i=e.split(";"),s=(t||{}).decode||n,o=0;o<i.length;o++){var a=i[o],l=a.indexOf("=");if(!(l<0)){var u=a.substring(0,l).trim();if(void 0==r[u]){var c=a.substring(l+1,a.length).trim();'"'===c[0]&&(c=c.slice(1,-1)),r[u]=function(e,t){try{return t(e)}catch(t){return e}}(c,s)}}}return r},t.serialize=function(e,t,n){var s=n||{},o=s.encode||r;if("function"!=typeof o)throw TypeError("option encode is invalid");if(!i.test(e))throw TypeError("argument name is invalid");var a=o(t);if(a&&!i.test(a))throw TypeError("argument val is invalid");var l=e+"="+a;if(null!=s.maxAge){var u=s.maxAge-0;if(isNaN(u)||!isFinite(u))throw TypeError("option maxAge is invalid");l+="; Max-Age="+Math.floor(u)}if(s.domain){if(!i.test(s.domain))throw TypeError("option domain is invalid");l+="; Domain="+s.domain}if(s.path){if(!i.test(s.path))throw TypeError("option path is invalid");l+="; Path="+s.path}if(s.expires){if("function"!=typeof s.expires.toUTCString)throw TypeError("option expires is invali
184d");l+="; Expires="+s.expires.toUTCString()}if(s.httpOnly&&(l+="; HttpOnly"),s.secure&&(l+="; Secure"),s.sameSite)switch("string"==typeof s.sameSite?s.sameSite.toLowerCase():s.sameSite){case!0:case"strict":l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"none":l+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return l};var n=decodeURIComponent,r=encodeURIComponent,i=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/},27484:function(e){var t,n,r,i,s,o,a,l,u,c,h,d,f,p,m,g,v,y,b,w,_,E;e.exports=(t="millisecond",n="second",r="minute",i="hour",s="week",o="month",a="quarter",l="year",u="date",c="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},(m={})[p="en"]={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||"th")+"]"}},g="$isDayjsObject",v=function(e){return e instanceof _||!(!e||!e[g])},y=function e(t,n,r){var i;if(!t)return p;if("string"==typeof t){var s=t.toLowerCase();m[s]&&(i=s),n&&(m[s]=n,i=s);var o=t.split("-");if(!i&&o.length>1)return e(o[0])}else{var a=t.name;m[a]=t,i=a}return!r&&i&&(p=i),i||!r&&p},b=function(e,t){if(v(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new _(n)},(w={s:f,z:function(e){var t=-e.utcOffset(),n=Math.abs(t);return(t<=0?"+":"-")+f(Math.floor(n/60),2,"0")+":"+f(n%60,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,o),s=n-i<0,a=t.clone().add(r+(s?-1:1),o);return+(-(r+(n-i)/(s?i-a:a-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return({M:o,y:l,w:s,d:"day",D:u,h:i,m:r,s:n,ms:t,Q:a})[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}}).l=y,w.i=v,w.w=function(e,t){return b(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})},E=(_=function(){function e(e){this.$L=y(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[g]=!0}var f=e.prototype;return f.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(w.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(h);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(t)}(e),this.init()},f.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},f.$utils=function(){return w},f.isValid=function(){return this.$d.toString()!==c},f.isSame=function(e,t){var n=b(e);return this.startOf(t)<=n&&n<=this.endOf(t)},f.isAfter=function(e,t){return b(e)<this.startOf(t)},f.isBefore=function(e,t){return this.endOf(t)<b(e)},f.$g=function(e,t,n){return w.u(e)?this[t]:this.set(n,e)},f.unix=function(){return Math.floor(this.valueOf()/1e3)},f.valueOf=function(){return this.$d.getTime()},f.startOf=function(e,t){var a=this,c=!!w.u(t)||t,h=w.p(e),d=function(e,t){var n=w.w(a.$u?Date.UTC(a.$y,t,e):new Date(a.$y,t,e),a);return c?n:n.endOf("day")},f=function(e,t){return w.w(a.toDate()[e].apply(a.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(t)),a)},p=this.$W,m=this.$M,g=this.$D,v="set"+(this.$u?"UTC":"");switch(h){case l:return c?d(1,0):d(31,11);case o:return c?d(1,m):d(0,m+1);case s:var y=this.$locale().weekStart||0,b=(p<y?p+7:p)-y;return d(c?g-b:g+(6-b),m);case"day":case u:return f(v+"Hours",0);case i:return f(v+"Minutes",1);case r:return f(v+"Seconds",2);case n:return f(v+"Milliseconds",3);default:return this.clone()}},f.endOf=function(e){return this.startOf(e,!1)},f.$set=function(e,s){var a,c=w.p(e),h="set"+(this.$u?"UTC":""),d=((a={}).day=h+"Date",a[u]=h+"Date",a[o]=h+"Month",a[l]=h+"FullYear",a[i]=h+"Hours",a[r]=h+"Minutes",a[n]=h+"Seconds",a[t]=h+"Milliseconds",a)[c],f="day"===c?this.$D+(s-this.$W):s;if(c===o||c===l){var p=this.clone().set(u,1);p.$d[d](f),p.init(),this.$d=p.set(u,Math.min(this.$D,p.daysInMonth())).$d}else d&&this.$d[d](f);return this.init(),this},f.set=function(e,t){return this.clone().$set(e,t)},f.get=function(e){return this[w.p(e)]()},f.add=function(e,t){var a,u=this;e=Number(e);var c=w.p(t),h=function(t){var n=b(u);return w.w(n.date(n.date()+Math.round(t*e)),u)};if(c===o)return this.set(o,this.$M+e);if(c===l)return this.set(l,this.$y+e);if("day"===c)return h(1);if(c===s)return h(7);var d=((a={})[r]=6e4,a[i]=36e5,a[n]=1e3,a)[c]||1,f=this.$d.getTime()+e*d;return w.w(f,this)},f.subtract=function(e,t){return this.add(-1*e,t)},f.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||c;var r=e||"YYYY-MM-DDTHH:mm:ssZ",i=w.z(this),s=this.$H,o=this.$m,a=this.$M,l=n.weekdays,u=n.months,h=n.meridiem,f=function(e,n,i,s){return e&&(e[
184n]||e(t,r))||i[n].slice(0,s)},p=function(e){return w.s(s%12||12,e,"0")},m=h||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(d,function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return w.s(t.$y,4,"0");case"M":return a+1;case"MM":return w.s(a+1,2,"0");case"MMM":return f(n.monthsShort,a,u,3);case"MMMM":return f(u,a);case"D":return t.$D;case"DD":return w.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return f(n.weekdaysMin,t.$W,l,2);case"ddd":return f(n.weekdaysShort,t.$W,l,3);case"dddd":return l[t.$W];case"H":return String(s);case"HH":return w.s(s,2,"0");case"h":return p(1);case"hh":return p(2);case"a":return m(s,o,!0);case"A":return m(s,o,!1);case"m":return String(o);case"mm":return w.s(o,2,"0");case"s":return String(t.$s);case"ss":return w.s(t.$s,2,"0");case"SSS":return w.s(t.$ms,3,"0");case"Z":return i}return null}(e)||i.replace(":","")})},f.utcOffset=function(){return-(15*Math.round(this.$d.getTimezoneOffset()/15))},f.diff=function(e,t,u){var c,h=this,d=w.p(t),f=b(e),p=(f.utcOffset()-this.utcOffset())*6e4,m=this-f,g=function(){return w.m(h,f)};switch(d){case l:c=g()/12;break;case o:c=g();break;case a:c=g()/3;break;case s:c=(m-p)/6048e5;break;case"day":c=(m-p)/864e5;break;case i:c=m/36e5;break;case r:c=m/6e4;break;case n:c=m/1e3;break;default:c=m}return u?c:w.a(c)},f.daysInMonth=function(){return this.endOf(o).$D},f.$locale=function(){return m[this.$L]},f.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=y(e,t,!0);return r&&(n.$L=r),n},f.clone=function(){return w.w(this.$d,this)},f.toDate=function(){return new Date(this.valueOf())},f.toJSON=function(){return this.isValid()?this.toISOString():null},f.toISOString=function(){return this.$d.toISOString()},f.toString=function(){return this.$d.toUTCString()},e}()).prototype,b.prototype=E,[["$ms",t],["$s",n],["$m",r],["$H",i],["$W","day"],["$M",o],["$y",l],["$D",u]].forEach(function(e){E[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),b.extend=function(e,t){return e.$i||(e(t,_,b),e.$i=!0),b},b.locale=y,b.isDayjs=v,b.unix=function(e){return b(1e3*e)},b.en=m[p],b.Ls=m,b.p={},b)},37553:function(e,t,n){var r,i;e.exports=(r=n(27484),i={name:"vi",weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ s\xe1u_thứ bảy".split("_"),months:"th\xe1ng 1_th\xe1ng 2_th\xe1ng 3_th\xe1ng 4_th\xe1ng 5_th\xe1ng 6_th\xe1ng 7_th\xe1ng 8_th\xe1ng 9_th\xe1ng 10_th\xe1ng 11_th\xe1ng 12".split("_"),weekStart:1,weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},relativeTime:{future:"%s tới",past:"%s trước",s:"v\xe0i gi\xe2y",m:"một ph\xfat",mm:"%d ph\xfat",h:"một giờ",hh:"%d giờ",d:"một ng\xe0y",dd:"%d ng\xe0y",M:"một th\xe1ng",MM:"%d th\xe1ng",y:"một năm",yy:"%d năm"}},(r&&"object"==typeof r&&"default"in r?r:{default:r}).default.locale(i,null,!0),i)},8679:function(e,t,n){"use strict";var r=n(21296),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},s={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function l(e){return r.isMemo(e)?o:a[e.$$typeof]||i}a[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[r.Memo]=o;var u=Object.defineProperty,c=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(p){var i=f(n);i&&i!==p&&e(t,i,r)}var o=c(n);h&&(o=o.concat(h(n)));for(var a=l(t),m=l(n),g=0;g<o.length;++g){var v=o[g];if(!s[v]&&!(r&&r[v])&&!(m&&m[v])&&!(a&&a[v])){var y=d(n,v);try{u(t,v,y)}catch(e){}}}}return t}},96103:function(e,t){"use strict";/** @license React v16.13.1
185 * react-is.production.min.js
186 *
187 * Copyright (c) Facebook, Inc. and its affiliates.
188 *
189 * This source code is licensed under the MIT license found in the
190 * LICENSE file in the root directory of this source tree.
191 */var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,s=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,h=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function _(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case h:case s:case a:case o:case f:return e;default:switch(e=e&&e.$$typeof){case u:case d:case g:case m:case l:return e;default:return t}}case i:return t}}}function E(e){return _(e)===h}t.AsyncMode=c,t.ConcurrentMode=h,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=d,t.Fragment=s,t.Lazy=g,t.Memo=m,t.Portal=i,t.Profiler=a,t.StrictMode=o,t.Suspense=f,t.isAsyncMode=function(e){return E(e)||_(e)===c},t.isConcurrentMode=E,t.isContextConsumer=function(e){return _(e)===u},t.isContextProvider=function(e){return _(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return _(e)===d},t.isFragment=function(e){return _(e)===s},t.isLazy=function(e){return _(e)===g},t.isMemo=function(e){return _(e)===m},t.isPortal=function(e){return _(e)===i},t.isProfiler=function(e){return _(e)===a},t.isStrictMode=function(e){return _(e)===o},t.isSuspense=function(e){return _(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===s||e===h||e===a||e===o||e===f||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===u||e.$$typeof===d||e.$$typeof===y||e.$$typeof===b||e.$$typeof===w||e.$$typeof===v)},t.typeOf=_},21296:function(e,t,n){"use strict";e.exports=n(96103)},6840:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(18330)}])},13991:function(e,t){"use strict";var n,r;
191Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{PrefetchKind:function(){return n},ACTION_REFRESH:function(){return i},ACTION_NAVIGATE:function(){return s},ACTION_RESTORE:function(){return o},ACTION_SERVER_PATCH:function(){return a},ACTION_PREFETCH:function(){return l},ACTION_FAST_REFRESH:function(){return u},ACTION_SERVER_ACTION:function(){return c}});let i="refresh",s="navigate",o="restore",a="server-patch",l="prefetch",u="fast-refresh",c="server-action";(r=n||(n={})).AUTO="auto",r.FULL="full",r.TEMPORARY="temporary",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},81516:function(e,t){"use strict";function n(e,t,n,r){return!1}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},15619:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return E}});let r=n(38754),i=n(61757),s=i._(n(67294)),o=r._(n(42636)),a=n(3735),l=n(80508),u=n(83341);n(34210);let c=n(82387);function h(e){return"/"===e[0]?e.slice(1):e}let d={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image/",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1},f=new Set,p="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",m=new Map([["default",function(e){let{config:t,src:n,width:r,quality:i}=e;return n.endsWith(".svg")&&!t.dangerouslyAllowSVG?n:(0,c.normalizePathTrailingSlash)(t.path)+"?url="+encodeURIComponent(n)+"&w="+r+"&q="+(i||75)}],["imgix",function(e){let{config:t,src:n,width:r,quality:i}=e,s=new URL(""+t.path+h(n)),o=s.searchParams;return o.set("auto",o.getAll("auto").join(",")||"format"),o.set("fit",o.get("fit")||"max"),o.set("w",o.get("w")||r.toString()),i&&o.set("q",i.toString()),s.href}],["cloudinary",function(e){let{config:t,src:n,width:r,quality:i}=e,s=["f_auto","c_limit","w_"+r,"q_"+(i||"auto")].join(",")+"/";return""+t.path+s+h(n)}],["akamai",function(e){let{config:t,src:n,width:r}=e;return""+t.path+h(n)+"?imwidth="+r}],["custom",function(e){let{src:t}=e;throw Error('Image with src "'+t+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader')}]]);function g(e){return void 0!==e.default}function v(e){let{config:t,src:n,unoptimized:r,layout:i,width:s,quality:o,sizes:a,loader:l}=e;if(r)return{src:n,srcSet:void 0,sizes:void 0};let{widths:u,kind:c}=function(e,t,n,r){let{deviceSizes:i,allSizes:s}=e;if(r&&("fill"===n||"responsive"===n)){let e=/(^|\s)(1?\d?\d)vw/g,t=[];for(let n;n=e.exec(r);n)t.push(parseInt(n[2]));if(t.length){let e=.01*Math.min(...t);return{widths:s.filter(t=>t>=i[0]*e),kind:"w"}}return{widths:s,kind:"w"}}if("number"!=typeof t||"fill"===n||"responsive"===n)return{widths:i,kind:"w"};let o=[...new Set([t,2*t].map(e=>s.find(t=>t>=e)||s[s.length-1]))];return{widths:o,kind:"x"}}(t,s,i,a),h=u.length-1;return{sizes:a||"w"!==c?a:"100vw",srcSet:u.map((e,r)=>l({config:t,src:n,quality:o,width:e})+" "+("w"===c?e:r+1)+c).join(", "),src:l({config:t,src:n,quality:o,width:u[h]})}}function y(e){return"number"==typeof e?e:"string"==typeof e?parseInt(e,10):void 0}function b(e){var t;let n=(null==(t=e.config)?void 0:t.loader)||"default",r=m.get(n);if(r)return r(e);throw Error('Unknown "loader" found in "next.config.js". Expected: '+a.VALID_LOADERS.join(", ")+". Received: "+n)}function w(e,t,n,r,i,s){if(!e||e.src===p||e["data-loaded-src"]===t)return;e["data-loaded-src"]=t;let o="decode"in e?e.decode():Promise.resolve();o.catch(()=>{}).then(()=>{if(e.parentNode&&(f.add(t),"blur"===r&&s(!0),null==i?void 0:i.current)){let{naturalWi
191dth:t,naturalHeight:n}=e;i.current({naturalWidth:t,naturalHeight:n})}})}let _=e=>{let{imgAttributes:t,heightInt:n,widthInt:r,qualityInt:i,layout:o,className:a,imgStyle:l,blurStyle:u,isLazy:c,placeholder:h,loading:d,srcString:f,config:p,unoptimized:m,loader:g,onLoadingCompleteRef:y,setBlurComplete:b,setIntersection:_,onLoad:E,onError:x,isVisible:S,noscriptSizes:k,...T}=e;return d=c?"lazy":d,s.default.createElement(s.default.Fragment,null,s.default.createElement("img",{...T,...t,decoding:"async","data-nimg":o,className:a,style:{...l,...u},ref:(0,s.useCallback)(e=>{_(e),(null==e?void 0:e.complete)&&w(e,f,o,h,y,b)},[_,f,o,h,y,b]),onLoad:e=>{let t=e.currentTarget;w(t,f,o,h,y,b),E&&E(e)},onError:e=>{"blur"===h&&b(!0),x&&x(e)}}),(c||"blur"===h)&&s.default.createElement("noscript",null,s.default.createElement("img",{...T,loading:d,decoding:"async","data-nimg":o,style:l,className:a,...v({config:p,src:f,unoptimized:m,layout:o,width:r,quality:i,sizes:k,loader:g})})))};function E(e){var t;let n,{src:r,sizes:i,unoptimized:c=!1,priority:h=!1,loading:m,lazyRoot:w=null,lazyBoundary:E,className:x,quality:S,width:k,height:T,style:I,objectFit:C,objectPosition:A,onLoadingComplete:O,placeholder:R="empty",blurDataURL:P,...N}=e,D=(0,s.useContext)(u.ImageConfigContext),M=(0,s.useMemo)(()=>{let e=d||D||a.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),n=e.deviceSizes.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:n}},[D]),L=i?"responsive":"intrinsic";"layout"in N&&(N.layout&&(L=N.layout),delete N.layout);let Z=b;if("loader"in N){if(N.loader){let e=N.loader;Z=t=>{let{config:n,...r}=t;return e(r)}}delete N.loader}let j="";if("object"==typeof(t=r)&&(g(t)||void 0!==t.src)){let e=g(r)?r.default:r;if(!e.src)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(e));if(P=P||e.blurDataURL,j=e.src,(!L||"fill"!==L)&&(T=T||e.height,k=k||e.width,!e.height||!e.width))throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(e))}let F=!h&&("lazy"===m||void 0===m);((r="string"==typeof r?r:j).startsWith("data:")||r.startsWith("blob:"))&&(c=!0,F=!1),f.has(r)&&(F=!1),M.unoptimized&&(c=!0);let[U,V]=(0,s.useState)(!1),[$,z,B]=(0,l.useIntersection)({rootRef:w,rootMargin:E||"200px",disabled:!F}),q=!F||z,H={boxSizing:"border-box",display:"block",overflow:"hidden",width:"initial",height:"initial",background:"none",opacity:1,border:0,margin:0,padding:0},W={boxSizing:"border-box",display:"block",width:"initial",height:"initial",background:"none",opacity:1,border:0,margin:0,padding:0},G=!1,K=y(k),Q=y(T),Y=y(S),X=Object.assign({},I,{position:"absolute",top:0,left:0,bottom:0,right:0,boxSizing:"border-box",padding:0,border:"none",margin:"auto",display:"block",width:0,height:0,minWidth:"100%",maxWidth:"100%",minHeight:"100%",maxHeight:"100%",objectFit:C,objectPosition:A}),J="blur"!==R||U?{}:{backgroundSize:C||"cover",backgroundPosition:A||"0% 0%",filter:"blur(20px)",backgroundImage:'url("'+P+'")'};if("fill"===L)H.display="block",H.position="absolute",H.top=0,H.left=0,H.bottom=0,H.right=0;else if(void 0!==K&&void 0!==Q){let e=Q/K,t=isNaN(e)?"100%":""+100*e+"%";"responsive"===L?(H.display="block",H.position="relative",G=!0,W.paddingTop=t):"intrinsic"===L?(H.display="inline-block",H.position="relative",H.maxWidth="100%",G=!0,W.maxWidth="100%",n="data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20version=%271.1%27%20width=%27"+K+"%27%20height=%27"+Q+"%27/%3e"):"fixed"===L&&(H.display="inline-block",H.position="relative",H.width=K,H.height=Q)}let ee={src:p,srcSet:void 0,sizes:void 0};q&&(ee=v({config:M,src:r,unoptimized:c,layout:L,width:K,quality:Y,sizes:i,loader:Z}));let et=r,en={imageSrcSet:ee.srcSet,imageSizes:ee.sizes,crossOrigin:N.crossOrigin,referrerPolicy:N.referrerPolicy},er=s.default.useLayoutEffect,ei=(0,s.useRef)(O),es=(0,s.useRef)(r);(0,s.useEffect)(()=>{ei.current=O},[O]),er(()=>{es.current!==r&&(B(),es.current=r)},[B,r]);
191let eo={isLazy:F,imgAttributes:ee,heightInt:Q,widthInt:K,qualityInt:Y,layout:L,className:x,imgStyle:X,blurStyle:J,loading:m,config:M,unoptimized:c,placeholder:R,loader:Z,srcString:et,onLoadingCompleteRef:ei,setBlurComplete:V,setIntersection:$,isVisible:q,noscriptSizes:i,...N};return s.default.createElement(s.default.Fragment,null,s.default.createElement("span",{style:H},G?s.default.createElement("span",{style:W},n?s.default.createElement("img",{style:{display:"block",maxWidth:"100%",width:"initial",height:"initial",background:"none",opacity:1,border:0,margin:0,padding:0},alt:"","aria-hidden":!0,src:n}):null):null,s.default.createElement(_,eo)),h?s.default.createElement(o.default,null,s.default.createElement("link",{key:"__nimg-"+ee.src+ee.srcSet+ee.sizes,rel:"preload",as:"image",href:ee.srcSet?void 0:ee.src,...en})):null)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},95569:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return w}});let r=n(38754),i=r._(n(67294)),s=n(14532),o=n(83353),a=n(61410),l=n(79064),u=n(370),c=n(69955),h=n(24224),d=n(80508),f=n(81516),p=n(64266),m=n(13991),g=new Set;function v(e,t,n,r,i,s){if(!s&&!(0,o.isLocalURL)(t))return;if(!r.bypassPrefetchedCheck){let i=void 0!==r.locale?r.locale:"locale"in e?e.locale:void 0,s=t+"%"+n+"%"+i;if(g.has(s))return;g.add(s)}let a=s?e.prefetch(t,i):e.prefetch(t,n,r);Promise.resolve(a).catch(e=>{})}function y(e){return"string"==typeof e?e:(0,a.formatUrl)(e)}let b=i.default.forwardRef(function(e,t){let n,r;let{href:a,as:g,children:b,prefetch:w=null,passHref:_,replace:E,shallow:x,scroll:S,locale:k,onClick:T,onMouseEnter:I,onTouchStart:C,legacyBehavior:A=!1,...O}=e;n=b,A&&("string"==typeof n||"number"==typeof n)&&(n=i.default.createElement("a",null,n));let R=!1!==w,P=null===w?m.PrefetchKind.AUTO:m.PrefetchKind.FULL,N=i.default.useContext(c.RouterContext),D=i.default.useContext(h.AppRouterContext),M=null!=N?N:D,L=!N,{href:Z,as:j}=i.default.useMemo(()=>{if(!N){let e=y(a);return{href:e,as:g?y(g):e}}let[e,t]=(0,s.resolveHref)(N,a,!0);return{href:e,as:g?(0,s.resolveHref)(N,g):t||e}},[N,a,g]),F=i.default.useRef(Z),U=i.default.useRef(j);A&&(r=i.default.Children.only(n));let V=A?r&&"object"==typeof r&&r.ref:t,[$,z,B]=(0,d.useIntersection)({rootMargin:"200px"}),q=i.default.useCallback(e=>{(U.current!==j||F.current!==Z)&&(B(),U.current=j,F.current=Z),$(e),V&&("function"==typeof V?V(e):"object"==typeof V&&(V.current=e))},[j,V,Z,B,$]);i.default.useEffect(()=>{M&&z&&R&&v(M,Z,j,{locale:k},{kind:P},L)},[j,Z,z,k,R,null==N?void 0:N.locale,M,L,P]);let H={ref:q,onClick(e){A||"function"!=typeof T||T(e),A&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),M&&!e.defaultPrevented&&function(e,t,n,r,s,a,l,u,c,h){let{nodeName:d}=e.currentTarget,f="A"===d.toUpperCase();if(f&&(function(e){let t=e.currentTarget,n=t.getAttribute("target");return n&&"_self"!==n||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!c&&!(0,o.isLocalURL)(n)))return;e.preventDefault();let p=()=>{"beforePopState"in t?t[s?"replace":"push"](n,r,{shallow:a,locale:u,scroll:l}):t[s?"replace":"push"](r||n,{forceOptimisticNavigation:!h})};c?i.default.startTransition(p):p()}(e,M,Z,j,E,x,S,k,L,R)},onMouseEnter(e){A||"function"!=typeof I||I(e),A&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),M&&(R||!L)&&v(M,Z,j,{locale:k,priority:!0,bypassPrefetchedCheck:!0},{kind:P},L)},onTouchStart(e){A||"function"!=typeof C||C(e),A&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),M&&(R||!L)&&v(M,Z,j,{locale:k,priority:!0,bypassPrefetchedCheck:!0},{kind:P},L)}};if((0,l.isAbsoluteUrl)(j))H.href=j;else if(!A||_||"a"===r.type&&!("href"in r.props)){let e=void 0!==k?k:null==N?void 0:N.locale,t=(null==N?void 0:N.isLocaleDomain)&&(0,f.getDomainLocale)(j,e,null==N?void 0:N.locales,null==N?void 0:N.domainLocales);H.href=t||(0,p.addBasePath)((0,u.addLocale)(j,e,null==N?void 0:N.defaultLocale))}return A?i.default.cloneElement(r,H):i.default.createElement("a",{...O,...H},n)}),w=b;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esMo
191dule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},80508:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return l}});let r=n(67294),i=n(10029),s="function"==typeof IntersectionObserver,o=new Map,a=[];function l(e){let{rootRef:t,rootMargin:n,disabled:l}=e,u=l||!s,[c,h]=(0,r.useState)(!1),d=(0,r.useRef)(null),f=(0,r.useCallback)(e=>{d.current=e},[]);(0,r.useEffect)(()=>{if(s){if(u||c)return;let e=d.current;if(e&&e.tagName){let r=function(e,t,n){let{id:r,observer:i,elements:s}=function(e){let t;let n={root:e.root||null,margin:e.rootMargin||""},r=a.find(e=>e.root===n.root&&e.margin===n.margin);if(r&&(t=o.get(r)))return t;let i=new Map,s=new IntersectionObserver(e=>{e.forEach(e=>{let t=i.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)})},e);return t={id:n,observer:s,elements:i},a.push(n),o.set(n,t),t}(n);return s.set(e,t),i.observe(e),function(){if(s.delete(e),i.unobserve(e),0===s.size){i.disconnect(),o.delete(r);let e=a.findIndex(e=>e.root===r.root&&e.margin===r.margin);e>-1&&a.splice(e,1)}}}(e,e=>e&&h(e),{root:null==t?void 0:t.current,rootMargin:n});return r}}else if(!c){let e=(0,i.requestIdleCallback)(()=>h(!0));return()=>(0,i.cancelIdleCallback)(e)}},[u,n,t,c,d.current]);let p=(0,r.useCallback)(()=>{h(!1)},[]);return[f,c,p]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},95677:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{noSSR:function(){return o},default:function(){return a}});let r=n(38754),i=(n(67294),r._(n(8976)));function s(e){return{default:(null==e?void 0:e.default)||e}}function o(e,t){return delete t.webpack,delete t.modules,e(t)}function a(e,t){let n=i.default,r={loading:e=>{let{error:t,isLoading:n,pastDelay:r}=e;return null}};e instanceof Promise?r.loader=()=>e:"function"==typeof e?r.loader=e:"object"==typeof e&&(r={...r,...e}),r={...r,...t};let a=r.loader,l=()=>null!=a?a().then(s):Promise.resolve(s(()=>null));return(r.loadableGenerated&&(r={...r,...r.loadableGenerated},delete r.loadableGenerated),"boolean"!=typeof r.ssr||r.ssr)?n({...r,loader:l}):(delete r.webpack,delete r.modules,o(n,r))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},92254:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return s}});let r=n(38754),i=r._(n(67294)),s=i.default.createContext(null)},8976:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return f}});let r=n(38754),i=r._(n(67294)),s=n(92254),o=[],a=[],l=!1;function u(e){let t=e(),n={loading:!0,loaded:null,error:null};return n.promise=t.then(e=>(n.loading=!1,n.loaded=e,e)).catch(e=>{throw n.loading=!1,n.error=e,e}),n}class c{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function h(e){return function(e,t){let n=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),r=null;function o(){if(!r){let t=new c(e,n);r={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return r.promise()}if(!l){let e=n.webpack?n.webpack():n.modules;e&&a.push(t=>{for(let n of e)if(t.includes(n))return o()})}function u(e,t){!function(){o();let e=i.default.useContext(s.LoadableContext);
191e&&Array.isArray(n.modules)&&n.modules.forEach(t=>{e(t)})}();let a=i.default.useSyncExternalStore(r.subscribe,r.getCurrentValue,r.getCurrentValue);return i.default.useImperativeHandle(t,()=>({retry:r.retry}),[]),i.default.useMemo(()=>{var t;return a.loading||a.error?i.default.createElement(n.loading,{isLoading:a.loading,pastDelay:a.pastDelay,timedOut:a.timedOut,error:a.error,retry:r.retry}):a.loaded?i.default.createElement((t=a.loaded)&&t.default?t.default:t,e):null},[e,a])}return u.preload=()=>o(),u.displayName="LoadableComponent",i.default.forwardRef(u)}(u,e)}function d(e,t){let n=[];for(;e.length;){let r=e.pop();n.push(r(t))}return Promise.all(n).then(()=>{if(e.length)return d(e,t)})}h.preloadAll=()=>new Promise((e,t)=>{d(o).then(e,t)}),h.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let n=()=>(l=!0,t());d(a,e).then(n,n)})),window.__NEXT_PRELOADREADY=h.preloadReady;let f=h},43740:function(e,t,n){"use strict";n.d(t,{Bg:function(){return p},h4:function(){return i}});var r,i,s=n(85893),o=n(67294),a=n(64198);function l(e,t){let{type:n,payload:r}=t;switch(n){case i.SET_USER_PROFILE:return{...e,userProfile:r};case i.SET_PURCHASE_PLANS:return{...e,purchasePlans:[...r]};case i.INCREASE_REQUEST_USAGE:{var s;let t=null===(s=e.userProfile)||void 0===s?void 0:s.freeUsagePolicies;if(!t||t&&0==t.length)return{...e};let n=t[0];return n.usage.totalRequests+=r,t[0]=n,{...e,userProfile:{...e.userProfile,freeUsagePolicies:t}}}case i.TOGGLE_UI:return{...e,uiState:{...u,[r]:!e.uiState[r]}};case i.TOGGLE_MODAL:return{...e,modalState:{...c,[r]:!e.modalState[r]}};default:return e}}(r=i||(i={}))[r.SET_USER_PROFILE=0]="SET_USER_PROFILE",r[r.SET_PURCHASE_PLANS=1]="SET_PURCHASE_PLANS",r[r.TOGGLE_UI=2]="TOGGLE_UI",r[r.TOGGLE_MODAL=3]="TOGGLE_MODAL",r[r.INCREASE_REQUEST_USAGE=4]="INCREASE_REQUEST_USAGE";let u={[a.Oo.WITH_POWEREDITOR]:!1},c={[a.M3.PAY_TO_USE]:!1,[a.M3.REQUIRE_LOGIN]:!1,[a.M3.NOT_ENOUGH_CASH]:!1,[a.M3.PURCHASE_CONFIRMATION]:!1,[a.M3.PURCHASE_SUCCESS]:!1},h={uiState:u,modalState:c,openFab:!0},d=(0,o.createContext)(h),f=(0,o.createContext)(()=>null),p=()=>{let e=(0,o.useContext)(d),t=(0,o.useContext)(f);return[e,t]},m=e=>{let{children:t}=e,[n,r]=(0,o.useReducer)(l,h);return(0,s.jsx)(d.Provider,{value:n,children:(0,s.jsx)(f.Provider,{value:r,children:t})})};t.ZP=m},64198:function(e,t,n){"use strict";var r,i,s,o;n.d(t,{CC:function(){return f},M3:function(){return i},NP:function(){return h},Oo:function(){return r},SF:function(){return c},d:function(){return l},hM:function(){return a},nV:function(){return d},xe:function(){return u}});let a=120202;(s=r||(r={}))[s.WITH_POWEREDITOR=0]="WITH_POWEREDITOR",(o=i||(i={}))[o.PAY_TO_USE=0]="PAY_TO_USE",o[o.PURCHASE_CONFIRMATION=1]="PURCHASE_CONFIRMATION",o[o.REQUIRE_LOGIN=2]="REQUIRE_LOGIN",o[o.NOT_ENOUGH_CASH=3]="NOT_ENOUGH_CASH",o[o.PURCHASE_SUCCESS=4]="PURCHASE_SUCCESS";let l={title:"Bạn đ\xe3 hết lượt miễn ph\xed",titleSubmitButton:"Đăng k\xfd ngay",titleCloseButton:"Đ\xf3ng",url:"/anfin-gpt/certification-cuate.svg",qrCode:!1},u={title:"X\xe1c nhận giao dịch",titleCloseButton:"Hủy",titleSubmitButton:"Tiếp tục",url:"/anfin-gpt/confirm-transaction.svg",qrCode:!1},c={title:"Bạn kh\xf4ng c\xf3 đủ tiền mặt trong t\xe0i khoản",decs:"Nạp th\xeam tiền để tiếp tục giao dịch",titleCloseButton:"Hủy",titleSubmitButton:"Nạp tiền",url:"/anfin-gpt/not-enough-cash.svg",qrCode:!1},h={title:"Đăng k\xfd th\xe0nh c\xf4ng",decs:"Bạn c\xf3 thể sử dụng t\xednh năng Anfin GPT kh\xf4ng giới hạn.",titleSubmitButton:"D\xf9ng ngay",url:"/anfin-gpt/purchase-success.svg",qrCode:!1},d={title:"Chưa đăng nhập t\xe0i khoản",decs:"Bạn cần đăng nhập t\xe0i khoản Anfin",titleSubmitButton:"Đăng nhập",url:"/common/computer_analystic.png",qrCode:!0},f=[{id:1,segments:"T\xf4i đang muốn đầu tư chứng kho\xe1n",group:["Đầu tư chứng kho\xe1n l\xe0 g\xec?","Đầu tư chứng kho\xe1n phải bắt đầu từ đ\xe2u?","Đầu tư chứng kho\xe1n cần bao nhi\xeau tiền?","Người mới cần chuẩn bị g\xec khi đầu tư cổ phiếu?","Đầu tư với Anfin c\xf3 an to\xe0n kh\xf4ng?"]},{id:2,segments:"T\xf4i đang đầu tư v\xe0 muốn học hỏi th\xeam",group:["Đầu tư chứng kho\xe1n sao cho hiệu quả?","C\xe1c chỉ số chứng kho\xe1n cơ bản n\xean theo d\xf5i","C\xe1c biểu đồ cần xem khi đầu tư chứng kho\xe1n ","L\xe0m sao để x\xe1c định điểm mua, b\xe1n chứng kho\xe1n?","Đầu tư d\xe0i hạn n\xean chọn cổ phiếu n\xe0o?"]},{id:3,segments:"T\xf4i cần t\xecm nội dung để đăng l\xean Cộng đồ
191ng Anfin",group:["Viết b\xe0i nhận định thị trường chứng kho\xe1n d\xe0i hạn","Viết b\xe0i ph\xe2n t\xedch tiềm năng của cổ phiếu VIC","Viết b\xe0i ph\xe2n t\xedch kỹ thuật cổ phiếu HPG","Viết b\xe0i nhận định khi đầu tư v\xe0o cổ phiếu bất động sản"]}]},17870:function(e,t,n){"use strict";n.d(t,{X:function(){return i},r:function(){return r}});let r={anfin:{id:"anfin",name:"Anfin",tabShortLabel:"Cổ phiếu",heroHeadline:"Đồng h\xe0nh c\xf9ng danh mục của bạn",benefits:["Theo d\xf5i gi\xe1 v\xe0 danh mục tập trung","Kh\xe1m ph\xe1 cổ phiếu Việt Nam","Đặt lệnh ngay tr\xean ứng dụng"],iconSrc:"/logo/new-logo.png",appStoreUrl:"https://apps.apple.com/vn/app/anfin-%C4%91%E1%BA%A7u-t%C6%B0-ch%E1%BB%A9ng-kho%C3%A1n/id1588678432?l=vi&utm_source=website_iboard&utm_medium=organic_cpc&utm_campaign=button_cta",googlePlayUrl:"https://play.google.com/store/apps/details?id=vn.anfin.app&referrer=utm_source%3Dwebsite_iboard%26utm_medium%3Dorganic_cpc%26utm_campaign%3Dbutton_cta%26anid%3Dadmob",webTradingUrl:null,deepLinkUrl:"https://anfins.app.link/download",detailUrl:"/san-pham-co-phieu",qrImage:"/landing-page/DownloadQRcode.png",qrAlt:"M\xe3 QR tải ứng dụng Anfin",mockupImage:"/app-store/Anfin.png",mockupAlt:"Giao diện ứng dụng đầu tư cổ phiếu Anfin",badgeSubtitle:"Cổ phiếu Việt Nam",highlightTickers:[{label:"FPT",url:"https://anfin.vn/app/market/FPT/"},{label:"HPG",url:"https://anfin.vn/app/market/HPG/"},{label:"VNM",url:"https://anfin.vn/app/market/VNM/"},{label:"VIC",url:"https://anfin.vn/app/market/VIC/"},{label:"MWG",url:"https://anfin.vn/app/market/MWG/"}],regulatoryNote:null,regulatoryUrl:null},anfinx:{id:"anfinx",name:"AnfinX",tabShortLabel:"H\xe0ng h\xf3a",heroHeadline:"Nắm bắt cơ hội từ thị trường to\xe0n cầu",benefits:["Giao dịch hai chiều mua v\xe0 b\xe1n","C\xf4ng cụ biểu đồ v\xe0 quản l\xfd vị thế","Trải nghiệm demo trước khi giao dịch thật"],iconSrc:"/logo/logotype_black.png",appStoreUrl:"https://apps.apple.com/us/app/anfinx-ph%C3%A1i-sinh-h%C3%A0ng-ho%C3%A1/id6475038747",googlePlayUrl:"https://play.google.com/store/apps/details?id=vn.anfin.commodity",webTradingUrl:"https://hanghoa.anfin.vn/AnfinX-Lite/",deepLinkUrl:null,detailUrl:"https://hanghoa.anfin.vn/",qrImage:"/app-store/qrCode-anfinX.png",qrAlt:"M\xe3 QR tải ứng dụng AnfinX",mockupImage:"/app-store/AnfinX.png",mockupAlt:"Giao diện ứng dụng h\xe0ng h\xf3a ph\xe1i sinh AnfinX",badgeSubtitle:"H\xe0ng h\xf3a ph\xe1i sinh",highlightTickers:[{label:"Bạc",url:"https://hanghoa.anfin.vn/san-pham/dau-tu-bac/"},{label:"Bạch kim",url:"https://hanghoa.anfin.vn/san-pham/dau-tu-bach-kim/"},{label:"C\xe0 ph\xea",url:"https://hanghoa.anfin.vn/san-pham/dau-tu-ca-phe-robusta/"},{label:"Cao su",url:"https://hanghoa.anfin.vn/san-pham/dau-tu-cao-su-rss3/"},{label:"Đồng",url:"https://hanghoa.anfin.vn/san-pham/dau-tu-dong/"}],regulatoryNote:"C\xf4ng ty TNHH Anfin — Th\xe0nh vi\xean Kinh doanh 068 của MXV",regulatoryUrl:"https://mxv.com.vn/thanh-vien/cong-ty-tnhh-anfin-m68.html"}},i=["anfin","anfinx"]},57404:function(e,t,n){"use strict";n.d(t,{ZX:function(){return l},sc:function(){return o},z0:function(){return u}});var r,i,s=n(74578);(r=i||(i={})).GOOGLE="Google",r.FACEBOOK="Facebook";let o=36e5,a="prod"===s.r.PROD,l=a?"283536558552-5o2kqrd5lf1bb9vb1okh4edhqkcq5cm3":"766889118557-a6dm5u0pj6744gjb3h2i6n5vr6gag52n",u=a?"1225662098849076":"206389018364209"},74578:function(e,t,n){"use strict";var r,i;n.d(t,{h:function(){return s},r:function(){return r}}),(i=r||(r={})).PROD="prod",i.DEV="dev",i.LOCAL="local";let s="https://firebasestorage.googleapis.com/v0/b/anfin-".concat("prod",".appspot.com/o/stocks%2Fimages%2F{STOCK_SYMBOL}.png?alt=media")},36075:function(e,t){"use strict";let n=(e,t,n)=>{window&&window.google_tag_manager&&(window.dataLayer=window.dataLayer||[],Array.isArray(window.dataLayer)&&window.dataLayer.push({event:e,eventLabel:t,eventValue:n||null}))};t.Z=n},45561:function(e,t,n){"use strict";var r=n(85893),i=n(80822),s=n(89755),o=n.n(s),a=n(41664),l=n.n(a),u=n(67294);let c=(0,u.forwardRef)((e,t)=>{let{disabledLink:n=!1,sx:s,urlRedirect:a}=e,u=(0,r.jsx)(i.Z,{ref:t,sx:{cursor:"pointer",...s},children:(0,r.jsx)(o(),{src:"/logo/new-logo.png",alt:"Anfin - Nền tảng đầu tư d\xe0nh cho người mới bắt đầu",width:134,height:32,layout:"intrinsic",priority:!0})});return n?(0,r.jsx)(r.Fragment,{children:u}):(0,r.jsx)(l(),{href:a||"/",children:u})});t.Z=c},76755:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return V}});var r=n(82729),i=n(85893),s=n(70917),o=n(90948),a=n(80822),l=n(15861),u=n(78462),c=n(97212),h=n(51233),d=n(23795),f=n(46574),p=n(86886),m=n(89755),g=n.n(m),v=n(85518),y=n(17870),b=n(36075),w=n(42496),_=n(67294);function E(){let e=(0,r._)(["\n  0%, 100% { transform: translateY(0); }\n  50% { transform: translateY(-10px); }\n"]);return E=function(){return e},e}let x=y.r.anfin,S=[{label:"Theo d\xf5i gi\xe1",icon:"/landing-page/download-app/prices.svg"}
191,{label:"Đặt lệnh",icon:"/landing-page/download-app/order.svg"},{label:"Quản l\xfd danh mục",icon:"/landing-page/download-app/portfolio.svg"}],k=[{label:"Facebook",href:"https://www.facebook.com/anfin.vn/",icon:"/landing-page/facebook.png",event:"AFweb_homepage_download_fb_button"},{label:"LinkedIn",href:"https://www.linkedin.com/company/anfin-vn/",icon:"/landing-page/linkedin.png",event:"AFweb_homepage_download_linkedin_button"},{label:"Instagram",href:"https://www.instagram.com/anfin_vn/",icon:"/landing-page/instagram.png",event:"AFweb_homepage_download_ig_button"},{label:"TikTok",href:"https://www.tiktok.com/@anfin.vn",icon:"/landing-page/tiktok.png",event:"AFweb_homepage_download_tiktok_button"}],T=(0,s.F4)(E()),I=(0,o.ZP)(a.Z)(e=>{let{theme:t}=e;return{fontSize:"10px",background:"rgba(1, 16, 69, 1)",width:"100%",height:"70em",position:"relative",overflow:"hidden",[t.breakpoints.down("md")]:{height:"auto",minHeight:"100vh",paddingTop:"30px",paddingBottom:"40px"},"@media (max-width: 460px)":{fontSize:"6px"},"@media (max-width: 360px)":{fontSize:"5px"},"@media (max-width: 320px)":{fontSize:"4px"}}}),C=(0,o.ZP)(a.Z)(e=>{let{theme:t}=e;return{position:"absolute",backgroundImage:"url(".concat("/landing-page/coverLeftDownloadApp.webp",")"),backgroundPosition:"bottom",backgroundSize:"contain",backgroundRepeat:"no-repeat",height:"51vw",bottom:"-35%",left:"-20%",width:"45vw",zIndex:1,[t.breakpoints.down("lg")]:{bottom:"-10%"},[t.breakpoints.down("sm")]:{width:"80vw",height:"100vw",bottom:"-15%",left:"-35%"}}}),A=(0,o.ZP)(a.Z)(e=>{let{theme:t}=e;return{position:"absolute",background:"#183DFF",filter:"blur(250px)",height:"65vw",width:"65vw",bottom:"-60%",left:"-70%",zIndex:0,[t.breakpoints.down("sm")]:{bottom:"0%",left:"0%"}}}),O=(0,o.ZP)(a.Z)(e=>{let{theme:t}=e;return{position:"absolute",background:"#183DFF",filter:"blur(250px)",height:"28vw",width:"20vw",top:"0%",right:"-5vw",zIndex:0,[t.breakpoints.down("sm")]:{display:"none"}}}),R=(0,o.ZP)(a.Z)(e=>{let{theme:t}=e;return{position:"relative",zIndex:1,".app-16":{position:"absolute",width:"auto",height:"100em",top:"-28em",left:"-35em",[t.breakpoints.down("md")]:{top:"-58em",left:"auto",right:"15%"},"&.moveUpDown":{animation:"".concat(T," 2s ease-in-out infinite")}},".app-15":{position:"absolute",width:"auto",height:"80em",top:"-7em",left:"-12em",[t.breakpoints.down("md")]:{top:"-35em",left:"auto",right:"-13%"},"&.moveUpDown":{animation:"".concat(T," 2s ease-in-out infinite")}}}}),P=(0,o.ZP)(l.Z)(e=>{let{theme:t}=e;return{color:"#fff",fontWeight:"700",fontSize:"36px",[t.breakpoints.down("md")]:{textAlign:"center"},[t.breakpoints.down("sm")]:{fontSize:"28px"}}}),N=(0,o.ZP)(l.Z)(e=>{let{theme:t}=e;return{color:"rgba(199, 214, 239, 1)",fontSize:"16px",lineHeight:1.6,maxWidth:"480px",marginTop:"16px",[t.breakpoints.down("md")]:{textAlign:"center",maxWidth:"none"}}}),D=(0,o.ZP)(u.Z)(e=>{let{theme:t}=e;return{display:"flex",flexWrap:"wrap",gap:"20px",padding:0,marginTop:"24px",marginBottom:"4px",[t.breakpoints.down("md")]:{justifyContent:"center"}}}),M=(0,o.ZP)(c.ZP)({width:"auto",padding:0,gap:"8px",color:"#fff",fontSize:"14px"}),L=(0,o.ZP)(h.Z)(e=>{let{theme:t}=e;return{flexDirection:"row",alignItems:"center",gap:"20px",marginTop:"28px",[t.breakpoints.down("md")]:{justifyContent:"center"}}}),Z=(0,o.ZP)(a.Z)(e=>{let{theme:t}=e;return{flexShrink:0,width:"88px",height:"88px",borderRadius:"12px",background:"#fff",display:"flex",alignItems:"center",justifyContent:"center",[t.breakpoints.down("md")]:{display:"none"}}}),j=(0,o.ZP)(u.Z)({display:"flex",flexWrap:"wrap",gap:"12px",padding:0,marginTop:"12px"}),F=(0,o.ZP)(h.Z)(e=>{let{theme:t}=e;return{flexDirection:"row",alignItems:"center",flexWrap:"wrap",gap:"18px",marginTop:"28px",paddingTop:"24px",borderTop:"1px solid rgba(255, 255, 255, 0.15)",color:"rgba(219, 231, 250, 1)",fontSize:"13px",[t.breakpoints.down("md")]:{justifyContent:"center",borderTop:"none",paddingTop:0,marginTop:"20px"}}}),U=(0,o.ZP)(d.Z)({display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderRadius:"50%",background:"rgba(255, 255, 255, 0.08)",transition:"background 0.2s ease","&:hover":{background:"rgba(255, 255, 255, 0.18)"}});function V(){let[e,t]=(0,_.useState)(""),{user:n}=(0,w.a)();return(0,_.useEffect)(()=>{let e=setTimeout(()=>{t("moveUpDown")},3e3);return()=>clearTimeout(e)},[]),(0,i.jsxs)(I,{sx:e=>({display:"flex",flexDirection:"column",[e.breakpoints.down("md")]:{paddingLeft:"0"}}),children:[(0,i.jsx)(f.Z,{sx:{height:"100%"},children:(0,i.jsxs)(p.ZP,{container:!0,maxWidth:"lg",sx:{margin:"auto",height:"100%"}
191,children:[(0,i.jsxs)(p.ZP,{item:!0,md:6,xs:12,sx:{display:"flex",flexDirection:"column",position:"relative",justifyContent:{xs:"flex-start",md:"center"},alignItems:{xs:"center",md:"flex-start"},zIndex:2},children:[(0,i.jsxs)(P,{variant:"h2",children:["Thị trường trong tầm tay. ",(0,i.jsx)("br",{}),"Danh mục lu\xf4n b\xean bạn."]}),(0,i.jsx)(N,{children:"Theo d\xf5i thị trường, đặt lệnh v\xe0 quản l\xfd danh mục ngay tr\xean điện thoại."}),(0,i.jsx)(D,{children:S.map(e=>(0,i.jsxs)(M,{children:[(0,i.jsx)(g(),{src:e.icon,alt:"",width:20,height:20}),e.label]},e.label))}),(0,i.jsxs)(L,{children:[(0,i.jsx)(Z,{children:(0,i.jsx)(g(),{src:x.qrImage,alt:x.qrAlt,width:72,height:72})}),(0,i.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,i.jsx)(l.Z,{sx:{color:"#fff",fontWeight:700,fontSize:"16px"},children:"Qu\xe9t m\xe3 để tải Anfin"}),(0,i.jsx)(l.Z,{sx:{color:"rgba(199, 214, 239, 1)",fontSize:"13px",mt:"4px"},children:"D\xe0nh cho iOS v\xe0 Android"}),(0,i.jsxs)(j,{children:[(0,i.jsx)(c.ZP,{sx:{padding:0,width:"auto"},children:(0,i.jsx)(d.Z,{href:x.appStoreUrl,target:"_blank",onClick:()=>{(0,b.Z)("AFweb_homepage_Apple_cta_button",null==n?void 0:n.userFS.uid,v.KC)},children:(0,i.jsx)(g(),{src:"/landing-page/AppStore.svg",alt:"app store",width:150,height:44})})}),(0,i.jsx)(c.ZP,{sx:{padding:0,width:"auto"},children:(0,i.jsx)(d.Z,{href:x.googlePlayUrl,target:"_blank",onClick:()=>{(0,b.Z)("AFweb_homepage_GG_cta_button",null==n?void 0:n.userFS.uid,v.KC)},children:(0,i.jsx)(g(),{src:"/landing-page/GooglePlay.svg",alt:"google play",width:150,height:44})})})]})]})]}),(0,i.jsxs)(F,{children:[(0,i.jsx)(l.Z,{sx:{fontSize:"13px"},children:"Kết nối c\xf9ng Anfin"}),(0,i.jsx)(h.Z,{direction:"row",gap:"12px",children:k.map(e=>(0,i.jsx)(U,{href:e.href,target:"_blank",onClick:()=>{(0,b.Z)(e.event,null==n?void 0:n.userFS.uid,v.KC)},children:(0,i.jsx)(g(),{src:e.icon,alt:e.label,width:18,height:18})},e.label))})]})]}),(0,i.jsx)(p.ZP,{item:!0,md:6,xs:12,sx:{mt:{xs:"300px",md:0}},children:(0,i.jsxs)(R,{children:[(0,i.jsx)("img",{className:"".concat(e," app-16 animate__animated animate__fadeInDown animate__delay-2s"),src:"/landing-page/iPhone16.webp",alt:"",loading:"lazy",decoding:"async"}),(0,i.jsx)("img",{className:"".concat(e," app-15 animate__animated animate__fadeInUp animate__delay-2s"),src:"/landing-page/iPhone15.webp",alt:"",loading:"lazy",decoding:"async"})]})})]})}),(0,i.jsx)(C,{}),(0,i.jsx)(A,{}),(0,i.jsx)(O,{})]})}},45457:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(85893),i=n(90948),s=n(51233),o=n(80822),a=n(5152),l=n.n(a),u=n(76755),c=n(72329),h=n(36470),d=n(67294),f=n(11163);function p(){let e=(0,f.useRouter)(),t=(0,d.useRef)(null);return(0,d.useEffect)(()=>{let n=()=>{setTimeout(()=>{var e;null===(e=t.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})},100)};return e.events.on("routeChangeComplete",n),()=>{e.events.off("routeChangeComplete",n)}},[]),(0,r.jsx)("div",{ref:t,style:{scrollMarginTop:"80px"}})}let m=l()(()=>Promise.resolve().then(n.bind(n,36470)).then(e=>e.MainHeader),{loadableGenerated:{webpack:()=>[36470]}}),g=(0,i.ZP)("main")(e=>{let{theme:t}=e;return{overflow:"auto",width:"100%",marginTop:"".concat(h.MAIN_DESKTOP_HEADER_HEIGHT,"px"),[t.breakpoints.down("md")]:{marginTop:"".concat(h.MAIN_DESKTOP_HEADER_HEIGHT,"px")}}});function v(e){let{children:t,sx:n,hasDownloadingApp:i=!1,hasFooter:a=!1}=e;return(0,r.jsxs)(s.Z,{sx:{minHeight:1,display:"flex",width:"100%"},children:[(0,r.jsx)(p,{}),(0,r.jsx)(m,{}),(0,r.jsxs)(g,{sx:n,children:[(0,r.jsx)(o.Z,{children:t}),(0,r.jsxs)("footer",{children:[i&&(0,r.jsx)(u.default,{}),a&&(0,r.jsx)(c.MainFooter,{})]})]})]})}},72329:function(e,t,n){"use strict";n.r(t),n.d(t,{MainFooter:function(){return M}});var r=n(85893),i=n(21269),s=n(51257),o=n(51803),a=n(56840),l=n(90948),u=n(15861),c=n(23795),h=n(80822),d=n(51233),f=n(86886),p=n(2734),m=n(46574),g=n(67720),v=n(89755),y=n.n(v),b=n(85518),w=n(36075),_=n(45561),E=n(42496);let x=[{grid:2,title:"Sản phẩm",shortcuts:[{item:"Cổ phiếu",path:"/san-pham-co-phieu/",target:!1},{item:"Ph\xe1i sinh h\xe0ng ho\xe1",path:"https://hanghoa.anfin.vn/",target:!1},{item:"Tư vấn vi\xean",path:"/san-pham/moi-gioi-dau-tu",target:!1}]},{grid:2,title:"Về Anfin",shortcuts:[{item:"Giới thiệu",path:"/gioi-thieu-ve-anfin/",target:!1},{item:"Đội ngũ Anfin",path:"/doi-ngu-anfin/",target:!1},{item:"Sứ mệnh",path:"/su-menh/",target:!1},{item:"Tuyển dụng",path:"/tuyen-dung/",target:!1}]},{grid:2,title:"Kiến thức",shortcuts:[{item:"Kiến thức",path:"/blog/huong-dan-dau-tu-chung-k
191hoan/",target:!1},{item:"Blog",path:"/blog/",target:!1}]},{grid:3,title:"Ch\xednh s\xe1ch",shortcuts:[{item:"Bảo mật & chia sẻ th\xf4ng tin",path:"/chinh-sach-bao-mat/",target:!1},{item:"Hợp đồng điện tá»­",path:"https://storage.googleapis.com/anfin.vn/public/cms/Hop_dong_hop_tac_kinh_doanh_AF_SERVICES_Business_Cooperation_Contract_19_10_2022_7e6f6a295d/Hop_dong_hop_tac_kinh_doanh_AF_SERVICES_Business_Cooperation_Contract_19_10_2022_7e6f6a295d.pdf",target:!1},{item:"Nguy\xean tắc t\xednh năng cộng đồng",path:"https://storage.googleapis.com/anfin.vn/public/cms/dieu_khoan_su_dung_cong_dong_c22f53fea2/dieu_khoan_su_dung_cong_dong_c22f53fea2.pdf",target:!0},{item:"Điều khoản - Điều kiện",path:"/dieu-khoan-dieu-kien-af-services/",target:!0}]}],S="#DCE5F1",k="#52627C",T="#1766CE",I=(0,l.ZP)(u.Z)({fontSize:18,fontWeight:700,color:"#112D59"}),C=(0,l.ZP)(c.Z)({color:k,textDecoration:"none",fontSize:"15px",fontWeight:500,"&:hover, &:focus-visible":{color:T,textDecoration:"underline"}}),A=(0,l.ZP)(h.Z)({display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:"32px",height:"32px",borderRadius:"50%",background:T,color:"#FFFFFF","& svg":{fontSize:"18px"}}),O=(0,l.ZP)(d.Z)({flexDirection:"row",alignItems:"flex-start",gap:"12px"}),R=(0,l.ZP)(h.Z)(e=>{let{theme:t}=e;return{display:"flex",[t.breakpoints.down("sm")]:{justifyContent:"space-evenly",width:"100%",marginBottom:"10px"},a:{margin:"0px 12px"}}}),P=(0,l.ZP)(h.Z)(e=>{let{theme:t}=e;return{backgroundColor:"#F7F9FC",borderTop:"1px solid ".concat(S),width:"100%",padding:"64px 0px",[t.breakpoints.down("sm")]:{padding:"32px 0px 20px"},"& .item-footer":{[t.breakpoints.down("lg")]:{paddingRight:"20px"},[t.breakpoints.down("md")]:{paddingRight:"0px"},[t.breakpoints.down("md")]:{marginBottom:"0px"}}}}),N=(0,l.ZP)(h.Z)(e=>{let{theme:t}=e;return{display:"flex",justifyContent:"space-between",alignItems:"center",[t.breakpoints.down("sm")]:{flexDirection:"column-reverse"}}}),D=(0,l.ZP)(f.ZP)(e=>{let{theme:t}=e;return{[t.breakpoints.down("sm")]:{marginTop:"32px"}}}),M=()=>{let{user:e}=(0,E.a)(),t=(0,p.Z)(),n=new Date,l=n.getUTCFullYear();return(0,r.jsx)(P,{sx:e=>({display:"flex",flexDirection:"column",[e.breakpoints.down("md")]:{paddingLeft:"0"}}),children:(0,r.jsxs)(m.Z,{maxWidth:"lg",children:[(0,r.jsxs)(f.ZP,{container:!0,justifyContent:{xs:"center",md:"space-between"},sx:{pb:t.spacing(1)},spacing:1,children:[(0,r.jsx)(f.ZP,{className:"item-footer",item:!0,xs:12,md:3,sx:{mb:3},children:(0,r.jsxs)(d.Z,{spacing:"16px",children:[(0,r.jsx)(_.Z,{sx:{mx:{sm:"inherit",md:"inherit"}}}),(0,r.jsx)(u.Z,{sx:{color:k,fontWeight:700},children:"C\xd4NG TY TNHH AF SERVICES"}),(0,r.jsxs)(O,{children:[(0,r.jsx)(A,{children:(0,r.jsx)(o.Z,{"aria-hidden":"true"})}),(0,r.jsx)(u.Z,{sx:{color:k},children:"Trụ Sở: 222 Điện Bi\xean Phá»§, Phường Xu\xe2n Ho\xe0, Th\xe0nh phố Hồ Ch\xed Minh"})]}),(0,r.jsxs)(O,{children:[(0,r.jsx)(A,{children:(0,r.jsx)(o.Z,{"aria-hidden":"true"})}),(0,r.jsx)(u.Z,{sx:{color:k},children:"Địa Điểm Kinh Doanh: Tầng 4 To\xe0 nh\xe0 Nova Evergreen, 42/2 Nguyễn Văn Trỗi, Phường Cầu Kiệu, Th\xe0nh phố Hồ Ch\xed Minh"})]}),(0,r.jsxs)(O,{sx:{alignItems:"center"},children:[(0,r.jsx)(A,{children:(0,r.jsx)(s.Z,{"aria-hidden":"true"})}),(0,r.jsxs)(u.Z,{sx:{color:k},children:["Hotline:"," ",(0,r.jsx)(c.Z,{sx:{color:k,textDecoration:"none",fontWeight:"700"},href:"tel:19006330949",children:"1900 633 049"})]})]}),(0,r.jsxs)(O,{sx:{alignItems:"center"},children:[(0,r.jsx)(A,{children:(0,r.jsx)(a.Z,{"aria-hidden":"true"})}),(0,r.jsxs)(u.Z,{sx:{color:k},children:["Email:"," ",(0,r.jsx)(c.Z,{sx:{color:k,textDecoration:"none",fontWeight:"700"},href:"mailto:[email protected]",children:"[email protected]"})]})]}),(0,r.jsxs)(O,{sx:{alignItems:"center"},children:[(0,r.jsx)(A,{children:(0,r.jsx)(i.Z,{"aria-hidden":"true"})}),(0,r.jsxs)(u.Z,{sx:{color:k},children:["Thời gian hoạt động:"," ",(0,r.jsx)(u.Z,{component:"span",sx:{color:k,fontWeight:700},children:"Thứ 2 - Thứ 6 (8:30 - 17:30)"})]})]})]})}),x.map(e=>(0,r.jsx)(L,{column:e},e.title))]}),(0,r.jsx)(g.Z,{sx:{my:t.spacing(2),borderColor:S}}),(0,r.jsxs)(N,{children:[(0,r.jsxs)(u.Z,{component:"p",textAlign:"center",sx:{color:k,fontSize:"16px"},children:["\xa9 ",l," Anfin. All rights reserved."]}),(0,r.jsxs)(R,{children:[(0,r.jsx)(c.Z,{href:"https://www.facebook.com/anfin.vn/",target:"_blank","aria-label":"Facebook",onClick:()=>{(0,w.Z)("AFweb_footer_fb_button",null==e?void 0:e.userFS.uid,b.KC)},children:(0,r.jsx)(y(),{src:"/landing-page/facebook.png",alt:"facebook",width:24,height:24})}),(0,r.jsx)(c.Z,{href:"https://www.linkedin.com/company/anfin-vn
191/",target:"_blank","aria-label":"LinkedIn",onClick:()=>{(0,w.Z)("AFweb_footer_linkedin_button",null==e?void 0:e.userFS.uid,b.KC)},children:(0,r.jsx)(y(),{src:"/landing-page/linkedin.png",alt:"LinkedIn",width:24,height:24})}),(0,r.jsx)(c.Z,{href:"https://www.instagram.com/anfin_vn/",target:"_blank","aria-label":"Instagram",onClick:()=>{(0,w.Z)("AFweb_footer_IG_button",null==e?void 0:e.userFS.uid,b.KC)},children:(0,r.jsx)(y(),{src:"/landing-page/instagram.png",alt:"instagram",width:24,height:24})}),(0,r.jsx)(c.Z,{href:"https://www.tiktok.com/@anfin.vn",target:"_blank","aria-label":"TikTok",onClick:()=>{(0,w.Z)("AFweb_footer_tiktok_button",null==e?void 0:e.userFS.uid,b.KC)},children:(0,r.jsx)(y(),{src:"/landing-page/tiktok.png",alt:"tiktok",width:24,height:24})})]})]})]})})},L=e=>{let{column:t}=e;return(0,r.jsx)(D,{item:!0,xs:12,md:t.grid,children:(0,r.jsxs)(d.Z,{spacing:2,children:[(0,r.jsx)(I,{children:t.title}),t&&(null==t?void 0:t.shortcuts.map(e=>(0,r.jsx)(C,{href:e.path,target:e.target?"_blank":"",children:e.item},e.item)))]})})}},36470:function(e,t,n){"use strict";n.r(t),n.d(t,{MAIN_DESKTOP_HEADER_HEIGHT:function(){return c},MainHeader:function(){return h}});var r=n(85893),i=n(42293),s=n(10155),o=n(5152),a=n.n(o);let l=a()(()=>Promise.all([n.e(9043),n.e(4564),n.e(7918),n.e(277),n.e(3674),n.e(6720),n.e(4769),n.e(45),n.e(4231)]).then(n.bind(n,71187)).then(e=>e.DesktopHeader),{loadableGenerated:{webpack:()=>[71187]}}),u=a()(()=>Promise.all([n.e(9043),n.e(4564),n.e(7918),n.e(277),n.e(4455),n.e(2786),n.e(6720),n.e(4769),n.e(45),n.e(3295)]).then(n.bind(n,53295)).then(e=>e.MobileHeader),{loadableGenerated:{webpack:()=>[53295]}}),c=0,h=e=>{let{forwardURL:t}=e;return(0,r.jsx)(i.Z,{position:"sticky",sx:e=>({boxShadow:"none",backgroundColor:"#FFFFFF",[e.breakpoints.down("md")]:{paddingLeft:"0"}}),children:(0,r.jsxs)(s.Z,{disableGutters:!0,sx:{height:c},children:[(0,r.jsx)(l,{forwardURL:t}),(0,r.jsx)(u,{forwardURL:t})]})})}},22771:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return p}});var r=n(85893),i=n(90948),s=n(15861),o=n(51233),a=n(80822),l=n(23795),u=n(69417),c=n(89755),h=n.n(c),d=n(45457);let f=(0,i.ZP)(s.Z)({color:"#FFFFFF",textTransform:"none",fontWeight:700,fontSize:16});function p(){return(0,r.jsx)(d.Z,{children:(0,r.jsxs)(o.Z,{my:2,spacing:2,justifyContent:"center",alignItems:"center",children:[(0,r.jsx)(a.Z,{my:4,children:(0,r.jsx)(h(),{src:"/404.svg",alt:"Page Not Found",width:400,height:252,layout:"intrinsic"})}),(0,r.jsx)(s.Z,{fontWeight:700,fontSize:28,color:"#0B399F",children:"C\xf3 lỗi xảy ra."}),(0,r.jsx)(s.Z,{fontWeight:400,fontSize:18,children:"Bạn vui l\xf2ng thử lại sau."}),(0,r.jsx)(l.Z,{href:"/",rel:"noopener",sx:{textDecoration:"none"},children:(0,r.jsx)(u.Z,{disableElevation:!0,variant:"contained",children:(0,r.jsx)(f,{children:"Về trang chủ"})})})]})})}},18330:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return Q}});var r=n(85893),i=n(87685);n(37553);var s=n(4298),o=n.n(s),a=n(50841),l=n(88767),u=n(43740),c=n(82729),h=n(70917),d=n(80822),f=n(89755),p=n.n(f),m=n(67294),g=n(42496);function v(){let e=(0,c._)(["\n  0% {\n    opacity: 0.72;\n    transform: scale(0.82);\n  }\n  70%, 100% {\n    opacity: 0;\n    transform: scale(1.48);\n  }\n"]);return v=function(){return e},e}let y=(0,h.F4)(v()),b=()=>{let{user:e}=(0,g.a)(),t=(0,m.useRef)(null),n=(0,m.useRef)(null),[i,s]=(0,m.useState)("loading"),a=(0,m.useCallback)(()=>{let e=t.current;if(!e)return!1;let r=!!e.querySelector("iframe");return r&&(null!==n.current&&(window.clearTimeout(n.current),n.current=null),s("ready")),r},[]),l=(0,m.useCallback)(()=>{null!==n.current&&window.clearTimeout(n.current),n.current=window.setTimeout(()=>{n.current=null,a()||s("unavailable")},2e4)}
191,[a]),u=(0,m.useCallback)(()=>{null!==n.current&&(window.clearTimeout(n.current),n.current=null),s("unavailable")},[]);return(0,m.useEffect)(()=>{let e=t.current;if(!e)return;let r=new MutationObserver(()=>{a()});return r.observe(e,{childList:!0,subtree:!0}),l(),()=>{r.disconnect(),null!==n.current&&window.clearTimeout(n.current)}},[a,l]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.Z,{ref:t,className:"zalo-chat-widget","data-autopopup":"0","data-height":"420","data-left-side":"false","data-oaid":"3702539646299302640","data-style":"2","data-welcome-message":"Rất vui khi được hỗ trợ bạn!","data-width":"350",sx:{bottom:{xs:e?"88px !important":"16px !important",sm:"24px !important"},left:"auto !important",position:"fixed !important",right:{xs:"16px !important",sm:"24px !important"},zIndex:"1500 !important","&::before":{animation:"".concat(y," 2.2s ease-out infinite"),backgroundColor:"rgba(0, 104, 255, 0.2)",border:"2px solid rgba(0, 104, 255, 0.34)",borderRadius:"50%",bottom:0,boxShadow:"0 0 18px rgba(0, 104, 255, 0.34)",content:'""',height:{xs:"56px",sm:"64px"},pointerEvents:"none",position:"absolute",right:0,width:{xs:"56px",sm:"64px"},zIndex:0},"& > iframe":{position:"relative",zIndex:1},"@media (prefers-reduced-motion: reduce)":{"&::before":{animation:"none",opacity:.28,transform:"scale(1.12)"}}}}),"unavailable"===i&&(0,r.jsx)(d.Z,{"aria-label":"Nhắn tin với Anfin qua Zalo",component:"a",href:"https://zalo.me/3702539646299302640",rel:"noopener noreferrer",target:"_blank",sx:{alignItems:"center",backgroundColor:"rgba(0, 104, 255, 0.18)",borderRadius:"50%",bottom:{xs:e?"88px":"16px",sm:"24px"},boxShadow:"0 0 0 9px rgba(0, 104, 255, 0.12)",display:"flex",height:{xs:"56px",sm:"64px"},justifyContent:"center",lineHeight:0,overflow:"hidden",position:"fixed",right:{xs:"16px",sm:"24px"},transition:"box-shadow 180ms ease, transform 180ms ease",width:{xs:"56px",sm:"64px"},zIndex:1499,"&:hover":{boxShadow:"0 0 0 11px rgba(0, 104, 255, 0.16), 0 8px 24px rgba(0, 104, 255, 0.32)",transform:"scale(1.05)"},"&:focus-visible":{outline:"3px solid rgba(0, 104, 255, 0.35)",outlineOffset:"3px"}},children:(0,r.jsx)(p(),{alt:"","aria-hidden":"true",height:64,layout:"responsive",src:"/social/zalo-group.png",width:64})}),(0,r.jsx)(o(),{id:"zalo-chat-widget-sdk",onError:u,src:"https://sp.zalo.me/plugins/sdk.js",strategy:"afterInteractive"})]})};var w=n(22771),_=n(73046);class E extends m.Component{static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){_.k.error("Uncaught error:\n"+JSON.stringify(e)+JSON.stringify(t.componentStack))}render(){return this.state.hasError?(0,r.jsx)(w.default,{}):this.props.children}constructor(e){super(e),this.state={hasError:!1}}}var x=n(90068);let S=(0,r.jsx)(x.Z,{styles:{body:{margin:0,padding:0,minHeight:"100vh",".MuiAutocomplete-popper":{backgroundColor:"#f9f7f7"}},main:{minHeight:"calc(100% - 72px)"}}});var k=n(56441),T=n.n(k),I=n(20041),C=n(87462),A=n(63366);let O=m.createContext(null);function R(){let e=m.useContext(O);return e}let P="function"==typeof Symbol&&Symbol.for;var N=P?Symbol.for("mui.nested"):"__THEME_NESTED__",D=function(e){let{children:t,theme:n}=e,i=R(),s=m.useMemo(()=>{let e=null===i?n:function(e,t){if("function"==typeof t){let n=t(e);return n}return(0,C.Z)({},e,t)}(i,n);return null!=e&&(e[N]=null!==i),e},[n,i]);return(0,r.jsx)(O.Provider,{value:s,children:t})},M=n(34168),L=n(82056),Z=n(32842);let j={};function F(e,t,n,r=!1){return m.useMemo(()=>{let i=e&&t[e]||t;if("function"==typeof n){let s=n(i),o=e?(0,C.Z)({},t,{[e]:s}):s;return r?()=>o:o}return e?(0,C.Z)({},t,{[e]:n}):(0,C.Z)({},t,n)},[e,t,n,r])}var U=function(e){let{children:t,theme:n,themeId:s}=e,o=(0,M.Z)(j),a=R()||j,l=F(s,o,n),u=F(s,a,n,!0),c="rtl"===l.direction;return(0,r.jsx)(D,{theme:u,children:(0,r.jsx)(i.T.Provider,{value:l,children:(0,r.jsx)(L.Z,{value:c,children:(0,r.jsx)(Z.Z,{value:null==l?void 0:l.components,children:t})})})})},V=n(10606);let $=["theme"];function z(e){let{theme:t}=e,n=(0,A.Z)(e,$),i=t[V.Z],s=i||t;return"function"!=typeof t&&(i&&!i.vars?s=(0,C.Z)({},i,{vars:null}):t&&!t.vars&&(s=(0,C.Z)({},t,{vars:null}))),(0,r.jsx)(U,(0,C.Z)({},n,{themeId:i?V.Z:void 0,theme:s}))}var B=n(66720);function q(e){let{children:t}=e,n=(0,I.Z)({typography:{allVariants:{display:"inline"},fontFamily:T().style.fontFamily},palette:{primary:{main:"#0AA5FF"}}});
191return(0,r.jsxs)(z,{theme:n,children:[(0,r.jsx)(B.ZP,{}),t]})}var H=n(87574);let W="undefined"!=typeof document,G=function(){let e;if(W){let t=document.querySelector('meta[name="emotion-insertion-point"]');e=null!=t?t:void 0}return(0,H.Z)({key:"mui-style",insertionPoint:e})}(),K=new l.QueryClient;var Q=function(e){var t;let{Component:n,emotionCache:s=G,pageProps:c}=e,h=null!==(t=n.getLayout)&&void 0!==t?t:e=>e;return(0,r.jsxs)(i.C,{value:s,children:[(0,r.jsx)(o(),{src:"https://www.googletagmanager.com/gtag/js?id=G-LV8L383FQ5"}),(0,r.jsx)(o(),{id:"gtag",dangerouslySetInnerHTML:{__html:"\n               window.dataLayer = window.dataLayer || [];\n               function gtag(){dataLayer.push(arguments);}\n               gtag('js', new Date());\n               gtag('config', 'G-LV8L383FQ5');\n             "}}),(0,r.jsx)(o(),{src:"https://accounts.google.com/gsi/client",defer:!0,id:"google-gsi-script"}),(0,r.jsx)(o(),{strategy:"lazyOnload",crossOrigin:"anonymous",src:"https://connect.facebook.net/vi_VN/sdk.js",id:"facebook-sdk-script"}),(0,r.jsx)("script",{dangerouslySetInnerHTML:{__html:"!function(f,b,e,v,n,t,s)\n      {if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n      n.callMethod.apply(n,arguments):n.queue.push(arguments)};\n      if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n      n.queue=[];t=b.createElement(e);t.async=!0;\n      t.src=v;s=b.getElementsByTagName(e)[0];\n      s.parentNode.insertBefore(t,s)}(window, document,'script',\n      'https://connect.facebook.net/en_US/fbevents.js');\n      fbq('init', '1225662098849076');\n      fbq('track', 'PageView');"}}),(0,r.jsx)("noscript",{dangerouslySetInnerHTML:{__html:'<img\n          height="1"\n          width="1"\n          style="display:none"\n          src="https://www.facebook.com/tr?id=1225662098849076&ev=PageView&noscript=1"\n        />'}}),(0,r.jsx)(o(),{id:"google-tag-manager",strategy:"lazyOnload",children:"\n          (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':\n          new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],\n          j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;
191j.src=\n          'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);\n          })(window,document,'script','dataLayer','GTM-59LJMG5C');\n        "}),(0,r.jsx)("div",{className:T().className,children:(0,r.jsx)(q,{children:(0,r.jsx)(E,{children:(0,r.jsx)(l.QueryClientProvider,{client:K,children:(0,r.jsx)(g.H,{children:(0,r.jsx)(u.ZP,{children:(0,r.jsxs)(a.wT,{anchorOrigin:{horizontal:"right",vertical:"top"},autoHideDuration:5e3,children:[h((0,r.jsx)(n,{...c})),(0,r.jsx)(b,{}),S]})})})})})})})]})}},42496:function(e,t,n){"use strict";n.d(t,{H:function(){return p},a:function(){return f}});var r=n(85893),i=n(19451),s=n(62286),o=n.n(s),a=n(67294),l=n(57404),u=n(77829),c=n(87612);let h=(0,a.createContext)({user:null,isLoading:!0}),d={path:"/",sameSite:"None",secure:!0},f=()=>(0,a.useContext)(h);function p(e){let{children:t}=e,[n,s]=(0,a.useState)(null),[f,p]=(0,a.useState)(!0),m=()=>{s(null),o().set(null,"token","",d)},g=async e=>{s(e);let t=await (0,i.wU)(e.userFS);o().set(null,"token",t,d)};return(0,a.useEffect)(()=>{if(!c.lX){p(!1);return}return(0,i.MX)(c.lX,async e=>{if(!e){m(),p(!1);return}let t=await e.getIdToken(),n=await fetch("/api/ekyc/get-user-info",{method:"GET",headers:(0,u.IZ)(t)}).then(e=>e.ok?e.json():null),r=(null==n?void 0:n.data)?n.data:null,s=e.metadata.lastSignInTime;if(!s){await g({userFS:e,userInfo:r}),p(!1);return}let o=new Date(s);Date.now().valueOf()-o.valueOf()>l.sc?(await (0,i.w7)(c.lX),m()):await g({userFS:e,userInfo:r}),p(!1)})},[]),(0,a.useEffect)(()=>{let e=setInterval(async()=>{let e=null===c.lX||void 0===c.lX?void 0:c.lX.currentUser;e&&await e.getIdToken(!0)},6e5);return()=>clearInterval(e)},[]),(0,r.jsx)(h.Provider,{value:{user:n,isLoading:f},children:t})}},77829:function(e,t,n){"use strict";n.d(t,{IZ:function(){return i}});var r=n(34155);let i=e=>{let t=new Headers;return t.append("authorization","Bearer ".concat(e)),t};r.env.API_URL},87612:function(e,t,n){"use strict";n.d(t,{lX:function(){return f},Kd:function(){return m},Tf:function(){return p}});var r=n(83977),i=n(19451),s=n(36100),o=n(86650),a=n(74578),l=JSON.parse('{"apiKey":"AIzaSyCbPXRw2spgvbeKkxjUnfJR1Sfq6Tp6O-g","authDomain":"anfin-dev.firebaseapp.com","databaseURL":"https://anfin-dev-default-rtdb.asia-southeast1.firebasedatabase.app","projectId":"anfin-dev","storageBucket":"anfin-dev.appspot.com","messagingSenderId":"766889118557","appId":"1:766889118557:web:8d995f0fbf1ab6fd5df6b4","measurementId":"G-H7Q58QBF9X"}'),u=JSON.parse('{"apiKey":"AIzaSyBQIs3mYySLW2-QmpNU24qMV_l95aPzb2Y","authDomain":"anfin-prod-323f2.firebaseapp.com","databaseURL":"https://anfin-prod-default-rtdb.asia-southeast1.firebasedatabase.app","projectId":"anfin-prod","storageBucket":"anfin-prod.appspot.com","messagingSenderId":"283536558552","appId":"1:283536558552:web:41b044fcc7accea5c5caad","measurementId":"G-Z0SZS2NPYT"}');n(73046);let c="prod"===a.r.PROD,h=l;c&&(h=u);let d=(0,r.ZF)(h),f=(0,i.v0)(d);f.setPersistence(i.a$),f.useDeviceLanguage(),(0,o.cF)(d);let p=async(e,t)=>{try{let n=(0,o.cF)(),r=(0,o.iH)(n,t);await (0,o.sf)(r,e,"data_url");let i=await (0,o.sd)(r);await (0,o.Ym)(r,{...i,cacheControl:"public, max-age=31536000"});let s=await (0,o.Jt)(r);return s}catch(e){return null}},m=(0,s.ad)(d)},73046:function(e,t,n){"use strict";n.d(t,{k:function(){return c}});var r,i,s=n(36559),o=n.n(s),a=n(74578);(r=i||(i={})).silent="OFF",r.trace="DEBUG",r.debug="DEBUG",r.info="INFO",r.warn="WARNING",r.error="ERROR",r.fatal="CRITICAL";let l={transport:{target:"pino-pretty",options:{colorize:!0,translateTime:"HH:MM"}},base:null,hooks:{logMethod(e,t){if(e.length>=2){let n=e.shift(),r=e.shift();return t.apply(this,[r,n,...e])}return t.apply(this,[e[0]])}},serializers:{err:o().stdSerializers.err}},u={messageKey:"message",base:null,hooks:{logMethod(e,t){if(e.length>=2){let n=e.shift(),r=e.shift();return t.apply(this,[r,n,...e])}return t.apply(this,[e[0]])}},formatters:{level(e,t){let n=i[e]||i.info;return{severity:n,..."fatal"===e?{"@type":"type.googleapis.com/google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent"}:{}}},log(e){var t;let n=(null==e?void 0:null===(t=e.err)||void 0===t?void 0:t.stack)?{stack_trace:e.err.stack}:{};return{...e,...n}}},serializers:{err:o().stdSerializers.err},timestamp:()=>',"timestamp":'.concat(Date.now()/1e3)},c=function(e,t){let n="prod"===a.r.LOCAL?l:u;return n.level=e,o()(Object.assign({},n,void 0))}("info")},56441:function(e){e.exports={style:{fontFamily:"'__Inter_8dbd63', '__Inter_Fallback_8dbd63'",fontStyle:"normal"},className:"__className_8dbd63"}},5152:function(e,t,n){e.exports=n(95677)},89755:function(e,t,n){e.exports=n(15619)},41664:function(e,t,n){e.exports=n(95569)},11163:function(e,t,n){e.exports=n(96885)},4298:function(e,t,n){e.exports=n(85442)},62286:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};
191Object.defineProperty(t,"__esModule",{value:!0}),t.destroyCookie=t.setCookie=t.parseCookies=void 0;var i=n(76489),s=n(69328),o=n(51022);function a(e,t){var n,r;return(null===(r=null===(n=null==e?void 0:e.req)||void 0===n?void 0:n.headers)||void 0===r?void 0:r.cookie)?i.parse(e.req.headers.cookie,t):o.isBrowser()?i.parse(document.cookie,t):{}}function l(e,t,n,a){var l,u;if(void 0===a&&(a={}),(null===(l=null==e?void 0:e.res)||void 0===l?void 0:l.getHeader)&&e.res.setHeader){if(null===(u=null==e?void 0:e.res)||void 0===u?void 0:u.finished)return console.warn('Not setting "'+t+'" cookie. Response has finished.'),console.warn("You should set cookie before res.send()"),{};var c=e.res.getHeader("Set-Cookie")||[];"string"==typeof c&&(c=[c]),"number"==typeof c&&(c=[]);var h=s.parse(c,{decodeValues:!1}),d=o.createCookie(t,n,a),f=[];h.forEach(function(e){if(!o.areCookiesEqual(e,d)){var t=i.serialize(e.name,e.value,r({encode:function(e){return e}},e));f.push(t)}}),f.push(i.serialize(t,n,a)),e.res.setHeader("Set-Cookie",f)}if(o.isBrowser()){if(a&&a.httpOnly)throw Error("Can not set a httpOnly cookie in the browser.");document.cookie=i.serialize(t,n,a)}return{}}function u(e,t,n){return l(e,t,"",r(r({},n||{}),{maxAge:-1}))}t.parseCookies=a,t.setCookie=l,t.destroyCookie=u,t.default={set:l,get:a,destroy:u}},51022:function(e,t){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function r(e,t){var n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertyNames(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++){var s=n[i];if(e[s]!==t[s])return!1}return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.areCookiesEqual=t.hasSameProperties=t.createCookie=t.isBrowser=void 0,t.isBrowser=function(){return"undefined"!=typeof window},t.createCookie=function(e,t,r){var i=r.sameSite;!0===i&&(i="strict"),(void 0===i||!1===i)&&(i="lax");var s=n(n({},r),{sameSite:i});return delete s.encode,n({name:e,value:t},s)},t.hasSameProperties=r,t.areCookiesEqual=function(e,t){var i=e.sameSite===t.sameSite;return"string"==typeof e.sameSite&&"string"==typeof t.sameSite&&(i=e.sameSite.toLowerCase()===t.sameSite.toLowerCase()),r(n(n({},e),{sameSite:void 0}),n(n({},t),{sameSite:void 0}))&&i}},50841:function(e,t,n){"use strict";n.d(t,{wT:function(){return q},Ds:function(){return H}});var r=n(67294),i=n(73935),s=function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=function e(t){var n,r,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t){if(Array.isArray(t))for(n=0;n<t.length;n++)t[n]&&(r=e(t[n]))&&(i&&(i+=" "),i+=r);else for(n in t)t[n]&&(i&&(i+=" "),i+=n)}return i}(e))&&(r&&(r+=" "),r+=t);return r},o=n(54776),a=n(90948),l=n(41796),u=n(57922),c=n(53219),h=n(7982);function d(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 f(){return(f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function p(e,t){if(null==e)return{};var n,r,i={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function m(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n(8679);var g=r.createContext(),v={mui:{root:{},anchorOriginTopCenter:{},anchorOriginBottomCenter:{},anchorOriginTopRight:{},anchorOriginBottomRight:{},anchorOriginTopLeft:{},anchorOriginBottomLeft:{}},container:{containerRoot:{},containerAnchorOriginTopCenter:{},containerAnchorOriginBottomCenter:{},containerAnchorOriginTopRight:{},containerAnchorOriginBottomRight:{},containerAnchorOriginTopLeft:{},containerAnchorOriginBottomLeft:{}}},y={view:{default:20,dense:4},snackbar:{default:6,dense:2}},b={maxSnack:3,dense:!1,hideIconVariant:!1,variant:"default",autoHideDuration:5e3,anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:o.Z,transitionDuration:{enter:225,exit:195}},w=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},_={TIMEOUT:"timeout",CLICKAWAY:"clickaway",MAXSNACK:"maxsnack",INSTRUCTED:"instructed"},E={toContainerAnchorOrigin:function(e){return"containerAnchorOrigin"+e},toAnchorOrigin:function(e){var t=e.vertical,n=e.horizontal;return"anchorOrigin"+w(t)+w(n)},toVariant:function(e){return"variant"+w(e)}},x=function(e){return!!e||0===e},S=function(e){return"number"==typeof e||null===e};
191function k(e,t,n){return void 0===e&&(e={}),void 0===t&&(t={}),void 0===n&&(n={}),f({},n,{},t,{},e)}var T={root:"SnackbarContent-root"},I=(0,a.ZP)("div")(function(e){var t,n,r=e.theme;return(n={})["&."+T.root]=((t={display:"flex",flexWrap:"wrap",flexGrow:1})[r.breakpoints.up("sm")]={flexGrow:"initial",minWidth:288},t),n}),C=(0,r.forwardRef)(function(e,t){var n=e.className,i=p(e,["className"]);return r.createElement(I,Object.assign({ref:t,className:s(T.root,n)},i))}),A={right:"left",left:"right",bottom:"up",top:"down"},O={fontSize:20,marginInlineEnd:8},R={default:void 0,success:r.createElement(function(e){return r.createElement(c.Z,Object.assign({},e),r.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41\n        10.59L10 14.17L17.59 6.58L19 8L10 17Z"}))},{style:O}),warning:r.createElement(function(e){return r.createElement(c.Z,Object.assign({},e),r.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},{style:O}),error:r.createElement(function(e){return r.createElement(c.Z,Object.assign({},e),r.createElement("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,\n        6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,\n        13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"}))},{style:O}),info:r.createElement(function(e){return r.createElement(c.Z,Object.assign({},e),r.createElement("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,\n        0 22,12A10,10 0 0,0 12,2Z"}))},{style:O})};function P(e,t){return e.reduce(function(e,n){return null==n?e:function(){for(var r=arguments.length,i=Array(r),s=0;s<r;s++)i[s]=arguments[s];var o=[].concat(i);t&&-1===o.indexOf(t)&&o.push(t),e.apply(this,o),n.apply(this,o)}},function(){})}var N="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;function D(e){var t=(0,r.useRef)(e);return N(function(){t.current=e}),(0,r.useCallback)(function(){return t.current.apply(void 0,arguments)},[])}var M=(0,r.forwardRef)(function(e,t){var n=e.children,i=e.autoHideDuration,s=e.ClickAwayListenerProps,o=e.disableWindowBlurListener,a=void 0!==o&&o,l=e.onClose,u=e.onMouseEnter,c=e.onMouseLeave,d=e.open,m=e.resumeHideDuration,g=p(e,["children","autoHideDuration","ClickAwayListenerProps","disableWindowBlurListener","onClose","onMouseEnter","onMouseLeave","open","resumeHideDuration"]),v=(0,r.useRef)(),y=D(function(){l&&l.apply(void 0,arguments)}),b=D(function(e){l&&null!=e&&(clearTimeout(v.current),v.current=setTimeout(function(){y(null,_.TIMEOUT)},e))});(0,r.useEffect)(function(){return d&&b(i),function(){clearTimeout(v.current)}},[d,i,b]);var w=function(){clearTimeout(v.current)},E=(0,r.useCallback)(function(){null!=i&&b(null!=m?m:.5*i)},[i,m,b]);return(0,r.useEffect)(function(){if(!a&&d)return window.addEventListener("focus",E),window.addEventListener("blur",w),function(){window.removeEventListener("focus",E),window.removeEventListener("blur",w)}},[a,E,d]),(0,r.createElement)(h.d,f({onClickAway:function(e){l&&l(e,_.CLICKAWAY)}},s),(0,r.createElement)("div",f({onMouseEnter:function(e){u&&u(e),w()},onMouseLeave:function(e){c&&c(e),E()},ref:t},g),n))}),L="SnackbarItem",Z={contentRoot:L+"-contentRoot",lessPadding:L+"-lessPadding",variantSuccess:L+"-variantSuccess",variantError:L+"-variantError",variantInfo:L+"-variantInfo",variantWarning:L+"-variantWarning",message:L+"-message",action:L+"-action",wrappedRoot:L+"-wrappedRoot"},j=(0,a.ZP)(M)(function(e){var t,n=e.theme,r=n.palette.mode||n.palette.type,i=(0,l._4)(n.palette.background.default,"light"===r?.8:.98);return(t={})["&."+Z.wrappedRoot]={position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0},t["."+Z.contentRoot]=f({}
191,n.typography.body2,{backgroundColor:i,color:n.palette.getContrastText(i),alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"}),t["."+Z.lessPadding]={paddingLeft:20},t["."+Z.variantSuccess]={backgroundColor:"#43a047",color:"#fff"},t["."+Z.variantError]={backgroundColor:"#d32f2f",color:"#fff"},t["."+Z.variantInfo]={backgroundColor:"#2196f3",color:"#fff"},t["."+Z.variantWarning]={backgroundColor:"#ff9800",color:"#fff"},t["."+Z.message]={display:"flex",alignItems:"center",padding:"8px 0"},t["."+Z.action]={display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8},t}),F=function(e){var t=e.classes,n=p(e,["classes"]),i=(0,r.useRef)(),o=(0,r.useState)(!0),a=o[0],l=o[1];(0,r.useEffect)(function(){return function(){i.current&&clearTimeout(i.current)}},[]);var c=P([n.snack.onClose,n.onClose],n.snack.key),h=n.style,d=n.ariaAttributes,m=n.className,g=n.hideIconVariant,v=n.iconVariant,y=n.snack,w=n.action,x=n.content,S=n.TransitionComponent,T=n.TransitionProps,I=n.transitionDuration,O=p(n,["style","dense","ariaAttributes","className","hideIconVariant","iconVariant","snack","action","content","TransitionComponent","TransitionProps","transitionDuration","onEnter","onEntered","onEntering","onExit","onExited","onExiting"]),N=y.key,D=y.open,M=y.className,L=y.variant,F=y.content,U=y.action,V=y.ariaAttributes,$=y.anchorOrigin,z=y.message,B=y.TransitionComponent,q=y.TransitionProps,H=y.transitionDuration,W=p(y,["persist","key","open","entered","requestClose","className","variant","content","action","ariaAttributes","anchorOrigin","message","TransitionComponent","TransitionProps","transitionDuration","onEnter","onEntered","onEntering","onExit","onExited","onExiting"]),G=f({},R,{},v)[L],K=f({"aria-describedby":"notistack-snackbar"},k(V,d)),Q=B||S||b.TransitionComponent,Y=k(H,I,b.transitionDuration),X=f({direction:"center"!==$.horizontal?A[$.horizontal]:A[$.vertical]},k(q,T)),J=U||w;"function"==typeof J&&(J=J(N));var ee=F||x;"function"==typeof ee&&(ee=ee(N,y.message));var et=["onEnter","onEntering","onEntered","onExit","onExiting","onExited"].reduce(function(e,t){var r;return f({},e,((r={})[t]=P([n.snack[t],n[t]],n.snack.key),r))},{});return r.createElement(u.Z,{unmountOnExit:!0,timeout:175,in:a,onExited:et.onExited},r.createElement(j,Object.assign({},O,W,{open:D,className:s(t.root,Z.wrappedRoot,t[E.toAnchorOrigin($)]),onClose:c}),r.createElement(Q,Object.assign({appear:!0,in:D,timeout:Y},X,{onExit:et.onExit,onExiting:et.onExiting,onExited:function(){i.current=setTimeout(function(){l(!a)},125)},onEnter:et.onEnter,onEntering:et.onEntering,onEntered:P([et.onEntered,function(){n.snack.requestClose&&c(null,_.INSTRCUTED)}])}),ee||r.createElement(C,Object.assign({},K,{role:"alert",style:h,className:s(Z.contentRoot,Z[E.toVariant(L)],t[E.toVariant(L)],m,M,!g&&G&&Z.lessPadding)}),r.createElement("div",{id:K["aria-describedby"],className:Z.message},g?null:G,z),J&&r.createElement("div",{className:Z.action},J)))))},U={container:"& > .MuiCollapse-container, & > .MuiCollapse-root",wrapper:"& > .MuiCollapse-container > .MuiCollapse-wrapper, & > .MuiCollapse-root > .MuiCollapse-wrapper"},V="SnackbarContainer",$={root:V+"-root",rootDense:V+"-rootDense",top:V+"-top",bottom:V+"-bottom",left:V+"-left",right:V+"-right",center:V+"-center"},z=(0,a.ZP)("div")(function(e){var t,n,r,i,s,o,a=e.theme;return(o={})["&."+$.root]=((t={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:a.zIndex.snackbar,height:"auto",width:"auto",transition:"top 300ms ease 0ms, right 300ms ease 0ms, bottom 300ms ease 0ms, left 300ms ease 0ms, margin 300ms ease 0ms, max-width 300ms ease 0ms",pointerEvents:"none"})[U.container]={pointerEvents:"all"},t[U.wrapper]={padding:y.snackbar.default+"px 0px",transition:"padding 300ms ease 0ms"},t.maxWidth="calc(100% - "+2*y.view.default+"px)",t[a.breakpoints.down("sm")]={width:"100%",maxWidth:"calc(100% - 32px)"},t),o["&."+$.rootDense]=((n={})[U.wrapper]={padding:y.snackbar.dense+"px 0px"},n),o["&."+$.top]={top:y.view.default-y.snackbar.default,flexDirection:"column"},o["&."+$.bottom]={bottom:y.view.default-y.snackbar.default,flexDirection:"column-reverse"},o["&."+$.left]=((r={left:y.view.default})[a.breakpoints.up("sm")]={alignItems:"flex-start"},r[a.breakpoints.down("sm")]={left:"16px"},r),o["&."+$.right]=((i={right:y.view.default})[a.breakpoints.up("sm")]={alignItems:"flex-end"},i[a.breakpoints.down("sm")]={right:"16px"},i),o["&."+$.center]=((s={left:"50%",transform:"translateX(-50%)"})[a.breakpoints.up("sm")]={alignItems:"center"},s),o}),B=r.memo(function(e){var t=e.className,n=e.anchorOrigin,i=e.dense,o=p(e,["className","anchorOrigin","dense"]),a=s($[n.vertical],$[n.horizontal],$.root,t,i&&$.rootDense);return r.createElement(z,Object.assign({className:a},o))}),q=function(e){var t,n;function o(t){var n;return(n=e.call(this,t)||this).enqueueSnackbar=function(e,t){void 0===t&&(t={});var r,i=t,s=i.key,o=i.preventDuplicate,a=p(i,["key","preventDuplicate"]),l=x(s),u=l?s:new Date().getTime()+Math.random(),c=(r=n.props,function(e){return"autoHideDuration"===e?S(a.autoHideDuration)?a.autoHideDuration:S(r.autoHideDuration)?r.autoHideDuration:b.autoHideDuration:a[e]||r[e]||b[e]}),h=f({key:u},a,{message:e,open:!0,entered:!1,requestClose:!1,variant:c("variant"),anchorOrigin:c("anchorOrigin"),autoHideDuration:c("autoHideDuration")});return a.persist&&(h.autoHideDuration=void 0),n.setState(function(t){if(void 0===o&&n.props.preventDuplicate||o){var r=function(t){return l?t.key===s:t.message===e},i=t.queue.findIndex(r)>-1,a=t.snacks.findIndex(r)>-1;if(i||a)return t}return n.handleDisplaySnack(f({},t,{queue:[].concat(t.queue,[h])}))}),u},n.handleDisplaySnack=function(e){return e.snacks.length>=n.maxSnack?n.handleDismissOldest(e):n.processQueue(e)},n.processQueue=function(e){var t=e.queue,n=e.snacks;return t.length>0?f({},e,{snacks:[].concat(n,[t[0]]),queue:t.slice(1,t.length)}):e},n.handleDismissOldest=function(e){if(e.snacks.some(function(e){return!e.open||e.requestClose}))return e;var t=!1,r=!1;e.snacks.reduce(function(e,t){return e+(t.open&&t.persist?1:0)},0)===n.maxSnack&&(r=!0);var i=e.snacks.map(function(e){return t||e.persist&&!r?f({},e):(t=!0,e.entered)?(e.onClose&&e.onClose(null,_.MAXSNACK,e.key),n.props.onClose&&n.props.onClose(null,_.MAXSNACK,e.key),f({},e,{open:!1})):f({},e,{requestClose:!0})});return f({},e,{snacks:i})},n.handleEnteredSnack=function(e,t,r){if(!x(r))throw Error("handleEnteredSnack Cannot be called with undefined key");n.setState(function(e){return{snacks:e.snacks.map(function(e){return e.key===r?f({},e,{entered:!0}):f({},e)})}})},n.handleCloseSnack=function(e,t,r){if(n.props.onClose&&n.props.onClose(e,t,r),t!==_.CLICKAWAY){var i=void 0===r;n.setState(function(e){var t=e.snacks,n=e.queue;return{snacks:t.map(function(e){return i||e.key===r?e.entered?f({},e,{open:!1}):f({},e,{requestClose:!0}):f({},e)}),queue:n.filter(function(e){return e.key!==r})}})}},n.closeSnackbar=function(e){var t=n.state.snacks.find(function(t){return t.key===e});x(e)&&t&&t.onClose&&t.onClose(null,_.INSTRUCTED,e),n.handleCloseSnack(null,_.INSTRUCTED,e)},n.handleExitedSnack=function(e,t,r){var i=t||r;if(!x(i))throw Error("handleExitedSnack Cannot be called with undefined key");n.setState(function(e){var t=n.processQueue(f({},e,{snacks:e.snacks.filter(function(e){return e.key!==i})}));return 0===t.queue.length?t:n.handleDismissOldest(t)})},n.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:n.enqueueSnackbar.bind(m(n)),closeSnackbar:n.closeSnackbar.bind(m(n))}},n}return(t=o).prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e,o.prototype.render=function(){var e=this,t=this.state.contextValue,n=this.props,o=n.iconVariant,a=n.dense,l=void 0===a?b.dense:a,u=n.hideIconVariant,c=void 0===u?b.hideIconVariant:u,h=n.domRoot,d=n.children,m=n.classes,y=void 0===m?{}:m,_=p(n,["maxSnack","preventDuplicate","variant","anchorOrigin","iconVariant","dense","hideIconVariant","domRoot","children","classes"]),x=this.state.snacks.reduce(function(e,t){var n,r,i=""+w((n=t.anchorOrigin).vertical)+w(n.horizontal),s=e[i]||[];return f({},e,((r={})[i]=[].concat(s,[t]),r))},{}),S=Object.keys(x).map(function(t){var n=x[t];return r.createElement(B,{key:t,dense:l,anchorOrigin:n[0].anchorOrigin,className:s(y.containerRoot,y[E.toContainerAnchorOrigin(t)])},n.map(function(t){return r.createElement(F,Object.assign({},_,{key:t.key,snack:t,dense:l,iconVariant:o,hideIconVariant:c,classes:Object.keys(y).filter(function(e){return!v.container[e]}).reduce(function(e,t){var n;return f({},e,((n={})[t]=y[t],n))},{}),onClose:e.handleCloseSnack,onExited:P([e.handleExitedSnack,e.props.onExited]),onEntered:P([e.handleEnteredSnack,e.props.onEntered])}))}))});return r.createElement(g.Provider,{value:t},d,h?(0,i.createPortal)(S,h):S)},d(o.prototype,[{key:"maxSnack",get:function(){return this.props.maxSnack||b.maxSnack}}]),n&&d(o,n),o}(r.Component),H=function(){return(0,r.useContext)(g)}},34155:function(e){var t,n,r,i=e.exports={};function s(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}
191catch(e){t=s}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var l=[],u=!1,c=-1;function h(){u&&r&&(u=!1,r.length?l=r.concat(l):c=-1,l.length&&d())}function d(){if(!u){var e=a(h);u=!0;for(var t=l.length;t;){for(r=l,l=[];++c<t;)r&&r[c].run();c=-1,t=l.length}r=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new f(e,t)),1!==l.length||u||a(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw Error("process.chdir is not supported")},i.umask=function(){return 0}},85346:function(e){"use strict";function t(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}e.exports=function(e,n,r){var i=r&&r.stringify||t;if("object"==typeof e&&null!==e){var s=n.length+1;if(1===s)return e;var o=Array(s);o[0]=i(e);for(var a=1;a<s;a++)o[a]=i(n[a]);return o.join(" ")}if("string"!=typeof e)return e;var l=n.length;if(0===l)return e;for(var u="",c=0,h=-1,d=e&&e.length||0,f=0;f<d;){if(37===e.charCodeAt(f)&&f+1<d){switch(h=h>-1?h:0,e.charCodeAt(f+1)){case 100:case 102:if(c>=l||null==n[c])break;h<f&&(u+=e.slice(h,f)),u+=Number(n[c]),h=f+2,f++;break;case 105:if(c>=l||null==n[c])break;h<f&&(u+=e.slice(h,f)),u+=Math.floor(Number(n[c])),h=f+2,f++;break;case 79:case 111:case 106:if(c>=l||void 0===n[c])break;h<f&&(u+=e.slice(h,f));var p=typeof n[c];if("string"===p){u+="'"+n[c]+"'",h=f+2,f++;break}if("function"===p){u+=n[c].name||"<anonymous>",h=f+2,f++;break}u+=i(n[c]),h=f+2,f++;break;case 115:if(c>=l)break;h<f&&(u+=e.slice(h,f)),u+=String(n[c]),h=f+2,f++;break;case 37:h<f&&(u+=e.slice(h,f)),u+="%",h=f+2,f++,c--}++c}++f}return -1===h?e:(h<d&&(u+=e.slice(h)),u)}},85518:function(e,t,n){"use strict";var r,i,s,o,a,l,u=n(67294);u&&"object"==typeof u&&"default"in u&&u.default;var c=n(23451),h=new c,d=h.getBrowser(),f=h.getCPU(),p=h.getDevice(),m=h.getEngine(),g=h.getOS(),v=h.getUA(),y={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},b={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},w={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},_=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";return e||t},E=function(){return!!("undefined"!=typeof window&&(window.navigator||navigator))&&(window.navigator||navigator)},x=function(e){var t=E();return t&&t.platform&&(-1!==t.platform.indexOf(e)||"MacIntel"===t.platform&&t.maxTouchPoints>1&&!window.MSStream)},S=function(e){return e.type===y.Browser},k=function(e){return e.name===b.Edge},T=function(e){return"string"==typeof e&&-1!==e.indexOf("Edg/")},I=function(){return x("iPad")};p.type,y.SmartTv,p.type,y.Console,p.type,y.Wearable,p.type,y.Embedded,d.name===b.MobileSafari||I(),d.name,b.Chromium;var C=(r=p.type,r===y.Mobile||r===y.Tablet||I()),A=(p.type,y.Mobile,p.type===y.Tablet||I(),S(p),S(p),g.name,w.Android,g.name,w.WindowsPhone,g.name===w.IOS||I(),d.name,b.Chrome,d.name,b.Firefox,i=d.name,i===b.Safari||b.MobileSafari,d.name,b.Opera,s=d.name,s===b.InternetExplorer||b.Ie,_(g.version),_(g.name),_(d.version),_(d.major),_(d.name));_(p.vendor),_(p.model),_(m.name),_(m.version),_(v),k(d)||T(v),d.name,b.Yandex,_(p.type,"browser"),o=E(),o&&(/iPad|iPhone|iPod/.test(o.platform)||"MacIntel"===o.platform&&o.maxTouchPoints>1)&&window.MSStream,I(),x("iPhone"),x("iPod"),a=E(),l=a&&a.userAgent&&a.userAgent.toLowerCase(),"string"==typeof l&&/electron/.test(l),T(v),k(d)&&T(v),g.name,w.Windows,g.name,w.MAC_OS,d.name,b.MIUI,d.name,b.SamsungBrowser,t.KC=A,t.tq=C},79593:function(e,t){"use strict";Symbol.for("react.transitional.element"),Symbol.for("react.portal"),Symbol.for("react.fragment"),Symbol.for("react.strict_mode"),Symbol.for("react.profiler"),Symbol.for("react.provider"),Symbol.for("react.consumer"),Symbol.for("react.context");var n=Symbol.for("react.forward_ref"),r=(Symbol.for("react.suspense"),Symbol.for("react.suspense_list"),Symbol.for("react.memo"));Symbol.for("react.lazy"),Symbol.for("react.view_transition"),Symbol.for("react.client.reference"),t.A4=n,t._Y=r},59852:function(e,t,n){"use strict";n.d(t,{j:function(){return o}});var r=n(75068),i=n(52943),s=n(52288),o=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!s.sk&&(null==(t=window)?void 0:t.addEventListener)){var n=function(){return e()};return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),function(){window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}},t}(0,r.Z)(t,e);var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){if(!this.hasListeners()){var e;null==(e=this.cleanup)||e.call(this),this.cleanup=void 0}},n.setEventListener=function(e){var t,n=this;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e(function(e){"boolean"==typeof e?n.setFocused(e):n.onFocus()})},n.setFocused=function(e){this.focused=e,e&&this.onFocus()}
191,n.onFocus=function(){this.listeners.forEach(function(e){e()})},n.isFocused=function(){return"boolean"==typeof this.focused?this.focused:"undefined"==typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)},t}(i.l))},46747:function(e,t,n){"use strict";n.d(t,{QueryClient:function(){return r.S}});var r=n(61284),i=n(86755);n.o(i,"QueryClientProvider")&&n.d(t,{QueryClientProvider:function(){return i.QueryClientProvider}}),n.o(i,"useInfiniteQuery")&&n.d(t,{useInfiniteQuery:function(){return i.useInfiniteQuery}}),n.o(i,"useMutation")&&n.d(t,{useMutation:function(){return i.useMutation}}),n.o(i,"useQuery")&&n.d(t,{useQuery:function(){return i.useQuery}}),n.o(i,"useQueryClient")&&n.d(t,{useQueryClient:function(){return i.useQueryClient}})},36997:function(e,t,n){"use strict";n.d(t,{Gm:function(){return s},Qy:function(){return l},ZF:function(){return u}});var r=n(21216),i=n(52288);function s(){return{onFetch:function(e){e.fetchFn=function(){var t,n,s,l,u,c,h,d=null==(t=e.fetchOptions)?void 0:null==(n=t.meta)?void 0:n.refetchPage,f=null==(s=e.fetchOptions)?void 0:null==(l=s.meta)?void 0:l.fetchMore,p=null==f?void 0:f.pageParam,m=(null==f?void 0:f.direction)==="forward",g=(null==f?void 0:f.direction)==="backward",v=(null==(u=e.state.data)?void 0:u.pages)||[],y=(null==(c=e.state.data)?void 0:c.pageParams)||[],b=(0,i.G9)(),w=null==b?void 0:b.signal,_=y,E=!1,x=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},S=function(e,t,n,r){return _=r?[t].concat(_):[].concat(_,[t]),r?[n].concat(e):[].concat(e,[n])},k=function(t,n,i,s){if(E)return Promise.reject("Cancelled");if(void 0===i&&!n&&t.length)return Promise.resolve(t);var o=x({queryKey:e.queryKey,signal:w,pageParam:i,meta:e.meta}),a=Promise.resolve(o).then(function(e){return S(t,i,e,s)});return(0,r.LE)(o)&&(a.cancel=o.cancel),a};if(v.length){if(m){var T=void 0!==p,I=T?p:o(e.options,v);h=k(v,T,I)}else if(g){var C=void 0!==p,A=C?p:a(e.options,v);h=k(v,C,A,!0)}else!function(){_=[];var t=void 0===e.options.getNextPageParam;h=!d||!v[0]||d(v[0],0,v)?k([],t,y[0]):Promise.resolve(S([],y[0],v[0]));for(var n=function(n){h=h.then(function(r){if(!d||!v[n]||d(v[n],n,v)){var i=t?y[n]:o(e.options,r);return k(r,t,i)}return Promise.resolve(S(r,y[n],v[n]))})},r=1;r<v.length;r++)n(r)}()}else h=k([]);var O=h.then(function(e){return{pages:e,pageParams:_}});return O.cancel=function(){E=!0,null==b||b.abort(),(0,r.LE)(h)&&h.cancel()},O}}}}function o(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}function a(e,t){return null==e.getPreviousPageParam?void 0:e.getPreviousPageParam(t[0],t)}function l(e,t){if(e.getNextPageParam&&Array.isArray(t)){var n=o(e,t);return null!=n&&!1!==n}}function u(e,t){if(e.getPreviousPageParam&&Array.isArray(t)){var n=a(e,t);return null!=n&&!1!==n}}},41909:function(e,t,n){"use strict";n.d(t,{E:function(){return s},j:function(){return i}});var r=console;function i(){return r}function s(e){r=e}},81262:function(e,t,n){"use strict";n.d(t,{R:function(){return u},m:function(){return l}});var r=n(87462),i=n(41909),s=n(101),o=n(21216),a=n(52288),l=function(){function e(e){this.options=(0,r.Z)({},e.defaultOptions,e.options),this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.observers=[],this.state=e.state||u(),this.meta=e.meta}var t=e.prototype;return t.setState=function(e){this.dispatch({type:"setState",state:e})},t.addObserver=function(e){-1===this.observers.indexOf(e)&&this.observers.push(e)},t.removeObserver=function(e){this.observers=this.observers.filter(function(t){return t!==e})},t.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(a.ZT).catch(a.ZT)):Promise.resolve()},t.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},t.execute=function(){var e,t=this,n="loading"===this.state.status,r=Promise.resolve();return n||(this.dispatch({type:"loading",variables:this.options.variables}),r=r.then(function(){null==t.mutationCache.config.onMutate||t.mutationCache.config.onMutate(t.state.variables,t)}).then(function(){return null==t.options.onMutate?void 0:t.options.onMutate(t.state.variables)}
191).then(function(e){e!==t.state.context&&t.dispatch({type:"loading",context:e,variables:t.state.variables})})),r.then(function(){return t.executeMutation()}).then(function(n){e=n,null==t.mutationCache.config.onSuccess||t.mutationCache.config.onSuccess(e,t.state.variables,t.state.context,t)}).then(function(){return null==t.options.onSuccess?void 0:t.options.onSuccess(e,t.state.variables,t.state.context)}).then(function(){return null==t.options.onSettled?void 0:t.options.onSettled(e,null,t.state.variables,t.state.context)}).then(function(){return t.dispatch({type:"success",data:e}),e}).catch(function(e){return null==t.mutationCache.config.onError||t.mutationCache.config.onError(e,t.state.variables,t.state.context,t),(0,i.j)().error(e),Promise.resolve().then(function(){return null==t.options.onError?void 0:t.options.onError(e,t.state.variables,t.state.context)}).then(function(){return null==t.options.onSettled?void 0:t.options.onSettled(void 0,e,t.state.variables,t.state.context)}).then(function(){throw t.dispatch({type:"error",error:e}),e})})},t.executeMutation=function(){var e,t=this;return this.retryer=new o.m4({fn:function(){return t.options.mutationFn?t.options.mutationFn(t.state.variables):Promise.reject("No mutationFn found")},onFail:function(){t.dispatch({type:"failed"})},onPause:function(){t.dispatch({type:"pause"})},onContinue:function(){t.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay}),this.retryer.promise},t.dispatch=function(e){var t=this;this.state=function(e,t){switch(t.type){case"failed":return(0,r.Z)({},e,{failureCount:e.failureCount+1});case"pause":return(0,r.Z)({},e,{isPaused:!0});case"continue":return(0,r.Z)({},e,{isPaused:!1});case"loading":return(0,r.Z)({},e,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return(0,r.Z)({},e,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return(0,r.Z)({},e,{data:void 0,error:t.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return(0,r.Z)({},e,t.state);default:return e}}(this.state,e),s.V.batch(function(){t.observers.forEach(function(t){t.onMutationUpdate(e)}),t.mutationCache.notify(t)})},e}();function u(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}},101:function(e,t,n){"use strict";n.d(t,{V:function(){return i}});var r=n(52288),i=new(function(){function e(){this.queue=[],this.transactions=0,this.notifyFn=function(e){e()},this.batchNotifyFn=function(e){e()}}var t=e.prototype;return t.batch=function(e){var t;this.transactions++;try{t=e()}finally{this.transactions--,this.transactions||this.flush()}return t},t.schedule=function(e){var t=this;this.transactions?this.queue.push(e):(0,r.A4)(function(){t.notifyFn(e)})},t.batchCalls=function(e){var t=this;return function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];t.schedule(function(){e.apply(void 0,r)})}},t.flush=function(){var e=this,t=this.queue;this.queue=[],t.length&&(0,r.A4)(function(){e.batchNotifyFn(function(){t.forEach(function(t){e.notifyFn(t)})})})},t.setNotifyFunction=function(e){this.notifyFn=e},t.setBatchNotifyFunction=function(e){this.batchNotifyFn=e},e}())},40068:function(e,t,n){"use strict";n.d(t,{N:function(){return o}});var r=n(75068),i=n(52943),s=n(52288),o=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!s.sk&&(null==(t=window)?void 0:t.addEventListener)){var n=function(){return e()};return window.addEventListener("online",n,!1),window.addEventListener("offline",n,!1),function(){window.removeEventListener("online",n),window.removeEventListener("offline",n)}}},t}(0,r.Z)(t,e);var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){if(!this.hasListeners()){var e;null==(e=this.cleanup)||e.call(this),this.cleanup=void 0}},n.setEventListener=function(e){var t,n=this;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e(function(e){"boolean"==typeof e?n.setOnline(e):n.onOnline()})},n.setOnline=function(e){this.online=e,e&&this.onOnline()}
191,n.onOnline=function(){this.listeners.forEach(function(e){e()})},n.isOnline=function(){return"boolean"==typeof this.online?this.online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine},t}(i.l))},61284:function(e,t,n){"use strict";n.d(t,{S:function(){return v}});var r=n(87462),i=n(52288),s=n(75068),o=n(101),a=n(41909),l=n(21216),u=function(){function e(e){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=e.meta,this.scheduleGc()}var t=e.prototype;return t.setOptions=function(e){var t;this.options=(0,r.Z)({},this.defaultOptions,e),this.meta=null==e?void 0:e.meta,this.cacheTime=Math.max(this.cacheTime||0,null!=(t=this.options.cacheTime)?t:3e5)},t.setDefaultOptions=function(e){this.defaultOptions=e},t.scheduleGc=function(){var e=this;this.clearGcTimeout(),(0,i.PN)(this.cacheTime)&&(this.gcTimeout=setTimeout(function(){e.optionalRemove()},this.cacheTime))},t.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},t.optionalRemove=function(){!this.observers.length&&(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},t.setData=function(e,t){var n,r,s=this.state.data,o=(0,i.SE)(e,s);return(null==(n=(r=this.options).isDataEqual)?void 0:n.call(r,s,o))?o=s:!1!==this.options.structuralSharing&&(o=(0,i.Q$)(s,o)),this.dispatch({data:o,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt}),o},t.setState=function(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})},t.cancel=function(e){var t,n=this.promise;return null==(t=this.retryer)||t.cancel(e),n?n.then(i.ZT).catch(i.ZT):Promise.resolve()},t.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},t.reset=function(){this.destroy(),this.setState(this.initialState)},t.isActive=function(){return this.observers.some(function(e){return!1!==e.options.enabled})},t.isFetching=function(){return this.state.isFetching},t.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(function(e){return e.getCurrentResult().isStale})},t.isStaleByTime=function(e){return void 0===e&&(e=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!(0,i.Kp)(this.state.dataUpdatedAt,e)},t.onFocus=function(){var e,t=this.observers.find(function(e){return e.shouldFetchOnWindowFocus()});t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.onOnline=function(){var e,t=this.observers.find(function(e){return e.shouldFetchOnReconnect()});t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.addObserver=function(e){-1===this.observers.indexOf(e)&&(this.observers.push(e),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))},t.removeObserver=function(e){-1!==this.observers.indexOf(e)&&(this.observers=this.observers.filter(function(t){return t!==e}),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:e}))},t.getObserversCount=function(){return this.observers.length},t.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},t.fetch=function(e,t){var n,r,s,o,u,c,h=this;if(this.state.isFetching){if(this.state.dataUpdatedAt&&(null==t?void 0:t.cancelRefetch))this.cancel({silent:!0});else if(this.promise)return null==(n=this.retryer)||n.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){var d=this.observers.find(function(e){return e.options.queryFn});d&&this.setOptions(d.options)}var f=(0,i.mc)(this.queryKey),p=(0,i.G9)(),m={queryKey:f,pageParam:void 0,meta:this.meta};Object.defineProperty(m,"signal",{enumerable:!0,get:function(){if(p)return h.abortSignalConsumed=!0,p.signal}});var g={fetchOptions:t,options:this.options,queryKey:f,state:this.state,fetchFn:function(){return h.options.queryFn?(h.abortSignalConsumed=!1,h.options.queryFn(m)):Promise.reject("Missing queryFn")},meta:this.meta};return(null==(o=this.options.behavior)?void 0:o.onFetch)&&(null==(r=this.options.behavior)||r.onFetch(g)),this.revertState=this.state,this.state.isFetching&&this.state.fetchMeta===(null==(u=g.fetchOptions)?void 0:u.meta)||this.dispatch({type:"fetch",meta:null==(s=g.fetchOptions)?void 0:s.meta}),this.retryer=new l.m4({fn:g.fetchFn,abort:null==p?void 0:null==(c=p.abort)?void 0:c.bind(p),onSuccess:function(e){h.setData(e),null==h.cache.config.onSuccess||h.cache.config.onSuccess(e,h),0===h.cacheTime&&h.optionalRemove()},onError:function(e){(0,l.DV)(e)&&e.silent||h.dispatch({type:"error",error:e}),(0,l.DV)(e)||(null==h.cache.config.onError||h.cache.config.onError(e,h),(0,a.j)().error(e)),0===h.cacheTime&&h.optionalRemove()},onFail:function(){h.dispatch({type:"failed"})},onPause:function(){h.dispatch({type:"pause"})},onContinue:function(){h.dispatch({type:"continue"})}
191,retry:g.options.retry,retryDelay:g.options.retryDelay}),this.promise=this.retryer.promise,this.promise},t.dispatch=function(e){var t=this;this.state=this.reducer(this.state,e),o.V.batch(function(){t.observers.forEach(function(t){t.onQueryUpdate(e)}),t.cache.notify({query:t,type:"queryUpdated",action:e})})},t.getDefaultState=function(e){var t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==e.initialData?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0,r=void 0!==t;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?null!=n?n:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:r?"success":"idle"}},t.reducer=function(e,t){var n,i;switch(t.type){case"failed":return(0,r.Z)({},e,{fetchFailureCount:e.fetchFailureCount+1});case"pause":return(0,r.Z)({},e,{isPaused:!0});case"continue":return(0,r.Z)({},e,{isPaused:!1});case"fetch":return(0,r.Z)({},e,{fetchFailureCount:0,fetchMeta:null!=(n=t.meta)?n:null,isFetching:!0,isPaused:!1},!e.dataUpdatedAt&&{error:null,status:"loading"});case"success":return(0,r.Z)({},e,{data:t.data,dataUpdateCount:e.dataUpdateCount+1,dataUpdatedAt:null!=(i=t.dataUpdatedAt)?i:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var s=t.error;if((0,l.DV)(s)&&s.revert&&this.revertState)return(0,r.Z)({},this.revertState);return(0,r.Z)({},e,{error:s,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return(0,r.Z)({},e,{isInvalidated:!0});case"setState":return(0,r.Z)({},e,t.state);default:return e}},e}(),c=n(52943),h=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.queries=[],n.queriesMap={},n}(0,s.Z)(t,e);var n=t.prototype;return n.build=function(e,t,n){var r,s=t.queryKey,o=null!=(r=t.queryHash)?r:(0,i.Rm)(s,t),a=this.get(o);return a||(a=new u({cache:this,queryKey:s,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(s),meta:t.meta}),this.add(a)),a},n.add=function(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"queryAdded",query:e}))},n.remove=function(e){var t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter(function(t){return t!==e}),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"queryRemoved",query:e}))},n.clear=function(){var e=this;o.V.batch(function(){e.queries.forEach(function(t){e.remove(t)})})},n.get=function(e){return this.queriesMap[e]},n.getAll=function(){return this.queries},n.find=function(e,t){var n=(0,i.I6)(e,t)[0];return void 0===n.exact&&(n.exact=!0),this.queries.find(function(e){return(0,i._x)(n,e)})},n.findAll=function(e,t){var n=(0,i.I6)(e,t)[0];return Object.keys(n).length>0?this.queries.filter(function(e){return(0,i._x)(n,e)}):this.queries},n.notify=function(e){var t=this;o.V.batch(function(){t.listeners.forEach(function(t){t(e)})})},n.onFocus=function(){var e=this;o.V.batch(function(){e.queries.forEach(function(e){e.onFocus()})})},n.onOnline=function(){var e=this;o.V.batch(function(){e.queries.forEach(function(e){e.onOnline()})})},t}(c.l),d=n(81262),f=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.mutations=[],n.mutationId=0,n}(0,s.Z)(t,e);var n=t.prototype;return n.build=function(e,t,n){var r=new d.m({mutationCache:this,mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:n,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0,meta:t.meta});return this.add(r),r},n.add=function(e){this.mutations.push(e),this.notify(e)},n.remove=function(e){this.mutations=this.mutations.filter(function(t){return t!==e}),e.cancel(),this.notify(e)},n.clear=function(){var e=this;o.V.batch(function(){e.mutations.forEach(function(t){e.remove(t)})})},n.getAll=function(){return this.mutations},n.find=function(e){return void 0===e.exact&&(e.exact=!0),this.mutations.find(function(t){return(0,i.X7)(e,t)})},n.findAll=function(e){return this.mutations.filter(function(t){return(0,i.X7)(e,t)})},n.notify=function(e){var t=this;
191o.V.batch(function(){t.listeners.forEach(function(t){t(e)})})},n.onFocus=function(){this.resumePausedMutations()},n.onOnline=function(){this.resumePausedMutations()},n.resumePausedMutations=function(){var e=this.mutations.filter(function(e){return e.state.isPaused});return o.V.batch(function(){return e.reduce(function(e,t){return e.then(function(){return t.continue().catch(i.ZT)})},Promise.resolve())})},t}(c.l),p=n(59852),m=n(40068),g=n(36997),v=function(){function e(e){void 0===e&&(e={}),this.queryCache=e.queryCache||new h,this.mutationCache=e.mutationCache||new f,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var t=e.prototype;return t.mount=function(){var e=this;this.unsubscribeFocus=p.j.subscribe(function(){p.j.isFocused()&&m.N.isOnline()&&(e.mutationCache.onFocus(),e.queryCache.onFocus())}),this.unsubscribeOnline=m.N.subscribe(function(){p.j.isFocused()&&m.N.isOnline()&&(e.mutationCache.onOnline(),e.queryCache.onOnline())})},t.unmount=function(){var e,t;null==(e=this.unsubscribeFocus)||e.call(this),null==(t=this.unsubscribeOnline)||t.call(this)},t.isFetching=function(e,t){var n=(0,i.I6)(e,t)[0];return n.fetching=!0,this.queryCache.findAll(n).length},t.isMutating=function(e){return this.mutationCache.findAll((0,r.Z)({},e,{fetching:!0})).length},t.getQueryData=function(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state.data},t.getQueriesData=function(e){return this.getQueryCache().findAll(e).map(function(e){return[e.queryKey,e.state.data]})},t.setQueryData=function(e,t,n){var r=(0,i._v)(e),s=this.defaultQueryOptions(r);return this.queryCache.build(this,s).setData(t,n)},t.setQueriesData=function(e,t,n){var r=this;return o.V.batch(function(){return r.getQueryCache().findAll(e).map(function(e){var i=e.queryKey;return[i,r.setQueryData(i,t,n)]})})},t.getQueryState=function(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state},t.removeQueries=function(e,t){var n=(0,i.I6)(e,t)[0],r=this.queryCache;o.V.batch(function(){r.findAll(n).forEach(function(e){r.remove(e)})})},t.resetQueries=function(e,t,n){var s=this,a=(0,i.I6)(e,t,n),l=a[0],u=a[1],c=this.queryCache,h=(0,r.Z)({},l,{active:!0});return o.V.batch(function(){return c.findAll(l).forEach(function(e){e.reset()}),s.refetchQueries(h,u)})},t.cancelQueries=function(e,t,n){var r=this,s=(0,i.I6)(e,t,n),a=s[0],l=s[1],u=void 0===l?{}:l;return void 0===u.revert&&(u.revert=!0),Promise.all(o.V.batch(function(){return r.queryCache.findAll(a).map(function(e){return e.cancel(u)})})).then(i.ZT).catch(i.ZT)},t.invalidateQueries=function(e,t,n){var s,a,l,u=this,c=(0,i.I6)(e,t,n),h=c[0],d=c[1],f=(0,r.Z)({},h,{active:null==(s=null!=(a=h.refetchActive)?a:h.active)||s,inactive:null!=(l=h.refetchInactive)&&l});return o.V.batch(function(){return u.queryCache.findAll(h).forEach(function(e){e.invalidate()}),u.refetchQueries(f,d)})},t.refetchQueries=function(e,t,n){var s=this,a=(0,i.I6)(e,t,n),l=a[0],u=a[1],c=Promise.all(o.V.batch(function(){return s.queryCache.findAll(l).map(function(e){return e.fetch(void 0,(0,r.Z)({},u,{meta:{refetchPage:null==l?void 0:l.refetchPage}}))})})).then(i.ZT);return(null==u?void 0:u.throwOnError)||(c=c.catch(i.ZT)),c},t.fetchQuery=function(e,t,n){var r=(0,i._v)(e,t,n),s=this.defaultQueryOptions(r);void 0===s.retry&&(s.retry=!1);var o=this.queryCache.build(this,s);return o.isStaleByTime(s.staleTime)?o.fetch(s):Promise.resolve(o.state.data)},t.prefetchQuery=function(e,t,n){return this.fetchQuery(e,t,n).then(i.ZT).catch(i.ZT)},t.fetchInfiniteQuery=function(e,t,n){var r=(0,i._v)(e,t,n);return r.behavior=(0,g.Gm)(),this.fetchQuery(r)},t.prefetchInfiniteQuery=function(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(i.ZT).catch(i.ZT)},t.cancelMutations=function(){var e=this;return Promise.all(o.V.batch(function(){return e.mutationCache.getAll().map(function(e){return e.cancel()})})).then(i.ZT).catch(i.ZT)},t.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},t.executeMutation=function(e){return this.mutationCache.build(this,e).execute()},t.getQueryCache=function(){return this.queryCache},t.getMutationCache=function(){return this.mutationCache},t.getDefaultOptions=function(){return this.defaultOptions},t.setDefaultOptions=function(e){this.defaultOptions=e},t.setQueryDefaults=function(e,t){var n=this.queryDefaults.find(function(t){return(0,i.yF)(e)===(0,i.yF)(t.queryKey)});n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})},t.getQueryDefaults=function(e){var t;return e?null==(t=this.queryDefaults.find(function(t){return(0,i.to)(e,t.queryKey)}))?void 0:t.defaultOptions:void 0},t.setMutationDefaults=function(e,t){var n=this.mutationDefaults.find(function(t){return(0,i.yF)(e)===(0,i.yF)(t.mutationKey)});n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})},t.getMutationDefaults=function(e){var t;return e?null==(t=this.mutationDefaults.find(function(t){return(0,i.to)(e,t.mutationKey)}))?void 0:t.defaultOptions:void 0},t.defaultQueryOptions=function(e){if(null==e?void 0:e._defaulted)return e;var t=(0,r.Z)({},this.defaultOptions.queries,this.getQueryDefaults(null==e?void 0:e.queryKey),e,{_defaulted:!0});return!t.queryHash&&t.queryKey&&(t.queryHash=(0,i.Rm)(t.queryKey,t)),t},t.defaultQueryObserverOptions=function(e){return this.defaultQueryOptions(e)},t.defaultMutationOptions=function(e){return(null==e?void 0:e._defaulted)?e:(0,r.Z)({},this.defaultOptions.mutations,this.getMutationDefaults(null==e?void 0:e.mutationKey),e,{_defaulted:!0})},t.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},e}()},21216:function(e,t,n){"use strict";n.d(t,{DV:function(){return u},LE:function(){return a},m4:function(){return c}});var r=n(59852),i=n(40068),s=n(52288);function o(e){return Math.min(1e3*Math.pow(2,e),3e4)}function a(e){return"function"==typeof(null==e?void 0:e.cancel)}var l=function(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent};function u(e){return e instanceof l}var c=function(e){var t,n,u,c,h=this,d=!1;this.abort=e.abort,this.cancel=function(e){return null==t?void 0:t(e)},this.cancelRetry=function(){d=!0},this.continueRetry=function(){d=!1},this.continue=function(){return null==n?void 0:n()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(e,t){u=e,c=t});var f=function(t){h.isResolved||(h.isResolved=!0,null==e.onSuccess||e.onSuccess(t),null==n||n(),u(t))},p=function(t){h.isResolved||(h.isResolved=!0,null==e.onError||e.onError(t),null==n||n(),c(t))};!function u(){var c;if(!h.isResolved){try{c=e.fn()}catch(e){c=Promise.reject(e)}t=function(e){if(!h.isResolved&&(p(new l(e)),null==h.abort||h.abort(),a(c)))try{c.cancel()}catch(e){}},h.isTransportCancelable=a(c),Promise.resolve(c).then(f).catch(function(t){if(!h.isResolved){var a,l,c=null!=(a=e.retry)?a:3,f=null!=(l=e.retryDelay)?l:o,m="function"==typeof f?f(h.failureCount,t):f,g=!0===c||"number"==typeof c&&h.failureCount<c||"function"==typeof c&&c(h.failureCount,t);if(d||!g){p(t);return}h.failureCount++,null==e.onFail||e.onFail(h.failureCount,t),(0,s.Gh)(m).then(function(){if(!r.j.isFocused()||!i.N.isOnline())return new Promise(function(t){n=t,h.isPaused=!0,null==e.onPause||e.onPause()}).then(function(){n=void 0,h.isPaused=!1,null==e.onContinue||e.onContinue()})}).then(function(){d?p(t):u()})}})}}()}},52943:function(e,t,n){"use strict";n.d(t,{l:function(){return r}});var r=function(){function e(){this.listeners=[]}var t=e.prototype;return t.subscribe=function(e){var t=this,n=e||function(){};return this.listeners.push(n),this.onSubscribe(),function(){t.listeners=t.listeners.filter(function(e){return e!==n}),t.onUnsubscribe()}},t.hasListeners=function(){return this.listeners.length>0},t.onSubscribe=function(){},t.onUnsubscribe=function(){},e}()},86755:function(){},52288:function(e,t,n){"use strict";n.d(t,{A4:function(){return x},G9:function(){return S},Gh:function(){return E},I6:function(){return d},Kp:function(){return u},PN:function(){return a},Q$:function(){return function e(t,n){if(t===n)return t;var r=Array.isArray(t)&&Array.isArray(n);if(r||b(t)&&b(n)){for(var i=r?t.length:Object.keys(t).length,s=r?n:Object.keys(n),o=s.length,a=r?[]:{},l=0,u=0;u<o;u++){var c=r?u:s[u];a[c]=e(t[c],n[c]),a[c]===t[c]&&l++}return i===o&&l===i?t:a}return n}},Rm:function(){return m},SE:function(){return o},VS:function(){return y},X7:function(){return p},ZT:function(){return s},_v:function(){return c},_x:function(){return f},lV:function(){return h},mc:function(){return l},sk:function(){return i},to:function(){return v},yF:function(){return g}});var r=n(87462),i="undefined"==typeof window;function s(){}function o(e,t){return"function"==typeof e?e(t):e}function a(e){return"number"==typeof e&&e>=0&&e!==1/0}function l(e){return Array.isArray(e)?e:[e]}function u(e,t){return Math.max(e+(t||0)-Date.now(),0)}
191function c(e,t,n){return _(e)?"function"==typeof t?(0,r.Z)({},n,{queryKey:e,queryFn:t}):(0,r.Z)({},t,{queryKey:e}):e}function h(e,t,n){return _(e)?"function"==typeof t?(0,r.Z)({},n,{mutationKey:e,mutationFn:t}):(0,r.Z)({},t,{mutationKey:e}):"function"==typeof e?(0,r.Z)({},t,{mutationFn:e}):(0,r.Z)({},e)}function d(e,t,n){return _(e)?[(0,r.Z)({},t,{queryKey:e}),n]:[e||{},t]}function f(e,t){var n=e.active,r=e.exact,i=e.fetching,s=e.inactive,o=e.predicate,a=e.queryKey,l=e.stale;if(_(a)){if(r){if(t.queryHash!==m(a,t.options))return!1}else if(!v(t.queryKey,a))return!1}var u=!0===n&&!0===s||null==n&&null==s?"all":!1===n&&!1===s?"none":(null!=n?n:!s)?"active":"inactive";if("none"===u)return!1;if("all"!==u){var c=t.isActive();if("active"===u&&!c||"inactive"===u&&c)return!1}return("boolean"!=typeof l||t.isStale()===l)&&("boolean"!=typeof i||t.isFetching()===i)&&(!o||!!o(t))}function p(e,t){var n=e.exact,r=e.fetching,i=e.predicate,s=e.mutationKey;if(_(s)){if(!t.options.mutationKey)return!1;if(n){if(g(t.options.mutationKey)!==g(s))return!1}else if(!v(t.options.mutationKey,s))return!1}return("boolean"!=typeof r||"loading"===t.state.status===r)&&(!i||!!i(t))}function m(e,t){return((null==t?void 0:t.queryKeyHashFn)||g)(e)}function g(e){return JSON.stringify(l(e),function(e,t){return b(t)?Object.keys(t).sort().reduce(function(e,n){return e[n]=t[n],e},{}):t})}function v(e,t){return function e(t,n){return t===n||typeof t==typeof n&&!!t&&!!n&&"object"==typeof t&&"object"==typeof n&&!Object.keys(n).some(function(r){return!e(t[r],n[r])})}(l(e),l(t))}function y(e,t){if(e&&!t||t&&!e)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}function b(e){if(!w(e))return!1;var t=e.constructor;if(void 0===t)return!0;var n=t.prototype;return!!(w(n)&&n.hasOwnProperty("isPrototypeOf"))}function w(e){return"[object Object]"===Object.prototype.toString.call(e)}function _(e){return"string"==typeof e||Array.isArray(e)}function E(e){return new Promise(function(t){setTimeout(t,e)})}function x(e){Promise.resolve().then(e).catch(function(e){return setTimeout(function(){throw e})})}function S(){if("function"==typeof AbortController)return new AbortController}},88767:function(e,t,n){"use strict";n.d(t,{QueryClient:function(){return r.QueryClient},QueryClientProvider:function(){return i.QueryClientProvider},useInfiniteQuery:function(){return i.useInfiniteQuery},useMutation:function(){return i.useMutation},useQuery:function(){return i.useQuery},useQueryClient:function(){return i.useQueryClient}});var r=n(46747);n.o(r,"QueryClientProvider")&&n.d(t,{QueryClientProvider:function(){return r.QueryClientProvider}}),n.o(r,"useInfiniteQuery")&&n.d(t,{useInfiniteQuery:function(){return r.useInfiniteQuery}}),n.o(r,"useMutation")&&n.d(t,{useMutation:function(){return r.useMutation}}),n.o(r,"useQuery")&&n.d(t,{useQuery:function(){return r.useQuery}}),n.o(r,"useQueryClient")&&n.d(t,{useQueryClient:function(){return r.useQueryClient}});var i=n(3407)},3407:function(e,t,n){"use strict";n.d(t,{QueryClientProvider:function(){return f},useInfiniteQuery:function(){return D},useMutation:function(){return _},useQuery:function(){return R},useQueryClient:function(){return d}});var r,i=n(101),s=n(73935).unstable_batchedUpdates;i.V.setBatchNotifyFunction(s);var o=n(41909),a=console;(0,o.E)(a);var l=n(67294),u=l.createContext(void 0),c=l.createContext(!1);function h(e){return e&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=u),window.ReactQueryClientContext):u}var d=function(){var e=l.useContext(h(l.useContext(c)));if(!e)throw Error("No QueryClient set, use QueryClientProvider to set one");return e},f=function(e){var t=e.client,n=e.contextSharing,r=void 0!==n&&n,i=e.children;l.useEffect(function(){return t.mount(),function(){t.unmount()}},[t]);var s=h(r);return l.createElement(c.Provider,{value:r},l.createElement(s.Provider,{value:t},i))},p=n(87462),m=n(52288),g=n(75068),v=n(81262),y=n(52943),b=function(e){function t(t,n){var r;return(r=e.call(this)||this).client=t,r.setOptions(n),r.bindMethods(),r.updateResult(),r}(0,g.Z)(t,e);var n=t.prototype;return n.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},n.setOptions=function(e){this.options=this.client.defaultMutationOptions(e)},n.onUnsubscribe=function(){if(!this.listeners.length){var e;null==(e=this.currentMutation)||e.removeObserver(this)}},n.onMutationUpdate=function(e){this.updateResult();var t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)},n.getCurrentResult=function(){return this.currentResult},n.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},n.mutate=function(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,(0,p.Z)({},this.options,{variables:void 0!==e?e:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},n.updateResult=function(){var e=this.currentMutation?this.currentMutation.state:(0,v.R)(),t=(0,p.Z)({},e,{isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset});this.currentResult=t},n.notify=function(e){var t=this;i.V.batch(function(){t.mutateOptions&&(e.onSuccess?(null==t.mutateOptions.onSuccess||t.mutateOptions.onSuccess(t.currentResult.data,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(t.currentResult.data,null,t.currentResult.variables,t.currentResult.context)):e.onError&&(null==t.mutateOptions.onError||t.mutateOptions.onError(t.currentResult.error,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(void 0,t.currentResult.error,t.currentResult.variables,t.currentResult.context))),e.listeners&&t.listeners.forEac
191h(function(e){e(t.currentResult)})})},t}(y.l);function w(e,t,n){return"function"==typeof t?t.apply(void 0,n):"boolean"==typeof t?t:!!e}function _(e,t,n){var r=l.useRef(!1),s=l.useState(0)[1],o=(0,m.lV)(e,t,n),a=d(),u=l.useRef();u.current?u.current.setOptions(o):u.current=new b(a,o);var c=u.current.getCurrentResult();l.useEffect(function(){r.current=!0;var e=u.current.subscribe(i.V.batchCalls(function(){r.current&&s(function(e){return e+1})}));return function(){r.current=!1,e()}},[]);var h=l.useCallback(function(e,t){u.current.mutate(e,t).catch(m.ZT)},[]);if(c.error&&w(void 0,u.current.options.useErrorBoundary,[c.error]))throw c.error;return(0,p.Z)({},c,{mutate:h,mutateAsync:c.mutate})}var E=n(59852),x=n(21216),S=function(e){function t(t,n){var r;return(r=e.call(this)||this).client=t,r.options=n,r.trackedProps=[],r.selectError=null,r.bindMethods(),r.setOptions(n),r}(0,g.Z)(t,e);var n=t.prototype;return n.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},n.onSubscribe=function(){1===this.listeners.length&&(this.currentQuery.addObserver(this),k(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},n.onUnsubscribe=function(){this.listeners.length||this.destroy()},n.shouldFetchOnReconnect=function(){return T(this.currentQuery,this.options,this.options.refetchOnReconnect)},n.shouldFetchOnWindowFocus=function(){return T(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},n.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},n.setOptions=function(e,t){var n=this.options,r=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled)throw Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();var i=this.hasListeners();i&&I(this.currentQuery,r,this.options,n)&&this.executeFetch(),this.updateResult(t),i&&(this.currentQuery!==r||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();var s=this.computeRefetchInterval();i&&(this.currentQuery!==r||this.options.enabled!==n.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)},n.getOptimisticResult=function(e){var t=this.client.defaultQueryObserverOptions(e),n=this.client.getQueryCache().build(this.client,t);return this.createResult(n,t)},n.getCurrentResult=function(){return this.currentResult},n.trackResult=function(e,t){var n=this,r={},i=function(e){n.trackedProps.includes(e)||n.trackedProps.push(e)};return Object.keys(e).forEach(function(t){Object.defineProperty(r,t,{configurable:!1,enumerable:!0,get:function(){return i(t),e[t]}})}),(t.useErrorBoundary||t.suspense)&&i("error"),r},n.getNextResult=function(e){var t=this;return new Promise(function(n,r){var i=t.subscribe(function(t){t.isFetching||(i(),t.isError&&(null==e?void 0:e.throwOnError)?r(t.error):n(t))})})},n.getCurrentQuery=function(){return this.currentQuery},n.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},n.refetch=function(e){return this.fetch((0,p.Z)({},e,{meta:{refetchPage:null==e?void 0:e.refetchPage}}))},n.fetchOptimistic=function(e){var t=this,n=this.client.defaultQueryObserverOptions(e),r=this.client.getQueryCache().build(this.client,n);return r.fetch().then(function(){return t.createResult(r,n)})},n.fetch=function(e){var t=this;return this.executeFetch(e).then(function(){return t.updateResult(),t.currentResult})},n.executeFetch=function(e){this.updateQuery();var t=this.currentQuery.fetch(this.options,e);return(null==e?void 0:e.throwOnError)||(t=t.catch(m.ZT)),t},n.updateStaleTimeout=function(){var e=this;if(this.clearStaleTimeout(),!m.sk&&!this.currentResult.isStale&&(0,m.PN)(this.options.staleTime)){var t=(0,m.Kp)(this.currentResult.dataUpdatedAt,this.options.staleTime);this.staleTimeoutId=setTimeout(function(){e.currentResult.isStale||e.updateResult()},t+1)}},n.computeRefetchInterval=function(){var e;return"function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(e=this.options.refetchInterval)&&e},n.updateRefetchInterval=function(e){var t=this;this.clearRefetchInterval(),this.currentRefetchInterval=e,!m.sk&&!1!==this.options.enabled&&(0,m.PN)(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval(function(){(t.options.refetchIntervalInBackgroun
191d||E.j.isFocused())&&t.executeFetch()},this.currentRefetchInterval))},n.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},n.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},n.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},n.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},n.createResult=function(e,t){var n,r,i=this.currentQuery,s=this.options,a=this.currentResult,l=this.currentResultState,u=this.currentResultOptions,c=e!==i,h=c?e.state:this.currentQueryInitialState,d=c?this.currentResult:this.previousQueryResult,f=e.state,p=f.dataUpdatedAt,g=f.error,v=f.errorUpdatedAt,y=f.isFetching,b=f.status,w=!1,_=!1;if(t.optimisticResults){var E=this.hasListeners(),x=!E&&k(e,t),S=E&&I(e,i,t,s);(x||S)&&(y=!0,p||(b="loading"))}if(t.keepPreviousData&&!f.dataUpdateCount&&(null==d?void 0:d.isSuccess)&&"error"!==b)n=d.data,p=d.dataUpdatedAt,b=d.status,w=!0;else if(t.select&&void 0!==f.data){if(a&&f.data===(null==l?void 0:l.data)&&t.select===this.selectFn)n=this.selectResult;else try{this.selectFn=t.select,n=t.select(f.data),!1!==t.structuralSharing&&(n=(0,m.Q$)(null==a?void 0:a.data,n)),this.selectResult=n,this.selectError=null}catch(e){(0,o.j)().error(e),this.selectError=e}}else n=f.data;if(void 0!==t.placeholderData&&void 0===n&&("loading"===b||"idle"===b)){if((null==a?void 0:a.isPlaceholderData)&&t.placeholderData===(null==u?void 0:u.placeholderData))r=a.data;else if(r="function"==typeof t.placeholderData?t.placeholderData():t.placeholderData,t.select&&void 0!==r)try{r=t.select(r),!1!==t.structuralSharing&&(r=(0,m.Q$)(null==a?void 0:a.data,r)),this.selectError=null}catch(e){(0,o.j)().error(e),this.selectError=e}void 0!==r&&(b="success",n=r,_=!0)}return this.selectError&&(g=this.selectError,n=this.selectResult,v=Date.now(),b="error"),{status:b,isLoading:"loading"===b,isSuccess:"success"===b,isError:"error"===b,isIdle:"idle"===b,data:n,dataUpdatedAt:p,error:g,errorUpdatedAt:v,failureCount:f.fetchFailureCount,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>h.dataUpdateCount||f.errorUpdateCount>h.errorUpdateCount,isFetching:y,isRefetching:y&&"loading"!==b,isLoadingError:"error"===b&&0===f.dataUpdatedAt,isPlaceholderData:_,isPreviousData:w,isRefetchError:"error"===b&&0!==f.dataUpdatedAt,isStale:C(e,t),refetch:this.refetch,remove:this.remove}},n.shouldNotifyListeners=function(e,t){if(!t)return!0;var n=this.options,r=n.notifyOnChangeProps,i=n.notifyOnChangePropsExclusions;if(!r&&!i||"tracked"===r&&!this.trackedProps.length)return!0;var s="tracked"===r?this.trackedProps:r;return Object.keys(e).some(function(n){var r=e[n]!==t[n],o=null==s?void 0:s.some(function(e){return e===n}),a=null==i?void 0:i.some(function(e){return e===n});return r&&!a&&(!s||o)})},n.updateResult=function(e){var t=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!(0,m.VS)(this.currentResult,t)){var n={cache:!0};(null==e?void 0:e.listeners)!==!1&&this.shouldNotifyListeners(this.currentResult,t)&&(n.listeners=!0),this.notify((0,p.Z)({},n,e))}},n.updateQuery=function(){var e=this.client.getQueryCache().build(this.client,this.options);if(e!==this.currentQuery){var t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}},n.onQueryUpdate=function(e){var t={};"success"===e.type?t.onSuccess=!0:"error"!==e.type||(0,x.DV)(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()},n.notify=function(e){var t=this;i.V.batch(function(){e.onSuccess?(null==t.options.onSuccess||t.options.onSuccess(t.currentResult.data),null==t.options.onSettled||t.options.onSettled(t.currentResult.data,null)):e.onError&&(null==t.options.onError||t.options.onError(t.currentResult.error),null==t.options.onSettled||t.options.onSettled(void 0,t.currentResult.error)),e.listeners&&t.listeners.forEac
191h(function(e){e(t.currentResult)}),e.cache&&t.client.getQueryCache().notify({query:t.currentQuery,type:"observerResultsUpdated"})})},t}(y.l);function k(e,t){return!1!==t.enabled&&!e.state.dataUpdatedAt&&!("error"===e.state.status&&!1===t.retryOnMount)||e.state.dataUpdatedAt>0&&T(e,t,t.refetchOnMount)}function T(e,t,n){if(!1!==t.enabled){var r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&C(e,t)}return!1}function I(e,t,n,r){return!1!==n.enabled&&(e!==t||!1===r.enabled)&&(!n.suspense||"error"!==e.state.status)&&C(e,n)}function C(e,t){return e.isStaleByTime(t.staleTime)}var A=l.createContext((r=!1,{clearReset:function(){r=!1},reset:function(){r=!0},isReset:function(){return r}}));function O(e,t){var n=l.useRef(!1),r=l.useState(0)[1],s=d(),o=l.useContext(A),a=s.defaultQueryObserverOptions(e);a.optimisticResults=!0,a.onError&&(a.onError=i.V.batchCalls(a.onError)),a.onSuccess&&(a.onSuccess=i.V.batchCalls(a.onSuccess)),a.onSettled&&(a.onSettled=i.V.batchCalls(a.onSettled)),a.suspense&&("number"!=typeof a.staleTime&&(a.staleTime=1e3),0===a.cacheTime&&(a.cacheTime=1)),(a.suspense||a.useErrorBoundary)&&!o.isReset()&&(a.retryOnMount=!1);var u=l.useState(function(){return new t(s,a)})[0],c=u.getOptimisticResult(a);if(l.useEffect(function(){n.current=!0,o.clearReset();var e=u.subscribe(i.V.batchCalls(function(){n.current&&r(function(e){return e+1})}));return u.updateResult(),function(){n.current=!1,e()}},[o,u]),l.useEffect(function(){u.setOptions(a,{listeners:!1})},[a,u]),a.suspense&&c.isLoading)throw u.fetchOptimistic(a).then(function(e){var t=e.data;null==a.onSuccess||a.onSuccess(t),null==a.onSettled||a.onSettled(t,null)}).catch(function(e){o.clearReset(),null==a.onError||a.onError(e),null==a.onSettled||a.onSettled(void 0,e)});if(c.isError&&!o.isReset()&&!c.isFetching&&w(a.suspense,a.useErrorBoundary,[c.error,u.getCurrentQuery()]))throw c.error;return"tracked"===a.notifyOnChangeProps&&(c=u.trackResult(c,a)),c}function R(e,t,n){return O((0,m._v)(e,t,n),S)}var P=n(36997),N=function(e){function t(t,n){return e.call(this,t,n)||this}(0,g.Z)(t,e);var n=t.prototype;return n.bindMethods=function(){e.prototype.bindMethods.call(this),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)},n.setOptions=function(t,n){e.prototype.setOptions.call(this,(0,p.Z)({},t,{behavior:(0,P.Gm)()}),n)},n.getOptimisticResult=function(t){return t.behavior=(0,P.Gm)(),e.prototype.getOptimisticResult.call(this,t)},n.fetchNextPage=function(e){var t;return this.fetch({cancelRefetch:null==(t=null==e?void 0:e.cancelRefetch)||t,throwOnError:null==e?void 0:e.throwOnError,meta:{fetchMore:{direction:"forward",pageParam:null==e?void 0:e.pageParam}}})},n.fetchPreviousPage=function(e){var t;return this.fetch({cancelRefetch:null==(t=null==e?void 0:e.cancelRefetch)||t,throwOnError:null==e?void 0:e.throwOnError,meta:{fetchMore:{direction:"backward",pageParam:null==e?void 0:e.pageParam}}})},n.createResult=function(t,n){var r,i,s,o,a,l,u=t.state,c=e.prototype.createResult.call(this,t,n);return(0,p.Z)({},c,{fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,P.Qy)(n,null==(r=u.data)?void 0:r.pages),hasPreviousPage:(0,P.ZF)(n,null==(i=u.data)?void 0:i.pages),isFetchingNextPage:u.isFetching&&(null==(s=u.fetchMeta)?void 0:null==(o=s.fetchMore)?void 0:o.direction)==="forward",isFetchingPreviousPage:u.isFetching&&(null==(a=u.fetchMeta)?void 0:null==(l=a.fetchMore)?void 0:l.direction)==="backward"})},t}(S);function D(e,t,n){return O((0,m._v)(e,t,n),N)}},98885:function(e,t,n){"use strict";n.d(t,{ZP:function(){return v}});var r=n(63366),i=n(75068),s=n(67294),o=n(73935),a={disabled:!1},l=n(220),u=n(59391),c="unmounted",h="exited",d="entering",f="entered",p="exiting",m=function(e){function t(t,n){r=e.call(this,t,n)||this;var r,i,s=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?s?(i=h,r.appearStatus=d):i=f:i=t.unmountOnExit||t.mountOnEnter?c:h,r.state={status:i},r.nextCallback=null,r}(0,i.Z)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===c?{status:h}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==d&&n!==f&&(t=d):(n===d||n===f)&&(t=p)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,a
191ppear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){if(this.cancelNextCallback(),t===d){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:o.findDOMNode(this);n&&(0,u.Q)(n)}this.performEnter(e)}else this.performExit()}else this.props.unmountOnExit&&this.state.status===h&&this.setState({status:c})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[o.findDOMNode(this),r],s=i[0],l=i[1],u=this.getTimeouts(),c=r?u.appear:u.enter;if(!e&&!n||a.disabled){this.safeSetState({status:f},function(){t.props.onEntered(s)});return}this.props.onEnter(s,l),this.safeSetState({status:d},function(){t.props.onEntering(s,l),t.onTransitionEnd(c,function(){t.safeSetState({status:f},function(){t.props.onEntered(s,l)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:o.findDOMNode(this);if(!t||a.disabled){this.safeSetState({status:h},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:p},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:h},function(){e.props.onExited(r)})})})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:o.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],s=i[0],a=i[1];this.props.addEndListener(s,a)}null!=e&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===c)return null;var t=this.props,n=t.children,i=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,(0,r.Z)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return s.createElement(l.Z.Provider,{value:null},"function"==typeof n?n(e,i):s.cloneElement(s.Children.only(n),i))},t}(s.Component);function g(){}m.contextType=l.Z,m.propTypes={},m.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:g,onEntering:g,onEntered:g,onExit:g,onExiting:g,onExited:g},m.UNMOUNTED=c,m.EXITED=h,m.ENTERING=d,m.ENTERED=f,m.EXITING=p;var v=m},89747:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(63366),i=n(87462),s=n(75068),o=n(67294),a=n(220);function l(e,t){var n=Object.create(null);return e&&o.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=t&&(0,o.isValidElement)(e)?t(e):e}),n}function u(e,t,n){return null!=n[t]?n[t]:e.props[t]}var c=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},h=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}(0,s.Z)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,s=t.handleExited;
191return{children:t.firstRender?l(e.children,function(t){return(0,o.cloneElement)(t,{onExited:s.bind(null,t),in:!0,appear:u(t,"appear",e),enter:u(t,"enter",e),exit:u(t,"exit",e)})}):(Object.keys(r=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),s=[];for(var o in e)o in t?s.length&&(i[o]=s,s=[]):s.push(o);var a={};for(var l in t){if(i[l])for(r=0;r<i[l].length;r++){var u=i[l][r];a[i[l][r]]=n(u)}a[l]=n(l)}for(r=0;r<s.length;r++)a[s[r]]=n(s[r]);return a}(i,n=l(e.children))).forEach(function(t){var a=r[t];if((0,o.isValidElement)(a)){var l=t in i,c=t in n,h=i[t],d=(0,o.isValidElement)(h)&&!h.props.in;c&&(!l||d)?r[t]=(0,o.cloneElement)(a,{onExited:s.bind(null,a),in:!0,exit:u(a,"exit",e),enter:u(a,"enter",e)}):c||!l||d?c&&l&&(0,o.isValidElement)(h)&&(r[t]=(0,o.cloneElement)(a,{onExited:s.bind(null,a),in:h.props.in,exit:u(a,"exit",e),enter:u(a,"enter",e)})):r[t]=(0,o.cloneElement)(a,{in:!1})}}),r),firstRender:!1}},n.handleExited=function(e,t){var n=l(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=(0,i.Z)({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,i=(0,r.Z)(e,["component","childFactory"]),s=this.state.contextValue,l=c(this.state.children).map(n);return(delete i.appear,delete i.enter,delete i.exit,null===t)?o.createElement(a.Z.Provider,{value:s},l):o.createElement(a.Z.Provider,{value:s},o.createElement(t,i,l))},t}(o.Component);h.propTypes={},h.defaultProps={component:"div",childFactory:function(e){return e}};var d=h},220:function(e,t,n){"use strict";var r=n(67294);t.Z=r.createContext(null)},59391:function(e,t,n){"use strict";n.d(t,{Q:function(){return r}});var r=function(e){return e.scrollTop}},69328:function(e){"use strict";var t={decodeValues:!0,map:!1,silent:!1};function n(e){return"string"==typeof e&&!!e.trim()}function r(e,r){var i,s,o,a,l=e.split(";").filter(n),u=(i=l.shift(),s="",o="",(a=i.split("=")).length>1?(s=a.shift(),o=a.join("=")):o=i,{name:s,value:o}),c=u.name,h=u.value;r=r?Object.assign({},t,r):t;try{h=r.decodeValues?decodeURIComponent(h):h}catch(e){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+h+"'. Set options.decodeValues to false to disable this feature.",e)}var d={name:c,value:h};return l.forEach(function(e){var t=e.split("="),n=t.shift().trimLeft().toLowerCase(),r=t.join("=");"expires"===n?d.expires=new Date(r):"max-age"===n?d.maxAge=parseInt(r,10):"secure"===n?d.secure=!0:"httponly"===n?d.httpOnly=!0:"samesite"===n?d.sameSite=r:"partitioned"===n?d.partitioned=!0:d[n]=r}),d}function i(e,i){if(i=i?Object.assign({},t,i):t,!e)return i.map?{}:[];if(e.headers){if("function"==typeof e.headers.getSetCookie)e=e.headers.getSetCookie();else if(e.headers["set-cookie"])e=e.headers["set-cookie"];else{var s=e.headers[Object.keys(e.headers).find(function(e){return"set-cookie"===e.toLowerCase()})];s||!e.headers.cookie||i.silent||console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),e=s}}return(Array.isArray(e)||(e=[e]),i.map)?e.filter(n).reduce(function(e,t){var n=r(t,i);return e[n.name]=n,e},{}):e.filter(n).map(function(e){return r(e,i)})}e.exports=i,e.exports.parse=i,e.exports.parseString=r,e.exports.splitCookiesString=function(e){if(Array.isArray(e))return e;if("string"!=typeof e)return[];var t,n,r,i,s,o=[],a=0;function l(){for(;a<e.length&&/\s/.test(e.charAt(a));)a+=1;return a<e.length}for(;a<e.length;){for(t=a,s=!1;l();)if(","===(n=e.charAt(a))){for(r=a,a+=1,l(),i=a;a<e.length&&"="!==(n=e.charAt(a))&&";"!==n&&","!==n;)a+=1;a<e.length&&"="===e.charAt(a)?(s=!0,a=i,o.push(e.substring(t,r)),t=a):a=r+1}else a+=1;(!s||a>=e.length)&&o.push(e.substring(t,e.length))}return o}},23451:function(e,t,n){var r;!function(i,s){"use strict";var o="function",a="undefined",l="object",u="string",c="major",h="model",d="name",f="type",p="vendor",m="version",g
vendor: 10,377 bytes, line 191
191="architecture",v="console",y="mobile",b="tablet",w="smarttv",_="wearable",E="embedded",x="Amazon",S="Apple",k="ASUS",T="BlackBerry",I="Browser",C="Chrome",A="Firefox",O="Google",R="Huawei",P="Microsoft",N="Motorola",D="Opera",M="Samsung",L="Sharp",Z="Sony",j="Xiaomi",F="Zebra",U="Facebook",V="Chromium OS",$="Mac OS",z=" Browser",B=function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},q=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},H=function(e,t){return typeof e===u&&-1!==W(t).indexOf(W(e))},W=function(e){return e.toLowerCase()},G=function(e,t){if(typeof e===u)return e=e.replace(/^\s\s*/,""),typeof t===a?e:e.substring(0,500)},K=function(e,t){for(var n,r,i,a,u,c,h=0;h<t.length&&!u;){var d=t[h],f=t[h+1];for(n=r=0;n<d.length&&!u&&d[n];)if(u=d[n++].exec(e))for(i=0;i<f.length;i++)c=u[++r],typeof(a=f[i])===l&&a.length>0?2===a.length?typeof a[1]==o?this[a[0]]=a[1].call(this,c):this[a[0]]=a[1]:3===a.length?typeof a[1]!==o||a[1].exec&&a[1].test?this[a[0]]=c?c.replace(a[1],a[2]):s:this[a[0]]=c?a[1].call(this,c,a[2]):s:4===a.length&&(this[a[0]]=c?a[3].call(this,c.replace(a[1],a[2])):s):this[a]=c||s;h+=2}},Q=function(e,t){for(var n in t)if(typeof t[n]===l&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(H(t[n][r],e))return"?"===n?s:n}else if(H(t[n],e))return"?"===n?s:n;return t.hasOwnProperty("*")?t["*"]:e},Y={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},X={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[m,[d,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[m,[d,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[d,m],[/opios[\/ ]+([\w\.]+)/i],[m,[d,D+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[m,[d,D+" GX"]],[/\bopr\/([\w\.]+)/i],[m,[d,D]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[m,[d,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[m,[d,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[d,m],[/quark(?:pc)?\/([-\w\.]+)/i],[m,[d,"Quark"]],[/\bddg\/([\w\.]+)/i],[m,[d,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[m,[d,"UC"+I]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[m,[d,"WeChat"]],[/konqueror\/([\w\.]+)/i],[m,[d,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[m,[d,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[m,[d,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[m,[d,"Smart Lenovo "+I]],[/(avast|avg)\/([\w\.]+)/i],[[d,/(.+)/,"$1 Secure "+I],m],[/\bfocus\/([\w\.]+)/i],[m,[d,A+" Focus"]],[/\bopt\/([\w\.]+)/i],[m,[d,D+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[m,[d,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[m,[d,"Dolphin"]],[/coast\/([\w\.]+)/i],[m,[d,D+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[m,[d,"MIUI"+z]],[/fxios\/([\w\.-]+)/i],[m,[d,A]],[/\bqihoobrowser\/?([\w\.]*)/i],[m,[d,"360"]],[/\b(qq)\/([\w\.]+)/i],[[d,/(.+)/,"$1Browser"],m],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[d,/(.+)/,"$1"+z],m],[/samsungbrowser\/([\w\.]+)/i],[m,[d,M+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[m,[d,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[d,"Sogou Mobile"],m],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[d,m],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[d],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[m,d],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[d,U],m],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[d,m],[/\bgsa\/([\w\.]+) .*safari\//i],[m,[d,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[m,[d,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[m,[d,C+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[d,C+" WebView"],m],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[m,[d,"Android "+I]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[d,m],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[m,[d,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[m,d],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[d,[m,Q,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[d,m],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[d,"Netscape"],m],[/(wolvic|librewolf)\/([\w\.]+)/i],[d,m],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[m,[d,A+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[d,[m,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[d,[m,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[g,"amd64"]],[/(ia32(?=;))/i],[[g,W]],[/((?:i[346]|x)86)[;\)]/i],[[g,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[g,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[g,"armhf"]],[/windows (ce|mobile); ppc;/i],[[g,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[g,/ower/,"",W]],[/(sun4\w)[;\)]/i],[[g,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[g,W]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[h,[p,M],[f,b]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[h,[p,M],[f,y]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[h,[p,S],[f,y]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[h,[p,S],[f,b]],[/(macintosh);/i],[h,[p,S]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[h,[p,L],[f,y]],[/(?:honor)([-\w ]+)[;\)]/i],[h,[p,"Honor"],[f,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[h,[p,R],[f,b]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[h,[p,R],[f,y]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[h,/_/g," "],[p,j],[f,y]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[h,/_/g," "],[p,j],[f,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[h,[p,"OPPO"],[f,y]],[/\b(opd2\d{3}a?) bui/i],[h,[p,"OPPO"],[f,b]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[h,[p,"Vivo"],[f,y]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[h,[p,"Realme"],[f,y]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[h,[p,N],[f,y]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[h,[p,N],[f,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[h,[p,"LG"],[f,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[h,[p,"LG"],[f,y]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[h,[p,"Lenovo"],[f,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[h,/_/g," "],[p,"Nokia"],[f,y]],[/(pixel c)\b/i],[h,[p,O],[f,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[h,[p,O],[f,y]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[h,[p,Z],[f,y]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[h,"Xperia Tablet"],[p,Z],[f,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[h,[p,"OnePlus"],[f,y]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[h,[p,x],[f,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[h,/(.+)/g,"Fire Phone $1"],[p,x],[f,y]],[/(playbook);[-\w\),; ]+(rim)/i],[h,p,[f,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[h,[p,T],[f,y]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[h,[p,k],[f,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[h,[p,k],[f,y]],[/(nexus 9)/i],[h,[p,"HTC"],[f,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[p,[h,/_/g," "],[f,y]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[h,[p,"TCL"],[f,b]],[/(itel) ((\w+))/i],[[p,W],h,[f,Q,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[h,[p,"Acer"],[f,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[h,[p,"Meizu"],[f,y]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[h,[p,"Ulefone"],[f,y]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[h,[p,"Energizer"],[f,y]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[h,[p,"Cat"],[f,y]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[h,[p,"Smartfren"],[f,y]],[/droid.+; (a(?:015|06[35]|142p?))/i],[h,[p,"Nothing"],[f,y]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/;
vendor: 6,118 bytes, line 191
191 (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[p,h,[f,y]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[p,h,[f,b]],[/(surface duo)/i],[h,[p,P],[f,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[h,[p,"Fairphone"],[f,y]],[/(u304aa)/i],[h,[p,"AT&T"],[f,y]],[/\bsie-(\w*)/i],[h,[p,"Siemens"],[f,y]],[/\b(rct\w+) b/i],[h,[p,"RCA"],[f,b]],[/\b(venue[\d ]{2,7}) b/i],[h,[p,"Dell"],[f,b]],[/\b(q(?:mv|ta)\w+) b/i],[h,[p,"Verizon"],[f,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[h,[p,"Barnes & Noble"],[f,b]],[/\b(tm\d{3}\w+) b/i],[h,[p,"NuVision"],[f,b]],[/\b(k88) b/i],[h,[p,"ZTE"],[f,b]],[/\b(nx\d{3}j) b/i],[h,[p,"ZTE"],[f,y]],[/\b(gen\d{3}) b.+49h/i],[h,[p,"Swiss"],[f,y]],[/\b(zur\d{3}) b/i],[h,[p,"Swiss"],[f,b]],[/\b((zeki)?tb.*\b) b/i],[h,[p,"Zeki"],[f,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[p,"Dragon Touch"],h,[f,b]],[/\b(ns-?\w{0,9}) b/i],[h,[p,"Insignia"],[f,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[h,[p,"NextBook"],[f,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[p,"Voice"],h,[f,y]],[/\b(lvtel\-)?(v1[12]) b/i],[[p,"LvTel"],h,[f,y]],[/\b(ph-1) /i],[h,[p,"Essential"],[f,y]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[h,[p,"Envizen"],[f,b]],[/\b(trio[-\w\. ]+) b/i],[h,[p,"MachSpeed"],[f,b]],[/\btu_(1491) b/i],[h,[p,"Rotor"],[f,b]],[/(shield[\w ]+) b/i],[h,[p,"Nvidia"],[f,b]],[/(sprint) (\w+)/i],[p,h,[f,y]],[/(kin\.[onetw]{3})/i],[[h,/\./g," "],[p,P],[f,y]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[h,[p,F],[f,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[h,[p,F],[f,y]],[/smart-tv.+(samsung)/i],[p,[f,w]],[/hbbtv.+maple;(\d+)/i],[[h,/^/,"SmartTV"],[p,M],[f,w]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[p,"LG"],[f,w]],[/(apple) ?tv/i],[p,[h,S+" TV"],[f,w]],[/crkey/i],[[h,C+"cast"],[p,O],[f,w]],[/droid.+aft(\w+)( bui|\))/i],[h,[p,x],[f,w]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[h,[p,L],[f,w]],[/(bravia[\w ]+)( bui|\))/i],[h,[p,Z],[f,w]],[/(mitv-\w{5}) bui/i],[h,[p,j],[f,w]],[/Hbbtv.*(technisat) (.*);/i],[p,h,[f,w]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[p,G],[h,G],[f,w]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[f,w]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[p,h,[f,v]],[/droid.+; (shield) bui/i],[h,[p,"Nvidia"],[f,v]],[/(playstation [345portablevi]+)/i],[h,[p,Z],[f,v]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[h,[p,P],[f,v]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[h,[p,M],[f,_]],[/((pebble))app/i],[p,h,[f,_]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[h,[p,S],[f,_]],[/droid.+; (glass) \d/i],[h,[p,O],[f,_]],[/droid.+; (wt63?0{2,3})\)/i],[h,[p,F],[f,_]],[/droid.+; (glass) \d/i],[h,[p,O],[f,_]],[/(pico) (4|neo3(?: link|pro)?)/i],[p,h,[f,_]],[/; (quest( \d| pro)?)/i],[h,[p,U],[f,_]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[p,[f,E]],[/(aeobc)\b/i],[h,[p,x],[f,E]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[h,[f,y]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[h,[f,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[f,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[f,y]],[/(android[-\w\. ]{0,9});.+buil/i],[h,[p,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[m,[d,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[d,m],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[m,[d,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[d,m],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[m,d]],os:[[/microsoft (windows) (vista|xp)/i],[d,m],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[d,[m,Q,Y]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[m,Q,Y],[d,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[m,/_/g,"."],[d,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[d,$],[m,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[m,d],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[d,m],[/\(bb(10);/i],[m,[d,T]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[m,[d,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[m,[d,A+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[m,[d,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[m,[d,"watchOS"]],[/crkey\/([\d\.]+)/i],[m,[d,C+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[d,V],m],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[d,m],[/(sunos) ?([\w\.\d]*)/i],[[d,"Solaris"],m],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[d,m]]},J=function(e,t){if(typeof e===l&&(t=e,e=s),!(this instanceof J))return new J
191(e,t).getResult();var n=typeof i!==a&&i.navigator?i.navigator:s,r=e||(n&&n.userAgent?n.userAgent:""),v=n&&n.userAgentData?n.userAgentData:s,w=t?B(X,t):X,_=n&&n.userAgent==r;return this.getBrowser=function(){var e,t={};return t[d]=s,t[m]=s,K.call(t,r,w.browser),t[c]=typeof(e=t[m])===u?e.replace(/[^\d\.]/g,"").split(".")[0]:s,_&&n&&n.brave&&typeof n.brave.isBrave==o&&(t[d]="Brave"),t},this.getCPU=function(){var e={};return e[g]=s,K.call(e,r,w.cpu),e},this.getDevice=function(){var e={};return e[p]=s,e[h]=s,e[f]=s,K.call(e,r,w.device),_&&!e[f]&&v&&v.mobile&&(e[f]=y),_&&"Macintosh"==e[h]&&n&&typeof n.standalone!==a&&n.maxTouchPoints&&n.maxTouchPoints>2&&(e[h]="iPad",e[f]=b),e},this.getEngine=function(){var e={};return e[d]=s,e[m]=s,K.call(e,r,w.engine),e},this.getOS=function(){var e={};return e[d]=s,e[m]=s,K.call(e,r,w.os),_&&!e[d]&&v&&v.platform&&"Unknown"!=v.platform&&(e[d]=v.platform.replace(/chrome os/i,V).replace(/macos/i,$)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=typeof e===u&&e.length>500?G(e,500):e,this},this.setUA(r),this};J.VERSION="1.0.40",J.BROWSER=q([d,m,c]),J.CPU=q([g]),J.DEVICE=q([h,p,f,v,y,w,b,_,E]),J.ENGINE=J.OS=q([d,m]),typeof t!==a?(e.exports&&(t=e.exports=J),t.UAParser=J):n.amdO?(r=(function(){return J}).call(t,n,t,e),s!==r&&(e.exports=r)):typeof i!==a&&(i.UAParser=J);var ee=typeof i!==a&&(i.jQuery||i.Zepto);if(ee&&!ee.ua){var et=new J;ee.ua=et.getResult(),ee.ua.get=function(){return et.getUA()},ee.ua.set=function(e){et.setUA(e);var t=et.getResult();for(var n in t)ee.ua[n]=t[n]}}}("object"==typeof window?window:this)},10434:function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},64836:function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},7071:function(e){e.exports=function(e,t){if(null==e)return{};var n={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n},e.exports.__esModule=!0,e.exports.default=e.exports},36559:function(e,t,n){"use strict";let r=n(85346);e.exports=c;let i=function(){function e(e){return void 0!==e&&e}try{if("undefined"!=typeof globalThis)return globalThis;return Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{};function s(e,t){return"silent"===e?1/0:t.levels.values[e]}let o=Symbol("pino.logFuncs"),a=Symbol("pino.hierarchy"),l={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function u(e,t){let n={logger:t,parent:e[a]};t[a]=n}function c(e){var t;(e=e||{}).browser=e.browser||{};let n=e.browser.transmit;if(n&&"function"!=typeof n.send)throw Error("pino: transmit option must have a send function");let r=e.browser.write||i;e.browser.write&&(e.browser.asObject=!0);let a=e.serializers||{},p=function(e,t){if(Array.isArray(e)){let t=e.filter(function(e){return"!stdSerializers.err"!==e});return t}return!0===e&&Object.keys(t)}(e.browser.serialize,a),m=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(m=!1);let g=Object.keys(e.customLevels||{}),w=["error","fatal","warn","info","debug","trace"].concat(g);"function"==typeof r&&w.forEach(function(e){r[e]=r}),(!1===e.enabled||e.browser.disabled)&&(e.level="silent");let _=e.level||"info",E=Object.create(r);E.log||(E.log=v),function(e,t,n){let r={};t.forEach(e=>{r[e]=n[e]?n[e]:i[e]||i[l[e]||"log"]||v}),e[o]=r}(E,w,r),u({},E),Object.defineProperty(E,"levelVal",{get:function(){return s(this.level,this)}}),Object.defineProperty(E,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,h(this,x,E,"error"),h(this,x,E,"fatal"),h(this,x,E,"warn"),h(this,x,E,"info"),h(this,x,E,"debug"),h(this,x,E,"trace"),g.forEach(e
191=>{h(this,x,E,e)})}});let x={transmit:n,serialize:p,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:w,timestamp:"function"==typeof(t=e).timestamp?t.timestamp:!1===t.timestamp?y:b};return E.levels=function(e){let t=e.customLevels||{},n=Object.assign({},c.levels.values,t),r=Object.assign({},c.levels.labels,function(e){let t={};return Object.keys(e).forEach(function(n){t[e[n]]=n}),t}(t));return{values:n,labels:r}}(e),E.level=_,E.setMaxListeners=E.getMaxListeners=E.emit=E.addListener=E.on=E.prependListener=E.once=E.prependOnceListener=E.removeListener=E.removeAllListeners=E.listeners=E.listenerCount=E.eventNames=E.write=E.flush=v,E.serializers=a,E._serialize=p,E._stdErrSerialize=m,E.child=function(t,r){if(!t)throw Error("missing bindings for child Pino");r=r||{},p&&t.serializers&&(r.serializers=t.serializers);let i=r.serializers;if(p&&i){var s=Object.assign({},a,i),o=!0===e.browser.serialize?Object.keys(s):p;delete t.serializers,d([t],o,s,this._stdErrSerialize)}function l(e){this._childLevel=(0|e._childLevel)+1,this.bindings=t,s&&(this.serializers=s,this._serialize=o),n&&(this._logEvent=f([].concat(e._logEvent.bindings,t)))}l.prototype=this;let c=new l(this);return u(this,c),c.level=this.level,c},n&&(E._logEvent=f()),E}function h(e,t,n,l){var u,c;if(Object.defineProperty(e,l,{value:s(e.level,n)>s(l,n)?v:n[o][l],writable:!0,enumerable:!0,configurable:!0}),!t.transmit&&e[l]===v)return;e[l]=(u=e[o][l],function(){let o=t.timestamp(),a=Array(arguments.length),c=Object.getPrototypeOf&&Object.getPrototypeOf(this)===i?i:this;for(var h=0;h<a.length;h++)a[h]=arguments[h];if(t.serialize&&!t.asObject&&d(a,this._serialize,this.serializers,this._stdErrSerialize),t.asObject||t.formatters?u.call(c,function(e,t,n,i,s={}){let{level:o=()=>e.levels.values[t],log:a=e=>e}=s;e._serialize&&d(n,e._serialize,e.serializers,e._stdErrSerialize);let l=n.slice(),u=l[0],c={};i&&(c.time=i),c.level=o(t,e.levels.values[t]);let h=(0|e._childLevel)+1;if(h<1&&(h=1),null!==u&&"object"==typeof u){for(;h--&&"object"==typeof l[0];)Object.assign(c,l.shift());u=l.length?r(l.shift(),l):void 0}else"string"==typeof u&&(u=r(l.shift(),l));void 0!==u&&(c.msg=u);let f=a(c);return f}(this,l,a,o,t.formatters)):u.apply(c,a),t.transmit){let r=t.transmit.level||e._level,i=n.levels.values[r],u=n.levels.values[l];if(u<i)return;(function(e,t,n){let r=t.send,i=t.ts,s=t.methodLevel,o=t.methodValue,a=t.val,l=e._logEvent.bindings;d(n,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=n.filter(function(e){return -1===l.indexOf(e)}),e._logEvent.level.label=s,e._logEvent.level.value=o,r(s,e._logEvent,a),e._logEvent=f(l)})(this,{ts:o,methodLevel:l,methodValue:u,transmitLevel:r,transmitValue:n.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:s(e._level,n)},a)}});let h=function(e){let t=[];e.bindings&&t.push(e.bindings);let n=e[a];for(;n.parent;)(n=n.parent).logger.bindings&&t.push(n.logger.bindings);return t.reverse()}(e);
1910!==h.length&&(e[l]=(c=e[l],function(){return c.apply(this,[...h,...arguments])}))}function d(e,t,n,r){for(let i in e)if(r&&e[i]instanceof Error)e[i]=c.stdSerializers.err(e[i]);else if("object"==typeof e[i]&&!Array.isArray(e[i]))for(let r in e[i])t&&t.indexOf(r)>-1&&r in n&&(e[i][r]=n[r](e[i][r]))}function f(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function p(e){let t={type:e.constructor.name,msg:e.message,stack:e.stack};for(let n in e)void 0===t[n]&&(t[n]=e[n]);return t}function m(){return{}}function g(e){return e}function v(){}function y(){return!1}function b(){return Date.now()}c.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},c.stdSerializers={mapHttpRequest:m,mapHttpResponse:m,wrapRequestSerializer:g,wrapResponseSerializer:g,wrapErrorSerializer:g,req:m,res:m,err:p,errWithCause:p},c.stdTimeFunctions=Object.assign({},{nullTime:y,epochTime:b,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}}),e.exports.default=c,e.exports.pino=c},87462:function(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}n.d(t,{Z:function(){return r}})},75068:function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,{Z:function(){return i}})},63366:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}n.d(t,{Z:function(){return r}})},47456:function(e,t,n){"use strict";let r,i;n.d(t,{ZR:function(){return l.ZR},Jn:function(){return D},qX:function(){return R},Xd:function(){return O},Mq:function(){return L},ZF:function(){return M},KN:function(){return Z}});var s,o=n(8463),a=n(53333),l=n(74444);let u=(e,t)=>t.some(t=>e instanceof t),c=new WeakMap,h=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,m={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return h.get(e);if("objectStoreNames"===t)return e.objectStoreNames||d.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return g(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function g(e){var t;if(e instanceof IDBRequest)return function(e){let t=new Promise((t,n)=>{let r=()=>{e.removeEventListener("success",i),e.removeEventListener("error",s)},i=()=>{t(g(e.result)),r()},s=()=>{n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",s)});return t.then(t=>{t instanceof IDBCursor&&c.set(t,e)}).catch(()=>{}),p.set(t,e),t}(e);if(f.has(e))return f.get(e);let n="function"==typeof(t=e)?t!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(i||(i=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(v(this),e),g(c.get(this))}:function(...e){return g(t.apply(v(this),e))}:function(e,...n){let r=t.call(v(this),e,...n);return d.set(r,e.sort?e.sort():[e]),g(r)}:(t instanceof IDBTransaction&&function(e){if(h.has(e))return;let t=new Promise((t,n)=>{let r=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",s),e.removeEventListener("abort",s)},i=()=>{t(),r()},s=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",s),e.addEventListener("abort",s)});h.set(e,t)}(t),u(t,r||(r=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])))?new Proxy(t,m):t;return n!==e&&(f.set(e,n),p.set(n,e)),n}let v=e=>p.get(e),y=["get","getKey","getAll","getAllKeys","count"],b=["put","add","delete","clear"],w=new Map;function _(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&"string"==typeof t))return;if(w.get(t))return w.get(t);let n=t.replace(/FromIndex$/,""),r=t!==n,i=b.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||y.includes(n)))return;let s=async function(e,...t){let s=this.transaction(e,i?"readwrite":"readonly"),o=s.store;
191return r&&(o=o.index(t.shift())),(await Promise.all([o[n](...t),i&&s.done]))[0]};return w.set(t,s),s}m={...s=m,get:(e,t,n)=>_(e,t)||s.get(e,t,n),has:(e,t)=>!!_(e,t)||s.has(e,t)};/**
192 * @license
193 * Copyright 2019 Google LLC
194 *
195 * Licensed under the Apache License, Version 2.0 (the "License");
196 * you may not use this file except in compliance with the License.
197 * You may obtain a copy of the License at
198 *
199 *   http://www.apache.org/licenses/LICENSE-2.0
200 *
201 * Unless required by applicable law or agreed to in writing, software
202 * distributed under the License is distributed on an "AS IS" BASIS,
203 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
204 * See the License for the specific language governing permissions and
205 * limitations under the License.
206 */class E{constructor(e){this.container=e}getPlatformInfoString(){let e=this.container.getProviders();return e.map(e=>{if(!function(e){let t=e.getComponent();return(null==t?void 0:t.type)==="VERSION"}(e))return null;{let t=e.getImmediate();return`${t.library}/${t.version}`}}).filter(e=>e).join(" ")}}let x="@firebase/app",S="0.9.13",k=new a.Yd("@firebase/app"),T="[DEFAULT]",I={[x]:"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/app-check":"fire-app-check","@firebase/app-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","fire-js":"fire-js",firebase:"fire-js-all"},C=new Map,A=new Map;function O(e){let t=e.name;if(A.has(t))return k.debug(`There were multiple attempts to register component ${t}.`),!1;for(let n of(A.set(t,e),C.values()))!function(e,t){try{e.container.addComponent(t)}catch(n){k.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}(n,e);return!0}function R(e,t){let n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}let P=new l.LL("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invali
206d-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."});/**
207 * @license
208 * Copyright 2019 Google LLC
209 *
210 * Licensed under the Apache License, Version 2.0 (the "License");
211 * you may not use this file except in compliance with the License.
212 * You may obtain a copy of the License at
213 *
214 *   http://www.apache.org/licenses/LICENSE-2.0
215 *
216 * Unless required by applicable law or agreed to in writing, software
217 * distributed under the License is distributed on an "AS IS" BASIS,
218 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
219 * See the License for the specific language governing permissions and
220 * limitations under the License.
221 */class N{constructor(e,t,n){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new o.wA("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw P.create("app-deleted",{appName:this._name})}}/**
222 * @license
223 * Copyright 2019 Google LLC
224 *
225 * Licensed under the Apache License, Version 2.0 (the "License");
226 * you may not use this file except in compliance with the License.
227 * You may obtain a copy of the License at
228 *
229 *   http://www.apache.org/licenses/LICENSE-2.0
230 *
231 * Unless required by applicable law or agreed to in writing, software
232 * distributed under the License is distributed on an "AS IS" BASIS,
233 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
234 * See the License for the specific language governing permissions and
235 * limitations under the License.
236 */let D="9.23.0";function M(e,t={}){let n=e;if("object"!=typeof t){let e=t;t={name:e}}let r=Object.assign({name:T,automaticDataCollectionEnabled:!1},t),i=r.name;if("string"!=typeof i||!i)throw P.create("bad-app-name",{appName:String(i)});if(n||(n=(0,l.aH)()),!n)throw P.create("no-options");let s=C.get(i);if(s){if((0,l.vZ)(n,s.options)&&(0,l.vZ)(r,s.config))return s;throw P.create("duplicate-app",{appName:i})}let a=new o.H0(i);for(let e of A.values())a.addComponent(e);let u=new N(n,r,a);return C.set(i,u),u}function L(e=T){let t=C.get(e);if(!t&&e===T&&(0,l.aH)())return M();if(!t)throw P.create("no-app",{appName:e});return t}function Z(e,t,n){var r;let i=null!==(r=I[e])&&void 0!==r?r:e;n&&(i+=`-${n}`);let s=i.match(/\s|\//),a=t.match(/\s|\//);if(s||a){let e=[`Unable to register library "${i}" with version "${t}":`];s&&e.push(`library name "${i}" contains illegal characters (whitespace or "/")`),s&&a&&e.push("and"),a&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),k.warn(e.join(" "));return}O(new o.wA(`${i}-version`,()=>({library:i,version:t}),"VERSION"))}let j="firebase-heartbeat-store",F=null;function U(){return F||(F=(function(e,t,{blocked:n,upgrade:r,blocking:i,terminated:s}={}){let o=indexedDB.open(e,1),a=g(o);return r&&o.addEventListener("upgradeneeded",e=>{r(g(o.result),e.oldVersion,e.newVersion,g(o.transaction),e)}),n&&o.addEventListener("blocked",e=>n(e.oldVersion,e.newVersion,e)),a.then(e=>{s&&e.addEventListener("close",()=>s()),i&&e.addEventListener("versionchange",e=>i(e.oldVersion,e.newVersion,e))}).catch(()=>{}),a})("firebase-heartbeat-database",0,{upgrade:(e,t)=>{0===t&&e.createObjectStore(j)}}).catch(e=>{throw P.create("idb-open",{originalErrorMessage:e.message})})),F}async function V(e){try{let t=await U(),n=await t.transaction(j).objectStore(j).get(z(e));return n}catch(e){if(e instanceof l.ZR)k.warn(e.message);else{let t=P.create("idb-get",{originalErrorMessage:null==e?void 0:e.message});k.warn(t.message)}}}async function $(e,t){try{let n=await U(),r=n.transaction(j,"readwrite"),i=r.objectStore(j);await i.put(t,z(e)),await r.done}catch(e){if(e instanceof l.ZR)k.warn(e.message);else{let t=P.create("idb-set",{originalErrorMessage:null==e?void 0:e.message});k.warn(t.message)}}}function z(e){return`${e.name}!${e.options.appId}`}class B{constructor(e){this.container=e,this._heartbeatsCache=null;let t=this.container.getProvider("app").getImmediate();this._storage=new H(t),this._heartbeatsCachePromise=this._storage.read().then(e=>(this._heartbeatsCache=e,e))}async triggerHeartbeat(){let e=this.container.getProvider("platform-logger").getImmediate(),t=e.getPlatformInfoString(),n=q();return(null===this._heartbeatsCache&&(this._heartbeatsCache=await this._heartbeatsCachePromise),this._heartbeatsCache.lastSentHeartbeatDate===n||this._heartbeatsCache.heartbeats.some(e=>e.date===n))?void 0:(this._heartbeatsCache.heartbeats.push({date:n,agent:t}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(e=>{let t=new Date(e.date).valueOf(),n=Date.now();return n-t<=2592e6}),this._storage.overwrite(this._heartbeatsCache))}
236async getHeartbeatsHeader(){if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,null===this._heartbeatsCache||0===this._heartbeatsCache.heartbeats.length)return"";let e=q(),{heartbeatsToSend:t,unsentEntries:n}=function(e,t=1024){let n=[],r=e.slice();for(let i of e){let e=n.find(e=>e.agent===i.agent);if(e){if(e.dates.push(i.date),W(n)>t){e.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),W(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}(this._heartbeatsCache.heartbeats),r=(0,l.L)(JSON.stringify({version:2,heartbeats:t}));return this._heartbeatsCache.lastSentHeartbeatDate=e,n.length>0?(this._heartbeatsCache.heartbeats=n,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),r}}function q(){let e=new Date;return e.toISOString().substring(0,10)}class H{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!(0,l.hl)()&&(0,l.eu)().then(()=>!0).catch(()=>!1)}async read(){let e=await this._canUseIndexedDBPromise;if(!e)return{heartbeats:[]};{let e=await V(this.app);return e||{heartbeats:[]}}}async overwrite(e){var t;let n=await this._canUseIndexedDBPromise;if(n){let n=await this.read();return $(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){var t;let n=await this._canUseIndexedDBPromise;if(n){let n=await this.read();return $(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:[...n.heartbeats,...e.heartbeats]})}}}function W(e){return(0,l.L)(JSON.stringify({version:2,heartbeats:e})).length}O(new o.wA("platform-logger",e=>new E(e),"PRIVATE")),O(new o.wA("heartbeat",e=>new B(e),"PRIVATE")),Z(x,S,""),Z(x,S,"esm2017"),Z("fire-js","")},8463:function(e,t,n){"use strict";n.d(t,{H0:function(){return a},wA:function(){return i}});var r=n(74444);class i{constructor(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}/**
237 * @license
238 * Copyright 2019 Google LLC
239 *
240 * Licensed under the Apache License, Version 2.0 (the "License");
241 * you may not use this file except in compliance with the License.
242 * You may obtain a copy of the License at
243 *
244 *   http://www.apache.org/licenses/LICENSE-2.0
245 *
246 * Unless required by applicable law or agreed to in writing, software
247 * distributed under the License is distributed on an "AS IS" BASIS,
248 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
249 * See the License for the specific language governing permissions and
250 * limitations under the License.
251 */let s="[DEFAULT]";/**
252 * @license
253 * Copyright 2019 Google LLC
254 *
255 * Licensed under the Apache License, Version 2.0 (the "License");
256 * you may not use this file except in compliance with the License.
257 * You may obtain a copy of the License at
258 *
259 *   http://www.apache.org/licenses/LICENSE-2.0
260 *
261 * Unless required by applicable law or agreed to in writing, software
262 * distributed under the License is distributed on an "AS IS" BASIS,
263 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
264 * See the License for the specific language governing permissions and
265 * limitations under the License.
266 */class o{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){let t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){let e=new r.BH;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{let n=this.getOrInitializeService({instanceIdentifier:t});n&&e.resolve(n)}catch(e){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;let n=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),r=null!==(t=null==e?void 0:e.optional)&&void 0!==t&&t;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}catch(e){if(r)return null;throw e}else{if(r)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,this.shouldAutoInitialize()){if("EAGER"===e.instantiationMode)try{this.getOrInitializeService({instanceIdentifier:s})}catch(e){}for(let[e,t]of this.instancesDeferred.entries()){let n=this.normalizeInstanceIdentifier(e);try{let e=this.getOrInitializeService({instanceIdentifier:n});t.resolve(e)}catch(e){}}}}clearInstance(e=s){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){let e=Array.from(this.instances.values());await Promise.all([...e.filter(e=>"INTERNAL"in e).map(e=>e.INTERNAL.delete()),...e.filter(e=>"_delete"in e).map(e=>e._delete())])}isComponentSet(){return null!=this.component}isInitialized(e=s){return this.instances.has(e)}getOptions(e=s){return this.instancesOptions.get(e)||{}}initialize(e={}){let{options:t={}}=e,n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let r=this.getOrInitializeService({instanceIdentifier:n,options:t});for(let[e,t]of this.instancesDeferred.entries()){let i=this.normalizeInstanceIdentifier(e);n===i&&t.resolve(r)}return r}onInit(e,t){var n;let 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);let s=this.instances.get(r);return s&&e(s,r),()=>{i.delete(e)}}invokeOnInitCallbacks(e,t){let n=this.onInitCallbacks.get(t);if(n)for(let r of n)try{r(e,t)}catch(e){}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let n=this.instances.get(e);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:e===s?void 0:e,options:t}),this.instances.set(e,n),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(n,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,n)}catch(e){}return n||null}normalizeInstanceIdentifier(e=s){return this.component?this.component.multipleInstances?e:s:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}/**
267 * @license
268 * Copyright 2019 Google LLC
269 *
270 * Licensed under the Apache License, Version 2.0 (the "License");
271 * you may not use this file except in compliance with the License.
272 * You may obtain a copy of the License at
273 *
274 *   http://www.apache.org/licenses/LICENSE-2.0
275 *
276 * Unless required by applicable law or agreed to in writing, software
277 * distributed under the License is distributed on an "AS IS" BASIS,
278 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
279 * See the License for the specific language governing permissions and
280 * limitations under the License.
281 */class a{constructor(e){this.name=e,this.providers=new Map}addComponent(e){let t=this.getProvider(e.name);if(t.isComponentSet())throw Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){let t=this.getProvider(e.name);t.isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);let t=new o(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}},53333:function(e,t,n){"use strict";var r,i;n.d(t,{Yd:function(){return c},in:function(){return r}});/**
282 * @license
283 * Copyright 2017 Google LLC
284 *
285 * Licensed under the Apache License, Version 2.0 (the "License");
286 * you may not use this file except in compliance with the License.
287 * You may obtain a copy of the License at
288 *
289 *   http://www.apache.org/licenses/LICENSE-2.0
290 *
291 * Unless required by applicable law or agreed to in writing, software
292 * distributed under the License is distributed on an "AS IS" BASIS,
293 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
294 * See the License for the specific language governing permissions and
295 * limitations under the License.
296 */let s=[];(i=r||(r={}))[i.DEBUG=0]="DEBUG",i[i.VERBOSE=1]="VERBOSE",i[i.INFO=2]="INFO",i[i.WARN=3]="WARN",i[i.ERROR=4]="ERROR",i[i.SILENT=5]="SILENT";let o={debug:r.DEBUG,verbose:r.VERBOSE,info:r.INFO,warn:r.WARN,error:r.ERROR,silent:r.SILENT},a=r.INFO,l={[r.DEBUG]:"log",[r.VERBOSE]:"log",[r.INFO]:"info",[r.WARN]:"warn",[r.ERROR]:"error"},u=(e,t,...n)=>{if(t<e.logLevel)return;let r=new Date().toISOString(),i=l[t];if(i)console[i](`[${r}]  ${e.name}:`,...n);else throw Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class c{constructor(e){this.name=e,this._logLevel=a,this._logHandler=u,this._userLogHandler=null,s.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in r))throw TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?o[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,r.DEBUG,...e),this._logHandler(this,r.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,r.VERBOSE,...e),this._logHandler(this,r.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,r.INFO,...e),this._logHandler(this,r.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,r.WARN,...e),this._logHandler(this,r.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,r.ERROR,...e),this._logHandler(this,r.ERROR,...e)}}},82729:function(e,t,n){"use strict";function r(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}n.d(t,{_:function(){return r}})},90512:function(e,t,n){"use strict";t.Z=function(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=function e(t){var n,r,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t){if(Array.isArray(t)){var s=t.length;for(n=0;n<s;n++)t[n]&&(r=e(t[n]))&&(i&&(i+=" "),i+=r)}else for(r in t)t[r]&&(i&&(i+=" "),i+=r)}return i}(e))&&(r&&(r+=" "),r+=t);return r}},83977:function(e,t,n){"use strict";n.d(t,{ZF:function(){return r.ZF},ZR:function(){return r.ZR}});var r=n(47456);/**
297 * @license
298 * Copyright 2020 Google LLC
299 *
300 * Licensed under the Apache License, Version 2.0 (the "License");
301 * you may not use this file except in compliance with the License.
302 * You may obtain a copy of the License at
303 *
304 *   http://www.apache.org/licenses/LICENSE-2.0
305 *
306 * Unless required by applicable law or agreed to in writing, software
307 * distributed under the License is distributed on an "AS IS" BASIS,
308 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
309 * See the License for the specific language governing permissions and
310 * limitations under the License.
311 */(0,r.KN)("firebase","9.23.0","app")},19451:function(e,t,n){"use strict";n.d(t,{kq:function(){return h},a$:function(){return tn},v0:function(){return nt},wU:function(){return L},MX:function(){return e3},LS:function(){return e6},_p:function(){return e4},e5:function(){return e9},w7:function(){return e7}});var r,i=n(74444),s=n(47456);function o(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}"function"==typeof SuppressedError&&SuppressedError;var a=n(53333),l=n(8463);function u(){return{"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."}}let c=new i.LL("auth","Firebase",u()),h={ADMIN_ONLY_OPERATION:"auth/admin-restricted-operation",ARGUMENT_ERROR:"auth/argument-error",APP_NOT_AUTHORIZED:"auth/app-not-authorized",APP_NOT_INSTALLED:"auth/app-not-installed",CAPTCHA_CHECK_FAILED:"auth/captcha-check-failed",CODE_EXPIRED:"auth/code-expired",CORDOVA_NOT_READY:"auth/cordova-not-ready",CORS_UNSUPPORTED:"auth/cors-unsupported",CREDENTIAL_ALREADY_IN_USE:"auth/credential-already-in-use",CREDENTIAL_MISMATCH:"auth/custom-token-mismatch",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"auth/requires-recent-login",DEPENDENT_SDK_INIT_BEFORE_AUTH:"auth/dependent-sdk-initialized-before-auth",DYNAMIC_LINK_NOT_ACTIVATED:"auth/dynamic-link-not-activated",EMAIL_CHANGE_NEEDS_VERIFICATION:"auth/email-change-needs-verification",EMAIL_EXISTS:"auth/email-already-in-use",EMULATOR_CONFIG_FAILED:"auth/emulator-config-failed",EXPIRED_OOB_CODE:"auth/expired-action-code",EXPIRED_POPUP_REQUEST:"auth/cancelled-popup-request",INTERNAL_ERROR:"auth/internal-error",INVALID_API_KEY:"auth/invalid-api-key",INVALID_APP_CREDENTIAL:"auth/invalid-app-credential",INVALID_APP_ID:"auth/invalid-app-id",INVALID_AUTH:"auth/invalid-user-token",INVALID_AUTH_EVENT:"auth/invalid-auth-event",INVALID_CERT_HASH:"auth/invalid-cert-hash",INVALID_CODE:"auth/invalid-verification-code",INVALID_CONTINUE_URI:"auth/invalid-continue-uri",INVALID_CORDOVA_CONFIGURATION:"auth/invalid-cordova-configuration",INVALID_CUSTOM_TOKEN:"auth/invalid-custom-token",INVALID_DYNAMIC_LINK_DOMAIN:"auth/invalid-dynamic-link-domain",INVALID_EMAIL:"auth/invalid-email",INVALID_EMULATOR_SCHEME:"auth/invalid-emulator-scheme",INVALID_IDP_RESPONSE:"auth/invalid-credential",INVALID_MESSAGE_PAYLOAD:"auth/invalid-message-payload",INVALID_MFA_SESSION:"auth/invalid-multi-factor-session",INVALID_OAUTH_CLIENT_ID:"auth/invalid-oauth-client-id",INVALID_OAUTH_PROVIDER:"auth/invalid-oauth-provider",INVALID_OOB_CODE:"auth/invalid-action-code",INVALID_ORIGIN:"auth/unauthorized-domain",INVALID_PASSWORD:"auth/wrong-password",INVALID_PERSISTENCE:"auth/invalid-persistence-type",INVALID_PHONE_NUMBER:"auth/invalid-phone-number",INVALID_PROVIDER_ID:"auth/invalid-provider-id",INVALID_RECIPIENT_EMAIL:"auth/invalid-recipient-email",INVALID_SENDER:"auth/invalid-sender",INVALID_SESSION_INFO:"auth/invalid-verification-id",INVALID_TENANT_ID:"auth/invalid-tenant-id",MFA_INFO_NOT_FOUND:"auth/multi-factor-info-not-found",MFA_REQUIRED:"auth/multi-factor-auth-required",MISSING_ANDROID_PACKAGE_NAME:"auth/missing-android-pkg-name",MISSING_APP_CREDENTIAL:"auth/missing-app-credential",MISSING_AUTH_DOMAIN:"auth/auth-domain-config-required",MISSING_CODE:"auth/missing-verification-code",MISSING_CONTINUE_URI:"auth/missing-continue-uri",MISSING_IFRAME_START:"auth/missing-iframe-start",MISSING_IOS_BUNDLE_ID:"auth/missing-ios-bundle-id",MISSING_OR_INVALID_
311NONCE:"auth/missing-or-invalid-nonce",MISSING_MFA_INFO:"auth/missing-multi-factor-info",MISSING_MFA_SESSION:"auth/missing-multi-factor-session",MISSING_PHONE_NUMBER:"auth/missing-phone-number",MISSING_SESSION_INFO:"auth/missing-verification-id",MODULE_DESTROYED:"auth/app-deleted",NEED_CONFIRMATION:"auth/account-exists-with-different-credential",NETWORK_REQUEST_FAILED:"auth/network-request-failed",NULL_USER:"auth/null-user",NO_AUTH_EVENT:"auth/no-auth-event",NO_SUCH_PROVIDER:"auth/no-such-provider",OPERATION_NOT_ALLOWED:"auth/operation-not-allowed",OPERATION_NOT_SUPPORTED:"auth/operation-not-supported-in-this-environment",POPUP_BLOCKED:"auth/popup-blocked",POPUP_CLOSED_BY_USER:"auth/popup-closed-by-user",PROVIDER_ALREADY_LINKED:"auth/provider-already-linked",QUOTA_EXCEEDED:"auth/quota-exceeded",REDIRECT_CANCELLED_BY_USER:"auth/redirect-cancelled-by-user",REDIRECT_OPERATION_PENDING:"auth/redirect-operation-pending",REJECTED_CREDENTIAL:"auth/rejected-credential",SECOND_FACTOR_ALREADY_ENROLLED:"auth/second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"auth/maximum-second-factor-count-exceeded",TENANT_ID_MISMATCH:"auth/tenant-id-mismatch",TIMEOUT:"auth/timeout",TOKEN_EXPIRED:"auth/user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"auth/too-many-requests",UNAUTHORIZED_DOMAIN:"auth/unauthorized-continue-uri",UNSUPPORTED_FIRST_FACTOR:"auth/unsupported-first-factor",UNSUPPORTED_PERSISTENCE:"auth/unsupported-persistence-type",UNSUPPORTED_TENANT_OPERATION:"auth/unsupported-tenant-operation",UNVERIFIED_EMAIL:"auth/unverified-email",USER_CANCELLED:"auth/user-cancelled",USER_DELETED:"auth/user-not-found",USER_DISABLED:"auth/user-disabled",USER_MISMATCH:"auth/user-mismatch",USER_SIGNED_OUT:"auth/user-signed-out",WEAK_PASSWORD:"auth/weak-password",WEB_STORAGE_UNSUPPORTED:"auth/web-storage-unsupported",ALREADY_INITIALIZED:"auth/already-initialized",RECAPTCHA_NOT_ENABLED:"auth/recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"auth/missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"auth/invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"auth/invalid-recaptcha-action",MISSING_CLIENT_TYPE:"auth/missing-client-type",MISSING_RECAPTCHA_VERSION:"auth/missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"auth/invalid-recaptcha-version",INVALID_REQ_TYPE:"auth/invalid-req-type"},d=new a.Yd("@firebase/auth");function f(e,...t){d.logLevel<=a.in.ERROR&&d.error(`Auth (${s.Jn}): ${e}`,...t)}/**
312 * @license
313 * Copyright 2020 Google LLC
314 *
315 * Licensed under the Apache License, Version 2.0 (the "License");
316 * you may not use this file except in compliance with the License.
317 * You may obtain a copy of the License at
318 *
319 *   http://www.apache.org/licenses/LICENSE-2.0
320 *
321 * Unless required by applicable law or agreed to in writing, software
322 * distributed under the License is distributed on an "AS IS" BASIS,
323 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
324 * See the License for the specific language governing permissions and
325 * limitations under the License.
326 */function p(e,...t){throw g(e,...t)}function m(e,...t){return g(e,...t)}function g(e,...t){if("string"!=typeof e){let n=t[0],r=[...t.slice(1)];return r[0]&&(r[0].appName=e.name),e._errorFactory.create(n,...r)}return c.create(e,...t)}function v(e,t,...n){if(!e)throw g(t,...n)}function y(e){let t="INTERNAL ASSERTION FAILED: "+e;throw f(t),Error(t)}/**
327 * @license
328 * Copyright 2020 Google LLC
329 *
330 * Licensed under the Apache License, Version 2.0 (the "License");
331 * you may not use this file except in compliance with the License.
332 * You may obtain a copy of the License at
333 *
334 *   http://www.apache.org/licenses/LICENSE-2.0
335 *
336 * Unless required by applicable law or agreed to in writing, software
337 * distributed under the License is distributed on an "AS IS" BASIS,
338 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
339 * See the License for the specific language governing permissions and
340 * limitations under the License.
341 */function b(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.href)||""}function w(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.protocol)||null}/**
342 * @license
343 * Copyright 2020 Google LLC
344 *
345 * Licensed under the Apache License, Version 2.0 (the "License");
346 * you may not use this file except in compliance with the License.
347 * You may obtain a copy of the License at
348 *
349 *   http://www.apache.org/licenses/LICENSE-2.0
350 *
351 * Unless required by applicable law or agreed to in writing, software
352 * distributed under the License is distributed on an "AS IS" BASIS,
353 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
354 * See the License for the specific language governing permissions and
355 * limitations under the License.
356 */class _{constructor(e,t){this.shortDelay=e,this.longDelay=t,t>e||y("Short delay should be less than long delay!"),this.isMobile=(0,i.uI)()||(0,i.b$)()}get(){return!("undefined"!=typeof navigator&&navigator&&"onLine"in navigator&&"boolean"==typeof navigator.onLine&&("http:"===w()||"https:"===w()||(0,i.ru)()||"connection"in navigator))||navigator.onLine?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/**
357 * @license
358 * Copyright 2020 Google LLC
359 *
360 * Licensed under the Apache License, Version 2.0 (the "License");
361 * you may not use this file except in compliance with the License.
362 * You may obtain a copy of the License at
363 *
364 *   http://www.apache.org/licenses/LICENSE-2.0
365 *
366 * Unless required by applicable law or agreed to in writing, software
367 * distributed under the License is distributed on an "AS IS" BASIS,
368 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
369 * See the License for the specific language governing permissions and
370 * limitations under the License.
371 */function E(e,t){e.emulator||y("Emulator should always be set here");let{url:n}=e.emulator;return t?`${n}${t.startsWith("/")?t.slice(1):t}`:n}/**
372 * @license
373 * Copyright 2020 Google LLC
374 *
375 * Licensed under the Apache License, Version 2.0 (the "License");
376 * you may not use this file except in compliance with the License.
377 * You may obtain a copy of the License at
378 *
379 *   http://www.apache.org/licenses/LICENSE-2.0
380 *
381 * Unless required by applicable law or agreed to in writing, software
382 * distributed under the License is distributed on an "AS IS" BASIS,
383 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
384 * See the License for the specific language governing permissions and
385 * limitations under the License.
386 */class x{static initialize(e,t,n){this.fetchImpl=e,t&&(this.headersImpl=t),n&&(this.responseImpl=n)}static fetch(){return this.fetchImpl?this.fetchImpl:"undefined"!=typeof self&&"fetch"in self?self.fetch:void y("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){return this.headersImpl?this.headersImpl:"undefined"!=typeof self&&"Headers"in self?self.Headers:void y("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){return this.responseImpl?this.responseImpl:"undefined"!=typeof self&&"Response"in self?self.Response:void y("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/**
387 * @license
388 * Copyright 2020 Google LLC
389 *
390 * Licensed under the Apache License, Version 2.0 (the "License");
391 * you may not use this file except in compliance with the License.
392 * You may obtain a copy of the License at
393 *
394 *   http://www.apache.org/licenses/LICENSE-2.0
395 *
396 * Unless required by applicable law or agreed to in writing, software
397 * distributed under the License is distributed on an "AS IS" BASIS,
398 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
399 * See the License for the specific language governing permissions and
400 * limitations under the License.
401 */let S={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-rec
401aptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"},k=new _(3e4,6e4);function T(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}async function I(e,t,n,r,s={}){return C(e,s,async()=>{let s={},o={};r&&("GET"===t?o=r:s={body:JSON.stringify(r)});let a=(0,i.xO)(Object.assign({key:e.config.apiKey},o)).slice(1),l=await e._getAdditionalHeaders();return l["Content-Type"]="application/json",e.languageCode&&(l["X-Firebase-Locale"]=e.languageCode),x.fetch()(O(e,e.config.apiHost,n,a),Object.assign({method:t,headers:l,referrerPolicy:"no-referrer"},s))})}async function C(e,t,n){e._canInitEmulator=!1;let r=Object.assign(Object.assign({},S),t);try{let t=new R(e),s=await Promise.race([n(),t.promise]);t.clearNetworkTimeout();let o=await s.json();if("needConfirmation"in o)throw P(e,"account-exists-with-different-credential",o);if(s.ok&&!("errorMessage"in o))return o;{let t=s.ok?o.errorMessage:o.error.message,[n,a]=t.split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===n)throw P(e,"credential-already-in-use",o);if("EMAIL_EXISTS"===n)throw P(e,"email-already-in-use",o);if("USER_DISABLED"===n)throw P(e,"user-disabled",o);let l=r[n]||n.toLowerCase().replace(/[_\s]+/g,"-");if(a)throw function(e,t,n){let r=Object.assign(Object.assign({},u()),{[t]:n}),s=new i.LL("auth","Firebase",r);return s.create(t,{appName:e.name})}(e,l,a);p(e,l)}}catch(t){if(t instanceof i.ZR)throw t;p(e,"network-request-failed",{message:String(t)})}}async function A(e,t,n,r,i={}){let s=await I(e,t,n,r,i);return"mfaPendingCredential"in s&&p(e,"multi-factor-auth-required",{_serverResponse:s}),s}function O(e,t,n,r){let i=`${t}${n}?${r}`;return e.config.emulator?E(e.config,i):`${e.config.apiScheme}://${i}`}class R{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((e,t)=>{this.timer=setTimeout(()=>t(m(this.auth,"network-request-failed")),k.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function P(e,t,n){let r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);let i=m(e,t,r);return i.customData._tokenResponse=n,i}/**
402 * @license
403 * Copyright 2020 Google LLC
404 *
405 * Licensed under the Apache License, Version 2.0 (the "License");
406 * you may not use this file except in compliance with the License.
407 * You may obtain a copy of the License at
408 *
409 *   http://www.apache.org/licenses/LICENSE-2.0
410 *
411 * Unless required by applicable law or agreed to in writing, software
412 * distributed under the License is distributed on an "AS IS" BASIS,
413 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
414 * See the License for the specific language governing permissions and
415 * limitations under the License.
416 */async function N(e,t){return I(e,"POST","/v1/accounts:delete",t)}async function D(e,t){return I(e,"POST","/v1/accounts:lookup",t)}/**
417 * @license
418 * Copyright 2020 Google LLC
419 *
420 * Licensed under the Apache License, Version 2.0 (the "License");
421 * you may not use this file except in compliance with the License.
422 * You may obtain a copy of the License at
423 *
424 *   http://www.apache.org/licenses/LICENSE-2.0
425 *
426 * Unless required by applicable law or agreed to in writing, software
427 * distributed under the License is distributed on an "AS IS" BASIS,
428 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
429 * See the License for the specific language governing permissions and
430 * limitations under the License.
431 */function M(e){if(e)try{let t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(e){}}/**
432 * @license
433 * Copyright 2020 Google LLC
434 *
435 * Licensed under the Apache License, Version 2.0 (the "License");
436 * you may not use this file except in compliance with the License.
437 * You may obtain a copy of the License at
438 *
439 *   http://www.apache.org/licenses/LICENSE-2.0
440 *
441 * Unless required by applicable law or agreed to in writing, softw
441are
442 * distributed under the License is distributed on an "AS IS" BASIS,
443 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
444 * See the License for the specific language governing permissions and
445 * limitations under the License.
446 */function L(e,t=!1){return(0,i.m9)(e).getIdToken(t)}async function Z(e,t=!1){let n=(0,i.m9)(e),r=await n.getIdToken(t),s=F(r);v(s&&s.exp&&s.auth_time&&s.iat,n.auth,"internal-error");let o="object"==typeof s.firebase?s.firebase:void 0,a=null==o?void 0:o.sign_in_provider;return{claims:s,token:r,authTime:M(j(s.auth_time)),issuedAtTime:M(j(s.iat)),expirationTime:M(j(s.exp)),signInProvider:a||null,signInSecondFactor:(null==o?void 0:o.sign_in_second_factor)||null}}function j(e){return 1e3*Number(e)}function F(e){let[t,n,r]=e.split(".");if(void 0===t||void 0===n||void 0===r)return f("JWT malformed, contained fewer than 3 sections"),null;try{let e=(0,i.tV)(n);if(!e)return f("Failed to decode base64 JWT payload"),null;return JSON.parse(e)}catch(e){return f("Caught error parsing JWT payload as JSON",null==e?void 0:e.toString()),null}}/**
447 * @license
448 * Copyright 2020 Google LLC
449 *
450 * Licensed under the Apache License, Version 2.0 (the "License");
451 * you may not use this file except in compliance with the License.
452 * You may obtain a copy of the License at
453 *
454 *   http://www.apache.org/licenses/LICENSE-2.0
455 *
456 * Unless required by applicable law or agreed to in writing, software
457 * distributed under the License is distributed on an "AS IS" BASIS,
458 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
459 * See the License for the specific language governing permissions and
460 * limitations under the License.
461 */async function U(e,t,n=!1){if(n)return t;try{return await t}catch(t){throw t instanceof i.ZR&&function({code:e}){return"auth/user-disabled"===e||"auth/user-token-expired"===e}(t)&&e.auth.currentUser===e&&await e.auth.signOut(),t}}/**
462 * @license
463 * Copyright 2020 Google LLC
464 *
465 * Licensed under the Apache License, Version 2.0 (the "License");
466 * you may not use this file except in compliance with the License.
467 * You may obtain a copy of the License at
468 *
469 *   http://www.apache.org/licenses/LICENSE-2.0
470 *
471 * Unless required by applicable law or agreed to in writing, software
472 * distributed under the License is distributed on an "AS IS" BASIS,
473 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
474 * See the License for the specific language governing permissions and
475 * limitations under the License.
476 */class V{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}getInterval(e){var t;if(e){let e=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),e}{this.errorBackoff=3e4;let e=null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t:0,n=e-Date.now()-3e5;return Math.max(0,n)}}schedule(e=!1){if(!this.isRunning)return;let t=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},t)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){(null==e?void 0:e.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}/**
477 * @license
478 * Copyright 2020 Google LLC
479 *
480 * Licensed under the Apache License, Version 2.0 (the "License");
481 * you may not use this file except in compliance with the License.
482 * You may obtain a copy of the License at
483 *
484 *   http://www.apache.org/licenses/LICENSE-2.0
485 *
486 * Unless required by applicable law or agreed to in writing, software
487 * distributed under the License is distributed on an "AS IS" BASIS,
488 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
489 * See the License for the specific language governing permissions and
490 * limitations under the License.
491 */class ${constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=M(this.lastLoginAt),this.creationTime=M(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/**
492 * @license
493 * Copyright 2019 Google LLC
494 *
495 * Licensed under the Apache License, Version 2.0 (the "License");
496 * you may not use this file except in compliance with the License.
497 * You may obtain a copy of the License at
498 *
499 *   http://www.apache.org/licenses/LICENSE-2.0
500 *
501 * Unless required by applicable law or agreed to in writing, software
502 * distributed under the License is distributed on an "AS IS" BASIS,
503 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
504 * See the License for the specific language governing permissions and
505 * limitations under the License.
506 */async function z(e){var t;let n=e.auth,r=await e.getIdToken(),i=await U(e,D(n,{idToken:r}));v(null==i?void 0:i.users.length,n,"internal-error");let s=i.users[0];e._notifyReloadListener(s);let a=(null===(t=s.providerUserInfo)||void 0===t?void 0:t.length)?s.providerUserInfo.map(e=>{var{providerId:t}=e,n=o(e,["providerId"]);return{providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}}):[],l=function(e,t){let n=e.filter(e=>!t.some(t=>t.providerId===e.providerId));return[...n,...t]}(e.providerData,a),u=e.isAnonymous,c=!(e.email&&s.passwordHash)&&!(null==l?void 0:l.length),h={uid:s.localId,displayName:s.displayName||null,photoURL:s.photoUrl||null,email:s.email||null,emailVerified:s.emailVerified||!1,phoneNumber:s.phoneNumber||null,tenantId:s.tenantId||null,providerData:l,metadata:new $(s.createdAt,s.lastLoginAt),isAnonymous:!!u&&c};Object.assign(e,h)}async function B(e){let t=(0,i.m9)(e);await z(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}/**
507 * @license
508 * Copyright 2020 Google LLC
509 *
510 * Licensed under the Apache License, Version 2.0 (the "License");
511 * you may not use this file except in compliance with the License.
512 * You may obtain a copy of the License at
513 *
514 *   http://www.apache.org/licenses/LICENSE-2.0
515 *
516 * Unless required by applicable law or agreed to in writing, software
517 * distributed under the License is distributed on an "AS IS" BASIS,
518 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
519 * See the License for the specific language governing permissions and
520 * limitations under the License.
521 */async function q(e,t){let n=await C(e,{},async()=>{let n=(0,i.xO)({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:r,apiKey:s}=e.config,o=O(e,r,"/v1/token",`key=${s}`),a=await e._getAdditionalHeaders();return a["Content-Type"]="application/x-www-form-urlencoded",x.fetch()(o,{method:"POST",headers:a,body:n})});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}/**
522 * @license
523 * Copyright 2020 Google LLC
524 *
525 * Licensed under the Apache License, Version 2.0 (the "License");
526 * you may not use this file except in compliance with the License.
527 * You may obtain a copy of the License at
528 *
529 *   http://www.apache.org/licenses/LICENSE-2.0
530 *
531 * Unless required by applicable law or agreed to in writing, software
532 * distributed under the License is distributed on an "AS IS" BASIS,
533 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
534 * See the License for the specific language governing permissions and
535 * limitations under the License.
536 */class H{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){v(e.idToken,"internal-error"),v(void 0!==e.idToken,"internal-error"),v(void 0!==e.refreshToken,"internal-error");let t="expiresIn"in e&&void 0!==e.expiresIn?Number(e.expiresIn):function(e){let t=F(e);return v(t,"internal-error"),v(void 0!==t.exp,"internal-error"),v(void 0!==t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}async getToken(e,t=!1){return(v(!this.accessToken||this.refreshToken,e,"user-token-expired"),t||!this.accessToken||this.isExpired)?this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null:this.accessToken}clearRefreshToken(){this.refreshToken=null}
536async refresh(e,t){let{accessToken:n,refreshToken:r,expiresIn:i}=await q(e,t);this.updateTokensAndExpiration(n,r,Number(i))}updateTokensAndExpiration(e,t,n){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*n}static fromJSON(e,t){let{refreshToken:n,accessToken:r,expirationTime:i}=t,s=new H;return n&&(v("string"==typeof n,"internal-error",{appName:e}),s.refreshToken=n),r&&(v("string"==typeof r,"internal-error",{appName:e}),s.accessToken=r),i&&(v("number"==typeof i,"internal-error",{appName:e}),s.expirationTime=i),s}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new H,this.toJSON())}_performRefresh(){return y("not implemented")}}/**
537 * @license
538 * Copyright 2020 Google LLC
539 *
540 * Licensed under the Apache License, Version 2.0 (the "License");
541 * you may not use this file except in compliance with the License.
542 * You may obtain a copy of the License at
543 *
544 *   http://www.apache.org/licenses/LICENSE-2.0
545 *
546 * Unless required by applicable law or agreed to in writing, software
547 * distributed under the License is distributed on an "AS IS" BASIS,
548 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
549 * See the License for the specific language governing permissions and
550 * limitations under the License.
551 */function W(e,t){v("string"==typeof e||void 0===e,"internal-error",{appName:t})}class G{constructor(e){var{uid:t,auth:n,stsTokenManager:r}=e,i=o(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new V(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=n,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=i.displayName||null,this.email=i.email||null,this.emailVerified=i.emailVerified||!1,this.phoneNumber=i.phoneNumber||null,this.photoURL=i.photoURL||null,this.isAnonymous=i.isAnonymous||!1,this.tenantId=i.tenantId||null,this.providerData=i.providerData?[...i.providerData]:[],this.metadata=new $(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(e){let t=await U(this,this.stsTokenManager.getToken(this.auth,e));return v(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return Z(this,e)}reload(){return B(this)}_assign(e){this!==e&&(v(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(e=>Object.assign({},e)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){let t=new G(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return t.metadata._copy(this.metadata),t}_onReload(e){v(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,t=!1){let n=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),n=!0),t&&await z(this),await this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)}async delete(){let e=await this.getIdToken();return await U(this,N(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>Object.assign({},e)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,t){var n,r,i,s,o,a,l,u;let c=null!==(n=t.displayName)&&void 0!==n?n:void 0,h=null!==(r=t.email)&&void 0!==r?r:void 0,d=null!==(i=t.phoneNumber)&&void 0!==i?i:void 0,f=null!==(s=t.photoURL)&&void 0!==s?s:void 0,p=null!==(o=t.tenantId)&&void 0!==o?o:void 0,m=null!==(a=t._redirectEventId)&&void 0!==a?a:void 0,g=null!==(l=t.createdAt)&&void 0!==l?l:void 0,y=null!==(u=t.lastLoginAt)&&void 0!==u?u:void 0,{uid:b,emailVerified:w,isAnonymous:_,providerData:E,stsTokenManager:x}=t;v(b&&x,e,"internal-error");let S=H.fromJSON(this.name,x);v("string"==typeof b,e,"internal-error"),W(c,e.name),W(h,e.name),v("boolean"==typeof w,e,"internal-error"),v("boolean"==typeof _,e,"internal-error"),W(d,e.name),W(f,e.name),W(p,e.name),W(m,e.name),W(g,e.name),W(y,e.name);let k=new G({uid:b,auth:e,email:h,emailVerified:w,displayName:c,isAnonymous:_,photoURL:f,phoneNumber:d,tenantId:p,stsTokenManager:S,createdAt:g,lastLoginAt:y});return E&&Array.isArray(E)&&(k.providerData=E.map(e=>Object.assign({},e))),m&&(k._redirectEventId=m),k}static async _fromIdTokenResponse(e,t,n=!1){let r=new H;r.updateFromServerResponse(t);let i=new G({uid:t.localId,auth:e,stsTokenManager:r,isAnonymous:n});return await z(i),i}}/**
552 * @license
553 * Copyright 2020 Google LLC
554 *
555 * Licensed under the Apache License, Version 2.0 (the "License");
556 * you may not use this file except in compliance with the License.
557 * You may obtain a copy of the License at
558 *
559 *   http://www.apache.org/licenses/LICENSE-2.0
560 *
561 * Unless required by applicable law or agreed to in writing, software
562 * distributed under the License is distributed on an "AS IS" BASIS,
563 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
564 * See the License for the specific language governing permissions and
565 * limitations under the License.
566 */let K=new Map;function Q(e){e instanceof Function||y("Expected a class definition");let t=K.get(e);return t?(t instanceof e||y("Instance stored in cache mismatched with class"),t):(t=new e,K.set(e,t),t)}/**
567 * @license
568 * Copyright 2019 Google LLC
569 *
570 * Licensed under the Apache License, Version 2.0 (the "License");
571 * you may not use this file except in compliance with the License.
572 * You may obtain a copy of the License at
573 *
574 *   http://www.apache.org/licenses/LICENSE-2.0
575 *
576 * Unless required by applicable law or agreed to in writing, software
577 * distributed under the License is distributed on an "AS IS" BASIS,
578 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
579 * See the License for the specific language governing permissions and
580 * limitations under the License.
581 */class Y{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){let t=this.storage[e];return void 0===t?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}}/**
582 * @license
583 * Copyright 2019 Google LLC
584 *
585 * Licensed under the Apache License, Version 2.0 (the "License");
586 * you may not use this file except in compliance with the License.
587 * You may obtain a copy of the License at
588 *
589 *   http://www.apache.org/licenses/LICENSE-2.0
590 *
591 * Unless required by applicable law or agreed to in writing, software
592 * distributed under the License is distributed on an "AS IS" BASIS,
593 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
594 * See the License for the specific language governing permissions and
595 * limitations under the License.
596 */function X(e,t,n){return`firebase:${e}:${t}:${n}`}Y.type="NONE";class J{constructor(e,t,n){this.persistence=e,this.auth=t,this.userKey=n;let{config:r,name:i}=this.auth;this.fullUserKey=X(this.userKey,r.apiKey,i),this.fullPersistenceKey=X("persistence",r.apiKey,i),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){let e=await this.persistence._get(this.fullUserKey);return e?G._fromJSON(this.auth,e):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;let t=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,t)return this.setCurrentUser(t)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,t,n="authUser"){if(!t.length)return new J(Q(Y),e,n);let r=(await Promise.all(t.map(async e=>{if(await e._isAvailable())return e}))).filter(e=>e),i=r[0]||Q(Y),s=X(n,e.config.apiKey,e.name),o=null;for(let n of t)try{let t=await n._get(s);if(t){let r=G._fromJSON(e,t);n!==i&&(o=r),i=n;break}}catch(e){}let a=r.filter(e=>e._shouldAllowMigration);return i._shouldAllowMigration&&a.length&&(i=a[0],o&&await i._set(s,o.toJSON()),await Promise.all(t.map(async e=>{if(e!==i)try{await e._remove(s)}catch(e){}}))),new J(i,e,n)}}/**
597 * @license
598 * Copyright 2020 Google LLC
599 *
600 * Licensed under the Apache License, Version 2.0 (the "License");
601 * you may not use this file except in compliance with the License.
602 * You may obtain a copy of the License at
603 *
604 *   http://www.apache.org/licenses/LICENSE-2.0
605 *
606 * Unless required by applicable law or agreed to in writing, softw
606are
607 * distributed under the License is distributed on an "AS IS" BASIS,
608 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
609 * See the License for the specific language governing permissions and
610 * limitations under the License.
611 */function ee(e){let t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(ei(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";{if(t.includes("edge/"))return"Edge";if(et(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(eo(t))return"Blackberry";if(ea(t))return"Webos";if(en(t))return"Safari";if((t.includes("chrome/")||er(t))&&!t.includes("edge/"))return"Chrome";if(es(t))return"Android";let n=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/);if((null==n?void 0:n.length)===2)return n[1]}return"Other"}function et(e=(0,i.z$)()){return/firefox\//i.test(e)}function en(e=(0,i.z$)()){let t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function er(e=(0,i.z$)()){return/crios\//i.test(e)}function ei(e=(0,i.z$)()){return/iemobile/i.test(e)}function es(e=(0,i.z$)()){return/android/i.test(e)}function eo(e=(0,i.z$)()){return/blackberry/i.test(e)}function ea(e=(0,i.z$)()){return/webos/i.test(e)}function el(e=(0,i.z$)()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function eu(e=(0,i.z$)()){return el(e)||es(e)||ea(e)||eo(e)||/windows phone/i.test(e)||ei(e)}/**
612 * @license
613 * Copyright 2020 Google LLC
614 *
615 * Licensed under the Apache License, Version 2.0 (the "License");
616 * you may not use this file except in compliance with the License.
617 * You may obtain a copy of the License at
618 *
619 *   http://www.apache.org/licenses/LICENSE-2.0
620 *
621 * Unless required by applicable law or agreed to in writing, software
622 * distributed under the License is distributed on an "AS IS" BASIS,
623 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
624 * See the License for the specific language governing permissions and
625 * limitations under the License.
626 */function ec(e,t=[]){let n;switch(e){case"Browser":n=ee((0,i.z$)());break;case"Worker":n=`${ee((0,i.z$)())}-${e}`;break;default:n=e}let r=t.length?t.join(","):"FirebaseCore-web";return`${n}/JsCore/${s.Jn}/${r}`}async function eh(e,t){return I(e,"GET","/v2/recaptchaConfig",T(e,t))}function ed(e){return void 0!==e&&void 0!==e.enterprise}class ef{constructor(e){if(this.siteKey="",this.emailPasswordEnabled=!1,void 0===e.recaptchaKey)throw Error("recaptchaKey undefined");this.siteKey=e.recaptchaKey.split("/")[3],this.emailPasswordEnabled=e.recaptchaEnforcementState.some(e=>"EMAIL_PASSWORD_PROVIDER"===e.provider&&"OFF"!==e.enforcementState)}}function ep(e){return new Promise((t,n)=>{var r,i;let s=document.createElement("script");s.setAttribute("src",e),s.onload=t,s.onerror=e=>{let t=m("internal-error");t.customData=e,n(t)},s.type="text/javascript",s.charset="UTF-8",(null!==(i=null===(r=document.getElementsByTagName("head"))||void 0===r?void 0:r[0])&&void 0!==i?i:document).appendChild(s)})}function em(e){return`__${e}${Math.floor(1e6*Math.random())}`}class eg{constructor(e){this.type="recaptcha-enterprise",this.auth=ew(e)}async verify(e="verify",t=!1){async function n(e){if(!t){if(null==e.tenantId&&null!=e._agentRecaptchaConfig)return e._agentRecaptchaConfig.siteKey;if(null!=e.tenantId&&void 0!==e._tenantRecaptchaConfigs[e.tenantId])return e._tenantRecaptchaConfigs[e.tenantId].siteKey}return new Promise(async(t,n)=>{eh(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(r=>{if(void 0===r.recaptchaKey)n(Error("recaptcha Enterprise site key undefined"));else{let n=new ef(r);return null==e.tenantId?e._agentRecaptchaConfig=n:e._tenantRecaptchaConfigs[e.tenantId]=n,t(n.siteKey)}}).catch(e=>{n(e)})})}function r(t,n,r){let i=window.grecaptcha;ed(i)?i.enterprise.ready(()=>{i.enterprise.execute(t,{action:e}).then(e=>{n(e)}).catch(()=>{n("NO_RECAPTCHA")})}):r(Error("No reCAPTCHA enterprise script loaded."))}return new Promise((e,i)=>{n(this.auth).then(n=>{if(!t&&ed(window.grecaptcha))r(n,e,i);else{if("undefined"==typeof window){i(Error("RecaptchaVerifier is only supported in browser"));return}ep("https://www.google.com/recaptcha/enterprise.js?render="+n).then(()=>{r(n,e,i)}).catch(e=>{i(e)})}}).catch(e=>{i(e)})})}}async function ev(e,t,n,r=!1){let i;let s=new eg(e);try{i=await s.verify(n)}
626catch(e){i=await s.verify(n,!0)}let o=Object.assign({},t);return r?Object.assign(o,{captchaResp:i}):Object.assign(o,{captchaResponse:i}),Object.assign(o,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(o,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),o}/**
627 * @license
628 * Copyright 2022 Google LLC
629 *
630 * Licensed under the Apache License, Version 2.0 (the "License");
631 * you may not use this file except in compliance with the License.
632 * You may obtain a copy of the License at
633 *
634 *   http://www.apache.org/licenses/LICENSE-2.0
635 *
636 * Unless required by applicable law or agreed to in writing, software
637 * distributed under the License is distributed on an "AS IS" BASIS,
638 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
639 * See the License for the specific language governing permissions and
640 * limitations under the License.
641 */class ey{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){let n=t=>new Promise((n,r)=>{try{let r=e(t);n(r)}catch(e){r(e)}});n.onAbort=t,this.queue.push(n);let r=this.queue.length-1;return()=>{this.queue[r]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;let t=[];try{for(let n of this.queue)await n(e),n.onAbort&&t.push(n.onAbort)}catch(e){for(let e of(t.reverse(),t))try{e()}catch(e){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null==e?void 0:e.message})}}}/**
642 * @license
643 * Copyright 2020 Google LLC
644 *
645 * Licensed under the Apache License, Version 2.0 (the "License");
646 * you may not use this file except in compliance with the License.
647 * You may obtain a copy of the License at
648 *
649 *   http://www.apache.org/licenses/LICENSE-2.0
650 *
651 * Unless required by applicable law or agreed to in writing, software
652 * distributed under the License is distributed on an "AS IS" BASIS,
653 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
654 * See the License for the specific language governing permissions and
655 * limitations under the License.
656 */class eb{constructor(e,t,n,r){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=n,this.config=r,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new e_(this),this.idTokenSubscription=new e_(this),this.beforeStateQueue=new ey(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=c,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=r.sdkClientVersion}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=Q(t)),this._initializationPromise=this.queue(async()=>{var n,r;if(!this._deleted&&(this.persistenceManager=await J.create(this,e),!this._deleted)){if(null===(n=this._popupRedirectResolver)||void 0===n?void 0:n._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch(e){}await this.initializeCurrentUser(t),this.lastNotifiedUid=(null===(r=this.currentUser)||void 0===r?void 0:r.uid)||null,this._deleted||(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;let e=await this.assertedPersistence.getCurrentUser();if(this.currentUser||e){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),await this.currentUser.getIdToken();return}await this._updateCurrentUser(e,!0)}}async initializeCurrentUser(e){var t;let n=await this.assertedPersistence.getCurrentUser(),r=n,i=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();let n=null===(t=this.redirectUser)||void 0===t?void 0:t._redirectEventId,s=null==r?void 0:r._redirectEventId,o=await this.tryRedirectSignIn(e);(!n||n===s)&&(null==o?void 0:o.user)&&(r=o.user,i=!0)}if(!r)return this.directlySetCurrentUser(null);if(!r._redirectEventId){if(i)try{await this.beforeStateQueue.runMiddleware(r)}catch(e){r=n,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(e))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return(v(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId)?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch(e){await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await z(e)}catch(e){if((null==e?void 0:e.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=function(){if("undefined"==typeof navigator)return null;let e=navigator;return e.languages&&e.languages[0]||e.language||null}()}async _delete(){this._deleted=!0}
656async updateCurrentUser(e){let t=e?(0,i.m9)(e):null;return t&&v(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e,t=!1){if(!this._deleted)return e&&v(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),t||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0)}setPersistence(e){return this.queue(async()=>{await this.assertedPersistence.setPersistence(Q(e))})}async initializeRecaptchaConfig(){let e=await eh(this,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}),t=new ef(e);if(null==this.tenantId?this._agentRecaptchaConfig=t:this._tenantRecaptchaConfigs[this.tenantId]=t,t.emailPasswordEnabled){let e=new eg(this);e.verify()}}_getRecaptchaConfig(){return null==this.tenantId?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new i.LL("auth","Firebase",e())}onAuthStateChanged(e,t,n){return this.registerStateListener(this.authStateSubscription,e,t,n)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,n){return this.registerStateListener(this.idTokenSubscription,e,t,n)}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:null===(e=this._currentUser)||void 0===e?void 0:e.toJSON()}}async _setRedirectUser(e,t){let n=await this.getOrInitRedirectPersistenceManager(t);return null===e?n.removeCurrentUser():n.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){let t=e&&Q(e)||this._popupRedirectResolver;v(t,this,"argument-error"),this.redirectPersistenceManager=await J.create(this,[Q(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var t,n;return(this._isInitialized&&await this.queue(async()=>{}),(null===(t=this._currentUser)||void 0===t?void 0:t._redirectEventId)===e)?this._currentUser:(null===(n=this.redirectUser)||void 0===n?void 0:n._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(e))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,t;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);let n=null!==(t=null===(e=this.currentUser)||void 0===e?void 0:e.uid)&&void 0!==t?t:null;this.lastNotifiedUid!==n&&(this.lastNotifiedUid=n,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,n,r){if(this._deleted)return()=>{};let i="function"==typeof t?t:t.next.bind(t),s=this._isInitialized?Promise.resolve():this._initializationPromise;return(v(s,this,"internal-error"),s.then(()=>i(this.currentUser)),"function"==typeof t)?e.addObserver(t,n,r):e.addObserver(t)}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return v(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=ec(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var e;let t={"X-Client-Version":this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);let n=await (null===(e=this.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getHeartbeatsHeader());n&&(t["X-Firebase-Client"]=n);let r=await this._getAppCheckToken();return r&&(t["X-Firebase-AppCheck"]=r),t}async _getAppCheckToken(){var e;let t=await (null===(e=this.appCheckServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getToken());return(null==t?void 0:t.error)&&function(e,...t){d.logLevel<=a.in.WARN&&d.warn(`Auth (${s.Jn}): ${e}`,...t)}(`Error while retrieving App Check token: ${t.error}`),null==t?void 0:t.token}}function ew(e){return(0,i.m9)(e)}class e_{constructor(e){this.auth=e,this.observer=null,this.addObserver=(0,i.ne)(e=>this.observer=e)}get next(){return v(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}function eE(e){let t=e.indexOf(":");
656return t<0?"":e.substr(0,t+1)}function ex(e){if(!e)return null;let t=Number(e);return isNaN(t)?null:t}/**
657 * @license
658 * Copyright 2020 Google LLC
659 *
660 * Licensed under the Apache License, Version 2.0 (the "License");
661 * you may not use this file except in compliance with the License.
662 * You may obtain a copy of the License at
663 *
664 *   http://www.apache.org/licenses/LICENSE-2.0
665 *
666 * Unless required by applicable law or agreed to in writing, software
667 * distributed under the License is distributed on an "AS IS" BASIS,
668 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
669 * See the License for the specific language governing permissions and
670 * limitations under the License.
671 */class eS{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return y("not implemented")}_getIdTokenResponse(e){return y("not implemented")}_linkToIdToken(e,t){return y("not implemented")}_getReauthenticationResolver(e){return y("not implemented")}}async function ek(e,t){return I(e,"POST","/v1/accounts:update",t)}/**
672 * @license
673 * Copyright 2020 Google LLC
674 *
675 * Licensed under the Apache License, Version 2.0 (the "License");
676 * you may not use this file except in compliance with the License.
677 * You may obtain a copy of the License at
678 *
679 *   http://www.apache.org/licenses/LICENSE-2.0
680 *
681 * Unless required by applicable law or agreed to in writing, software
682 * distributed under the License is distributed on an "AS IS" BASIS,
683 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
684 * See the License for the specific language governing permissions and
685 * limitations under the License.
686 */async function eT(e,t){return A(e,"POST","/v1/accounts:signInWithPassword",T(e,t))}async function eI(e,t){return I(e,"POST","/v1/accounts:sendOobCode",T(e,t))}async function eC(e,t){return eI(e,t)}/**
687 * @license
688 * Copyright 2020 Google LLC
689 *
690 * Licensed under the Apache License, Version 2.0 (the "License");
691 * you may not use this file except in compliance with the License.
692 * You may obtain a copy of the License at
693 *
694 *   http://www.apache.org/licenses/LICENSE-2.0
695 *
696 * Unless required by applicable law or agreed to in writing, software
697 * distributed under the License is distributed on an "AS IS" BASIS,
698 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
699 * See the License for the specific language governing permissions and
700 * limitations under the License.
701 */async function eA(e,t){return A(e,"POST","/v1/accounts:signInWithEmailLink",T(e,t))}async function eO(e,t){return A(e,"POST","/v1/accounts:signInWithEmailLink",T(e,t))}/**
702 * @license
703 * Copyright 2020 Google LLC
704 *
705 * Licensed under the Apache License, Version 2.0 (the "License");
706 * you may not use this file except in compliance with the License.
707 * You may obtain a copy of the License at
708 *
709 *   http://www.apache.org/licenses/LICENSE-2.0
710 *
711 * Unless required by applicable law or agreed to in writing, software
712 * distributed under the License is distributed on an "AS IS" BASIS,
713 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
714 * See the License for the specific language governing permissions and
715 * limitations under the License.
716 */class eR extends eS{constructor(e,t,n,r=null){super("password",n),this._email=e,this._password=t,this._tenantId=r}static _fromEmailAndPassword(e,t){return new eR(e,t,"password")}static _fromEmailAndCode(e,t,n=null){return new eR(e,t,"emailLink",n)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){let t="string"==typeof e?JSON.parse(e):e;if((null==t?void 0:t.email)&&(null==t?void 0:t.password)){if("password"===t.signInMethod)return this._fromEmailAndPassword(t.email,t.password);if("emailLink"===t.signInMethod)return this._fromEmailAndCode(t.email,t.password,t.tenantId)}return null}async _getIdTokenResponse(e){var t;switch(this.signInMethod){case"password":let n={returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};if(null===(t=e._getRecaptchaConfig())||void 0===t||!t.emailPasswordEnabled)return eT(e,n).catch(async t=>
716{if("auth/missing-recaptcha-token"!==t.code)return Promise.reject(t);{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.");let t=await ev(e,n,"signInWithPassword");return eT(e,t)}});{let t=await ev(e,n,"signInWithPassword");return eT(e,t)}case"emailLink":return eA(e,{email:this._email,oobCode:this._password});default:p(e,"internal-error")}}async _linkToIdToken(e,t){switch(this.signInMethod){case"password":return ek(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password});case"emailLink":return eO(e,{idToken:t,email:this._email,oobCode:this._password});default:p(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}/**
717 * @license
718 * Copyright 2020 Google LLC
719 *
720 * Licensed under the Apache License, Version 2.0 (the "License");
721 * you may not use this file except in compliance with the License.
722 * You may obtain a copy of the License at
723 *
724 *   http://www.apache.org/licenses/LICENSE-2.0
725 *
726 * Unless required by applicable law or agreed to in writing, software
727 * distributed under the License is distributed on an "AS IS" BASIS,
728 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
729 * See the License for the specific language governing permissions and
730 * limitations under the License.
731 */async function eP(e,t){return A(e,"POST","/v1/accounts:signInWithIdp",T(e,t))}class eN extends eS{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){let t=new eN(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):p("argument-error"),t}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,n
731once:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){let t="string"==typeof e?JSON.parse(e):e,{providerId:n,signInMethod:r}=t,i=o(t,["providerId","signInMethod"]);if(!n||!r)return null;let s=new eN(n,r);return s.idToken=i.idToken||void 0,s.accessToken=i.accessToken||void 0,s.secret=i.secret,s.nonce=i.nonce,s.pendingToken=i.pendingToken||null,s}_getIdTokenResponse(e){let t=this.buildRequest();return eP(e,t)}_linkToIdToken(e,t){let n=this.buildRequest();return n.idToken=t,eP(e,n)}_getReauthenticationResolver(e){let t=this.buildRequest();return t.autoCreate=!1,eP(e,t)}buildRequest(){let e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{let 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=(0,i.xO)(t)}return e}}/**
732 * @license
733 * Copyright 2020 Google LLC
734 *
735 * Licensed under the Apache License, Version 2.0 (the "License");
736 * you may not use this file except in compliance with the License.
737 * You may obtain a copy of the License at
738 *
739 *   http://www.apache.org/licenses/LICENSE-2.0
740 *
741 * Unless required by applicable law or agreed to in writing, software
742 * distributed under the License is distributed on an "AS IS" BASIS,
743 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
744 * See the License for the specific language governing permissions and
745 * limitations under the License.
746 */async function eD(e,t){return I(e,"POST","/v1/accounts:sendVerificationCode",T(e,t))}async function eM(e,t){return A(e,"POST","/v1/accounts:signInWithPhoneNumber",T(e,t))}async function eL(e,t){let n=await A(e,"POST","/v1/accounts:signInWithPhoneNumber",T(e,t));if(n.temporaryProof)throw P(e,"account-exists-with-different-credential",n);return n}let eZ={USER_NOT_FOUND:"user-not-found"};async function ej(e,t){let n=Object.assign(Object.assign({},t),{operation:"REAUTH"});return A(e,"POST","/v1/accounts:signInWithPhoneNumber",T(e,n),eZ)}/**
747 * @license
748 * Copyright 2020 Google LLC
749 *
750 * Licensed under the Apache License, Version 2.0 (the "License");
751 * you may not use this file except in compliance with the License.
752 * You may obtain a copy of the License at
753 *
754 *   http://www.apache.org/licenses/LICENSE-2.0
755 *
756 * Unless required by applicable law or agreed to in writing, software
757 * distributed under the License is distributed on an "AS IS" BASIS,
758 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
759 * See the License for the specific language governing permissions and
760 * limitations under the License.
761 */class eF extends eS{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new eF({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new eF({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return eM(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return eL(e,Object.assign({idToken:t},this._makeVerificationRequest()))}_getReauthenticationResolver(e){return ej(e,this._makeVerificationRequest())}_makeVerificationRequest(){let{temporaryProof:e,phoneNumber:t,verificationId:n,verificationCode:r}=this.params;return e&&t?{temporaryProof:e,phoneNumber:t}:{sessionInfo:n,code:r}}toJSON(){let e={providerId:this.providerId};return this.params.phoneNumber&&(e.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&(e.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&(e.verificationCode=this.params.verificationCode),this.params.verificationId&&(e.verificationId=this.params.verificationId),e}static fromJSON(e){"string"==typeof e&&(e=JSON.parse(e));let{verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:i}=e;return n||t||r||i?new eF({verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:i}):null}}class eU{constructor(e){var t,n,r,s,o,a;let l=(0,i.zd)((0,i.pd)(e)),u=null!==(t=l.apiKey)&&void 0!==t?t:null,c=null!==(n=l.oobCode)&&void 0!==n?n:null,h=/**
762 * @license
763 * Copyright 2020 Google LLC
764 *
765 * Licensed under the Apache License, Version 2.0 (the "License");
766 * you may not use this file except in compliance with the License.
767 * You may obtain a copy of the License at
768 *
769 *   http://www.apache.org/licenses/LICENSE-2.0
770 *
771 * Unless required by applicable law or agreed to in writing, software
772 * distributed under the License is distributed on an "AS IS" BASIS,
773 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
774 * See the License for the specific language governing permissions and
775 * limitations under the License.
776 */function(e){switch(e){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}(null!==(r=l.mode)&&void 0!==r?r:null);v(u&&c&&h,"argument-error"),this.apiKey=u,this.operation=h,this.code=c,this.continueUrl=null!==(s=l.continueUrl)&&void 0!==s?s:null,this.languageCode=null!==(o=l.languageCode)&&void 0!==o?o:null,this.tenantId=null!==(a=l.tenantId)&&void 0!==a?a:null}static parseLink(e){let t=function(e){let t=(0,i.zd)((0,i.pd)(e)).link,n=t?(0,i.zd)((0,i.pd)(t)).deep_link_id:null,r=(0,i.zd)((0,i.pd)(e)).deep_link_id,s=r?(0,i.zd)((0,i.pd)(r)).link:null;return s||r||n||t||e}(e);try{return new eU(t)}catch(e){return null}}}/**
777 * @license
778 * Copyright 2020 Google LLC
779 *
780 * Licensed under the Apache License, Version 2.0 (the "License");
781 * you may not use this file except in compliance with the License.
782 * You may obtain a copy of the License at
783 *
784 *   http://www.apache.org/licenses/LICENSE-2.0
785 *
786 * Unless required by applicable law or agreed to in writing, software
787 * distributed under the License is distributed on an "AS IS" BASIS,
788 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
789 * See the License for the specific language governing permissions and
790 * limitations under the License.
791 */class eV{constructor(){this.providerId=eV.PROVIDER_ID}static credential(e,t){return eR._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){let n=eU.parseLink(t);return v(n,"argument-error"),eR._fromEmailAndCode(e,n.code,n.tenantId)}}eV.PROVIDER_ID="password",eV.EMAIL_PASSWORD_SIGN_IN_METHOD="password",eV.EMAIL_LINK_SIGN_IN_METHOD="emailLink";/**
792 * @license
793 * Copyright 2020 Google LLC
794 *
795 * Licensed under the Apache License, Version 2.0 (the "License");
796 * you may not use this file except in compliance with the License.
797 * You may obtain a copy of the License at
798 *
799 *   http://www.apache.org/licenses/LICENSE-2.0
800 *
801 * Unless required by applicable law or agreed to in writing, software
802 * distributed under the License is distributed on an "AS IS" BASIS,
803 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
804 * See the License for the specific language governing permissions and
805 * limitations under the License.
806 */class e${constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}/**
807 * @license
808 * Copyright 2019 Google LLC
809 *
810 * Licensed under the Apache License, Version 2.0 (the "License");
811 * you may not use this file except in compliance with the License.
812 * You may obtain a copy of the License at
813 *
814 *   http://www.apache.org/licenses/LICENSE-2.0
815 *
816 * Unless required by applicable law or agreed to in writing, software
817 * distributed under the License is distributed on an "AS IS" BASIS,
818 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
819 * See the License for the specific language governing permissions and
820 * limitations under the License.
821 */class ez extends e${constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}/**
822 * @license
823 * Copyright 2020 Google LLC
824 *
825 * Licensed under the Apache License, Version 2.0 (the "License");
826 * you may not use this file except in compliance with the License.
827 * You may obtain a copy of the License at
828 *
829 *   http://www.apache.org/licenses/LICENSE-2.0
830 *
831 * Unless required by applicable law or agreed to in writing, software
832 * distributed under the License is distributed on an "AS IS" BASIS,
833 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
834 * See the License for the specific language governing permissions and
835 * limitations under the License.
836 */class eB extends ez{constructor(){super("facebook.com")}static credential(e){return eN._fromParams({providerId:eB.PROVIDER_ID,signInMethod:eB.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return eB.credentialFromTaggedObject(e)}static credentialFromError(e){return eB.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return eB.credential(e.oauthAccessToken)}catch(e){return null}}}eB.FACEBOOK_SIGN_IN_METHOD="facebook.com",eB.PROVIDER_ID="facebook.com";/**
837 * @license
838 * Copyright 2020 Google LLC
839 *
840 * Licensed under the Apache License, Version 2.0 (the "License");
841 * you may not use this file except in compliance with the License.
842 * You may obtain a copy of the License at
843 *
844 *   http://www.apache.org/licenses/LICENSE-2.0
845 *
846 * Unless required by applicable law or agreed to in writing, software
847 * distributed under the License is distributed on an "AS IS" BASIS,
848 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
849 * See the License for the specific language governing permissions and
850 * limitations under the License.
851 */class eq extends ez{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return eN._fromParams({providerId:eq.PROVIDER_ID,signInMethod:eq.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return eq.credentialFromTaggedObject(e)}static credentialFromError(e){return eq.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthIdToken:t,oauthAccessToken:n}=e;if(!t&&!n)return null;try{return eq.credential(t,n)}catch(e){return null}}}eq.GOOGLE_SIGN_IN_METHOD="google.com",eq.PROVIDER_ID="google.com";/**
852 * @license
853 * Copyright 2020 Google LLC
854 *
855 * Licensed under the Apache License, Version 2.0 (the "License");
856 * you may not use this file except in compliance with the License.
857 * You may obtain a copy of the License at
858 *
859 *   http://www.apache.org/licenses/LICENSE-2.0
860 *
861 * Unless required by applicable law or agreed to in writing, software
862 * distributed under the License is distributed on an "AS IS" BASIS,
863 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
864 * See the License for the specific language governing permissions and
865 * limitations under the License.
866 */class eH extends ez{constructor(){super("github.com")}static credential(e){return eN._fromParams({providerId:eH.PROVIDER_ID,signInMethod:eH.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return eH.credentialFromTaggedObject(e)}static credentialFromError(e){return eH.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return eH.credential(e.oauthAccessToken)}catch(e){return null}}}eH.GITHUB_SIGN_IN_METHOD="github.com",eH.PROVIDER_ID="github.com";/**
867 * @license
868 * Copyright 2020 Google LLC
869 *
870 * Licensed under the Apache License, Version 2.0 (the "License");
871 * you may not use this file except in compliance with the License.
872 * You may obtain a copy of the License at
873 *
874 *   http://www.apache.org/licenses/LICENSE-2.0
875 *
876 * Unless required by applicable law or agreed to in writing, software
877 * distributed under the License is distributed on an "AS IS" BASIS,
878 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
879 * See the License for the specific language governing permissions and
880 * limitations under the License.
881 */class eW extends ez{constructor(){super("twitter.com")}static credential(e,t){return eN._fromParams({providerId:eW.PROVIDER_ID,signInMethod:eW.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return eW.credentialFromTaggedObject(e)}static credentialFromError(e){return eW.credentialFromTaggedObject(e.customData||{})}
881static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthAccessToken:t,oauthTokenSecret:n}=e;if(!t||!n)return null;try{return eW.credential(t,n)}catch(e){return null}}}eW.TWITTER_SIGN_IN_METHOD="twitter.com",eW.PROVIDER_ID="twitter.com";/**
882 * @license
883 * Copyright 2020 Google LLC
884 *
885 * Licensed under the Apache License, Version 2.0 (the "License");
886 * you may not use this file except in compliance with the License.
887 * You may obtain a copy of the License at
888 *
889 *   http://www.apache.org/licenses/LICENSE-2.0
890 *
891 * Unless required by applicable law or agreed to in writing, software
892 * distributed under the License is distributed on an "AS IS" BASIS,
893 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
894 * See the License for the specific language governing permissions and
895 * limitations under the License.
896 */class eG{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,n,r=!1){let i=await G._fromIdTokenResponse(e,n,r),s=eK(n),o=new eG({user:i,providerId:s,_tokenResponse:n,operationType:t});return o}static async _forOperation(e,t,n){await e._updateTokensIfNecessary(n,!0);let r=eK(n);return new eG({user:e,providerId:r,_tokenResponse:n,operationType:t})}}function eK(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}/**
897 * @license
898 * Copyright 2020 Google LLC
899 *
900 * Licensed under the Apache License, Version 2.0 (the "License");
901 * you may not use this file except in compliance with the License.
902 * You may obtain a copy of the License at
903 *
904 *   http://www.apache.org/licenses/LICENSE-2.0
905 *
906 * Unless required by applicable law or agreed to in writing, software
907 * distributed under the License is distributed on an "AS IS" BASIS,
908 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
909 * See the License for the specific language governing permissions and
910 * limitations under the License.
911 */class eQ extends i.ZR{constructor(e,t,n,r){var i;super(t.code,t.message),this.operationType=n,this.user=r,Object.setPrototypeOf(this,eQ.prototype),this.customData={appName:e.name,tenantId:null!==(i=e.tenantId)&&void 0!==i?i:void 0,_serverResponse:t.customData._serverResponse,operationType:n}}static _fromErrorAndOperation(e,t,n,r){return new eQ(e,t,n,r)}}function eY(e,t,n,r){let i="reauthenticate"===t?n._getReauthenticationResolver(e):n._getIdTokenResponse(e);return i.catch(n=>{if("auth/multi-factor-auth-required"===n.code)throw eQ._fromErrorAndOperation(e,n,t,r);throw n})}async function eX(e,t,n=!1){let r=await U(e,t._linkToIdToken(e.auth,await e.getIdToken()),n);return eG._forOperation(e,"link",r)}/**
912 * @license
913 * Copyright 2019 Google LLC
914 *
915 * Licensed under the Apache License, Version 2.0 (the "License");
916 * you may not use this file except in compliance with the License.
917 * You may obtain a copy of the License at
918 *
919 *   http://www.apache.org/licenses/LICENSE-2.0
920 *
921 * Unless required by applicable law or agreed to in writing, software
922 * distributed under the License is distributed on an "AS IS" BASIS,
923 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
924 * See the License for the specific language governing permissions and
925 * limitations under the License.
926 */async function eJ(e,t,n=!1){let{auth:r}=e,i="reauthenticate";try{let s=await U(e,eY(r,i,t,e),n);v(s.idToken,r,"internal-error");let o=F(s.idToken);v(o,r,"internal-error");let{sub:a}=o;return v(e.uid===a,r,"user-mismatch"),eG._forOperation(e,i,s)}catch(e){throw(null==e?void 0:e.code)==="auth/user-not-found"&&p(r,"user-mismatch"),e}}/**
927 * @license
928 * Copyright 2020 Google LLC
929 *
930 * Licensed under the Apache License, Version 2.0 (the "License");
931 * you may not use this file except in compliance with the License.
932 * You may obtain a copy of the License at
933 *
934 *   http://www.apache.org/licenses/LICENSE-2.0
935 *
936 * Unless required by applicable law or agreed to in writing, software
937 * distributed under the License is distributed on an "AS IS" BASIS,
938 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
939 * See the License for the specific language governing permissions and
940 * limitations under the License.
941 */async function e0(e,t,n=!1){let r="signIn",i=await eY(e,r,t),s=await eG._fromIdTokenResponse(e,r,i);return n||await e._updateCurrentUser(s.user),s}async function e1(e,t){return e0(ew(e),t)}/**
942 * @license
943 * Copyright 2020 Google LLC
944 *
945 * Licensed under the Apache License, Version 2.0 (the "License");
946 * you may not use this file except in compliance with the License.
947 * You may obtain a copy of the License at
948 *
949 *   http://www.apache.org/licenses/LICENSE-2.0
950 *
951 * Unless required by applicable law or agreed to in writing, software
952 * distributed under the License is distributed on an "AS IS" BASIS,
953 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
954 * See the License for the specific language governing permissions and
955 * limitations under the License.
956 */async function e2(e,t){return A(e,"POST","/v1/accounts:signInWithCustomToken",T(e,t))}/**
957 * @license
958 * Copyright 2020 Google LLC
959 *
960 * Licensed under the Apache License, Version 2.0 (the "License");
961 * you may not use this file except in compliance with the License.
962 * You may obtain a copy of the License at
963 *
964 *   http://www.apache.org/licenses/LICENSE-2.0
965 *
966 * Unless required by applicable law or agreed to in writing, software
967 * distributed under the License is distributed on an "AS IS" BASIS,
968 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
969 * See the License for the specific language governing permissions and
970 * limitations under the License.
971 */async function e4(e,t){let n=ew(e),r=await e2(n,{token:t,returnSecureToken:!0}),i=await eG._fromIdTokenResponse(n,"signIn",r);return await n._updateCurrentUser(i.user),i}/**
972 * @license
973 * Copyright 2020 Google LLC
974 *
975 * Licensed under the Apache License, Version 2.0 (the "License");
976 * you may not use this file except in compliance with the License.
977 * You may obtain a copy of the License at
978 *
979 *   http://www.apache.org/licenses/LICENSE-2.0
980 *
981 * Unless required by applicable law or agreed to in writing, software
982 * distributed under the License is distributed on an "AS IS" BASIS,
983 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
984 * See the License for the specific language governing permissions and
985 * limitations under the License.
986 */function e5(e,t,n){var r;v((null===(r=n.url)||void 0===r?void 0:r.length)>0,e,"invalid-continue-uri"),v(void 0===n.dynamicLinkDomain||n.dynamicLinkDomain.length>0,e,"invalid-dynamic-link-domain"),t.continueUrl=n.url,t.dynamicLinkDomain=n.dynamicLinkDomain,t.canHandleCodeInApp=n.handleCodeInApp,n.iOS&&(v(n.iOS.bundleId.length>0,e,"missing-ios-bundle-id"),t.iOSBundleId=n.iOS.bundleId),n.android&&(v(n.android.packageName.length>0,e,"missing-android-pkg-name"),t.androidInstallApp=n.android.installApp,t.androidMinimumVersionCode=n.android.minimumVersion,t.androidPackageName=n.android.packageName)}/**
987 * @license
988 * Copyright 2020 Google LLC
989 *
990 * Licensed under the Apache License, Version 2.0 (the "License");
991 * you may not use this file except in compliance with the License.
992 * You may obtain a copy of the License at
993 *
994 *   http://www.apache.org/licenses/LICENSE-2.0
995 *
996 * Unless required by applicable law or agreed to in writing, software
997 * distributed under the License is distributed on an "AS IS" BASIS,
998 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
999 * See the License for the specific language governing permissions and
1000 * limitations under the License.
1001 */async function e6(e,t,n){var r;let i=ew(e),s={requestType:"PASSWORD_RESET",email:t,clientType:"CLIENT_TYPE_WEB"};if(null===(r=i._getRecaptchaConfig())||void 0===r?void 0:r.emailPasswordEnabled){let e=await ev(i,s,"getOobCode",!0);n&&e5(i,e,n),await eC(i,e)}else n&&e5(i,s,n),await eC(i,s).catch(async e=>{if("auth/missing-recaptcha-token"!==e.code)return Promise.reject(e);{console.log("Password resets are protected by reCAPTCHA for this project. Automatically triggering the reCAPTCHA flow and restarting the password reset flow.");let e=await ev(i,s,"getOobCode",!0);n&&e5(i,e,n),await eC(i,e)}})}function e9(e,t,n){return e1((0,i.m9)(e),eV.credential(t,n))}function e3(e,t,n,r){return(0,i.m9)(e).onIdTokenChanged(t,n,r)}function e7(e){return(0,i.m9)(e).signOut()}new WeakMap;let e8="__sak";/**
1002 * @license
1003 * Copyright 2019 Google LLC
1004 *
1005 * Licensed under the Apache License, Version 2.0 (the "License");
1006 * you may not use this file except in compliance with the License.
1007 * You may obtain a copy of the License at
1008 *
1009 *   http://www.apache.org/licenses/LICENSE-2.0
1010 *
1011 * Unless required by applicable law or agreed to in writing, software
1012 * distributed under the License is distributed on an "AS IS" BASIS,
1013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1014 * See the License for the specific language governing permissions and
1015 * limitations under the License.
1016 */class te{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{if(!this.storage)return Promise.resolve(!1);return this.storage.setItem(e8,"1"),this.storage.removeItem(e8),Promise.resolve(!0)}catch(e){return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){let t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}class tt extends te{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=/**
1017 * @license
1018 * Copyright 2020 Google LLC
1019 *
1020 * Licensed under the Apache License, Version 2.0 (the "License");
1021 * you may not use this file except in compliance with the License.
1022 * You may obtain a copy of the License at
1023 *
1024 *   http://www.apache.org/licenses/LICENSE-2.0
1025 *
1026 * Unless required by applicable law or agreed to in writing, software
1027 * distributed under the License is distributed on an "AS IS" BASIS,
1028 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1029 * See the License for the specific language governing permissions and
1030 * limitations under the License.
1031 */function(){let e=(0,i.z$)();return en(e)||el(e)}()&&function(){try{return!!(window&&window!==window.top)}catch(e){return!1}}(),this.fallbackToPolling=eu(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(let t of Object.keys(this.listeners)){let n=this.storage.getItem(t),r=this.localCache[t];n!==r&&e(t,r,n)}}onStorageEvent(e,t=!1){if(!e.key){this.forAllChangedKeys((e,t,n)=>{this.notifyListeners(e,n)});return}let n=e.key;if(t?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){let r=this.storage.getItem(n);if(e.newValue!==r)null!==e.newValue?this.storage.setItem(n,e.newValue):this.storage.removeItem(n);else if(this.localCache[n]===e.newValue&&!t)return}let r=()=>{let e=this.storage.getItem(n);(t||this.localCache[n]!==e)&&this.notifyListeners(n,e)},s=this.storage.getItem(n);(0,i.w1)()&&10===document.documentMode&&s!==e.newValue&&e.newValue!==e.oldValue?setTimeout(r,10):r()}notifyListeners(e,t){this.localCache[e]=t;let n=this.listeners[e];if(n)for(let e of Array.from(n))e(t?JSON.parse(t):t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,t,n)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:n}),!0)})},1e3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,t){0===Object.keys(this.listeners).length&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&(this.detachListener(),this.stopPolling())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){let t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}tt.type="LOCAL";let tn=tt;/**
1032 * @license
1033 * Copyright 2020 Google LLC
1034 *
1035 * Licensed under the Apache License, Version 2.0 (the "License");
1036 * you may not use this file except in compliance with the License.
1037 * You may obtain a copy of the License at
1038 *
1039 *   http://www.apache.org/licenses/LICENSE-2.0
1040 *
1041 * Unless required by applicable law or agreed to in writing, software
1042 * distributed under the License is distributed on an "AS IS" BASIS,
1043 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1044 * See the License for the specific language governing permissions and
1045 * limitations under the License.
1046 */class tr extends te{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,t){}_removeListener(e,t){}}tr.type="SESSION";/**
1047 * @license
1048 * Copyright 2019 Google LLC
1049 *
1050 * Licensed under the Apache License, Version 2.0 (the "License");
1051 * you may not use this file except in compliance with the License.
1052 * You may obtain a copy of the License at
1053 *
1054 *   http://www.apache.org/licenses/LICENSE-2.0
1055 *
1056 * Unless required by applicable law or agreed to in writing, software
1057 * distributed under the License is distributed on an "AS IS" BASIS,
1058 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1059 * See the License for the specific language governing permissions and
1060 * limitations under the License.
1061 */class ti{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){let t=this.receivers.find(t=>t.isListeningto(e));if(t)return t;let n=new ti(e);return this.receivers.push(n),n}isListeningto(e){return this.eventTarget===e}async handleEvent(e){let{eventId:t,eventType:n,data:r}=e.data,i=this.handlersMap[n];if(!(null==i?void 0:i.size))return;e.ports[0].postMessage({status:"ack",eventId:t,eventType:n});let s=Array.from(i).map(async t=>t(e.origin,r)),o=await Promise.all(s.map(async e=>{try{let t=await e;return{fulfilled:!0,value:t}}catch(e){return{fulfilled:!1,reason:e}}}));e.ports[0].postMessage({status:"done",eventId:t,eventType:n,response:o})}_subscribe(e,t){0===Object.keys(this.handlersMap).length&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(t)}_unsubscribe(e,t){this.handlersMap[e]&&t&&this.handlersMap[e].delete(t),t&&0!==this.handlersMap[e].size||delete this.handlersMap[e],0===Object.keys(this.handlersMap).length&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}/**
1062 * @license
1063 * Copyright 2020 Google LLC
1064 *
1065 * Licensed under the Apache License, Version 2.0 (the "License");
1066 * you may not use this file except in compliance with the License.
1067 * You may obtain a copy of the License at
1068 *
1069 *   http://www.apache.org/licenses/LICENSE-2.0
1070 *
1071 * Unless required by applicable law or agreed to in writing, software
1072 * distributed under the License is distributed on an "AS IS" BASIS,
1073 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1074 * See the License for the specific language governing permissions and
1075 * limitations under the License.
1076 */function ts(e="",t=10){let n="";for(let e=0;e<t;e++)n+=Math.floor(10*Math.random());return e+n}ti.receivers=[];/**
1077 * @license
1078 * Copyright 2019 Google LLC
1079 *
1080 * Licensed under the Apache License, Version 2.0 (the "License");
1081 * you may not use this file except in compliance with the License.
1082 * You may obtain a copy of the License at
1083 *
1084 *   http://www.apache.org/licenses/LICENSE-2.0
1085 *
1086 * Unless required by applicable law or agreed to in writing, software
1087 * distributed under the License is distributed on an "AS IS" BASIS,
1088 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1089 * See the License for the specific language governing permissions and
1090 * limitations under the License.
1091 */class to{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}async _send(e,t,n=50){let r,i;let s="undefined"!=typeof MessageChannel?new MessageChannel:null;if(!s)throw Error("connection_unavailable");return new Promise((o,a)=>{let l=ts("",20);s.port1.start();let u=setTimeout(()=>{a(Error("unsupported_event"))},n);i={messageChannel:s,onMessage(e){if(e.data.eventId===l)switch(e.data.status){case"ack":clearTimeout(u),r=setTimeout(()=>{a(Error("timeout"))},3e3);break;case"done":clearTimeout(r),o(e.data.response);break;default:clearTimeout(u),clearTimeout(r),a(Error("invalid_response"))}}},this.handlers.add(i),s.port1.addEventListener("message",i.onMessage),this.target.postMessage({eventType:e,eventId:l,data:t},[s.port2])}).finally(()=>{i&&this.removeMessageHandler(i)})}}/**
1092 * @license
1093 * Copyright 2020 Google LLC
1094 *
1095 * Licensed under the Apache License, Version 2.0 (the "License");
1096 * you may not use this file except in compliance with the License.
1097 * You may obtain a copy of the License at
1098 *
1099 *   http://www.apache.org/licenses/LICENSE-2.0
1100 *
1101 * Unless required by applicable law or agreed to in writing, software
1102 * distributed under the License is distributed on an "AS IS" BASIS,
1103 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1104 * See the License for the specific language governing permissions and
1105 * limitations under the License.
1106 */function ta(){return window}/**
1107 * @license
1108 * Copyright 2020 Google LLC.
1109 *
1110 * Licensed under the Apache License, Version 2.0 (the "License");
1111 * you may not use this file except in compliance with the License.
1112 * You may obtain a copy of the License at
1113 *
1114 *   http://www.apache.org/licenses/LICENSE-2.0
1115 *
1116 * Unless required by applicable law or agreed to in writing, software
1117 * distributed under the License is distributed on an "AS IS" BASIS,
1118 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1119 * See the License for the specific language governing permissions and
1120 * limitations under the License.
1121 */function tl(){return void 0!==ta().WorkerGlobalScope&&"function"==typeof ta().importScripts}async function tu(){if(!(null==navigator?void 0:navigator.serviceWorker))return null;try{let e=await navigator.serviceWorker.ready;return e.active}catch(e){return null}}/**
1122 * @license
1123 * Copyright 2019 Google LLC
1124 *
1125 * Licensed under the Apache License, Version 2.0 (the "License");
1126 * you may not use this file except in compliance with the License.
1127 * You may obtain a copy of the License at
1128 *
1129 *   http://www.apache.org/licenses/LICENSE-2.0
1130 *
1131 * Unless required by applicable law or agreed to in writing, software
1132 * distributed under the License is distributed on an "AS IS" BASIS,
1133 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1134 * See the License for the specific language governing permissions and
1135 * limitations under the License.
1136 */let tc="firebaseLocalStorageDb",th="firebaseLocalStorage",td="fbase_key";class tf{constructor(e){this.request=e}toPromise(){return new Promise((e,t)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{t(this.request.error)})})}}function tp(e,t){return e.transaction([th],t?"readwrite":"readonly").objectStore(th)}function tm(){let e=indexedDB.open(tc,1);return new Promise((t,n)=>{e.addEventListener("error",()=>{n(e.error)}),e.addEventListener("upgradeneeded",()=>{let t=e.result;try{t.createObjectStore(th,{keyPath:td})}catch(e){n(e)}}),e.addEventListener("success",async()=>{let n=e.result;n.objectStoreNames.contains(th)?t(n):(n.close(),await function(){let e=indexedDB.deleteDatabase(tc);return new tf(e).toPromise()}(),t(await tm()))})})}async function tg(e,t,n){let r=tp(e,!0).put({[td]:t,value:n});return new tf(r).toPromise()}async function tv(e,t){let n=tp(e,!1).get(t),r=await new tf(n).toPromise();return void 0===r?null:r.value}function ty(e,t){let n=tp(e,!0).delete(t);return new tf(n).toPromise()}class tb{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.db||(this.db=await tm()),this.db}async _withRetries(e){let t=0;for(;;)try{let t=await this._openDb();return await e(t)}catch(e){if(t++>3)throw e;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return tl()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=ti._getInstance(tl()?self:null),this.receiver._subscribe("keyChanged",async(e,t)=>{let n=await this._poll();return{keyProcessed:n.includes(t.key)}}),this.receiver._subscribe("ping",async(e,t)=>["keyChanged"])}async initializeSender(){var e,t;if(this.activeServiceWorker=await tu(),!this.activeServiceWorker)return;this.sender=new to(this.activeServiceWorker);let n=await this.sender._send("ping",{},800);n&&(null===(e=n[0])||void 0===e?void 0:e.fulfilled)&&(null===(t=n[0])||void 0===t?void 0:t.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){var t;if(this.sender&&this.activeServiceWorker&&((null===(t=null==navigator?void 0:navigator.serviceWorker)||void 0===t?void 0:t.controller)||null)===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch(e){}}async _isAvailable(){try{if(!indexedDB)return!1;let e=await tm();return await tg(e,e8,"1"),await ty(e,e8),!0}catch(e){}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite(async()=>(await this._withRetries(n=>tg(n,e,t)),this.localCache[e]=t,this.notifyServiceWorker(e)))}async _get(e){let t=await this._withRetries(t=>tv(t,e));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(t=>ty(t,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){let e=await this._withRetries(e=>{let t=tp(e,!1).getAll();
1136return new tf(t).toPromise()});if(!e||0!==this.pendingWrites)return[];let t=[],n=new Set;for(let{fbase_key:r,value:i}of e)n.add(r),JSON.stringify(this.localCache[r])!==JSON.stringify(i)&&(this.notifyListeners(r,i),t.push(r));for(let e of Object.keys(this.localCache))this.localCache[e]&&!n.has(e)&&(this.notifyListeners(e,null),t.push(e));return t}notifyListeners(e,t){this.localCache[e]=t;let n=this.listeners[e];if(n)for(let e of Array.from(n))e(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&this.stopPolling()}}async function tw(e,t,n){var r,i,s;let o=await n.verify();try{let a;if(v("string"==typeof o,e,"argument-error"),v("recaptcha"===n.type,e,"argument-error"),a="string"==typeof t?{phoneNumber:t}:t,"session"in a){let t=a.session;if("phoneNumber"in a){v("enroll"===t.type,e,"internal-error");let n=await (i={idToken:t.credential,phoneEnrollmentInfo:{phoneNumber:a.phoneNumber,recaptchaToken:o}},I(e,"POST","/v2/accounts/mfaEnrollment:start",T(e,i)));return n.phoneSessionInfo.sessionInfo}{v("signin"===t.type,e,"internal-error");let n=(null===(r=a.multiFactorHint)||void 0===r?void 0:r.uid)||a.multiFactorUid;v(n,e,"missing-multi-factor-info");let i=await (s={mfaPendingCredential:t.credential,mfaEnrollmentId:n,phoneSignInInfo:{recaptchaToken:o}},I(e,"POST","/v2/accounts/mfaSignIn:start",T(e,s)));return i.phoneResponseInfo.sessionInfo}}{let{sessionInfo:t}=await eD(e,{phoneNumber:a.phoneNumber,recaptchaToken:o});return t}}finally{n._reset()}}tb.type="LOCAL",em("rcb"),new _(3e4,6e4);/**
1137 * @license
1138 * Copyright 2020 Google LLC
1139 *
1140 * Licensed under the Apache License, Version 2.0 (the "License");
1141 * you may not use this file except in compliance with the License.
1142 * You may obtain a copy of the License at
1143 *
1144 *   http://www.apache.org/licenses/LICENSE-2.0
1145 *
1146 * Unless required by applicable law or agreed to in writing, software
1147 * distributed under the License is distributed on an "AS IS" BASIS,
1148 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1149 * See the License for the specific language governing permissions and
1150 * limitations under the License.
1151 */class t_{constructor(e){this.providerId=t_.PROVIDER_ID,this.auth=ew(e)}verifyPhoneNumber(e,t){return tw(this.auth,e,(0,i.m9)(t))}static credential(e,t){return eF._fromVerification(e,t)}static credentialFromResult(e){return t_.credentialFromTaggedObject(e)}static credentialFromError(e){return t_.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{phoneNumber:t,temporaryProof:n}=e;return t&&n?eF._fromTokenResponse(t,n):null}}t_.PROVIDER_ID="phone",t_.PHONE_SIGN_IN_METHOD="phone";/**
1152 * @license
1153 * Copyright 2019 Google LLC
1154 *
1155 * Licensed under the Apache License, Version 2.0 (the "License");
1156 * you may not use this file except in compliance with the License.
1157 * You may obtain a copy of the License at
1158 *
1159 *   http://www.apache.org/licenses/LICENSE-2.0
1160 *
1161 * Unless required by applicable law or agreed to in writing, software
1162 * distributed under the License is distributed on an "AS IS" BASIS,
1163 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1164 * See the License for the specific language governing permissions and
1165 * limitations under the License.
1166 */class tE extends eS{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return eP(e,this._buildIdpRequest())}_linkToIdToken(e,t){return eP(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return eP(e,this._buildIdpRequest())}_buildIdpRequest(e){let t={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(t.idToken=e),t}}function tx(e){return e0(e.auth,new tE(e),e.bypassAuthState)}function tS(e){let{auth:t,user:n}=e;return v(n,t,"internal-error"),eJ(n,new tE(e),e.bypassAuthState)}async function tk(e){let{auth:t,user:n}=e;return v(n,t,"internal-error"),eX(n,new tE(e),e.bypassAuthState)}/**
1167 * @license
1168 * Copyright 2020 Google LLC
1169 *
1170 * Licensed under the Apache License, Version 2.0 (the "License");
1171 * you may not use this file except in compliance with the License.
1172 * You may obtain a copy of the License at
1173 *
1174 *   http://www.apache.org/licenses/LICENSE-2.0
1175 *
1176 * Unless required by applicable law or agreed to in writing, software
1177 * distributed under the License is distributed on an "AS IS" BASIS,
1178 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1179 * See the License for the specific language governing permissions and
1180 * limitations under the License.
1181 */class tT{constructor(e,t,n,r,i=!1){this.auth=e,this.resolver=n,this.user=r,this.bypassAuthState=i,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(t)?t:[t]}execute(){return new Promise(async(e,t)=>{this.pendingPromise={resolve:e,reject:t};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(e){this.reject(e)}})}async onAuthEvent(e){let{urlResponse:t,sessionId:n,postBody:r,tenantId:i,error:s,type:o}=e;if(s){this.reject(s);return}let a={auth:this.auth,requestUri:t,sessionId:n,tenantId:i||void 0,postBody:r||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(o)(a))}catch(e){this.reject(e)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return tx;case"linkViaPopup":case"linkViaRedirect":return tk;case"reauthViaPopup":case"reauthViaRedirect":return tS;default:p(this.auth,"internal-error")}}resolve(e){this.pendingPromise||y("Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){this.pendingPromise||y("Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}/**
1182 * @license
1183 * Copyright 2020 Google LLC
1184 *
1185 * Licensed under the Apache License, Version 2.0 (the "License");
1186 * you may not use this file except in compliance with the License.
1187 * You may obtain a copy of the License at
1188 *
1189 *   http://www.apache.org/licenses/LICENSE-2.0
1190 *
1191 * Unless required by applicable law or agreed to in writing, software
1192 * distributed under the License is distributed on an "AS IS" BASIS,
1193 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1194 * See the License for the specific language governing permissions and
1195 * limitations under the License.
1196 */let tI=new _(2e3,1e4);class tC extends tT{constructor(e,t,n,r,i){super(e,t,r,i),this.provider=n,this.authWindow=null,this.pollId=null,tC.currentPopupAction&&tC.currentPopupAction.cancel(),tC.currentPopupAction=this}async executeNotNull(){let e=await this.execute();return v(e,this.auth,"internal-error"),e}async onExecution(){1===this.filter.length||y("Popup operations only handle one event");let e=ts();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch(e=>{this.reject(e)}),this.resolver._isIframeWebStorageSupported(this.auth,e=>{e||this.reject(m(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var e;return(null===(e=this.authWindow)||void 0===e?void 0:e.associatedEvent)||null}cancel(){this.reject(m(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,tC.currentPopupAction=null}pollUserCancellation(){let e=()=>{var t,n;if(null===(n=null===(t=this.authWindow)||void 0===t?void 0:t.window)||void 0===n?void 0:n.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(m(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,tI.get())};e()}}tC.currentPopupAction=null;let tA=new Map;class tO extends tT{constructor(e,t,n=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,n),this.eventId=null}async execute(){let e=tA.get(this.auth._key());if(!e){try{let t=await tR(this.resolver,this.auth),n=t?await super.execute():null;e=()=>Promise.resolve(n)}catch(t){e=()=>Promise.reject(t)}tA.set(this.auth._key(),e)}return this.bypassAuthState||tA.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);
1196if("unknown"===e.type){this.resolve(null);return}if(e.eventId){let t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function tR(e,t){let n=X("pendingRedirect",t.config.apiKey,t.name),r=Q(e._redirectPersistence);if(!await r._isAvailable())return!1;let i=await r._get(n)==="true";return await r._remove(n),i}function tP(e,t){tA.set(e._key(),t)}async function tN(e,t,n=!1){let r=ew(e),i=t?Q(t):(v(r._popupRedirectResolver,r,"argument-error"),r._popupRedirectResolver),s=new tO(r,i,n),o=await s.execute();return o&&!n&&(delete o.user._redirectEventId,await r._persistUserIfCurrent(o.user),await r._setRedirectUser(null,t)),o}class tD{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let t=!1;return this.consumers.forEach(n=>{this.isEventForConsumer(e,n)&&(t=!0,this.sendToConsumer(e,n),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return tL(e);default:return!1}}(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){var n;if(e.error&&!tL(e)){let r=(null===(n=e.error.code)||void 0===n?void 0:n.split("auth/")[1])||"internal-error";t.onError(m(this.auth,r))}else t.onAuthEvent(e)}isEventForConsumer(e,t){let n=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&n}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(tM(e))}saveEventToCache(e){this.cachedEventUids.add(tM(e)),this.lastProcessedEventTime=Date.now()}}function tM(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(e=>e).join("-")}function tL({type:e,error:t}){return"unknown"===e&&(null==t?void 0:t.code)==="auth/no-auth-event"}/**
1197 * @license
1198 * Copyright 2020 Google LLC
1199 *
1200 * Licensed under the Apache License, Version 2.0 (the "License");
1201 * you may not use this file except in compliance with the License.
1202 * You may obtain a copy of the License at
1203 *
1204 *   http://www.apache.org/licenses/LICENSE-2.0
1205 *
1206 * Unless required by applicable law or agreed to in writing, software
1207 * distributed under the License is distributed on an "AS IS" BASIS,
1208 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1209 * See the License for the specific language governing permissions and
1210 * limitations under the License.
1211 */async function tZ(e,t={}){return I(e,"GET","/v1/projects",t)}/**
1212 * @license
1213 * Copyright 2020 Google LLC
1214 *
1215 * Licensed under the Apache License, Version 2.0 (the "License");
1216 * you may not use this file except in compliance with the License.
1217 * You may obtain a copy of the License at
1218 *
1219 *   http://www.apache.org/licenses/LICENSE-2.0
1220 *
1221 * Unless required by applicable law or agreed to in writing, software
1222 * distributed under the License is distributed on an "AS IS" BASIS,
1223 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1224 * See the License for the specific language governing permissions and
1225 * limitations under the License.
1226 */let tj=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,tF=/^https?/;async function tU(e){if(e.config.emulator)return;let{authorizedDomains:t}=await tZ(e);for(let e of t)try{if(function(e){let t=b(),{protocol:n,hostname:r}=new URL(t);if(e.startsWith("chrome-extension://")){let i=new URL(e);return""===i.hostname&&""===r?"chrome-extension:"===n&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===n&&i.hostname===r}if(!tF.test(n))return!1;if(tj.test(e))return r===e;let i=e.replace(/\./g,"\\."),s=RegExp("^(.+\\."+i+"|"+i+")$","i");return s.test(r)}(e))return}catch(e){}p(e,"unauthorized-domain")}/**
1227 * @license
1228 * Copyright 2020 Google LLC.
1229 *
1230 * Licensed under the Apache License, Version 2.0 (the "License");
1231 * you may not use this file except in compliance with the License.
1232 * You may obtain a copy of the License at
1233 *
1234 *   http://www.apache.org/licenses/LICENSE-2.0
1235 *
1236 * Unless required by applicable law or agreed to in writing, software
1237 * distributed under the License is distributed on an "AS IS" BASIS,
1238 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1239 * See the License for the specific language governing permissions and
1240 * limitations under the License.
1241 */let tV=new _(3e4,6e4);function t$(){let e=ta().___jsl;if(null==e?void 0:e.H){for(let t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let t=0;t<e.CP.length;t++)e.CP[t]=null}}let tz=null,tB=new _(5e3,15e3),tq={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},tH=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);async function tW(e){let t=await (tz=tz||new Promise((t,n)=>{var r,i,s;function o(){t$(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{t$(),n(m(e,"network-request-failed"))},timeout:tV.get()})}if(null===(i=null===(r=ta().gapi)||void 0===r?void 0:r.iframes)||void 0===i?void 0:i.Iframe)t(gapi.iframes.getContext());else if(null===(s=ta().gapi)||void 0===s?void 0:s.load)o();else{let t=em("iframefcb");return ta()[t]=()=>{gapi.load?o():n(m(e,"network-request-failed"))},ep(`https://apis.google.com/js/api.js?onload=${t}`).catch(e=>n(e))}}).catch(e=>{throw tz=null,e})),n=ta().gapi;return v(n,e,"internal-error"),t.open({where:document.body,url:function(e){let t=e.config;v(t.authDomain,e,"auth-domain-config-required");let n=t.emulator?E(t,"emulator/auth/iframe"):`https://${e.config.authDomain}/__/auth/iframe`,r={apiKey:t.apiKey,appName:e.name,v:s.Jn},o=tH.get(e.config.apiHost);o&&(r.eid=o);let a=e._getFrameworks();return a.length&&(r.fw=a.join(",")),`${n}?${(0,i.xO)(r).slice(1)}`}(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:tq,dontclear:!0},t=>new Promise(async(n,r)=>{await t.restyle({setHideOnLeave:!1});let i=m(e,"network-request-failed"),s=ta().setTimeout(()=>{r(i)},tB.get());function o(){ta().clearTimeout(s),n(t)}t.ping(o).then(o,()=>{r(i)})}))}/**
1242 * @license
1243 * Copyright 2020 Google LLC.
1244 *
1245 * Licensed under the Apache License, Version 2.0 (the "License");
1246 * you may not use this file except in compliance with the License.
1247 * You may obtain a copy of the License at
1248 *
1249 *   http://www.apache.org/licenses/LICENSE-2.0
1250 *
1251 * Unless required by applicable law or agreed to in writing, software
1252 * distributed under the License is distributed on an "AS IS" BASIS,
1253 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1254 * See the License for the specific language governing permissions and
1255 * limitations under the License.
1256 */let tG={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class tK{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(e){}}}let tQ=encodeURIComponent("fac");async function tY(e,t,n,r,o,a){v(e.config.authDomain,e,"auth-domain-config-required"),v(e.config.apiKey,e,"invalid-api-key");let l={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:r,v:s.Jn,eventId:o};if(t instanceof e$)for(let[n,r]of(t.setDefaultLanguage(e.languageCode),l.providerId=t.providerId||"",(0,i.xb)(t.getCustomParameters())||(l.customParameters=JSON.stringify(t.getCustomParameters())),Object.entries(a||{})))l[n]=r;if(t instanceof ez){let e=t.getScopes().filter(e=>""!==e);e.length>0&&(l.scopes=e.join(","))}e.tenantId&&(l.tid=e.tenantId);let u=l;for(let e of Object.keys(u))void 0===u[e]&&delete u[e];let c=await e._getAppCheckToken(),h=c?`#${tQ}=${encodeURIComponent(c)}`:"";return`${function({config:e}){return e.emulator?E(e,"emulator/auth/handler"):`https://${e.authDomain}/__/auth/handler`}(e)}?${(0,i.xO)(u).slice(1)}${h}`}/**
1257 * @license
1258 * Copyright 2020 Google LLC
1259 *
1260 * Licensed under the Apache License, Version 2.0 (the "License");
1261 * you may not use this file except in compliance with the License.
1262 * You may obtain a copy of the License at
1263 *
1264 *   http://www.apache.org/licenses/LICENSE-2.0
1265 *
1266 * Unless required by applicable law or agreed to in writing, software
1267 * distributed under the License is distributed on an "AS IS" BASIS,
1268 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1269 * See the License for the specific language governing permissions and
1270 * limitations under the License.
1271 */let tX="webStorageSupport",tJ=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=tr,this._completeRedirectFn=tN,this._overrideRedirectResult=tP}async _openPopup(e,t,n,r){var s;(null===(s=this.eventManagers[e._key()])||void 0===s?void 0:s.manager)||y("_initialize() not called before _openPopup()");let o=await tY(e,t,n,b(),r);return function(e,t,n,r=500,s=600){let o=Math.max((window.screen.availHeight-s)/2,0).toString(),a=Math.max((window.screen.availWidth-r)/2,0).toString(),l="",u=Object.assign(Object.assign({},tG),{width:r.toString(),height:s.toString(),top:o,left:a}),c=(0,i.z$)().toLowerCase();n&&(l=er(c)?"_blank":n),et(c)&&(t=t||"http://localhost",u.scrollbars="yes");let h=Object.entries(u).reduce((e,[t,n])=>`${e}${t}=${n},`,"");if(function(e=(0,i.z$)()){var t;return el(e)&&!!(null===(t=window.navigator)||void 0===t?void 0:t.standalone)}(c)&&"_self"!==l)return function(e,t){let n=document.createElement("a");n.href=e,n.target=t;let 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||"",l),new tK(null);let d=window.open(t||"",l,h);v(d,e,"popup-blocked");try{d.focus()}catch(e){}return new tK(d)}(e,o,ts())}async _openRedirect(e,t,n,r){await this._originValidation(e);let i=await tY(e,t,n,b(),r);return ta().location.href=i,new Promise(()=>{})}_initialize(e){let t=e._key();if(this.eventManagers[t]){let{manager:e,promise:n}=this.eventManagers[t];return e?Promise.resolve(e):(n||y("If manager is not set, promise should be"),n)}let n=this.initAndGetManager(e);return this.eventManagers[t]={promise:n},n.catch(()=>{delete this.eventManagers[t]}),n}async initAndGetManager(e){let t=await tW(e),n=new tD(e);return t.register("authEvent",t=>{v(null==t?void 0:t.authEvent,e,"invalid-auth-event");let r=n.onEvent(t.authEvent);return{status:r?"ACK":"ERROR"}},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:n},this.iframes[e._key()]=t,n}_isIframeWebStorageSupported(e,t){let n=this.iframes[e._key()];n.send(tX,{type:tX},n=>{var r;let i=null===(r=null==n?void 0:n[0])||void 0===r?void 0:r[tX];void 0!==i&&t(!!i),p(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){let t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=tU(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return eu()||en()||el()}};class t0{constructor(e){this.factorId=e}_process(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 y("unexpected MultiFactorSessionType")}}}class t1 extends t0{constructor(e){super("phone"),this.credential=e}static _fromCredential(e){return new t1(e)}_finalizeEnroll(e,t,n){return I(e,"POST","/v2/accounts/mfaEnrollment:finalize",T(e,{idToken:t,displayName:n,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}_finalizeSignIn(e,t){return I(e,"POST","/v2/accounts/mfaSignIn:finalize",T(e,{mfaPendingCredential:t,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}}class t2 extends t0{constructor(e,t,n){super("totp"),this.otp=e,this.enrollmentId=t,this.secret=n}static _fromSecret(e,t){return new t2(t,void 0,e)}static _fromEnrollmentId(e,t){return new t2(t,e)}async _finalizeEnroll(e,t,n){return v(void 0!==this.secret,e,"argument-error"),I(e,"POST","/v2/accounts/mfaEnrollment:finalize",T(e,{idToken:t,displayName:n,totpVerificationInfo:this.secret._makeTotpVerificationInfo(this.otp)}))}async _finalizeSignIn(e,t){v(void 0!==this.enrollmentId&&void 0!==this.otp,e,"argument-error");let n={verificationCode:this.otp};return I(e,"POST","/v2/accounts/mfaSignIn:finalize",T(e,{mfaPendingCredential:t,mfaEnrollmentId:this.enrollmentId,totpVerificationInfo:n}))}}class t4{constructor(e,t,n,r,i,s,o){this.sessionInfo=s,this.auth=o,this.secretKey=e,this.hashingAlgorithm=t,this.co
1271deLength=n,this.codeIntervalSeconds=r,this.enrollmentCompletionDeadline=i}static _fromStartTotpMfaEnrollmentResponse(e,t){return new t4(e.totpSessionInfo.sharedSecretKey,e.totpSessionInfo.hashingAlgorithm,e.totpSessionInfo.verificationCodeLength,e.totpSessionInfo.periodSec,new Date(e.totpSessionInfo.finalizeEnrollmentTime).toUTCString(),e.totpSessionInfo.sessionInfo,t)}_makeTotpVerificationInfo(e){return{sessionInfo:this.sessionInfo,verificationCode:e}}generateQrCodeUrl(e,t){var n;let r=!1;return(t5(e)||t5(t))&&(r=!0),r&&(t5(e)&&(e=(null===(n=this.auth.currentUser)||void 0===n?void 0:n.email)||"unknownuser"),t5(t)&&(t=this.auth.name)),`otpauth://totp/${t}:${e}?secret=${this.secretKey}&issuer=${t}&algorithm=${this.hashingAlgorithm}&digits=${this.codeLength}`}}function t5(e){return void 0===e||(null==e?void 0:e.length)===0}var t6="@firebase/auth",t9="0.23.2";/**
1272 * @license
1273 * Copyright 2020 Google LLC
1274 *
1275 * Licensed under the Apache License, Version 2.0 (the "License");
1276 * you may not use this file except in compliance with the License.
1277 * You may obtain a copy of the License at
1278 *
1279 *   http://www.apache.org/licenses/LICENSE-2.0
1280 *
1281 * Unless required by applicable law or agreed to in writing, software
1282 * distributed under the License is distributed on an "AS IS" BASIS,
1283 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1284 * See the License for the specific language governing permissions and
1285 * limitations under the License.
1286 */class t3{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.uid)||null}async getToken(e){if(this.assertAuthConfigured(),await this.auth._initializationPromise,!this.auth.currentUser)return null;let t=await this.auth.currentUser.getIdToken(e);return{accessToken:t}}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;let t=this.auth.onIdTokenChanged(t=>{e((null==t?void 0:t.stsTokenManager.accessToken)||null)});this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();let t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){v(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}let t7=(0,i.Pz)("authIdTokenMaxAge")||300,t8=null,ne=e=>async t=>{let n=t&&await t.getIdTokenResult(),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>t7)return;let i=null==n?void 0:n.token;t8!==i&&(t8=i,await fetch(e,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))};function nt(e=(0,s.Mq)()){let t=(0,s.qX)(e,"auth");if(t.isInitialized())return t.getImmediate();let n=/**
1287 * @license
1288 * Copyright 2020 Google LLC
1289 *
1290 * Licensed under the Apache License, Version 2.0 (the "License");
1291 * you may not use this file except in compliance with the License.
1292 * You may obtain a copy of the License at
1293 *
1294 *   http://www.apache.org/licenses/LICENSE-2.0
1295 *
1296 * Unless required by applicable law or agreed to in writing, software
1297 * distributed under the License is distributed on an "AS IS" BASIS,
1298 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1299 * See the License for the specific language governing permissions and
1300 * limitations under the License.
1301 */function(e,t){let n=(0,s.qX)(e,"auth");if(n.isInitialized()){let e=n.getImmediate(),r=n.getOptions();if((0,i.vZ)(r,null!=t?t:{}))return e;p(e,"already-initialized")}let r=n.initialize({options:t});return r}(e,{popupRedirectResolver:tJ,persistence:[tb,tn,tr]}),r=(0,i.Pz)("authTokenSyncURL");if(r){var o;let e=ne(r);o=()=>e(n.currentUser),(0,i.m9)(n).beforeAuthStateChanged(e,o),e3(n,t=>e(t))}let a=(0,i.q4)("auth");return a&&function(e,t,n){let r=ew(e);v(r._canInitEmulator,r,"emulator-config-failed"),v(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");let i=!!(null==n?void 0:n.disableWarnings),s=eE(t),{host:o,port:a}=function(e){let t=eE(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};let r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){let e=i[1];return{host:e,port:ex(r.substr(e.length+1))}}{let[e,t]=r.split(":");return{host:e,port:ex(t)}}}(t),l=null===a?"":`:${a}`;r.config.emulator={url:`${s}//${o}${l}/`},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:o,port:a,protocol:s.replace(":",""),options:Object.freeze({disableWarnings:i})}),i||function(){function e(){let 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())}()}(n,`http://${a}`),n}r="Browser",(0,s.Xd)(new l.wA("auth",(e,{options:t})=>{let n=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),s=e.getProvider("app-check-internal"),{apiKey:o,authDomain:a}=n.options;v(o&&!o.includes(":"),"invalid-api-key",{appName:n.name});let l={apiKey:o,authDomain:a,clientPlatform:r,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:ec(r)},u=new eb(n,i,s,l);return function(e,t){let n=(null==t?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(Q);(null==t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,null==t?void 0:t.popupRedirectResolver)}(u,t),u},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,n)=>{let r=e.getProvider("auth-internal");r.initialize()})),(0,s.Xd)(new l.wA("auth-internal",e=>{let t=ew(e.getProvider("auth").getImmediate());return new t3(t)},"PRIVATE").setInstantiationMode("EXPLICIT")),(0,s.KN)(t6,t9,/**
1302 * @license
1303 * Copyright 2020 Google LLC
1304 *
1305 * Licensed under the Apache License, Version 2.0 (the "License");
1306 * you may not use this file except in compliance with the License.
1307 * You may obtain a copy of the License at
1308 *
1309 *   http://www.apache.org/licenses/LICENSE-2.0
1310 *
1311 * Unless required by applicable law or agreed to in writing, software
1312 * distributed under the License is distributed on an "AS IS" BASIS,
1313 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1314 * See the License for the specific language governing permissions and
1315 * limitations under the License.
1316 */function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";default:return}}(r)),(0,s.KN)(t6,t9,"esm2017")},36100:function(e,t,n){"use strict";n.d(t,{JU:function(){return af},ad:function(){return av},cf:function(){return aN}});var r,i,s,o,a,l,u,c=n(47456),h=n(8463),d=n(53333),f=n(74444),p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},m={},g=g||{},v=p||self;function y(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 b(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}function w(e,t,n){return e.call.apply(e.bind,arguments)}function _(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 E(e,t,n){return(E=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?w:_).apply(null,arguments)}function x(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 S(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),s=2;s<arguments.length;s++)i[s-2]=arguments[s];return t.prototype[n].apply(e,i)}}function k(){this.s=this.s,this.o=this.o}k.prototype.s=!1,k.prototype.sa=function(){this.s||(this.s=!0,this.N())},k.prototype.N=function(){if(this.o)for(;this.o.length;)this.o.shift()()};let T=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(let n=0;n<e.length;n++)if(n in e&&e[n]===t)return n;return -1};function I(e){let t=e.length;if(0<t){let n=Array(t);for(let r=0;r<t;r++)n[r]=e[r];return n}return[]}function C(e,t){for(let t=1;t<arguments.length;t++){let n=arguments[t];if(y(n)){let t=e.length||0,r=n.length||0;e.length=t+r;for(let i=0;i<r;i++)e[t+i]=n[i]}else e.push(n)}}function A(e,t){this.type=e,this.g=this.target=t,this.defaultPrevented=!1}A.prototype.h=function(){this.defaultPrevented=!0};var O=function(){if(!v.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{v.addEventListener("test",()=>{},t),v.removeEventListener("test",()=>{},t)}catch(e){}return e}();function R(e){return/^[\s\xa0]*$/.test(e)}function P(){var e=v.navigator;return e&&(e=e.userAgent)?e:""}function N(e){return -1!=P().indexOf(e)}function D(e){return D[" "](e),e}D[" "]=function(){};var M=N("Opera"),L=N("Trident")||N("MSIE"),Z=N("Edge"),j=Z||L,F=N("Gecko")&&!(-1!=P().toLowerCase().indexOf("webkit")&&!N("Edge"))&&!(N("Trident")||N("MSIE"))&&!N("Edge"),U=-1!=P().toLowerCase().indexOf("webkit")&&!N("Edge");function V(){var e=v.document;return e?e.documentMode:void 0}e:{var $,z="",B=($=P(),F?/rv:([^\);]+)(\)|;)/.exec($):Z?/Edge\/([\d\.]+)/.exec($):L?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec($):U?/WebKit\/(\S+)/.exec($):M?/(?:Version)[ \/]?(\S+)/.exec($):void 0);if(B&&(z=B?B[1]:""),L){var q=V();if(null!=q&&q>parseFloat(z)){i=String(q);break e}}i=z}var H=v.document&&L&&(V()||parseInt(i,10))||void 0;function W(e,t){if(A.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(F){e:{try{D(t.nodeName);var i=!0;break e}catch(e){}i=!1}i||(t=null)}}
1316else"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:G[e.pointerType]||"",this.state=e.state,this.i=e,e.defaultPrevented&&W.$.h.call(this)}}S(W,A);var G={2:"touch",3:"pen",4:"mouse"};W.prototype.h=function(){W.$.h.call(this);var e=this.i;e.preventDefault?e.preventDefault():e.returnValue=!1};var K="closure_listenable_"+(1e6*Math.random()|0),Q=0;function Y(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=++Q,this.fa=this.ia=!1}function X(e){e.fa=!0,e.listener=null,e.proxy=null,e.src=null,e.la=null}function J(e,t,n){for(let r in e)t.call(n,e[r],r,e)}function ee(e){let t={};for(let n in e)t[n]=e[n];return t}let et="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function en(e,t){let n,r;for(let t=1;t<arguments.length;t++){for(n in r=arguments[t])e[n]=r[n];for(let t=0;t<et.length;t++)n=et[t],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function er(e){this.src=e,this.g={},this.h=0}function ei(e,t){var n=t.type;if(n in e.g){var r,i=e.g[n],s=T(i,t);(r=0<=s)&&Array.prototype.splice.call(i,s,1),r&&(X(t),0==e.g[n].length&&(delete e.g[n],e.h--))}}function es(e,t,n,r){for(var i=0;i<e.length;++i){var s=e[i];if(!s.fa&&s.listener==t&&!!n==s.capture&&s.la==r)return i}return -1}er.prototype.add=function(e,t,n,r,i){var s=e.toString();(e=this.g[s])||(e=this.g[s]=[],this.h++);var o=es(e,t,r,i);return -1<o?(t=e[o],n||(t.ia=!1)):((t=new Y(t,this.src,s,!!r,i)).ia=n,e.push(t)),t};var eo="closure_lm_"+(1e6*Math.random()|0),ea={};function el(e,t,n,r,i,s){if(!t)throw Error("Invalid event type");var o=b(i)?!!i.capture:!!i,a=ed(e);if(a||(e[eo]=a=new er(e)),(n=a.add(t,n,r,o,s)).proxy)return n;if(r=function e(t){return eh.call(e.src,e.listener,t)},n.proxy=r,r.src=e,r.listener=n,e.addEventListener)O||(i=o),void 0===i&&(i=!1),e.addEventListener(t.toString(),r,i);else if(e.attachEvent)e.attachEvent(ec(t.toString()),r);else if(e.addListener&&e.removeListener)e.addListener(r);else throw Error("addEventListener and attachEvent are unavailable.");return n}function eu(e){if("number"!=typeof e&&e&&!e.fa){var t=e.src;if(t&&t[K])ei(t.i,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(ec(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=ed(t))?(ei(n,e),0==n.h&&(n.src=null,t[eo]=null)):X(e)}}}function ec(e){return e in ea?ea[e]:ea[e]="on"+e}function eh(e,t){if(e.fa)e=!0;else{t=new W(t,this);var n=e.listener,r=e.la||e.src;e.ia&&eu(e),e=n.call(r,t)}return e}function ed(e){return(e=e[eo])instanceof er?e:null}var ef="__closure_events_fn_"+(1e9*Math.random()>>>0);function ep(e){return"function"==typeof e?e:(e[ef]||(e[ef]=function(t){return e.handleEvent(t)}),e[ef])}function em(){k.call(this),this.i=new er(this),this.S=this,this.J=null}function eg(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 A(t,e);else if(t instanceof A)t.target=t.target||e;else{var i=t;en(t=new A(r,e),i)}if(i=!0,n)for(var s=n.length-1;0<=s;s--){var o=t.g=n[s];i=ev(o,r,!0,t)&&i}if(i=ev(o=t.g=e,r,!0,t)&&i,i=ev(o,r,!1,t)&&i,n)for(s=0;s<n.length;s++)i=ev(o=t.g=n[s],r,!1,t)&&i}function ev(e,t,n,r){if(!(t=e.i.g[String(t)]))return!0;t=t.concat();for(var i=!0,s=0;s<t.length;++s){var o=t[s];if(o&&!o.fa&&o.capture==n){var a=o.listener,l=o.la||o.src;o.ia&&ei(e.i,o),i=!1!==a.call(l,r)&&i}}return i&&!r.defaultPrevented}S(em,k),em.prototype[K]=!0,em.prototype.removeEventListener=function(e,t,n,r){!function e(t,n,r,i,s){if(Array.isArray(n))for(var o=0;o<n.length;o++)e(t,n[o],r,i,s);else(i=b(i)?!!i.capture:!!i,r=ep(r),t&&t[K])?(t=t.i,(n=String(n).toString())in t.g&&-1<(r=es(o=t.g[n],r,i,s))&&(X(o[r]),Array.prototype.splice.call(o,r,1),0==o.length&&(delete t.g[n],t.h--))):t&&(t=ed(t))&&(n=t.g[n.toString()],t=-1,n&&(t=es(n,r,i,s)),(r=-1<t?n[t]:null)&&eu(r))}(this,e,t,n,r)},em.prototype.N=function(){if(em.$.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++)X(n[r]);delete t.g[e],t.h--}}this.J=null},em.prototype.O=function(e,t,n,r){return this.i.add(String(e),t,!1,n,r)},em.prototype.P=function(e,t,n,r){return this.i.add(String(e),t,!0,n,r)};var ey=v.JSON.stringify,eb=new class{constructor(e,t){this.i=e,this.j=t,this.h=0,this.g=null}get(){let e;return 0<this.h?(this.h--,e=this.g,this.g=e.next,e.next=null):e=this.i(),e}}(()=>new ew,e=>e.reset());class ew{constructor(){this.next=this.g=this.h=null}set(e,t){this.h=e,this.g=t,this.next=null}reset(){this.next=this.g=this.h=null}}let e_,eE=!1,ex=new class{constructor(){this.h=this.g=null}add(e,t){let n=eb.get();n.set(e,t),this.h?this.h.next=n:this.g=n,this.h=n}},eS=()=>{let e=v.Promise.resolve(void 0);e_=()=>{e.then(ek)}};var ek=()=>{let e;for(;e=null,(t=ex).g&&(e=t.g,t.g=t.g.next,t.g||(t.h=null),e.next=null),n=e;){try{n.h.call(n.g)}catch(e){!function(e){v.setTimeout(()=>{throw e},0)}(e)}var t,n,r=eb;r.j(n),100>r.h&&(r.h++,n.next=r.g,r.g=n)}eE=!1};function eT(e,t){em.call(this),this.h=e||1,this.g=t||v,this.j=E(this.qb,this),this.l=Date.now()}function eI(e){e.ga=!1,e.T&&(e.g.clearTimeout(e.T),e.T=null)}function eC(e,t,n){if("function"==typeof e)n&&(e=E(e,n));else if(e&&"function"==typeof e.handleEvent)e=E(e.handleEvent,e);else throw Error("Invalid listener argument");return 2147483647<Number(t)?-1:v.setTimeout(e,t||0)}S(eT,em),(u=eT.prototype).ga=!1,u.T=null,u.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),eg(this,"tick"),this.ga&&(eI(this),this.start()))}},u.start=function(){this.ga=!0,this.T||(this.T=this.g.setTimeout(this.j,this.h),this.l=Date.now())},u.N=function(){eT.$.N.call(this),eI(this),delete this.g};class eA extends k{constructor(e,t){super(),this.m=e,this.j=t,this.h=null,this.i=!1,this.g=null}l(e){this.h=arguments,this.g?this.i=!0:function e(t){t.g=eC(()=>{t.g=null,t.i&&(t.i=!1,e(t))},t.j);let n=t.h;t.h=null,t.m.apply(null,n)}(this)}N(){super.N(),this.g&&(v.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function eO(e){k.call(this),this.h=e,this.g={}}S(eO,k);var eR=[];function eP(e,t,n,r){Array.isArray(n)||(n&&(eR[0]=n.toString()),n=eR);for(var i=0;i<n.length;i++){var s=function e(t,n,r,i,s){if(i&&i.once)return function e(t,n,r,i,s){if(Array.isArray(n)){for(var o=0;o<n.length;o++)e(t,n[o],r,i,s);return null}return r=ep(r),t&&t[K]?t.P(n,r,b(i)?!!i.capture:!!i,s):el(t,n,r,!0,i,s)}(t,n,r,i,s);if(Array.isArray(n)){for(var o=0;o<n.length;o++)e(t,n[o],r,i,s);return null}return r=ep(r),t&&t[K]?t.O(n,r,b(i)?!!i.capture:!!i,s):el(t,n,r,!1,i,s)}(t,n[i],r||e.handleEvent,!1,e.h||e);if(!s)break;e.g[s.key]=s}}function eN(e){J(e.g,function(e,t){this.g.hasOwnProperty(t)&&eu(e)},e),e.g={}}function eD(){this.g=!0}function eM(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 s=i[0];if("noop"!=s&&"stop"!=s&&"close"!=s)for(var o=1;o<i.length;o++)i[o]=""}}}}return ey(n)}catch(e){return t}}(e,n)+(r?" "+r:"")})}
1316eO.prototype.N=function(){eO.$.N.call(this),eN(this)},eO.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},eD.prototype.Ea=function(){this.g=!1},eD.prototype.info=function(){};var eL={},eZ=null;function ej(){return eZ=eZ||new em}function eF(e){A.call(this,eL.Ta,e)}function eU(e){let t=ej();eg(t,new eF(t))}function eV(e,t){A.call(this,eL.STAT_EVENT,e),this.stat=t}function e$(e){let t=ej();eg(t,new eV(t,e))}function ez(e,t){A.call(this,eL.Ua,e),this.size=t}function eB(e,t){if("function"!=typeof e)throw Error("Fn must not be null and must be a function");return v.setTimeout(function(){e()},t)}eL.Ta="serverreachability",S(eF,A),eL.STAT_EVENT="statevent",S(eV,A),eL.Ua="timingevent",S(ez,A);var eq={NO_ERROR:0,rb:1,Eb:2,Db:3,yb:4,Cb:5,Fb:6,Qa:7,TIMEOUT:8,Ib:9},eH={wb:"complete",Sb:"success",Ra:"error",Qa:"abort",Kb:"ready",Lb:"readystatechange",TIMEOUT:"timeout",Gb:"incrementaldata",Jb:"progress",zb:"downloadprogress",$b:"uploadprogress"};function eW(){}function eG(e){return e.h||(e.h=e.i())}function eK(){}eW.prototype.h=null;var eQ={OPEN:"a",vb:"b",Ra:"c",Hb:"d"};function eY(){A.call(this,"d")}function eX(){A.call(this,"c")}function eJ(){}function e0(e,t,n,r){this.l=e,this.j=t,this.m=n,this.W=r||1,this.U=new eO(this),this.P=e2,e=j?125:void 0,this.V=new eT(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.ca=-1,this.J=!1,this.O=0,this.M=null,this.ba=this.K=this.aa=this.S=!1,this.h=new e1}function e1(){this.i=null,this.g="",this.h=!1}S(eY,A),S(eX,A),S(eJ,eW),eJ.prototype.g=function(){return new XMLHttpRequest},eJ.prototype.i=function(){return{}},o=new eJ;var e2=45e3,e4={},e5={};function e6(e,t,n){e.L=1,e.v=tf(tl(t)),e.s=n,e.S=!0,e9(e,null)}function e9(e,t){e.G=Date.now(),e8(e),e.A=tl(e.v);var n=e.A,r=e.W;Array.isArray(r)||(r=[String(r)]),tT(n.i,"t",r),e.C=0,n=e.l.J,e.h=new e1,e.g=nm(e.l,n?t:null,!e.s),0<e.O&&(e.M=new eA(E(e.Pa,e,e.g),e.O)),eP(e.U,e.g,"readystatechange",e.nb),t=e.I?ee(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)),eU(),function(e,t,n,r,i,s){e.info(function(){if(e.g){if(s)for(var o="",a=s.split("&"),l=0;l<a.length;l++){var u=a[l].split("=");if(1<u.length){var c=u[0];u=u[1];var h=c.split("_");o=2<=h.length&&"type"==h[1]?o+(c+"=")+u+"&":o+(c+"=redacted&")}}else o=null}else o=s;return"XMLHTTP REQ ("+r+") [attempt "+i+"]: "+t+"\n"+n+"\n"+o})}(e.j,e.u,e.A,e.m,e.W,e.s)}function e3(e){return!!e.g&&"GET"==e.u&&2!=e.L&&e.l.Ha}function e7(e,t,n){let r=!0,i;for(;!e.J&&e.C<n.length;)if((i=function(e,t){var n=e.C,r=t.indexOf("\n",n);return -1==r?e5:isNaN(n=Number(t.substring(n,r)))?e4:(r+=1)+n>t.length?e5:(t=t.slice(r,r+n),e.C=r+n,t)}(e,n))==e5){4==t&&(e.o=4,e$(14),r=!1),eM(e.j,e.m,null,"[Incomplete Response]");break}else if(i==e4){e.o=4,e$(15),eM(e.j,e.m,n,"[Invalid Chunk]"),r=!1;break}else eM(e.j,e.m,i,null),ti(e,i);e3(e)&&i!=e5&&i!=e4&&(e.h.g="",e.C=0),4!=t||0!=n.length||e.h.h||(e.o=1,e$(16),r=!1),e.i=e.i&&r,r?0<n.length&&!e.ba&&(e.ba=!0,(t=e.l).g==e&&t.ca&&!t.M&&(t.l.info("Great, no buffering proxy detected. Bytes received: "+n.length),na(t),t.M=!0,e$(11))):(eM(e.j,e.m,n,"[Invalid Chunked Response]"),tr(e),tn(e))}function e8(e){e.Y=Date.now()+e.P,te(e,e.P)}function te(e,t){if(null!=e.B)throw Error("WatchDog timer not null");e.B=eB(E(e.lb,e),t)}function tt(e){e.B&&(v.clearTimeout(e.B),e.B=null)}function tn(e){0==e.l.H||e.J||nc(e.l,e)}function tr(e){tt(e);var t=e.M;t&&"function"==typeof t.sa&&t.sa(),e.M=null,eI(e.V),eN(e.U),e.g&&(t=e.g,e.g=null,t.abort(),t.sa())}function ti(e,t){try{var n=e.l;if(0!=n.H&&(n.g==e||tN(n.i,e))){if(!e.K&&tN(n.i,e)&&3==n.H){try{var r=n.Ja.g.parse(t)}catch(e){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)nu(n),t8(n);else break e}no(n),e$(18)}}else n.Fa=i[1],0<n.Fa-n.V&&37500>i[2]&&n.G&&0==n.A&&!n.v&&(n.v=eB(E(n.ib,n),6e3));if(1>=tP(n.i)&&n.oa){try{n.oa()}catch(e){}n.oa=void 0}}else nd(n,11)}else if((e.K||n.g==e)&&nu(n),!R(t))for(i=n.Ja.g.parse(t),t=0;t<i.length;t++){let a=i[t];if(n.V=a[0],a=a[1],2==n.H){if("c"==a[0]){n.K=a[1],n.pa=a[2];let t=a[3];null!=t&&(n.ra=t,n.l.info("VER="+n.ra));let i=a[4];null!=i&&(n.Ga=i,n.l.info("SVER="+n.Ga));let l=a[5];null!=l&&"number"==typeof l&&0<l&&(r=1.5*l,n.L=r,n.l.info("backChannelRequestTimeoutMs_="+r)),r=n;let u=e.g;if(u){let e=u.g?u.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(e){var s=r.i;s.g||-1==e.indexOf("spdy")&&-1==e.indexOf("quic")&&-1==e.indexOf("h2")||(s.j=s.l,s.g=new Set,s.h&&(tD(s,s.h),s.h=null))}if(r.F){let e=u.g?u.g.getResponseHeader("X-HTTP-Session-Id"):null;e&&(r.Da=e,td(r.I,r.F,e))}}if(n.H=3,n.h&&n.h.Ba(),n.ca&&(n.S=Date.now()-e.G,n.l.info("Handshake RTT: "+n.S+"ms")),(r=n).wa=np(r,r.J?r.pa:null,r.Y),e.K){tM(r.i,e);var o=r.L;o&&e.setTimeout(o),e.B&&(tt(e),e8(e)),r.g=e}else ns(r);0<n.j.length&&nt(n)}else"stop"!=a[0]&&"close"!=a[0]||nd(n,7)}else 3==n.H&&("stop"==a[0]||"close"==a[0]?"stop"==a[0]?nd(n,7):t7(n):"noop"!=a[0]&&n.h&&n.h.Aa(a),n.A=0)}}eU(4)}catch(e){}}function ts(e,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(t,void 0);else if(y(e)||"string"==typeof e)Array.prototype.forEach.call(e,t,void 0);else for(var n=function(e){if(e.ta&&"function"==typeof e.ta)return e.ta();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(y(e)||"string"==typeof e){var t=[];e=e.length;for(var n=0;n<e;n++)t.push(n);return t}for(let 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("");
1316if(y(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,s=0;s<i;s++)t.call(void 0,r[s],n&&n[s],e)}(u=e0.prototype).setTimeout=function(e){this.P=e},u.nb=function(e){e=e.target;let t=this.M;t&&3==t2(e)?t.l():this.Pa(e)},u.Pa=function(e){try{if(e==this.g)e:{let c=t2(this.g);var t=this.g.Ia();let h=this.g.da();if(!(3>c)&&(3!=c||j||this.g&&(this.h.h||this.g.ja()||t4(this.g)))){this.J||4!=c||7==t||(8==t||0>=h?eU(3):eU(2)),tt(this);var n=this.g.da();this.ca=n;t:if(e3(this)){var r=t4(this.g);e="";var i=r.length,s=4==t2(this.g);if(!this.h.i){if("undefined"==typeof TextDecoder){tr(this),tn(this);var o="";break t}this.h.i=new v.TextDecoder}for(t=0;t<i;t++)this.h.h=!0,e+=this.h.i.decode(r[t],{stream:s&&t==i-1});r.splice(0,i),this.h.g+=e,this.C=0,o=this.h.g}else o=this.g.ja();if(this.i=200==n,function(e,t,n,r,i,s,o){e.info(function(){return"XMLHTTP RESP ("+r+") [ attempt "+i+"]: "+t+"\n"+n+"\n"+s+" "+o})}(this.j,this.u,this.A,this.m,this.W,c,n),this.i){if(this.aa&&!this.K){t:{if(this.g){var a,l=this.g;if((a=l.g?l.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!R(a)){var u=a;break t}}u=null}if(n=u)eM(this.j,this.m,n,"Initial handshake response via X-HTTP-Initial-Response"),this.K=!0,ti(this,n);else{this.i=!1,this.o=3,e$(12),tr(this),tn(this);break e}}this.S?(e7(this,c,o),j&&this.i&&3==c&&(eP(this.U,this.V,"tick",this.mb),this.V.start())):(eM(this.j,this.m,o,null),ti(this,o)),4==c&&tr(this),this.i&&!this.J&&(4==c?nc(this.l,this):(this.i=!1,e8(this)))}else(function(e){let t={};e=(e.g&&2<=t2(e)&&e.g.getAllResponseHeaders()||"").split("\r\n");for(let r=0;r<e.length;r++){if(R(e[r]))continue;var n=function(e){var t=1;e=e.split(":");let n=[];for(;0<t&&e.length;)n.push(e.shift()),t--;return e.length&&n.push(e.join(":")),n}(e[r]);let i=n[0];if("string"!=typeof(n=n[1]))continue;n=n.trim();let s=t[i]||[];t[i]=s,s.push(n)}!function(e,t){for(let n in e)t.call(void 0,e[n],n,e)}(t,function(e){return e.join(", ")})})(this.g),400==n&&0<o.indexOf("Unknown SID")?(this.o=3,e$(12)):(this.o=0,e$(13)),tr(this),tn(this)}}}catch(e){}finally{}},u.mb=function(){if(this.g){var e=t2(this.g),t=this.g.ja();this.C<t.length&&(tt(this),e7(this,e,t),this.i&&4!=e&&e8(this))}},u.cancel=function(){this.J=!0,tr(this)},u.lb=function(){this.B=null;let e=Date.now();0<=e-this.Y?(function(e,t){e.info(function(){return"TIMEOUT: "+t})}(this.j,this.A),2!=this.L&&(eU(),e$(17)),tr(this),this.o=2,tn(this)):te(this,this.Y-e)};var to=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function ta(e){if(this.g=this.s=this.j="",this.m=null,this.o=this.l="",this.h=!1,e instanceof ta){this.h=e.h,tu(this,e.j),this.s=e.s,this.g=e.g,tc(this,e.m),this.l=e.l;var t=e.i,n=new tE;n.i=t.i,t.g&&(n.g=new Map(t.g),n.h=t.h),th(this,n),this.o=e.o}else e&&(t=String(e).match(to))?(this.h=!1,tu(this,t[1]||"",!0),this.s=tp(t[2]||""),this.g=tp(t[3]||"",!0),tc(this,t[4]),this.l=tp(t[5]||"",!0),th(this,t[6]||"",!0),this.o=tp(t[7]||"")):(this.h=!1,this.i=new tE(null,this.h))}function tl(e){return new ta(e)}function tu(e,t,n){e.j=n?tp(t,!0):t,e.j&&(e.j=e.j.replace(/:$/,""))}function tc(e,t){if(t){if(isNaN(t=Number(t))||0>t)throw Error("Bad port number "+t);e.m=t}else e.m=null}function th(e,t,n){var r,i;t instanceof tE?(e.i=t,r=e.i,(i=e.h)&&!r.j&&(tx(r),r.i=null,r.g.forEach(function(e,t){var n=t.toLowerCase();t!=n&&(tS(this,t),tT(this,n,e))},r)),r.j=i):(n||(t=tm(t,tw)),e.i=new tE(t,e.h))}function td(e,t,n){e.i.set(t,n)}function tf(e){return td(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),e}function tp(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function tm(e,t,n){return"string"==typeof e?(e=encodeURI(e).replace(t,tg),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function tg(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}ta.prototype.toString=function(){var e=[],t=this.j;t&&e.push(tm(t,tv,!0),":");var n=this.g;return(n||"file"==t)&&(e.push("//"),(t=this.s)&&e.push(tm(t,tv,!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(tm(n,"/"==n.charAt(0)?tb:ty,!0))),(n=this.i.toString())&&e.push("?",n),(n=this.o)&&e.push("#",tm(n,t_)),e.join("")};var tv=/[#\/\?@]/g,ty=/[#\?:]/g,tb=/[#\?]/g,tw=/[#\?@]/g,t_=/#/g;function tE(e,t){this.h=this.g=null,this.i=e||null,this.j=!!t}function tx(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 s=e[n].substring(0,r);i=e[n].substring(r+1)}else s=e[n];t(s,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(e.i,function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)}))}function tS(e,t){tx(e),t=tI(e,t),e.g.has(t)&&(e.i=null,e.h-=e.g.get(t).length,e.g.delete(t))}function tk(e,t){return tx(e),t=tI(e,t),e.g.has(t)}function tT(e,t,n){tS(e,t),0<n.length&&(e.i=null,e.g.set(tI(e,t),I(n)),e.h+=n.length)}function tI(e,t){return t=String(t),e.j&&(t=t.toLowerCase()),t}(u=tE.prototype).add=function(e,t){tx(this),this.i=null,e=tI(this,e);var n=this.g.get(e);return n||this.g.set(e,n=[]),n.push(t),this.h+=1,this},u.forEach=function(e,t){tx(this),this.g.forEach(function(n,r){n.forEac
1316h(function(n){e.call(t,n,r,this)},this)},this)},u.ta=function(){tx(this);let e=Array.from(this.g.values()),t=Array.from(this.g.keys()),n=[];for(let r=0;r<t.length;r++){let i=e[r];for(let e=0;e<i.length;e++)n.push(t[r])}return n},u.Z=function(e){tx(this);let t=[];if("string"==typeof e)tk(this,e)&&(t=t.concat(this.g.get(tI(this,e))));else{e=Array.from(this.g.values());for(let n=0;n<e.length;n++)t=t.concat(e[n])}return t},u.set=function(e,t){return tx(this),this.i=null,tk(this,e=tI(this,e))&&(this.h-=this.g.get(e).length),this.g.set(e,[t]),this.h+=1,this},u.get=function(e,t){return e&&0<(e=this.Z(e)).length?String(e[0]):t},u.toString=function(){if(this.i)return this.i;if(!this.g)return"";let e=[],t=Array.from(this.g.keys());for(var n=0;n<t.length;n++){var r=t[n];let s=encodeURIComponent(String(r)),o=this.Z(r);for(r=0;r<o.length;r++){var i=s;""!==o[r]&&(i+="="+encodeURIComponent(String(o[r]))),e.push(i)}}return this.i=e.join("&")};var tC=class{constructor(e,t){this.g=e,this.map=t}};function tA(e){this.l=e||tO,e=v.PerformanceNavigationTiming?0<(e=v.performance.getEntriesByType("navigation")).length&&("hq"==e[0].nextHopProtocol||"h2"==e[0].nextHopProtocol):!!(v.g&&v.g.Ka&&v.g.Ka()&&v.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 tO=10;function tR(e){return!!e.h||!!e.g&&e.g.size>=e.j}function tP(e){return e.h?1:e.g?e.g.size:0}function tN(e,t){return e.h?e.h==t:!!e.g&&e.g.has(t)}function tD(e,t){e.g?e.g.add(t):e.h=t}function tM(e,t){e.h&&e.h==t?e.h=null:e.g&&e.g.has(t)&&e.g.delete(t)}function tL(e){if(null!=e.h)return e.i.concat(e.h.F);if(null!=e.g&&0!==e.g.size){let t=e.i;for(let n of e.g.values())t=t.concat(n.F);return t}return I(e.i)}tA.prototype.cancel=function(){if(this.i=tL(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){for(let e of this.g.values())e.cancel();this.g.clear()}};var tZ=class{stringify(e){return v.JSON.stringify(e,void 0)}parse(e){return v.JSON.parse(e,void 0)}};function tj(){this.g=new tZ}function tF(e,t,n,r,i){try{t.onload=null,t.onerror=null,t.onabort=null,t.ontimeout=null,i(r)}catch(e){}}function tU(e){this.l=e.fc||null,this.j=e.ob||!1}function tV(e,t){em.call(this),this.F=e,this.u=t,this.m=void 0,this.readyState=t$,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}S(tU,eW),tU.prototype.g=function(){return new tV(this.l,this.j)},tU.prototype.i=(r={},function(){return r}),S(tV,em);var t$=0;function tz(e){e.j.read().then(e.Xa.bind(e)).catch(e.ka.bind(e))}function tB(e){e.readyState=4,e.l=null,e.j=null,e.A=null,tq(e)}function tq(e){e.onreadystatechange&&e.onreadystatechange.call(e)}(u=tV.prototype).open=function(e,t){if(this.readyState!=t$)throw this.abort(),Error("Error reopening a connection");this.C=e,this.B=t,this.readyState=1,tq(this)},u.send=function(e){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.g=!0;let t={headers:this.v,method:this.C,credentials:this.m,cache:void 0};e&&(t.body=e),(this.F||v).fetch(new Request(this.B,t)).then(this.$a.bind(this),this.ka.bind(this))},u.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,tB(this)),this.readyState=t$},u.$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,tq(this)),this.g&&(this.readyState=3,tq(this),this.g))){if("arraybuffer"===this.responseType)e.arrayBuffer().then(this.Ya.bind(this),this.ka.bind(this));else if(void 0!==v.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;tz(this)}else e.text().then(this.Za.bind(this),this.ka.bind(this))}},u.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?tB(this):tq(this),3==this.readyState&&tz(this)}},u.Za=function(e){this.g&&(this.response=this.responseText=e,tB(this))},u.Ya=function(e){this.g&&(this.response=e,tB(this))},u.ka=function(){this.g&&tB(this)},u.setRequestHeader=function(e,t){this.v.append(e,t)},u.getResponseHeader=function(e){return this.h&&this.h.get(e.toLowerCase())||""},u.getAllResponseHeaders=function(){if(!this.h)return"";let e=[],t=this.h.entries();for(var n=t.next();!n.done;)e.push((n=n.value)[0]+": "+n[1]),n=t.next();return e.join("\r\n")},Object.defineProperty(tV.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(e){this.m=e?"include":"same-origin"}});var tH=v.JSON.parse;function tW(e){em.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=tG,this.L=this.M=!1}S(tW,em);var tG="",tK=/^https?$/i,tQ=["POST","PUT"];function tY(e,t){e.h=!1,e.g&&(e.l=!0,e.g.abort(),e.l=!1),e.j=t,e.m=5,tX(e),t0(e)}function tX(e){e.F||(e.F=!0,eg(e,"complete"),eg(e,"error"))}function tJ(e){if(e.h&&void 0!==g&&(!e.C[1]||4!=t2(e)||2!=e.da())){if(e.v&&4==t2(e))eC(e.La,0,e);else if(eg(e,"readystatechange"),4==t2(e)){e.h=!1;try{let o=e.da();e:switch(o){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var t,n,r=!0;break e;default:r=!1}if(!(t=r)){if(n=0===o){var i=String(e.I).match(to)[1]||null;!i&&v.self&&v.self.location&&(i=v.self.location.protocol.slice(0,-1)),n=!tK.test(i?i.toLowerCase():"")}t=n}if(t)eg(e,"complete"),eg(e,"success");else{e.m=6;try{var s=2<t2(e)?e.g.statusText:""}catch(e){s=""}e.j=s+" ["+e.da()+"]",tX(e)}}finally{t0(e)}}}}function t0(e,t){if(e.g){t1(e);let n=e.g,r=e.C[0]?()=>{}:null;e.g=null,e.C=null,t||eg(e,"ready");try{n.onreadystatechange=r}catch(e){}}}
1316function t1(e){e.g&&e.L&&(e.g.ontimeout=null),e.A&&(v.clearTimeout(e.A),e.A=null)}function t2(e){return e.g?e.g.readyState:0}function t4(e){try{if(!e.g)return null;if("response"in e.g)return e.g.response;switch(e.K){case tG:case"text":return e.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in e.g)return e.g.mozResponseArrayBuffer}return null}catch(e){return null}}function t5(e){let t="";return J(e,function(e,n){t+=n+":"+e+"\r\n"}),t}function t6(e,t,n){e:{for(r in n){var r=!1;break e}r=!0}r||(n=t5(n),"string"==typeof e?null!=n&&encodeURIComponent(String(n)):td(e,t,n))}function t9(e,t,n){return n&&n.internalChannelParams&&n.internalChannelParams[e]||t}function t3(e){this.Ga=0,this.j=[],this.l=new eD,this.pa=this.wa=this.I=this.Y=this.g=this.Da=this.F=this.na=this.o=this.U=this.s=null,this.fb=this.W=0,this.cb=t9("failFast",!1,e),this.G=this.v=this.u=this.m=this.h=null,this.aa=!0,this.Fa=this.V=-1,this.ba=this.A=this.C=0,this.ab=t9("baseRetryDelayMs",5e3,e),this.hb=t9("retryDelaySeedMs",1e4,e),this.eb=t9("forwardChannelMaxRetries",2,e),this.xa=t9("forwardChannelRequestTimeoutMs",2e4,e),this.va=e&&e.xmlHttpFactory||void 0,this.Ha=e&&e.dc||!1,this.L=void 0,this.J=e&&e.supportsCrossDomainXhr||!1,this.K="",this.i=new tA(e&&e.concurrentRequestLimit),this.Ja=new tj,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.l.Ea(),e&&e.forceLongPolling&&(this.aa=!1),this.ca=!this.P&&this.aa&&e&&e.detectBufferingProxy||!1,this.qa=void 0,e&&e.longPollingTimeout&&0<e.longPollingTimeout&&(this.qa=e.longPollingTimeout),this.oa=void 0,this.S=0,this.M=!1,this.ma=this.B=null}function t7(e){if(ne(e),3==e.H){var t=e.W++,n=tl(e.I);if(td(n,"SID",e.K),td(n,"RID",t),td(n,"TYPE","terminate"),nr(e,n),(t=new e0(e,e.l,t)).L=2,t.v=tf(tl(n)),n=!1,v.navigator&&v.navigator.sendBeacon)try{n=v.navigator.sendBeacon(t.v.toString(),"")}catch(e){}!n&&v.Image&&((new Image).src=t.v,n=!0),n||(t.g=nm(t.l,null),t.g.ha(t.v)),t.G=Date.now(),e8(t)}nf(e)}function t8(e){e.g&&(na(e),e.g.cancel(),e.g=null)}function ne(e){t8(e),e.u&&(v.clearTimeout(e.u),e.u=null),nu(e),e.i.cancel(),e.m&&("number"==typeof e.m&&v.clearTimeout(e.m),e.m=null)}function nt(e){if(!tR(e.i)&&!e.m){e.m=!0;var t=e.Na;e_||eS(),eE||(e_(),eE=!0),ex.add(t,e),e.C=0}}function nn(e,t){var n;n=t?t.m:e.W++;let r=tl(e.I);td(r,"SID",e.K),td(r,"RID",n),td(r,"AID",e.V),nr(e,r),e.o&&e.s&&t6(r,e.o,e.s),n=new e0(e,e.l,n,e.C+1),null===e.o&&(n.I=e.s),t&&(e.j=t.F.concat(e.j)),t=ni(e,n,1e3),n.setTimeout(Math.round(.5*e.xa)+Math.round(.5*e.xa*Math.random())),tD(e.i,n),e6(n,r,t)}function nr(e,t){e.na&&J(e.na,function(e,n){td(t,n,e)}),e.h&&ts({},function(e,n){td(t,n,e)})}function ni(e,t,n){n=Math.min(e.j.length,n);var r=e.h?E(e.h.Va,e.h,e):null;e:{var i=e.j;let t=-1;for(;;){let e=["count="+n];-1==t?0<n?(t=i[0].g,e.push("ofs="+t)):t=0:e.push("ofs="+t);let s=!0;for(let o=0;o<n;o++){let n=i[o].g,a=i[o].map;if(0>(n-=t))t=Math.max(0,i[o].g-100),s=!1;else try{!function(e,t,n){let r=n||"";try{ts(e,function(e,n){let i=e;b(e)&&(i=ey(e)),t.push(r+n+"="+encodeURIComponent(i))})}catch(e){throw t.push(r+"type="+encodeURIComponent("_badmap")),e}}(a,e,"req"+n+"_")}catch(e){r&&r(a)}}if(s){r=e.join("&");break e}}}return e=e.j.splice(0,n),t.F=e,r}function ns(e){if(!e.g&&!e.u){e.ba=1;var t=e.Ma;e_||eS(),eE||(e_(),eE=!0),ex.add(t,e),e.A=0}}function no(e){return!e.g&&!e.u&&!(3<=e.A)&&(e.ba++,e.u=eB(E(e.Ma,e),nh(e,e.A)),e.A++,!0)}function na(e){null!=e.B&&(v.clearTimeout(e.B),e.B=null)}function nl(e){e.g=new e0(e,e.l,"rpc",e.ba),null===e.o&&(e.g.I=e.s),e.g.O=0;var t=tl(e.wa);td(t,"RID","rpc"),td(t,"SID",e.K),td(t,"AID",e.V),td(t,"CI",e.G?"0":"1"),!e.G&&e.qa&&td(t,"TO",e.qa),td(t,"TYPE","xmlhttp"),nr(e,t),e.o&&e.s&&t6(t,e.o,e.s),e.L&&e.g.setTimeout(e.L);var n=e.g;e=e.pa,n.L=1,n.v=tf(tl(t)),n.s=null,n.S=!0,e9(n,e)}function nu(e){null!=e.v&&(v.clearTimeout(e.v),e.v=null)}function nc(e,t){var n=null;if(e.g==t){nu(e),na(e),e.g=null;var r=2}else{if(!tN(e.i,t))return;n=t.F,tM(e.i,t),r=1}if(0!=e.H){if(t.i){if(1==r){n=t.s?t.s.length:0,t=Date.now()-t.G;var i,s,o=e.C;eg(r=ej(),new ez(r,n)),nt(e)}else ns(e)}else if(3==(o=t.o)||0==o&&0<t.ca||!(1==r&&(i=e,s=t,!(tP(i.i)>=i.i.j-(i.m?1:0))&&(i.m?(i.j=s.F.concat(i.j),!0):1!=i.H&&2!=i.H&&!(i.C>=(i.cb?0:i.eb))&&(i.m=eB(E(i.Na,i,s),nh(i,i.C)),i.C++,!0)))||2==r&&no(e)))switch(n&&0<n.length&&((t=e.i).i=t.i.concat(n)),o){case 1:nd(e,5);break;case 4:nd(e,10);break;case 3:nd(e,6);break;default:nd(e,2)}}}function nh(e,t){let n=e.ab+Math.floor(Math.random()*e.hb);return e.isActive()||(n*=2),n*t}
1316function nd(e,t){if(e.l.info("Error code "+t),2==t){var n=null;e.h&&(n=null);var r=E(e.pb,e);n||(n=new ta("//www.google.com/images/cleardot.gif"),v.location&&"http"==v.location.protocol||tu(n,"https"),tf(n)),function(e,t){let n=new eD;if(v.Image){let r=new Image;r.onload=x(tF,n,r,"TestLoadImage: loaded",!0,t),r.onerror=x(tF,n,r,"TestLoadImage: error",!1,t),r.onabort=x(tF,n,r,"TestLoadImage: abort",!1,t),r.ontimeout=x(tF,n,r,"TestLoadImage: timeout",!1,t),v.setTimeout(function(){r.ontimeout&&r.ontimeout()},1e4),r.src=e}else t(!1)}(n.toString(),r)}else e$(2);e.H=0,e.h&&e.h.za(t),nf(e),ne(e)}function nf(e){if(e.H=0,e.ma=[],e.h){let t=tL(e.i);(0!=t.length||0!=e.j.length)&&(C(e.ma,t),C(e.ma,e.j),e.i.i.length=0,I(e.j),e.j.length=0),e.h.ya()}}function np(e,t,n){var r=n instanceof ta?tl(n):new ta(n);if(""!=r.g)t&&(r.g=t+"."+r.g),tc(r,r.m);else{var i=v.location;r=i.protocol,t=t?t+"."+i.hostname:i.hostname,i=+i.port;var s=new ta(null);r&&tu(s,r),t&&(s.g=t),i&&tc(s,i),n&&(s.l=n),r=s}return n=e.F,t=e.Da,n&&t&&td(r,n,t),td(r,"VER",e.ra),nr(e,r),r}function nm(e,t,n){if(t&&!e.J)throw Error("Can't create secondary domain capable XhrIo object.");return(t=new tW(n&&e.Ha&&!e.va?new tU({ob:!0}):e.va)).Oa(e.J),t}function ng(){}function nv(){if(L&&!(10<=Number(H)))throw Error("Environmental error: no available transport.")}function ny(e,t){em.call(this),this.g=new t3(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)&&!R(e)&&(this.g.o=e),this.A=t&&t.supportsCrossDomainXhr||!1,this.v=t&&t.sendRawJson||!1,(t=t&&t.httpSessionIdParam)&&!R(t)&&(this.g.F=t,null!==(e=this.h)&&t in e&&t in(e=this.h)&&delete e[t]),this.j=new n_(this)}function nb(e){eY.call(this),e.__headers__&&(this.headers=e.__headers__,this.statusCode=e.__status__,delete e.__headers__,delete e.__status__);var t=e.__sm__;if(t){e:{for(let 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 nw(){eX.call(this),this.status=1}function n_(e){this.g=e}function nE(){this.blockSize=-1,this.blockSize=64,this.g=[,,,,],this.m=Array(this.blockSize),this.i=this.h=0,this.reset()}function nx(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 s=e.g[3],o=t+(s^n&(i^s))+r[0]+3614090360&4294967295;o=s+(i^(t=n+(o<<7&4294967295|o>>>25))&(n^i))+r[1]+3905402710&4294967295,o=i+(n^(s=t+(o<<12&4294967295|o>>>20))&(t^n))+r[2]+606105819&4294967295,o=n+(t^(i=s+(o<<17&4294967295|o>>>15))&(s^t))+r[3]+3250441966&4294967295,o=t+(s^(n=i+(o<<22&4294967295|o>>>10))&(i^s))+r[4]+4118548399&4294967295,o=s+(i^(t=n+(o<<7&4294967295|o>>>25))&(n^i))+r[5]+1200080426&4294967295,o=i+(n^(s=t+(o<<12&4294967295|o>>>20))&(t^n))+r[6]+2821735955&4294967295,o=n+(t^(i=s+(o<<17&4294967295|o>>>15))&(s^t))+r[7]+4249261313&4294967295,o=t+(s^(n=i+(o<<22&4294967295|o>>>10))&(i^s))+r[8]+1770035416&4294967295,o=s+(i^(t=n+(o<<7&4294967295|o>>>25))&(n^i))+r[9]+2336552879&4294967295,o=i+(n^(s=t+(o<<12&4294967295|o>>>20))&(t^n))+r[10]+4294925233&4294967295,o=n+(t^(i=s+(o<<17&4294967295|o>>>15))&(s^t))+r[11]+2304563134&4294967295,o=t+(s^(n=i+(o<<22&4294967295|o>>>10))&(i^s))+r[12]+1804603682&4294967295,o=s+(i^(t=n+(o<<7&4294967295|o>>>25))&(n^i))+r[13]+4254626195&4294967295,o=i+(n^(s=t+(o<<12&4294967295|o>>>20))&(t^n))+r[14]+2792965006&4294967295,o=n+(t^(i=s+(o<<17&4294967295|o>>>15))&(s^t))+r[15]+1236535329&4294967295,n=i+(o<<22&4294967295|o>>>10),o=t+(i^s&(n^i))+r[1]+4129170786&4294967295,t=n+(o<<5&4294967295|o>>>27),o=s+(n^i&(t^n))+r[6]+3225465664&4294967295,s=t+(o<<9&4294967295|o>>>23),o=i+(t^n&(s^t))+r[11]+643717713&4294967295,i=s+(o<<14&4294967295|o>>>18),o=n+(s^t&(i^s))+r[0]+3921069994&4294967295,n=i+(o<<20&4294967295|o>>>12),o=t+(i^s&(n^i))+r[5]+3593408605&4294967295,t=n+(o<<5&4294967295|o>>>27),o=s+(n^i&(t^n))+r[10]+38016083&4294967295,s=t+(o<<9&4294967295|o>>>23),o=i+(t^n&(s^t))+r[15]+3634488961&4294967295,i=s+(o<<14&4294967295|o>>>18),o=n+(s^t&(i^s))+r[4]+3889429448&4294967295,n=i+(o<<20&4294967295|o>>>12),o=t+(i^s&(n^i))+r[9]+568446438&4294967295,t=n+(o<<5&4294967295|o>>>27),o=s+(n^i&(t^n))+r[14]+3275163606&4294967295,s=t+(o<<9&4294967295|o>>>23),o=i+(t^n&(s^t))+r[3]+4107603335&4294967295,i=s+(o<<14&4294967295|o>>>18),o=n+(s^t&(i^s))+r[8]+1163531501&4294967295,n=i+(o<<20&4294967295|o>>>12),o=t+(i^s&(n^i))+r[13]+2850285829&4294967295,t=n+(o<<5&4294967295|o>>>27),o=s+(n^i&(t^n))+r[2]+4243563512&4294967295,s=t+(o<<9&4294967295|o>>>23),o=i+(t^n&(s^t))+r[7]+1735328473&4294967295,i=s+(o<<14&4294967295|o>>>18),o=n+(s^t&(i^s))+r[12]+2368359562&4294967295,o=t+((n=i+(o<<20&4294967295|o>>>12))^i^s)+r[5]+4294588738&4294967295,o=s+((t=n+(o<<4&4294967295|o>>>28))^n^i)+r[8]+2272392833&4294967295,o=i+((s=t+(o<<11&4294967295|o>>>21))^t^n)+r[11]+1839030562&4294967295,o=n+((i=s+(o<<16&4294967295|o>>>16))^s^t)+r[14]+4259657740&4294967295,o=t+((n=i+(o<<23&4294967295|o>>>9))^i^s)+r[1]+2763975236&4294967295,o=s+((t=n+(o<<4&4294967295|o>>>28))^n^i)+r[4]+1272893353&4294967295,o=i+((s=t+(o<<11&4294967295|o>>>21))^t^n)+r[7]+4139469664&4294967295,o=n+((i=s+(o<<16&4294967295|o>>>16))^s^t)+r[10]+3200236656&4294967295,o=t+((n=i+(o<<23&4294967295|o>>>9))^i^s)+r[13]+681279174&4294967295,o=s+((t=n+(o<<4&4294967295|o>>>28))^n^i)+r[0]+3936430074&4294967295,o=i+((s=t+(o<<11&4294967295|o>>>21))^t^n)+r[3]+3572445317&4294967295,o=n+((i=s+(o<<16&4294967295|o>>>16))^s^t)+r[6]+76029189&4294967295,o=t+((n=i+(o<<23&4294967295|o>>>9))^i^s)+r[9]+3654602809&4294967295,o=s+((t=n+(o<<4&4294967295|o>>>28))^n^i)+r[12]+3873151461&4294967295,o=i+((s=t+(o<<11&4294967295|o>>>21))^t^n)+r[15]+530742520&4294967295,o=n+((i=s+(o<<16&4294967295|o>>>16))^s^t)+r[2]+3299628645&4294967295,n=i+(o<<23&4294967295|o>>>9),o=t+(i^(n|~s))+r[0]+4096336452&4294967295,t=n+(o<<6&4294967295|o>>>26),o=s+(n^(t|~i))+r[7]+1126891415&4294967295,s=t+(o<<10&4294967295|o>>>22),o=i+(t^(s|~n))+r[14]+2878612391&4294967295,i=s+(o<<15&4294967295|o>>>17),o=n+(s^(i|~t))+r[5]+4237533241&4294967295,n=i+(o<<21&4294967295|o>>>11),o=t+(i^(n|~s))+r[12]+1700485571&4294967295,t=n+(o<<6&4294967295|o>>>26),o=s+(n^(t|~i))+r[3]+2399980690&4294967295,s=t+(o<<10&4294967295|o>>>22),o=i+(t^(s|~n))+r[10]+4293915773&4294967295,i=s+(o<<15&4294967295|o>>>17),o=n+(s^(i|~t))+r[1]+2240044497&4294967295,n=i+(o<<21&4294967295|o>>>11),o=t+(i^(n|~s))+r[8]+1873313359&4294967295,t=n+(o<<6&4294967295|o>>>26),o=s+(n^(t|~i))+r[15]+4264355552&4294967295,s=t+(o<<10&4294967295|o>>>22),o=i+(t^(s|~n))+r[6]+2734768916&4294967295,i=s+(o<<15&4294967295|o>>>17),o=n+(s^(i|~t))+r[13]+1309151649&4294967295,n=i+(o<<21&4294967295|o>>>11),o=t+(i^(n|~s))+r[4]+4149444226&4294967295,t=n+(o<<6&4294967295|o>>>
131626),o=s+(n^(t|~i))+r[11]+3174756917&4294967295,s=t+(o<<10&4294967295|o>>>22),o=i+(t^(s|~n))+r[2]+718787259&4294967295,i=s+(o<<15&4294967295|o>>>17),o=n+(s^(i|~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]+s&4294967295}function nS(e,t){this.h=t;for(var n=[],r=!0,i=e.length-1;0<=i;i--){var s=0|e[i];r&&s==t||(n[i]=s,r=!1)}this.g=n}(u=tW.prototype).Oa=function(e){this.M=e},u.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():o.g(),this.C=this.u?eG(this.u):eG(o),this.g.onreadystatechange=E(this.La,this);try{this.G=!0,this.g.open(t,String(e),!0),this.G=!1}catch(e){tY(this,e);return}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)for(let e of r.keys())n.set(e,r.get(e));else throw Error("Unknown input type for opt_headers: "+String(r))}for(let[s,o]of(r=Array.from(n.keys()).find(e=>"content-type"==e.toLowerCase()),i=v.FormData&&e instanceof v.FormData,!(0<=T(tQ,t))||r||i||n.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),n))this.g.setRequestHeader(s,o);this.K&&(this.g.responseType=this.K),"withCredentials"in this.g&&this.g.withCredentials!==this.M&&(this.g.withCredentials=this.M);try{var s;t1(this),0<this.B&&((this.L=(s=this.g,L&&"number"==typeof s.timeout&&void 0!==s.ontimeout))?(this.g.timeout=this.B,this.g.ontimeout=E(this.ua,this)):this.A=eC(this.ua,this.B,this)),this.v=!0,this.g.send(e),this.v=!1}catch(e){tY(this,e)}},u.ua=function(){void 0!==g&&this.g&&(this.j="Timed out after "+this.B+"ms, aborting",this.m=8,eg(this,"timeout"),this.abort(8))},u.abort=function(e){this.g&&this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1,this.m=e||7,eg(this,"complete"),eg(this,"abort"),t0(this))},u.N=function(){this.g&&(this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1),t0(this,!0)),tW.$.N.call(this)},u.La=function(){this.s||(this.G||this.v||this.l?tJ(this):this.kb())},u.kb=function(){tJ(this)},u.isActive=function(){return!!this.g},u.da=function(){try{return 2<t2(this)?this.g.status:-1}catch(e){return -1}},u.ja=function(){try{return this.g?this.g.responseText:""}catch(e){return""}},u.Wa=function(e){if(this.g){var t=this.g.responseText;return e&&0==t.indexOf(e)&&(t=t.substring(e.length)),tH(t)}},u.Ia=function(){return this.m},u.Sa=function(){return"string"==typeof this.j?this.j:String(this.j)},(u=t3.prototype).ra=8,u.H=1,u.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++;let i=new e0(this,this.l,e),s=this.s;if(this.U&&(s?en(s=ee(s),this.U):s=this.U),null!==this.o||this.O||(i.I=s,s=null),this.P)e:{for(var t=0,n=0;n<this.j.length;n++){t:{var r=this.j[n];if("__data__"in r.map&&"string"==typeof(r=r.map.__data__)){r=r.length;break t}r=void 0}if(void 0===r)break;if(4096<(t+=r)){t=n;break e}if(4096===t||n===this.j.length-1){t=n+1;break e}}t=1e3}else t=1e3;t=ni(this,i,t),td(n=tl(this.I),"RID",e),td(n,"CVER",22),this.F&&td(n,"X-HTTP-Session-Id",this.F),nr(this,n),s&&(this.O?t="headers="+encodeURIComponent(String(t5(s)))+"&"+t:this.o&&t6(n,this.o,s)),tD(this.i,i),this.bb&&td(n,"TYPE","init"),this.P?(td(n,"$req",t),td(n,"SID","null"),i.aa=!0,e6(i,n,null)):e6(i,n,t),this.H=2}}else 3==this.H&&(e?nn(this,e):0==this.j.length||tR(this.i)||nn(this))}},u.Ma=function(){if(this.u=null,nl(this),this.ca&&!(this.M||null==this.g||0>=this.S)){var e=2*this.S;this.l.info("BP detection timer enabled: "+e),this.B=eB(E(this.jb,this),e)}},u.jb=function(){this.B&&(this.B=null,this.l.info("BP detection timeout reached."),this.l.info("Buffering proxy detected and switch to long-polling!"),this.G=!1,this.M=!0,e$(10),t8(this),nl(this))},u.ib=function(){null!=this.v&&(this.v=null,t8(this),no(this),e$(19))},u.pb=function(e){e?(this.l.info("Successfully pinged google.com"),e$(2)):(this.l.info("Failed to ping google.com"),e$(1))},u.isActive=function(){return!!this.h&&this.h.isActive(this)},(u=ng.prototype).Ba=function(){},u.Aa=function(){},u.za=function(){},u.ya=function(){},u.isActive=function(){return!0},u.Va=function(){},nv.prototype.g=function(e,t){return new ny(e,t)},S(ny,em),ny.prototype.m=function(){this.g.h=this.j,this.A&&(this.g.J=!0);var e=this.g,t=this.l,n=this.h||void 0;e$(0),e.Y=t,e.na=n||{},e.G=e.aa,e.I=np(e,null,e.Y),nt(e)},ny.prototype.close=function(){t7(this.g)},ny.prototype.u=function(e){var t=this.g;if("string"==typeof e){var n={};n.__data__=e,e=n}else this.v&&((n={}).__data__=ey(e),e=n);t.j.push(new tC(t.fb++,e)),3==t.H&&nt(t)},ny.prototype.N=function(){this.g.h=null,delete this.j,t7(this.g),delete this.g,ny.$.N.call(this)},S(nb,eY),S(nw,eX),S(n_,ng),n_.prototype.Ba=function(){eg(this.g,"a")},n_.prototype.Aa=function(e){eg(this.g,new nb(e))},n_.prototype.za=function(e){eg(this.g,new nw)},n_.prototype.ya=function(){eg(this.g,"b")},S(nE,function(){this.blockSize=-1}),nE.prototype.reset=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.i=this.h=0},nE.prototype.j=function(e,t){void 0===t&&(t=e.length);for(var n=t-this.blockSize,r=this.m,i=this.h,s=0;s<t;){if(0==i)for(;s<=n;)nx(this,e,s),s+=this.blockSize;if("string"==typeof e){for(;s<t;)if(r[i++]=e.charCodeAt(s++),i==this.blockSize){nx(this,r),i=0;break}}else for(;s<t;)if(r[i++]=e[s++],i==this.blockSize){nx(this,r),i=0;break}}this.h=i,this.i+=t},nE.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 nk={};function nT(e){var t;return -128<=e&&128>e?(t=nk,Object.prototype.hasOwnProperty.call(t,e)?t[e]:t[e]=new nS([0|e],0>e?-1:0)):new nS([0|e],0>e?-1:0)}function nI(e){if(isNaN(e)||!isFinite(e))return nA;if(0>e)return nD(nI(-e));for(var t=[],n=1,r=0;e>=n;r++)t[r]=e/n|0,n*=nC;return new nS(t,0)}var nC=4294967296,nA=nT(0),nO=nT(1),nR=nT(16777216);function nP(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 nN(e){return -1==e.h}function nD(e){for(var t=e.g.length,n=[],r=0;r<t;r++)n[r]=~e.g[r];return new nS(n,~e.h).add(nO)}function nM(e,t){return e.add(nD(t))}function nL(e,t){for(;(65535&e[t])!=e[t];)e[t+1]+=e[t]>>>16,e[t]&=65535,t++}function nZ(e,t){this.g=e,this.h=t}function nj(e,t){if(nP(t))throw Error("division by zero");if(nP(e))return new nZ(nA,nA);if(nN(e))return t=nj(nD(e),t),new nZ(nD(t.g),nD(t.h));if(nN(t))return t=nj(e,nD(t)),new nZ(nD(t.g),t.h);if(30<e.g.length){if(nN(e)||nN(t))throw Error("slowDivide_ only works with positive integers.");for(var n=nO,r=t;0>=r.X(e);)n=nF(n),r=nF(r);var i=nU(n,1),s=nU(r,1);for(r=nU(r,2),n=nU(n,2);!nP(r);){var o=s.add(r);0>=o.X(e)&&(i=i.add(n),s=o),r=nU(r,1),n=nU(n,1)}return t=nM(e,i.R(t)),new nZ(i,t)}for(i=nA;0<=e.X(t);){for(r=48>=(r=Math.ceil(Math.log(n=Math.max(1,Math.floor(e.ea()/t.ea())))/M
1316ath.LN2))?1:Math.pow(2,r-48),o=(s=nI(n)).R(t);nN(o)||0<o.X(e);)n-=r,o=(s=nI(n)).R(t);nP(s)&&(s=nO),i=i.add(s),e=nM(e,o)}return new nZ(i,e)}function nF(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 nS(n,e.h)}function nU(e,t){var n=t>>5;t%=32;for(var r=e.g.length-n,i=[],s=0;s<r;s++)i[s]=0<t?e.D(s+n)>>>t|e.D(s+n+1)<<32-t:e.D(s+n);return new nS(i,e.h)}(u=nS.prototype).ea=function(){if(nN(this))return-nD(this).ea();for(var e=0,t=1,n=0;n<this.g.length;n++){var r=this.D(n);e+=(0<=r?r:nC+r)*t,t*=nC}return e},u.toString=function(e){if(2>(e=e||10)||36<e)throw Error("radix out of range: "+e);if(nP(this))return"0";if(nN(this))return"-"+nD(this).toString(e);for(var t=nI(Math.pow(e,6)),n=this,r="";;){var i=nj(n,t).g,s=((0<(n=nM(n,i.R(t))).g.length?n.g[0]:n.h)>>>0).toString(e);if(nP(n=i))return s+r;for(;6>s.length;)s="0"+s;r=s+r}},u.D=function(e){return 0>e?0:e<this.g.length?this.g[e]:this.h},u.X=function(e){return nN(e=nM(this,e))?-1:nP(e)?0:1},u.abs=function(){return nN(this)?nD(this):this},u.add=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],r=0,i=0;i<=t;i++){var s=r+(65535&this.D(i))+(65535&e.D(i)),o=(s>>>16)+(this.D(i)>>>16)+(e.D(i)>>>16);r=o>>>16,s&=65535,o&=65535,n[i]=o<<16|s}return new nS(n,-2147483648&n[n.length-1]?-1:0)},u.R=function(e){if(nP(this)||nP(e))return nA;if(nN(this))return nN(e)?nD(this).R(nD(e)):nD(nD(this).R(e));if(nN(e))return nD(this.R(nD(e)));if(0>this.X(nR)&&0>e.X(nR))return nI(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 s=this.D(r)>>>16,o=65535&this.D(r),a=e.D(i)>>>16,l=65535&e.D(i);n[2*r+2*i]+=o*l,nL(n,2*r+2*i),n[2*r+2*i+1]+=s*l,nL(n,2*r+2*i+1),n[2*r+2*i+1]+=o*a,nL(n,2*r+2*i+1),n[2*r+2*i+2]+=s*a,nL(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 nS(n,0)},u.gb=function(e){return nj(this,e).h},u.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 nS(n,this.h&e.h)},u.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 nS(n,this.h|e.h)},u.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 nS(n,this.h^e.h)},nv.prototype.createWebChannel=nv.prototype.g,ny.prototype.send=ny.prototype.u,ny.prototype.open=ny.prototype.m,ny.prototype.close=ny.prototype.close,eq.NO_ERROR=0,eq.TIMEOUT=8,eq.HTTP_ERROR=6,eH.COMPLETE="complete",eK.EventType=eQ,eQ.OPEN="a",eQ.CLOSE="b",eQ.ERROR="c",eQ.MESSAGE="d",em.prototype.listen=em.prototype.O,tW.prototype.listenOnce=tW.prototype.P,tW.prototype.getLastError=tW.prototype.Sa,tW.prototype.getLastErrorCode=tW.prototype.Ia,tW.prototype.getStatus=tW.prototype.da,tW.prototype.getResponseJson=tW.prototype.Wa,tW.prototype.getResponseText=tW.prototype.ja,tW.prototype.send=tW.prototype.ha,tW.prototype.setWithCredentials=tW.prototype.Oa,nE.prototype.digest=nE.prototype.l,nE.prototype.reset=nE.prototype.reset,nE.prototype.update=nE.prototype.j,nS.prototype.add=nS.prototype.add,nS.prototype.multiply=nS.prototype.R,nS.prototype.modulo=nS.prototype.gb,nS.prototype.compare=nS.prototype.X,nS.prototype.toNumber=nS.prototype.ea,nS.prototype.toString=nS.prototype.toString,nS.prototype.getBits=nS.prototype.D,nS.fromNumber=nI,nS.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 nD(e(t.substring(1),n));if(0<=t.indexOf("-"))throw Error('number format error: interior "-" character');for(var r=nI(Math.pow(n,8)),i=nA,s=0;s<t.length;s+=8){var o=Math.min(8,t.length-s),a=parseInt(t.substring(s,s+o),n);8>o?(o=nI(Math.pow(n,o)),i=i.R(o).add(nI(a))):i=(i=i.R(r)).add(nI(a))}return i};var nV=m.createWebChannelTransport=function(){return new nv},n$=m.getStatEventTarget=function(){return ej()},nz=m.ErrorCode=eq,nB=m.EventType=eH,nq=m.Event=eL,nH=m.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},nW=m.FetchXmlHttpFactory=tU,nG=m.WebChannel=eK,nK=m.XhrIo=tW,nQ=m.Md5=nE,nY=m.Integer=nS;n(34155);let nX="@firebase/firestore";/**
1317 * @license
1318 * Copyright 2017 Google LLC
1319 *
1320 * Licensed under the Apache License, Version 2.0 (the "License");
1321 * you may not use this file except in compliance with the License.
1322 * You may obtain a copy of the License at
1323 *
1324 *   http://www.apache.org/licenses/LICENSE-2.0
1325 *
1326 * Unless required by applicable law or agreed to in writing, software
1327 * distributed under the License is distributed on an "AS IS" BASIS,
1328 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1329 * See the License for the specific language governing permissions and
1330 * limitations under the License.
1331 */class nJ{constructor(e){this.uid=e}isAuthenticated(){return null!=this.uid}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(e){return e.uid===this.uid}}nJ.UNAUTHENTICATED=new nJ(null),nJ.GOOGLE_CREDENTIALS=new nJ("google-credentials-uid"),nJ.FIRST_PARTY=new nJ("first-party-uid"),nJ.MOCK_USER=new nJ("mock-user");/**
1332 * @license
1333 * Copyright 2017 Google LLC
1334 *
1335 * Licensed under the Apache License, Version 2.0 (the "License");
1336 * you may not use this file except in compliance with the License.
1337 * You may obtain a copy of the License at
1338 *
1339 *   http://www.apache.org/licenses/LICENSE-2.0
1340 *
1341 * Unless required by applicable law or agreed to in writing, software
1342 * distributed under the License is distributed on an "AS IS" BASIS,
1343 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1344 * See the License for the specific language governing permissions and
1345 * limitations under the License.
1346 */let n0="9.23.0",n1=new d.Yd("@firebase/firestore");function n2(){return n1.logLevel}function n4(e,...t){if(n1.logLevel<=d.in.DEBUG){let n=t.map(n9);n1.debug(`Firestore (${n0}): ${e}`,...n)}}function n5(e,...t){if(n1.logLevel<=d.in.ERROR){let n=t.map(n9);n1.error(`Firestore (${n0}): ${e}`,...n)}}function n6(e,...t){if(n1.logLevel<=d.in.WARN){let n=t.map(n9);n1.warn(`Firestore (${n0}): ${e}`,...n)}}function n9(e){if("string"==typeof e)return e;try{return JSON.stringify(e)}catch(t){return e}}/**
1347 * @license
1348 * Copyright 2017 Google LLC
1349 *
1350 * Licensed under the Apache License, Version 2.0 (the "License");
1351 * you may not use this file except in compliance with the License.
1352 * You may obtain a copy of the License at
1353 *
1354 *   http://www.apache.org/licenses/LICENSE-2.0
1355 *
1356 * Unless required by applicable law or agreed to in writing, software
1357 * distributed under the License is distributed on an "AS IS" BASIS,
1358 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1359 * See the License for the specific language governing permissions and
1360 * limitations under the License.
1361 */function n3(e="Unexpected state"){let t=`FIRESTORE (${n0}) INTERNAL ASSERTION FAILED: `+e;throw n5(t),Error(t)}/**
1362 * @license
1363 * Copyright 2017 Google LLC
1364 *
1365 * Licensed under the Apache License, Version 2.0 (the "License");
1366 * you may not use this file except in compliance with the License.
1367 * You may obtain a copy of the License at
1368 *
1369 *   http://www.apache.org/licenses/LICENSE-2.0
1370 *
1371 * Unless required by applicable law or agreed to in writing, software
1372 * distributed under the License is distributed on an "AS IS" BASIS,
1373 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1374 * See the License for the specific language governing permissions and
1375 * limitations under the License.
1376 */let n7={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"};class n8 extends f.ZR{constructor(e,t){super(e,t),this.code=e,this.message=t,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}/**
1377 * @license
1378 * Copyright 2017 Google LLC
1379 *
1380 * Licensed under the Apache License, Version 2.0 (the "License");
1381 * you may not use this file except in compliance with the License.
1382 * You may obtain a copy of the License at
1383 *
1384 *   http://www.apache.org/licenses/LICENSE-2.0
1385 *
1386 * Unless required by applicable law or agreed to in writing, softw
1386are
1387 * distributed under the License is distributed on an "AS IS" BASIS,
1388 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1389 * See the License for the specific language governing permissions and
1390 * limitations under the License.
1391 */class re{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}/**
1392 * @license
1393 * Copyright 2017 Google LLC
1394 *
1395 * Licensed under the Apache License, Version 2.0 (the "License");
1396 * you may not use this file except in compliance with the License.
1397 * You may obtain a copy of the License at
1398 *
1399 *   http://www.apache.org/licenses/LICENSE-2.0
1400 *
1401 * Unless required by applicable law or agreed to in writing, software
1402 * distributed under the License is distributed on an "AS IS" BASIS,
1403 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1404 * See the License for the specific language governing permissions and
1405 * limitations under the License.
1406 */class rt{constructor(e,t){this.user=t,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class rn{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,t){e.enqueueRetryable(()=>t(nJ.UNAUTHENTICATED))}shutdown(){}}class rr{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,t){this.changeListener=t,e.enqueueRetryable(()=>t(this.token.user))}shutdown(){this.changeListener=null}}class ri{constructor(e){this.t=e,this.currentUser=nJ.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,t){let n=this.i,r=e=>this.i!==n?(n=this.i,t(e)):Promise.resolve(),i=new re;this.o=()=>{this.i++,this.currentUser=this.u(),i.resolve(),i=new re,e.enqueueRetryable(()=>r(this.currentUser))};let s=()=>{let t=i;e.enqueueRetryable(async()=>{await t.promise,await r(this.currentUser)})},o=e=>{n4("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=e,this.auth.addAuthTokenListener(this.o),s()};this.t.onInit(e=>o(e)),setTimeout(()=>{if(!this.auth){let e=this.t.getImmediate({optional:!0});e?o(e):(n4("FirebaseAuthCredentialsProvider","Auth not yet detected"),i.resolve(),i=new re)}},0),s()}getToken(){let e=this.i,t=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(t).then(t=>this.i!==e?(n4("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):t?("string"==typeof t.accessToken||n3(),new rt(t.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){let e=this.auth&&this.auth.getUid();return null===e||"string"==typeof e||n3(),new nJ(e)}}class rs{constructor(e,t,n){this.h=e,this.l=t,this.m=n,this.type="FirstParty",this.user=nJ.FIRST_PARTY,this.g=new Map}p(){return this.m?this.m():null}get headers(){this.g.set("X-Goog-AuthUser",this.h);let e=this.p();return e&&this.g.set("Authorization",e),this.l&&this.g.set("X-Goog-Iam-Authorization-Token",this.l),this.g}}class ro{constructor(e,t,n){this.h=e,this.l=t,this.m=n}getToken(){return Promise.resolve(new rs(this.h,this.l,this.m))}start(e,t){e.enqueueRetryable(()=>t(nJ.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class ra{constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class rl{constructor(e){this.I=e,this.forceRefresh=!1,this.appCheck=null,this.T=null}start(e,t){let n=e=>{null!=e.error&&n4("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${e.error.message}`);let n=e.token!==this.T;return this.T=e.token,n4("FirebaseAppCheckTokenProvider",`Received ${n?"new":"existing"} token.`),n?t(e.token):Promise.resolve()};this.o=t=>{e.enqueueRetryable(()=>n(t))};let r=e=>{n4("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=e,this.appCheck.addTokenListener(this.o)};this.I.onInit(e=>r(e)),setTimeout(()=>{if(!this.appCheck){let e=this.I.getImmediate({optional:!0});e?r(e):n4("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){let e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(e=>e?("string"==typeof e.token||n3(),this.T=e.token,new ra(e.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}/**
1407 * @license
1408 * Copyright 2017 Google LLC
1409 *
1410 * Licensed under the Apache License, Version 2.0 (the "License");
1411 * you may not use this file except in compliance with the License.
1412 * You may obtain a copy of the License at
1413 *
1414 *   http://www.apache.org/licenses/LICENSE-2.0
1415 *
1416 * Unless required by applicable law or agreed to in writing, software
1417 * distributed under the License is distributed on an "AS IS" BASIS,
1418 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1419 * See the License for the specific language governing permissions and
1420 * limitations under the License.
1421 */class ru{static A(){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=Math.floor(256/e.length)*e.length,n="";for(;n.length<20;){let r=/**
1422 * @license
1423 * Copyright 2020 Google LLC
1424 *
1425 * Licensed under the Apache License, Version 2.0 (the "License");
1426 * you may not use this file except in compliance with the License.
1427 * You may obtain a copy of the License at
1428 *
1429 *   http://www.apache.org/licenses/LICENSE-2.0
1430 *
1431 * Unless required by applicable law or agreed to in writing, software
1432 * distributed under the License is distributed on an "AS IS" BASIS,
1433 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1434 * See the License for the specific language governing permissions and
1435 * limitations under the License.
1436 */function(e){let t="undefined"!=typeof self&&(self.crypto||self.msCrypto),n=new Uint8Array(e);if(t&&"function"==typeof t.getRandomValues)t.getRandomValues(n);else for(let t=0;t<e;t++)n[t]=Math.floor(256*Math.random());return n}(40);for(let i=0;i<r.length;++i)n.length<20&&r[i]<t&&(n+=e.charAt(r[i]%e.length))}return n}}function rc(e,t){return e<t?-1:e>t?1:0}function rh(e,t,n){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}/**
1437 * @license
1438 * Copyright 2017 Google LLC
1439 *
1440 * Licensed under the Apache License, Version 2.0 (the "License");
1441 * you may not use this file except in compliance with the License.
1442 * You may obtain a copy of the License at
1443 *
1444 *   http://www.apache.org/licenses/LICENSE-2.0
1445 *
1446 * Unless required by applicable law or agreed to in writing, software
1447 * distributed under the License is distributed on an "AS IS" BASIS,
1448 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1449 * See the License for the specific language governing permissions and
1450 * limitations under the License.
1451 */class rd{constructor(e,t){if(this.seconds=e,this.nanoseconds=t,t<0||t>=1e9)throw new n8(n7.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(e<-62135596800||e>=253402300800)throw new n8(n7.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}static now(){return rd.fromMillis(Date.now())}static fromDate(e){return rd.fromMillis(e.getTime())}static fromMillis(e){let t=Math.floor(e/1e3);return new rd(t,Math.floor(1e6*(e-1e3*t)))}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(e){return this.seconds===e.seconds?rc(this.nanoseconds,e.nanoseconds):rc(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){let e=this.seconds- -62135596800;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}/**
1452 * @license
1453 * Copyright 2017 Google LLC
1454 *
1455 * Licensed under the Apache License, Version 2.0 (the "License");
1456 * you may not use this file except in compliance with the License.
1457 * You may obtain a copy of the License at
1458 *
1459 *   http://www.apache.org/licenses/LICENSE-2.0
1460 *
1461 * Unless required by applicable law or agreed to in writing, software
1462 * distributed under the License is distributed on an "AS IS" BASIS,
1463 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1464 * See the License for the specific language governing permissions and
1465 * limitations under the License.
1466 */class rf{constructor(e){this.timestamp=e}static fromTimestamp(e){return new rf(e)}static min(){return new rf(new rd(0,0))}static max(){return new rf(new rd(253402300799,999999999))}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}/**
1467 * @license
1468 * Copyright 2017 Google LLC
1469 *
1470 * Licensed under the Apache License, Version 2.0 (the "License");
1471 * you may not use this file except in compliance with the License.
1472 * You may obtain a copy of the License at
1473 *
1474 *   http://www.apache.org/licenses/LICENSE-2.0
1475 *
1476 * Unless required by applicable law or agreed to in writing, software
1477 * distributed under the License is distributed on an "AS IS" BASIS,
1478 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1479 * See the License for the specific language governing permissions and
1480 * limitations under the License.
1481 */class rp{constructor(e,t,n){void 0===t?t=0:t>e.length&&n3(),void 0===n?n=e.length-t:n>e.length-t&&n3(),this.segments=e,this.offset=t,this.len=n}get length(){return this.len}isEqual(e){return 0===rp.comparator(this,e)}child(e){let t=this.segments.slice(this.offset,this.limit());return e instanceof rp?e.forEach(e=>{t.push(e)}):t.push(e),this.construct(t)}limit(){return this.offset+this.length}popFirst(e){return e=void 0===e?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return 0===this.length}isPrefixOf(e){if(e.length<this.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}isImmediateParentOf(e){if(this.length+1!==e.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}forEach(e){for(let t=this.offset,n=this.limit();t<n;t++)e(this.segments[t])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++){let n=e.get(r),i=t.get(r);if(n<i)return -1;if(n>i)return 1}return e.length<t.length?-1:e.length>t.length?1:0}}class rm extends rp{construct(e,t,n){return new rm(e,t,n)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}static fromString(...e){let t=[];for(let n of e){if(n.indexOf("//")>=0)throw new n8(n7.INVALID_ARGUMENT,`Invalid segment (${n}). Paths must not contain // in them.`);t.push(...n.split("/").filter(e=>e.length>0))}return new rm(t)}static emptyPath(){return new rm([])}}let rg=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class rv extends rp{construct(e,t,n){return new rv(e,t,n)}static isValidIdentifier(e){return rg.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),rv.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return 1===this.length&&"__name__"===this.get(0)}static keyField(){return new rv(["__name__"])}static fromServerFormat(e){let t=[],n="",r=0,i=()=>{if(0===n.length)throw new n8(n7.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);t.push(n),n=""},s=!1;for(;r<e.length;){let t=e[r];if("\\"===t){if(r+1===e.length)throw new n8(n7.INVALID_ARGUMENT,"Path has trailing escape character: "+e);let t=e[r+1];if("\\"!==t&&"."!==t&&"`"!==t)throw new n8(n7.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);n+=t,r+=2}else"`"===t?(s=!s,r++):"."!==t||s?(n+=t,r++):(i(),r++)}if(i(),s)throw new n8(n7.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new rv(t)}static emptyPath(){return new rv([])}}/**
1482 * @license
1483 * Copyright 2017 Google LLC
1484 *
1485 * Licensed under the Apache License, Version 2.0 (the "License");
1486 * you may not use this file except in compliance with the License.
1487 * You may obtain a copy of the License at
1488 *
1489 *   http://www.apache.org/licenses/LICENSE-2.0
1490 *
1491 * Unless required by applicable law or agreed to in writing, software
1492 * distributed under the License is distributed on an "AS IS" BASIS,
1493 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1494 * See the License for the specific language governing permissions and
1495 * limitations under the License.
1496 */class ry{constructor(e){this.path=e}static fromPath(e){return new ry(rm.fromString(e))}static fromName(e){return new ry(rm.fromString(e).popFirst(5))}static empty(){return new ry(rm.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return null!==e&&0===rm.comparator(this.path,e.path)}toString(){return this.path.toString()}static comparator(e,t){return rm.comparator(e.path,t.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new ry(new rm(e.slice()))}}class rb{constructor(e,t,n){this.readTime=e,this.documentKey=t,this.largestBatchId=n}static min(){return new rb(rf.min(),ry.empty(),-1)}static max(){return new rb(rf.max(),ry.empty(),-1)}}class rw{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}
vendor: 4,202 bytes, lines 1496-1545
1496raiseOnCommittedEvent(){this.onCommittedListeners.forEach(e=>e())}}/**
1497 * @license
1498 * Copyright 2017 Google LLC
1499 *
1500 * Licensed under the Apache License, Version 2.0 (the "License");
1501 * you may not use this file except in compliance with the License.
1502 * You may obtain a copy of the License at
1503 *
1504 *   http://www.apache.org/licenses/LICENSE-2.0
1505 *
1506 * Unless required by applicable law or agreed to in writing, software
1507 * distributed under the License is distributed on an "AS IS" BASIS,
1508 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1509 * See the License for the specific language governing permissions and
1510 * limitations under the License.
1511 */async function r_(e){if(e.code!==n7.FAILED_PRECONDITION||"The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab."!==e.message)throw e;n4("LocalStore","Unexpectedly lost primary lease")}/**
1512 * @license
1513 * Copyright 2017 Google LLC
1514 *
1515 * Licensed under the Apache License, Version 2.0 (the "License");
1516 * you may not use this file except in compliance with the License.
1517 * You may obtain a copy of the License at
1518 *
1519 *   http://www.apache.org/licenses/LICENSE-2.0
1520 *
1521 * Unless required by applicable law or agreed to in writing, software
1522 * distributed under the License is distributed on an "AS IS" BASIS,
1523 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1524 * See the License for the specific language governing permissions and
1525 * limitations under the License.
1526 */class rE{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e(e=>{this.isDone=!0,this.result=e,this.nextCallback&&this.nextCallback(e)},e=>{this.isDone=!0,this.error=e,this.catchCallback&&this.catchCallback(e)})}catch(e){return this.next(void 0,e)}next(e,t){return this.callbackAttached&&n3(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(t,this.error):this.wrapSuccess(e,this.result):new rE((n,r)=>{this.nextCallback=t=>{this.wrapSuccess(e,t).next(n,r)},this.catchCallback=e=>{this.wrapFailure(t,e).next(n,r)}})}toPromise(){return new Promise((e,t)=>{this.next(e,t)})}wrapUserFunction(e){try{let t=e();return t instanceof rE?t:rE.resolve(t)}catch(e){return rE.reject(e)}}wrapSuccess(e,t){return e?this.wrapUserFunction(()=>e(t)):rE.resolve(t)}wrapFailure(e,t){return e?this.wrapUserFunction(()=>e(t)):rE.reject(t)}static resolve(e){return new rE((t,n)=>{t(e)})}static reject(e){return new rE((t,n)=>{n(e)})}static waitFor(e){return new rE((t,n)=>{let r=0,i=0,s=!1;e.forEach(e=>{++r,e.next(()=>{++i,s&&i===r&&t()},e=>n(e))}),s=!0,i===r&&t()})}static or(e){let t=rE.resolve(!1);for(let n of e)t=t.next(e=>e?rE.resolve(e):n());return t}static forEach(e,t){let n=[];return e.forEach((e,r)=>{n.push(t.call(this,e,r))}),this.waitFor(n)}static mapArray(e,t){return new rE((n,r)=>{let i=e.length,s=Array(i),o=0;for(let a=0;a<i;a++){let l=a;t(e[l]).next(e=>{s[l]=e,++o===i&&n(s)},e=>r(e))}})}static doWhile(e,t){return new rE((n,r)=>{let i=()=>{!0===e()?t().next(()=>{i()},r):n()};i()})}}function rx(e){return"IndexedDbTransactionError"===e.name}/**
1527 * @license
1528 * Copyright 2018 Google LLC
1529 *
1530 * Licensed under the Apache License, Version 2.0 (the "License");
1531 * you may not use this file except in compliance with the License.
1532 * You may obtain a copy of the License at
1533 *
1534 *   http://www.apache.org/licenses/LICENSE-2.0
1535 *
1536 * Unless required by applicable law or agreed to in writing, software
1537 * distributed under the License is distributed on an "AS IS" BASIS,
1538 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1539 * See the License for the specific language governing permissions and
1540 * limitations under the License.
1541 */class rS{constructor(e,t){this.previousValue=e,t&&(t.sequenceNumberHandler=e=>this.ot(e),this.ut=e=>t.writeSequenceNumber(e))}ot(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){let e=++this.previousValue;return this.ut&&this.ut(e),e}}function rk(e){return 0===e&&1/e==-1/0}/**
1542 * @license
1543 * Copyright 2017 Google LLC
1544 *
1545 * Licensed under the Apache License, Version 2.0 (the "License");
1546 * you may not use this file except in compliance with the License.
1547 * You may obtain a copy of the License at
1548 *
1549 *   http://www.apache.org/licenses/LICENSE-2.0
1550 *
1551 * Unless required by applicable law or agreed to in writing, software
1552 * distributed under the License is distributed on an "AS IS" BASIS,
1553 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1554 * See the License for the specific language governing permissions and
1555 * limitations under the License.
1556 */function rT(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function rI(e,t){for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])}rS.ct=-1;/**
1557 * @license
1558 * Copyright 2017 Google LLC
1559 *
1560 * Licensed under the Apache License, Version 2.0 (the "License");
1561 * you may not use this file except in compliance with the License.
1562 * You may obtain a copy of the License at
1563 *
1564 *   http://www.apache.org/licenses/LICENSE-2.0
1565 *
1566 * Unless required by applicable law or agreed to in writing, software
1567 * distributed under the License is distributed on an "AS IS" BASIS,
1568 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1569 * See the License for the specific language governing permissions and
1570 * limitations under the License.
1571 */class rC{constructor(e,t){this.comparator=e,this.root=t||rO.EMPTY}insert(e,t){return new rC(this.comparator,this.root.insert(e,t,this.comparator).copy(null,null,rO.BLACK,null,null))}remove(e){return new rC(this.comparator,this.root.remove(e,this.comparator).copy(null,null,rO.BLACK,null,null))}get(e){let t=this.root;for(;!t.isEmpty();){let n=this.comparator(e,t.key);if(0===n)return t.value;n<0?t=t.left:n>0&&(t=t.right)}return null}indexOf(e){let t=0,n=this.root;for(;!n.isEmpty();){let 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}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal((t,n)=>(e(t,n),!1))}toString(){let e=[];return this.inorderTraversal((t,n)=>(e.push(`${t}:${n}`),!1)),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new rA(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new rA(this.root,e,this.comparator,!1)}getReverseIterator(){return new rA(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new rA(this.root,e,this.comparator,!0)}}class rA{constructor(e,t,n,r){this.isReverse=r,this.nodeStack=[];let i=1;for(;!e.isEmpty();)if(i=t?n(e.key,t):1,t&&r&&(i*=-1),i<0)e=this.isReverse?e.left:e.right;else{if(0===i){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let 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}hasNext(){return this.nodeStack.length>0}peek(){if(0===this.nodeStack.length)return null;let e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class rO{constructor(e,t,n,r,i){this.key=e,this.value=t,this.color=null!=n?n:rO.RED,this.left=null!=r?r:rO.EMPTY,this.right=null!=i?i:rO.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,t,n,r,i){return new rO(null!=e?e:this.key,null!=t?t:this.value,null!=n?n:this.color,null!=r?r:this.left,null!=i?i:this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,t,n){let r=this,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()}removeMin(){if(this.left.isEmpty())return rO.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),(e=e.copy(null,null,null,e.left.removeMin(),null)).fixUp()}remove(e,t){let n,r=this;if(0>t(e,r.key))r.left.isEmpty()||r.left.isRed()||r.left.left.isRed()||(r=r.moveRedLeft()),r=r.copy(null,null,null,r.left.remove(e,t),null);else{if(r.left.isRed()&&(r=r.rotateRight()),r.right.isEmpty()||r.right.isRed()||r.right.left.isRed()||(r=r.moveRedRight()),0===t(e,r.key)){if(r.right.isEmpty())return rO.EMPTY;n=r.right.min(),r=r.copy(n.key,n.value,null,null,r.right.removeMin())}r=r.copy(null,null,null,null,r.right.remove(e,t))}return r.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=(e=(e=e.copy(null,null,null,null,e.right.rotateRight())).rotateLeft()).colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=(e=e.rotateRight()).colorFlip()),e}rotateLeft(){let e=this.copy(null,null,rO.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){let e=this.copy(null,null,rO.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){let e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)}checkMaxDepth(){let e=this.check();return Math.pow(2,e)<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw n3();let e=this.left.check();if(e!==this.right.check())throw n3();return e+(this.isRed()?0:1)}}
1571rO.EMPTY=null,rO.RED=!0,rO.BLACK=!1,rO.EMPTY=new class{constructor(){this.size=0}get key(){throw n3()}get value(){throw n3()}get color(){throw n3()}get left(){throw n3()}get right(){throw n3()}copy(e,t,n,r,i){return this}insert(e,t,n){return new rO(e,t)}remove(e,t){return this}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};/**
1572 * @license
1573 * Copyright 2017 Google LLC
1574 *
1575 * Licensed under the Apache License, Version 2.0 (the "License");
1576 * you may not use this file except in compliance with the License.
1577 * You may obtain a copy of the License at
1578 *
1579 *   http://www.apache.org/licenses/LICENSE-2.0
1580 *
1581 * Unless required by applicable law or agreed to in writing, software
1582 * distributed under the License is distributed on an "AS IS" BASIS,
1583 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1584 * See the License for the specific language governing permissions and
1585 * limitations under the License.
1586 */class rR{constructor(e){this.comparator=e,this.data=new rC(this.comparator)}has(e){return null!==this.data.get(e)}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal((t,n)=>(e(t),!1))}forEachInRange(e,t){let n=this.data.getIteratorFrom(e[0]);for(;n.hasNext();){let r=n.getNext();if(this.comparator(r.key,e[1])>=0)return;t(r.key)}}forEachWhile(e,t){let n;for(n=void 0!==t?this.data.getIteratorFrom(t):this.data.getIterator();n.hasNext();)if(!e(n.getNext().key))return}firstAfterOrEqual(e){let t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null}getIterator(){return new rP(this.data.getIterator())}getIteratorFrom(e){return new rP(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let t=this;return t.size<e.size&&(t=e,e=this),e.forEach(e=>{t=t.add(e)}),t}isEqual(e){if(!(e instanceof rR)||this.size!==e.size)return!1;let t=this.data.getIterator(),n=e.data.getIterator();for(;t.hasNext();){let e=t.getNext().key,r=n.getNext().key;if(0!==this.comparator(e,r))return!1}return!0}toArray(){let e=[];return this.forEach(t=>{e.push(t)}),e}toString(){let e=[];return this.forEach(t=>e.push(t)),"SortedSet("+e.toString()+")"}copy(e){let t=new rR(this.comparator);return t.data=e,t}}class rP{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}/**
1587 * @license
1588 * Copyright 2020 Google LLC
1589 *
1590 * Licensed under the Apache License, Version 2.0 (the "License");
1591 * you may not use this file except in compliance with the License.
1592 * You may obtain a copy of the License at
1593 *
1594 *   http://www.apache.org/licenses/LICENSE-2.0
1595 *
1596 * Unless required by applicable law or agreed to in writing, software
1597 * distributed under the License is distributed on an "AS IS" BASIS,
1598 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1599 * See the License for the specific language governing permissions and
1600 * limitations under the License.
1601 */class rN{constructor(e){this.fields=e,e.sort(rv.comparator)}static empty(){return new rN([])}unionWith(e){let t=new rR(rv.comparator);for(let e of this.fields)t=t.add(e);for(let n of e)t=t.add(n);return new rN(t.toArray())}covers(e){for(let t of this.fields)if(t.isPrefixOf(e))return!0;return!1}isEqual(e){return rh(this.fields,e.fields,(e,t)=>e.isEqual(t))}}/**
1602 * @license
1603 * Copyright 2023 Google LLC
1604 *
1605 * Licensed under the Apache License, Version 2.0 (the "License");
1606 * you may not use this file except in compliance with the License.
1607 * You may obtain a copy of the License at
1608 *
1609 *   http://www.apache.org/licenses/LICENSE-2.0
1610 *
1611 * Unless required by applicable law or agreed to in writing, software
1612 * distributed under the License is distributed on an "AS IS" BASIS,
1613 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1614 * See the License for the specific language governing permissions and
1615 * limitations under the License.
1616 */class rD extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}/**
1617 * @license
1618 * Copyright 2020 Google LLC
1619 *
1620 * Licensed under the Apache License, Version 2.0 (the "License");
1621 * you may not use this file except in compliance with the License.
1622 * You may obtain a copy of the License at
1623 *
1624 *   http://www.apache.org/licenses/LICENSE-2.0
1625 *
1626 * Unless required by applicable law or agreed to in writing, software
1627 * distributed under the License is distributed on an "AS IS" BASIS,
1628 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1629 * See the License for the specific language governing permissions and
1630 * limitations under the License.
1631 */class rM{constructor(e){this.binaryString=e}static fromBase64String(e){let t=function(e){try{return atob(e)}catch(e){throw"undefined"!=typeof DOMException&&e instanceof DOMException?new rD("Invalid base64 string: "+e):e}}(e);return new rM(t)}static fromUint8Array(e){let t=function(e){let t="";for(let n=0;n<e.length;++n)t+=String.fromCharCode(e[n]);return t}(e);return new rM(t)}[Symbol.iterator](){let e=0;return{next:()=>e<this.binaryString.length?{value:this.binaryString.charCodeAt(e++),done:!1}:{value:void 0,done:!0}}}toBase64(){return btoa(this.binaryString)}toUint8Array(){return function(e){let t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(e){return rc(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}rM.EMPTY_BYTE_STRING=new rM("");let rL=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function rZ(e){if(e||n3(),"string"==typeof e){let t=0,n=rL.exec(e);if(n||n3(),n[1]){let e=n[1];t=Number(e=(e+"000000000").substr(0,9))}let r=new Date(e);return{seconds:Math.floor(r.getTime()/1e3),nanos:t}}return{seconds:rj(e.seconds),nanos:rj(e.nanos)}}function rj(e){return"number"==typeof e?e:"string"==typeof e?Number(e):0}function rF(e){return"string"==typeof e?rM.fromBase64String(e):rM.fromUint8Array(e)}/**
1632 * @license
1633 * Copyright 2020 Google LLC
1634 *
1635 * Licensed under the Apache License, Version 2.0 (the "License");
1636 * you may not use this file except in compliance with the License.
1637 * You may obtain a copy of the License at
1638 *
1639 *   http://www.apache.org/licenses/LICENSE-2.0
1640 *
1641 * Unless required by applicable law or agreed to in writing, software
1642 * distributed under the License is distributed on an "AS IS" BASIS,
1643 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1644 * See the License for the specific language governing permissions and
1645 * limitations under the License.
1646 */function rU(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 rV(e){let t=e.mapValue.fields.__previous_value__;return rU(t)?rV(t):t}function r$(e){let t=rZ(e.mapValue.fields.__local_write_time__.timestampValue);return new rd(t.seconds,t.nanos)}/**
1647 * @license
1648 * Copyright 2017 Google LLC
1649 *
1650 * Licensed under the Apache License, Version 2.0 (the "License");
1651 * you may not use this file except in compliance with the License.
1652 * You may obtain a copy of the License at
1653 *
1654 *   http://www.apache.org/licenses/LICENSE-2.0
1655 *
1656 * Unless required by applicable law or agreed to in writing, software
1657 * distributed under the License is distributed on an "AS IS" BASIS,
1658 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1659 * See the License for the specific language governing permissions and
1660 * limitations under the License.
1661 */class rz{constructor(e,t,n,r,i,s,o,a,l){this.databaseId=e,this.appId=t,this.persistenceKey=n,this.host=r,this.ssl=i,this.forceLongPolling=s,this.autoDetectLongPolling=o,this.longPollingOptions=a,this.useFetchStreams=l}}class rB{constructor(e,t){this.projectId=e,this.database=t||"(default)"}static empty(){return new rB("","")}get isDefaultDatabase(){return"(default)"===this.database}isEqual(e){return e instanceof rB&&e.projectId===this.projectId&&e.database===this.database}}/**
1662 * @license
1663 * Copyright 2020 Google LLC
1664 *
1665 * Licensed under the Apache License, Version 2.0 (the "License");
1666 * you may not use this file except in compliance with the License.
1667 * You may obtain a copy of the License at
1668 *
1669 *   http://www.apache.org/licenses/LICENSE-2.0
1670 *
1671 * Unless required by applicable law or agreed to in writing, software
1672 * distributed under the License is distributed on an "AS IS" BASIS,
1673 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1674 * See the License for the specific language governing permissions and
1675 * limitations under the License.
1676 */let rq={mapValue:{fields:{__type__:{stringValue:"__max__"}}}};function rH(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?rU(e)?4:r5(e)?9007199254740991:10:n3()}function rW(e,t){if(e===t)return!0;let n=rH(e);if(n!==rH(t))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return e.booleanValue===t.booleanValue;case 4:return r$(e).isEqual(r$(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;let n=rZ(e.timestampValue),r=rZ(t.timestampValue);return n.seconds===r.seconds&&n.nanos===r.nanos}(e,t);case 5:return e.stringValue===t.stringValue;case 6:return rF(e.bytesValue).isEqual(rF(t.bytesValue));case 7:return e.referenceValue===t.referenceValue;case 8:return rj(e.geoPointValue.latitude)===rj(t.geoPointValue.latitude)&&rj(e.geoPointValue.longitude)===rj(t.geoPointValue.longitude);case 2:return function(e,t){if("integerValue"in e&&"integerValue"in t)return rj(e.integerValue)===rj(t.integerValue);if("doubleValue"in e&&"doubleValue"in t){let n=rj(e.doubleValue),r=rj(t.doubleValue);return n===r?rk(n)===rk(r):isNaN(n)&&isNaN(r)}return!1}(e,t);case 9:return rh(e.arrayValue.values||[],t.arrayValue.values||[],rW);case 10:return function(e,t){let n=e.mapValue.fields||{},r=t.mapValue.fields||{};if(rT(n)!==rT(r))return!1;for(let e in n)if(n.hasOwnProperty(e)&&(void 0===r[e]||!rW(n[e],r[e])))return!1;return!0}(e,t);default:return n3()}}function rG(e,t){return void 0!==(e.values||[]).find(e=>rW(e,t))}function rK(e,t){if(e===t)return 0;let n=rH(e),r=rH(t);if(n!==r)return rc(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return rc(e.booleanValue,t.booleanValue);case 2:return function(e,t){let n=rj(e.integerValue||e.doubleValue),r=rj(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 rQ(e.timestampValue,t.timestampValue);case 4:return rQ(r$(e),r$(t));case 5:return rc(e.stringValue,t.stringValue);case 6:return function(e,t){let n=rF(e),r=rF(t);return n.compareTo(r)}(e.bytesValue,t.bytesValue);case 7:return function(e,t){let n=e.split("/"),r=t.split("/");for(let e=0;e<n.length&&e<r.length;e++){let t=rc(n[e],r[e]);if(0!==t)return t}return rc(n.length,r.length)}(e.referenceValue,t.referenceValue);case 8:return function(e,t){let n=rc(rj(e.latitude),rj(t.latitude));return 0!==n?n:rc(rj(e.longitude),rj(t.longitude))}(e.geoPointValue,t.geoPointValue);case 9:return function(e,t){let n=e.values||[],r=t.values||[];for(let e=0;e<n.length&&e<r.length;++e){let t=rK(n[e],r[e]);if(t)return t}return rc(n.length,r.length)}(e.arrayValue,t.arrayValue);case 10:return function(e,t){if(e===rq.mapValue&&t===rq.mapValue)return 0;if(e===rq.mapValue)return 1;if(t===rq.mapValue)return -1;let n=e.fields||{},r=Object.keys(n),i=t.fields||{},s=Object.keys(i);r.sort(),s.sort();for(let e=0;e<r.length&&e<s.length;++e){let t=rc(r[e],s[e]);if(0!==t)return t;let o=rK(n[r[e]],i[s[e]]);if(0!==o)return o}return rc(r.length,s.length)}(e.mapValue,t.mapValue);default:throw n3()}}function rQ(e,t){if("string"==typeof e&&"string"==typeof t&&e.length===t.length)return rc(e,t);let n=rZ(e),r=rZ(t),i=rc(n.seconds,r.seconds);return 0!==i?i:rc(n.nanos,r.nanos)}function rY(e){var t,n;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){let t=rZ(e);return`time(${t.seconds},${t.nanos})`}(e.timestampValue):"stringValue"in e?e.stringValue:"bytesValue"in e?rF(e.bytesValue).toBase64():"referenceValue"in e?(n=e.referenceValue,ry.fromName(n).toString()):"geoPointValue"in e?`geo(${(t=e.geoPointValue).latitude},${t.longitude})`:"arrayValue"in e?function(e){let t="[",n=!0;for(let r of e.values||[])n?n=!1:t+=",",t+=rY(r);return t+"]"}(e.arrayValue):"mapValue"in e?function(e){let t=Object.keys(e.fields||{}).sort(),n="{",r=!0;for(let i of t)r?r=!1:n+=",",n+=`${i}:${rY(e.fields[i])}`;return n+"}"}(e.mapValue):n3()}function rX(e){return!!e&&"integerValue"in e}function rJ(e){return!!e&&"arrayValue"in e}function r0(e){return!!e&&"nullValue"in e}function r1(e){return!!e&&"doubleValue"in e&&isNaN(Number(e.doubleValue))}function r2(e){return!!e&&"mapValue"in e}function r4(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){let t={mapValue:{fields:{}}};return rI(e.mapValue.fields,(e,n)=>t.mapValue.fields[e]=r4(n)),t}if(e.arrayValue){let t={arrayValue:{values:[]}};for(let n=0;n<(e.arrayValue.values||[]).length;++n)t.arrayValue.values[n]=r4(e.arrayValue.values[n]);return t}return Object.assign({},e)}function r5(e){return"__max__"===(((e.mapValue||{}).fields||{}).__type__||{}).stringValue}/**
1677 * @license
1678 * Copyright 2017 Google LLC
1679 *
1680 * Licensed under the Apache License, Version 2.0 (the "License");
1681 * you may not use this file except in compliance with the License.
1682 * You may obtain a copy of the License at
1683 *
1684 *   http://www.apache.org/licenses/LICENSE-2.0
1685 *
1686 * Unless required by applicable law or agreed to in writing, software
1687 * distributed under the License is distributed on an "AS IS" BASIS,
1688 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1689 * See the License for the specific language governing permissions and
1690 * limitations under the License.
1691 */class r6{constructor(e){this.value=e}static empty(){return new r6({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let t=this.value;for(let n=0;n<e.length-1;++n)if(!r2(t=(t.mapValue.fields||{})[e.get(n)]))return null;return(t=(t.mapValue.fields||{})[e.lastSegment()])||null}}set(e,t){this.getFieldsMap(e.popLast())[e.lastSegment()]=r4(t)}setAll(e){let t=rv.emptyPath(),n={},r=[];e.forEach((e,i)=>{if(!t.isImmediateParentOf(i)){let e=this.getFieldsMap(t);this.applyChanges(e,n,r),n={},r=[],t=i.popLast()}e?n[i.lastSegment()]=r4(e):r.push(i.lastSegment())});let i=this.getFieldsMap(t);this.applyChanges(i,n,r)}delete(e){let t=this.field(e.popLast());r2(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]}isEqual(e){return rW(this.value,e.value)}getFieldsMap(e){let t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(let n=0;n<e.length;++n){let r=t.mapValue.fields[e.get(n)];r2(r)&&r.mapValue.fields||(r={mapValue:{fields:{}}},t.mapValue.fields[e.get(n)]=r),t=r}return t.mapValue.fields}applyChanges(e,t,n){for(let r of(rI(t,(t,n)=>e[t]=n),n))delete e[r]}clone(){return new r6(r4(this.value))}}/**
1692 * @license
1693 * Copyright 2017 Google LLC
1694 *
1695 * Licensed under the Apache License, Version 2.0 (the "License");
1696 * you may not use this file except in compliance with the License.
1697 * You may obtain a copy of the License at
1698 *
1699 *   http://www.apache.org/licenses/LICENSE-2.0
1700 *
1701 * Unless required by applicable law or agreed to in writing, software
1702 * distributed under the License is distributed on an "AS IS" BASIS,
1703 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1704 * See the License for the specific language governing permissions and
1705 * limitations under the License.
1706 */class r9{constructor(e,t,n,r,i,s,o){this.key=e,this.documentType=t,this.version=n,this.readTime=r,this.createTime=i,this.data=s,this.documentState=o}static newInvalidDocument(e){return new r9(e,0,rf.min(),rf.min(),rf.min(),r6.empty(),0)}static newFoundDocument(e,t,n,r){return new r9(e,1,t,rf.min(),n,r,0)}static newNoDocument(e,t){return new r9(e,2,t,rf.min(),rf.min(),r6.empty(),0)}static newUnknownDocument(e,t){return new r9(e,3,t,rf.min(),rf.min(),r6.empty(),2)}convertToFoundDocument(e,t){return this.createTime.isEqual(rf.min())&&(2===this.documentType||0===this.documentType)&&(this.createTime=e),this.version=e,this.documentType=1,this.data=t,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=r6.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=r6.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=rf.min(),this}setReadTime(e){return this.readTime=e,this}get hasLocalMutations(){return 1===this.documentState}get hasCommittedMutations(){return 2===this.documentState}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return 0!==this.documentType}isFoundDocument(){return 1===this.documentType}isNoDocument(){return 2===this.documentType}isUnknownDocument(){return 3===this.documentType}isEqual(e){return e instanceof r9&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.documentType===e.documentType&&this.documentState===e.documentState&&this.data.isEqual(e.data)}mutableCopy(){return new r9(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}
1706/**
1707 * @license
1708 * Copyright 2022 Google LLC
1709 *
1710 * Licensed under the Apache License, Version 2.0 (the "License");
1711 * you may not use this file except in compliance with the License.
1712 * You may obtain a copy of the License at
1713 *
1714 *   http://www.apache.org/licenses/LICENSE-2.0
1715 *
1716 * Unless required by applicable law or agreed to in writing, software
1717 * distributed under the License is distributed on an "AS IS" BASIS,
1718 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1719 * See the License for the specific language governing permissions and
1720 * limitations under the License.
1721 */class r3{constructor(e,t){this.position=e,this.inclusive=t}}function r7(e,t,n){let r=0;for(let i=0;i<e.position.length;i++){let s=t[i],o=e.position[i];if(r=s.field.isKeyField()?ry.comparator(ry.fromName(o.referenceValue),n.key):rK(o,n.data.field(s.field)),"desc"===s.dir&&(r*=-1),0!==r)break}return r}function r8(e,t){if(null===e)return null===t;if(null===t||e.inclusive!==t.inclusive||e.position.length!==t.position.length)return!1;for(let n=0;n<e.position.length;n++)if(!rW(e.position[n],t.position[n]))return!1;return!0}/**
1722 * @license
1723 * Copyright 2022 Google LLC
1724 *
1725 * Licensed under the Apache License, Version 2.0 (the "License");
1726 * you may not use this file except in compliance with the License.
1727 * You may obtain a copy of the License at
1728 *
1729 *   http://www.apache.org/licenses/LICENSE-2.0
1730 *
1731 * Unless required by applicable law or agreed to in writing, software
1732 * distributed under the License is distributed on an "AS IS" BASIS,
1733 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1734 * See the License for the specific language governing permissions and
1735 * limitations under the License.
1736 */class ie{constructor(e,t="asc"){this.field=e,this.dir=t}}/**
1737 * @license
1738 * Copyright 2022 Google LLC
1739 *
1740 * Licensed under the Apache License, Version 2.0 (the "License");
1741 * you may not use this file except in compliance with the License.
1742 * You may obtain a copy of the License at
1743 *
1744 *   http://www.apache.org/licenses/LICENSE-2.0
1745 *
1746 * Unless required by applicable law or agreed to in writing, software
1747 * distributed under the License is distributed on an "AS IS" BASIS,
1748 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1749 * See the License for the specific language governing permissions and
1750 * limitations under the License.
1751 */class it{}class ir extends it{constructor(e,t,n){super(),this.field=e,this.op=t,this.value=n}static create(e,t,n){return e.isKeyField()?"in"===t||"not-in"===t?this.createKeyFieldInFilter(e,t,n):new ia(e,t,n):"array-contains"===t?new ih(e,n):"in"===t?new id(e,n):"not-in"===t?new ip(e,n):"array-contains-any"===t?new im(e,n):new ir(e,t,n)}static createKeyFieldInFilter(e,t,n){return"in"===t?new il(e,n):new iu(e,n)}matches(e){let t=e.data.field(this.field);return"!="===this.op?null!==t&&this.matchesComparison(rK(t,this.value)):null!==t&&rH(this.value)===rH(t)&&this.matchesComparison(rK(t,this.value))}matchesComparison(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 n3()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}getFirstInequalityField(){return this.isInequality()?this.field:null}}class ii extends it{constructor(e,t){super(),this.filters=e,this.op=t,this.lt=null}static create(e,t){return new ii(e,t)}matches(e){return is(this)?void 0===this.filters.find(t=>!t.matches(e)):void 0!==this.filters.find(t=>t.matches(e))}getFlattenedFilters(){return null!==this.lt||(this.lt=this.filters.reduce((e,t)=>e.concat(t.getFlattenedFilters()),[])),this.lt}getFilters(){return Object.assign([],this.filters)}getFirstInequalityField(){let e=this.ft(e=>e.isInequality());return null!==e?e.field:null}ft(e){for(let t of this.getFlattenedFilters())if(e(t))return t;return null}}function is(e){return"and"===e.op}function io(e){for(let t of e.filters)if(t instanceof ii)return!1;return!0}class ia extends ir{constructor(e,t,n){super(e,t,n),this.key=ry.fromName(n.referenceValue)}
1751matches(e){let t=ry.comparator(e.key,this.key);return this.matchesComparison(t)}}class il extends ir{constructor(e,t){super(e,"in",t),this.keys=ic("in",t)}matches(e){return this.keys.some(t=>t.isEqual(e.key))}}class iu extends ir{constructor(e,t){super(e,"not-in",t),this.keys=ic("not-in",t)}matches(e){return!this.keys.some(t=>t.isEqual(e.key))}}function ic(e,t){var n;return((null===(n=t.arrayValue)||void 0===n?void 0:n.values)||[]).map(e=>ry.fromName(e.referenceValue))}class ih extends ir{constructor(e,t){super(e,"array-contains",t)}matches(e){let t=e.data.field(this.field);return rJ(t)&&rG(t.arrayValue,this.value)}}class id extends ir{constructor(e,t){super(e,"in",t)}matches(e){let t=e.data.field(this.field);return null!==t&&rG(this.value.arrayValue,t)}}class ip extends ir{constructor(e,t){super(e,"not-in",t)}matches(e){if(rG(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;let t=e.data.field(this.field);return null!==t&&!rG(this.value.arrayValue,t)}}class im extends ir{constructor(e,t){super(e,"array-contains-any",t)}matches(e){let t=e.data.field(this.field);return!(!rJ(t)||!t.arrayValue.values)&&t.arrayValue.values.some(e=>rG(this.value.arrayValue,e))}}/**
1752 * @license
1753 * Copyright 2019 Google LLC
1754 *
1755 * Licensed under the Apache License, Version 2.0 (the "License");
1756 * you may not use this file except in compliance with the License.
1757 * You may obtain a copy of the License at
1758 *
1759 *   http://www.apache.org/licenses/LICENSE-2.0
1760 *
1761 * Unless required by applicable law or agreed to in writing, software
1762 * distributed under the License is distributed on an "AS IS" BASIS,
1763 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1764 * See the License for the specific language governing permissions and
1765 * limitations under the License.
1766 */class ig{constructor(e,t=null,n=[],r=[],i=null,s=null,o=null){this.path=e,this.collectionGroup=t,this.orderBy=n,this.filters=r,this.limit=i,this.startAt=s,this.endAt=o,this.dt=null}}function iv(e,t=null,n=[],r=[],i=null,s=null,o=null){return new ig(e,t,n,r,i,s,o)}function iy(e){let t=e;if(null===t.dt){let e=t.path.canonicalString();null!==t.collectionGroup&&(e+="|cg:"+t.collectionGroup),e+="|f:"+t.filters.map(e=>(function e(t){if(t instanceof ir)return t.field.canonicalString()+t.op.toString()+rY(t.value);if(io(t)&&is(t))return t.filters.map(t=>e(t)).join(",");{let n=t.filters.map(t=>e(t)).join(",");return`${t.op}(${n})`}})(e)).join(",")+"|ob:"+t.orderBy.map(e=>e.field.canonicalString()+e.dir).join(","),null==t.limit||(e+="|l:"+t.limit),t.startAt&&(e+="|lb:"+(t.startAt.inclusive?"b:":"a:")+t.startAt.position.map(e=>rY(e)).join(",")),t.endAt&&(e+="|ub:"+(t.endAt.inclusive?"a:":"b:")+t.endAt.position.map(e=>rY(e)).join(",")),t.dt=e}return t.dt}function ib(e,t){if(e.limit!==t.limit||e.orderBy.length!==t.orderBy.length)return!1;for(let i=0;i<e.orderBy.length;i++){var n,r;if(n=e.orderBy[i],r=t.orderBy[i],!(n.dir===r.dir&&n.field.isEqual(r.field)))return!1}if(e.filters.length!==t.filters.length)return!1;for(let n=0;n<e.filters.length;n++)if(!function e(t,n){return t instanceof ir?n instanceof ir&&t.op===n.op&&t.field.isEqual(n.field)&&rW(t.value,n.value):t instanceof ii?n instanceof ii&&t.op===n.op&&t.filters.length===n.filters.length&&t.filters.reduce((t,r,i)=>t&&e(r,n.filters[i]),!0):void n3()}(e.filters[n],t.filters[n]))return!1;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!r8(e.startAt,t.startAt)&&r8(e.endAt,t.endAt)}function iw(e){return ry.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}/**
1767 * @license
1768 * Copyright 2017 Google LLC
1769 *
1770 * Licensed under the Apache License, Version 2.0 (the "License");
1771 * you may not use this file except in compliance with the License.
1772 * You may obtain a copy of the License at
1773 *
1774 *   http://www.apache.org/licenses/LICENSE-2.0
1775 *
1776 * Unless required by applicable law or agreed to in writing, software
1777 * distributed under the License is distributed on an "AS IS" BASIS,
1778 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1779 * See the License for the specific language governing permissions and
1780 * limitations under the License.
1781 */class i_{constructor(e,t=null,n=[],r=[],i=null,s="F",o=null,a=null){this.path=e,this.collectionGroup=t,this.explicitOrderBy=n,this.filters=r,this.limit=i,this.limitType=s,this.startAt=o,this.endAt=a,this.wt=null,this._t=null,this.startAt,this.endAt}}function iE(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 ix(e){let t=e;if(null===t.wt){t.wt=[];let e=function(e){for(let t of e.filters){let e=t.getFirstInequalityField();if(null!==e)return e}return null}(t),n=t.explicitOrderBy.length>0?t.explicitOrderBy[0].field:null;if(null!==e&&null===n)e.isKeyField()||t.wt.push(new ie(e)),t.wt.push(new ie(rv.keyField(),"asc"));else{let e=!1;for(let n of t.explicitOrderBy)t.wt.push(n),n.field.isKeyField()&&(e=!0);if(!e){let e=t.explicitOrderBy.length>0?t.explicitOrderBy[t.explicitOrderBy.length-1].dir:"asc";t.wt.push(new ie(rv.keyField(),e))}}}return t.wt}function iS(e){let t=e;if(!t._t){if("F"===t.limitType)t._t=iv(t.path,t.collectionGroup,ix(t),t.filters,t.limit,t.startAt,t.endAt);else{let e=[];for(let n of ix(t)){let t="desc"===n.dir?"asc":"desc";e.push(new ie(n.field,t))}let n=t.endAt?new r3(t.endAt.position,t.endAt.inclusive):null,r=t.startAt?new r3(t.startAt.position,t.startAt.inclusive):null;t._t=iv(t.path,t.collectionGroup,e,t.filters,t.limit,n,r)}}return t._t}function ik(e,t,n){return new i_(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),t,n,e.startAt,e.endAt)}function iT(e,t){return ib(iS(e),iS(t))&&e.limitType===t.limitType}function iI(e){return`${iy(iS(e))}|lt:${e.limitType}`}function iC(e){var t;let n;return`Query(target=${n=(t=iS(e)).path.canonicalString(),null!==t.collectionGroup&&(n+=" collectionGroup="+t.collectionGroup),t.filters.length>0&&(n+=`, filters: [${t.filters.map(e=>(function e(t){return t instanceof ir?`${t.field.canonicalString()} ${t.op} ${rY(t.value)}`:t instanceof ii?t.op.toString()+" {"+t.getFilters().map(e).join(" ,")+"}":"Filter"})(e)).join(", ")}]`),null==t.limit||(n+=", limit: "+t.limit),t.orderBy.length>0&&(n+=`, orderBy: [${t.orderBy.map(e=>`${e.field.canonicalString()} (${e.dir})`).join(", ")}]`),t.startAt&&(n+=", startAt: "+(t.startAt.inclusive?"b:":"a:")+t.startAt.position.map(e=>rY(e)).join(",")),t.endAt&&(n+=", endAt: "+(t.endAt.inclusive?"a:":"b:")+t.endAt.position.map(e=>rY(e)).join(",")),`Target(${n})`}; limitType=${e.limitType})`}function iA(e,t){return t.isFoundDocument()&&function(e,t){let n=t.key.path;return null!==e.collectionGroup?t.key.hasCollectionId(e.collectionGroup)&&e.path.isPrefixOf(n):ry.isDocumentKey(e.path)?e.path.isEqual(n):e.path.isImmediateParentOf(n)}(e,t)&&function(e,t){for(let n of ix(e))if(!n.field.isKeyField()&&null===t.data.field(n.field))return!1;return!0}(e,t)&&function(e,t){for(let n of e.filters)if(!n.matches(t))return!1;return!0}(e,t)&&(!e.startAt||!!function(e,t,n){let r=r7(e,t,n);return e.inclusive?r<=0:r<0}(e.startAt,ix(e),t))&&(!e.endAt||!!function(e,t,n){let r=r7(e,t,n);return e.inclusive?r>=0:r>0}(e.endAt,ix(e),t))}function iO(e){return(t,n)=>{let r=!1;for(let i of ix(e)){let e=function(e,t,n){let r=e.field.isKeyField()?ry.comparator(t.key,n.key):function(e,t,n){let r=t.data.field(e),i=n.data.field(e);return null!==r&&null!==i?rK(r,i):n3()}(e.field,t,n);switch(e.dir){case"asc":return r;case"desc":return -1*r;default:return n3()}}(i,t,n);if(0!==e)return e;r=r||i.field.isKeyField()}return 0}}/**
1782 * @license
1783 * Copyright 2017 Google LLC
1784 *
1785 * Licensed under the Apache License, Version 2.0 (the "License");
1786 * you may not use this file except in compliance with the License.
1787 * You may obtain a copy of the License at
1788 *
1789 *   http://www.apache.org/licenses/LICENSE-2.0
1790 *
1791 * Unless required by applicable law or agreed to in writing, software
1792 * distributed under the License is distributed on an "AS IS" BASIS,
1793 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1794 * See the License for the specific language governing permissions and
1795 * limitations under the License.
1796 */class iR{constructor(e,t){this.mapKeyFn=e,this.equalsFn=t,this.inner={},this.innerSize=0}get(e){let t=this.mapKeyFn(e),n=this.inner[t];if(void 0!==n){for(let[t,r]of n)if(this.equalsFn(t,e))return r}}has(e){return void 0!==this.get(e)}set(e,t){let n=this.mapKeyFn(e),r=this.inner[n];if(void 0===r)return this.inner[n]=[[e,t]],void this.innerSize++;for(let n=0;n<r.length;n++)if(this.equalsFn(r[n][0],e))return void(r[n]=[e,t]);r.push([e,t]),this.innerSize++}delete(e){let t=this.mapKeyFn(e),n=this.inner[t];if(void 0===n)return!1;for(let 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}forEach(e){rI(this.inner,(t,n)=>{for(let[t,r]of n)e(t,r)})}isEmpty(){return function(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}(this.inner)}size(){return this.innerSize}}/**
1797 * @license
1798 * Copyright 2017 Google LLC
1799 *
1800 * Licensed under the Apache License, Version 2.0 (the "License");
1801 * you may not use this file except in compliance with the License.
1802 * You may obtain a copy of the License at
1803 *
1804 *   http://www.apache.org/licenses/LICENSE-2.0
1805 *
1806 * Unless required by applicable law or agreed to in writing, software
1807 * distributed under the License is distributed on an "AS IS" BASIS,
1808 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1809 * See the License for the specific language governing permissions and
1810 * limitations under the License.
1811 */let iP=new rC(ry.comparator),iN=new rC(ry.comparator);function iD(...e){let t=iN;for(let n of e)t=t.insert(n.key,n);return t}function iM(){return new iR(e=>e.toString(),(e,t)=>e.isEqual(t))}new rC(ry.comparator);let iL=new rR(ry.comparator);function iZ(...e){let t=iL;for(let n of e)t=t.add(n);return t}let ij=new rR(rc);/**
1812 * @license
1813 * Copyright 2018 Google LLC
1814 *
1815 * Licensed under the Apache License, Version 2.0 (the "License");
1816 * you may not use this file except in compliance with the License.
1817 * You may obtain a copy of the License at
1818 *
1819 *   http://www.apache.org/licenses/LICENSE-2.0
1820 *
1821 * Unless required by applicable law or agreed to in writing, software
1822 * distributed under the License is distributed on an "AS IS" BASIS,
1823 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1824 * See the License for the specific language governing permissions and
1825 * limitations under the License.
1826 */class iF{constructor(){this._=void 0}}class iU extends iF{}class iV extends iF{constructor(e){super(),this.elements=e}}function i$(e,t){let n=iW(t);for(let t of e.elements)n.some(e=>rW(e,t))||n.push(t);return{arrayValue:{values:n}}}class iz extends iF{constructor(e){super(),this.elements=e}}function iB(e,t){let n=iW(t);for(let t of e.elements)n=n.filter(e=>!rW(e,t));return{arrayValue:{values:n}}}class iq extends iF{constructor(e,t){super(),this.serializer=e,this.gt=t}}function iH(e){return rj(e.integerValue||e.doubleValue)}function iW(e){return rJ(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}class iG{constructor(e,t){this.updateTime=e,this.exists=t}static none(){return new iG}static exists(e){return new iG(void 0,e)}static updateTime(e){return new iG(e)}get isNone(){return void 0===this.updateTime&&void 0===this.exists}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}function iK(e,t){return void 0!==e.updateTime?t.isFoundDocument()&&t.version.isEqual(e.updateTime):void 0===e.exists||e.exists===t.isFoundDocument()}class iQ{}function iY(e,t){if(!e.hasLocalMutations||t&&0===t.fields.length)return null;if(null===t)return e.isNoDocument()?new i6(e.key,iG.none()):new i0(e.key,e.data,iG.none());{let n=e.data,r=r6.empty(),i=new rR(rv.comparator);for(let e of t.fields)if(!i.has(e)){let t=n.field(e);null===t&&e.length>1&&(e=e.popLast(),t=n.field(e)),null===t?r.delete(e):r.set(e,t),i=i.add(e)}return new i1(e.key,r,new rN(i.toArray()),iG.none())}}function iX(e,t,n,r){return e instanceof i0?function(e,t,n,r){if(!iK(e.precondition,t))return n;let i=e.value.clone(),s=i5(e.fieldTransforms,r,t);return i.setAll(s),t.convertToFoundDocument(t.version,i).setHasLocalMutations(),null}(e,t,n,r):e instanceof i1?function(e,t,n,r){if(!iK(e.precondition,t))return n;let i=i5(e.fieldTransforms,r,t),s=t.data;return(s.setAll(i2(e)),s.setAll(i),t.convertToFoundDocument(t.version,s).setHasLocalMutations(),null===n)?null:n.unionWith(e.fieldMask.fields).unionWith(e.fieldTransforms.map(e=>e.field))}(e,t,n,r):iK(e.precondition,t)?(t.convertToNoDocument(t.version).setHasLocalMutations(),null):n}function iJ(e,t){var n,r;return e.type===t.type&&!!e.key.isEqual(t.key)&&!!e.precondition.isEqual(t.precondition)&&(n=e.fieldTransforms,r=t.fieldTransforms,!!(void 0===n&&void 0===r||!(!n||!r)&&rh(n,r,(e,t)=>{var n,r;return e.field.isEqual(t.field)&&(n=e.transform,r=t.transform,n instanceof iV&&r instanceof iV||n instanceof iz&&r instanceof iz?rh(n.elements,r.elements,rW):n instanceof iq&&r instanceof iq?rW(n.gt,r.gt):n instanceof iU&&r instanceof iU)})))&&(0===e.type?e.value.isEqual(t.value):1!==e.type||e.data.isEqual(t.data)&&e.fieldMask.isEqual(t.fieldMask))}class i0 extends iQ{constructor(e,t,n,r=[]){super(),this.key=e,this.value=t,this.prec
1826ondition=n,this.fieldTransforms=r,this.type=0}getFieldMask(){return null}}class i1 extends iQ{constructor(e,t,n,r,i=[]){super(),this.key=e,this.data=t,this.fieldMask=n,this.precondition=r,this.fieldTransforms=i,this.type=1}getFieldMask(){return this.fieldMask}}function i2(e){let t=new Map;return e.fieldMask.fields.forEach(n=>{if(!n.isEmpty()){let r=e.data.field(n);t.set(n,r)}}),t}function i4(e,t,n){var r;let i=new Map;e.length===n.length||n3();for(let s=0;s<n.length;s++){let o=e[s],a=o.transform,l=t.data.field(o.field);i.set(o.field,(r=n[s],a instanceof iV?i$(a,l):a instanceof iz?iB(a,l):r))}return i}function i5(e,t,n){let r=new Map;for(let i of e){let e=i.transform,s=n.data.field(i.field);r.set(i.field,e instanceof iU?function(e,t){let n={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:e.seconds,nanos:e.nanoseconds}}}};return t&&rU(t)&&(t=rV(t)),t&&(n.fields.__previous_value__=t),{mapValue:n}}(t,s):e instanceof iV?i$(e,s):e instanceof iz?iB(e,s):function(e,t){var n,r;let i=(n=e,r=t,n instanceof iq?rX(r)||r&&"doubleValue"in r?r:{integerValue:0}:null),s=iH(i)+iH(e.gt);return rX(i)&&rX(e.gt)?{integerValue:""+s}:/**
1827 * @license
1828 * Copyright 2020 Google LLC
1829 *
1830 * Licensed under the Apache License, Version 2.0 (the "License");
1831 * you may not use this file except in compliance with the License.
1832 * You may obtain a copy of the License at
1833 *
1834 *   http://www.apache.org/licenses/LICENSE-2.0
1835 *
1836 * Unless required by applicable law or agreed to in writing, software
1837 * distributed under the License is distributed on an "AS IS" BASIS,
1838 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1839 * See the License for the specific language governing permissions and
1840 * limitations under the License.
1841 */function(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:rk(t)?"-0":t}}(e.serializer,s)}(e,s))}return r}class i6 extends iQ{constructor(e,t){super(),this.key=e,this.precondition=t,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}}/**
1842 * @license
1843 * Copyright 2017 Google LLC
1844 *
1845 * Licensed under the Apache License, Version 2.0 (the "License");
1846 * you may not use this file except in compliance with the License.
1847 * You may obtain a copy of the License at
1848 *
1849 *   http://www.apache.org/licenses/LICENSE-2.0
1850 *
1851 * Unless required by applicable law or agreed to in writing, software
1852 * distributed under the License is distributed on an "AS IS" BASIS,
1853 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1854 * See the License for the specific language governing permissions and
1855 * limitations under the License.
1856 */class i9{constructor(e,t,n,r){this.batchId=e,this.localWriteTime=t,this.baseMutations=n,this.mutations=r}applyToRemoteDocument(e,t){let n=t.mutationResults;for(let t=0;t<this.mutations.length;t++){let i=this.mutations[t];if(i.key.isEqual(e.key)){var r;r=n[t],i instanceof i0?function(e,t,n){let r=e.value.clone(),i=i4(e.fieldTransforms,t,n.transformResults);r.setAll(i),t.convertToFoundDocument(n.version,r).setHasCommittedMutations()}(i,e,r):i instanceof i1?function(e,t,n){if(!iK(e.precondition,t))return void t.convertToUnknownDocument(n.version);let r=i4(e.fieldTransforms,t,n.transformResults),i=t.data;i.setAll(i2(e)),i.setAll(r),t.convertToFoundDocument(n.version,i).setHasCommittedMutations()}(i,e,r):function(e,t,n){t.convertToNoDocument(n.version).setHasCommittedMutations()}(0,e,r)}}}applyToLocalView(e,t){for(let n of this.baseMutations)n.key.isEqual(e.key)&&(t=iX(n,e,t,this.localWriteTime));for(let n of this.mutations)n.key.isEqual(e.key)&&(t=iX(n,e,t,this.localWriteTime));return t}applyToLocalDocumentSet(e,t){let n=iM();return this.mutations.forEach(r=>{let i=e.get(r.key),s=i.overlayedDocument,o=this.applyToLocalView(s,i.mutatedFields);o=t.has(r.key)?null:o;let a=iY(s,o);null!==a&&n.set(r.key,a),s.isValidDocument()||s.convertToNoDocument(rf.min())}),n}keys(){return this.mutations.reduce((e,t)=>e.add(t.key),iZ())}isEqual(e){return this.batchId===e.batchId&&rh(this.mutations,e.mutations,(e,t)=>iJ(e,t))&&rh(this.baseMutations,e.baseMutations,(e,t)=>iJ(e,t))}}/**
1857 * @license
1858 * Copyright 2022 Google LLC
1859 *
1860 * Licensed under the Apache License, Version 2.0 (the "License");
1861 * you may not use this file except in compliance with the License.
1862 * You may obtain a copy of the License at
1863 *
1864 *   http://www.apache.org/licenses/LICENSE-2.0
1865 *
1866 * Unless required by applicable law or agreed to in writing, software
1867 * distributed under the License is distributed on an "AS IS" BASIS,
1868 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1869 * See the License for the specific language governing permissions and
1870 * limitations under the License.
1871 */class i3{constructor(e,t){this.largestBatchId=e,this.mutation=t}getKey(){return this.mutation.key}isEqual(e){return null!==e&&this.mutation===e.mutation}toString(){return`Overlay{
1872      largestBatchId: ${this.largestBatchId},
1873      mutation: ${this.mutation.toString()}
1874    }`}}/**
1875 * @license
1876 * Copyright 2017 Google LLC
1877 *
1878 * Licensed under the Apache License, Version 2.0 (the "License");
1879 * you may not use this file except in compliance with the License.
1880 * You may obtain a copy of the License at
1881 *
1882 *   http://www.apache.org/licenses/LICENSE-2.0
1883 *
1884 * Unless required by applicable law or agreed to in writing, software
1885 * distributed under the License is distributed on an "AS IS" BASIS,
1886 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1887 * See the License for the specific language governing permissions and
1888 * limitations under the License.
1889 */class i7{constructor(e,t){this.count=e,this.unchangedNames=t}}function i8(e){if(void 0===e)return n5("GRPC error has no .code"),n7.UNKNOWN;switch(e){case a.OK:return n7.OK;case a.CANCELLED:return n7.CANCELLED;case a.UNKNOWN:return n7.UNKNOWN;case a.DEADLINE_EXCEEDED:return n7.DEADLINE_EXCEEDED;case a.RESOURCE_EXHAUSTED:return n7.RESOURCE_EXHAUSTED;case a.INTERNAL:return n7.INTERNAL;case a.UNAVAILABLE:return n7.UNAVAILABLE;case a.UNAUTHENTICATED:return n7.UNAUTHENTICATED;case a.INVALID_ARGUMENT:return n7.INVALID_ARGUMENT;case a.NOT_FOUND:return n7.NOT_FOUND;case a.ALREADY_EXISTS:return n7.ALREADY_EXISTS;case a.PERMISSION_DENIED:return n7.PERMISSION_DENIED;case a.FAILED_PRECONDITION:return n7.FAILED_PRECONDITION;case a.ABORTED:return n7.ABORTED;case a.OUT_OF_RANGE:return n7.OUT_OF_RANGE;case a.UNIMPLEMENTED:return n7.UNIMPLEMENTED;case a.DATA_LOSS:return n7.DATA_LOSS;default:return n3()}}(l=a||(a={}))[l.OK=0]="OK",l[l.CANCELLED=1]="CANCELLED",l[l.UNKNOWN=2]="UNKNOWN",l[l.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",l[l.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",l[l.NOT_FOUND=5]="NOT_FOUND",l[l.ALREADY_EXISTS=6]="ALREADY_EXISTS",l[l.PERMISSION_DENIED=7]="PERMISSION_DENIED",l[l.UNAUTHENTICATED=16]="UNAUTHENTICATED",l[l.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",l[l.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",l[l.ABORTED=10]="ABORTED",l[l.OUT_OF_RANGE=11]="OUT_OF_RANGE",l[l.UNIMPLEMENTED=12]="UNIMPLEMENTED",l[l.INTERNAL=13]="INTERNAL",l[l.UNAVAILABLE=14]="UNAVAILABLE",l[l.DATA_LOSS=15]="DATA_LOSS";/**
1890 * @license
1891 * Copyright 2023 Google LLC
1892 *
1893 * Licensed under the Apache License, Version 2.0 (the "License");
1894 * you may not use this file except in compliance with the License.
1895 * You may obtain a copy of the License at
1896 *
1897 *   http://www.apache.org/licenses/LICENSE-2.0
1898 *
1899 * Unless required by applicable law or agreed to in writing, software
1900 * distributed under the License is distributed on an "AS IS" BASIS,
1901 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1902 * See the License for the specific language governing permissions and
1903 * limitations under the License.
1904 */class se{constructor(){this.onExistenceFilterMismatchCallbacks=new Map}static get instance(){return st}static getOrCreateInstance(){return null===st&&(st=new se),st}onExistenceFilterMismatch(e){let t=Symbol();return this.onExistenceFilterMismatchCallbacks.set(t,e),()=>this.onExistenceFilterMismatchCallbacks.delete(t)}notifyOnExistenceFilterMismatch(e){this.onExistenceFilterMismatchCallbacks.forEach(t=>t(e))}}let st=null,sn=new nY([4294967295,4294967295],0);function sr(e){let t=(new TextEncoder).encode(e),n=new nQ;return n.update(t),new Uint8Array(n.digest())}function si(e){let t=new DataView(e.buffer),n=t.getUint32(0,!0),r=t.getUint32(4,!0),i=t.getUint32(8,!0),s=t.getUint32(12,!0);return[new nY([n,r],0),new nY([i,s],0)]}class ss{constructor(e,t,n){if(this.bitmap=e,this.padding=t,this.hashCount=n,t<0||t>=8)throw new so(`Invalid padding: ${t}`);if(n<0||e.length>0&&0===this.hashCount)throw new so(`Invalid hash count: ${n}`);if(0===e.length&&0!==t)throw new so(`Invalid padding when bitmap length is 0: ${t}`);this.It=8*e.length-t,this.Tt=nY.fromNumber(this.It)}Et(e,t,n){let r=e.add(t.multiply(nY.fromNumber(n)));return 1===r.compare(sn)&&(r=new nY([r.getBits(0),r.getBits(1)],0)),r.modulo(this.Tt).toNumber()}At(e){return 0!=(this.bitmap[Math.floor(e/8)]&1<<e%8)}vt(e){if(0===this.It)return!1;let t=sr(e),[n,r]=si(t);for(let e=0;e<this.hashCount;e++){let t=this.Et(n,r,e);if(!this.At(t))return!1}return!0}static create(e,t,n){let r=new Uint8Array(Math.ceil(e/8)),i=new ss(r,e%8==0?0:8-e%8,t);
1904return n.forEach(e=>i.insert(e)),i}insert(e){if(0===this.It)return;let t=sr(e),[n,r]=si(t);for(let e=0;e<this.hashCount;e++){let t=this.Et(n,r,e);this.Rt(t)}}Rt(e){this.bitmap[Math.floor(e/8)]|=1<<e%8}}class so extends Error{constructor(){super(...arguments),this.name="BloomFilterError"}}/**
1905 * @license
1906 * Copyright 2017 Google LLC
1907 *
1908 * Licensed under the Apache License, Version 2.0 (the "License");
1909 * you may not use this file except in compliance with the License.
1910 * You may obtain a copy of the License at
1911 *
1912 *   http://www.apache.org/licenses/LICENSE-2.0
1913 *
1914 * Unless required by applicable law or agreed to in writing, software
1915 * distributed under the License is distributed on an "AS IS" BASIS,
1916 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1917 * See the License for the specific language governing permissions and
1918 * limitations under the License.
1919 */class sa{constructor(e,t,n,r,i){this.snapshotVersion=e,this.targetChanges=t,this.targetMismatches=n,this.documentUpdates=r,this.resolvedLimboDocuments=i}static createSynthesizedRemoteEventForCurrentChange(e,t,n){let r=new Map;return r.set(e,sl.createSynthesizedTargetChangeForCurrentChange(e,t,n)),new sa(rf.min(),r,new rC(rc),iP,iZ())}}class sl{constructor(e,t,n,r,i){this.resumeToken=e,this.current=t,this.addedDocuments=n,this.modifiedDocuments=r,this.removedDocuments=i}static createSynthesizedTargetChangeForCurrentChange(e,t,n){return new sl(n,t,iZ(),iZ(),iZ())}}/**
1920 * @license
1921 * Copyright 2017 Google LLC
1922 *
1923 * Licensed under the Apache License, Version 2.0 (the "License");
1924 * you may not use this file except in compliance with the License.
1925 * You may obtain a copy of the License at
1926 *
1927 *   http://www.apache.org/licenses/LICENSE-2.0
1928 *
1929 * Unless required by applicable law or agreed to in writing, software
1930 * distributed under the License is distributed on an "AS IS" BASIS,
1931 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1932 * See the License for the specific language governing permissions and
1933 * limitations under the License.
1934 */class su{constructor(e,t,n,r){this.Pt=e,this.removedTargetIds=t,this.key=n,this.bt=r}}class sc{constructor(e,t){this.targetId=e,this.Vt=t}}class sh{constructor(e,t,n=rM.EMPTY_BYTE_STRING,r=null){this.state=e,this.targetIds=t,this.resumeToken=n,this.cause=r}}class sd{constructor(){this.St=0,this.Dt=sm(),this.Ct=rM.EMPTY_BYTE_STRING,this.xt=!1,this.Nt=!0}get current(){return this.xt}get resumeToken(){return this.Ct}get kt(){return 0!==this.St}get Mt(){return this.Nt}$t(e){e.approximateByteSize()>0&&(this.Nt=!0,this.Ct=e)}Ot(){let e=iZ(),t=iZ(),n=iZ();return this.Dt.forEach((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:n3()}}),new sl(this.Ct,this.xt,e,t,n)}Ft(){this.Nt=!1,this.Dt=sm()}Bt(e,t){this.Nt=!0,this.Dt=this.Dt.insert(e,t)}Lt(e){this.Nt=!0,this.Dt=this.Dt.remove(e)}qt(){this.St+=1}Ut(){this.St-=1}Kt(){this.Nt=!0,this.xt=!0}}class sf{constructor(e){this.Gt=e,this.Qt=new Map,this.jt=iP,this.zt=sp(),this.Wt=new rC(rc)}Ht(e){for(let t of e.Pt)e.bt&&e.bt.isFoundDocument()?this.Jt(t,e.bt):this.Yt(t,e.key,e.bt);for(let t of e.removedTargetIds)this.Yt(t,e.key,e.bt)}Xt(e){this.forEachTarget(e,t=>{let n=this.Zt(t);switch(e.state){case 0:this.te(t)&&n.$t(e.resumeToken);break;case 1:n.Ut(),n.kt||n.Ft(),n.$t(e.resumeToken);break;case 2:n.Ut(),n.kt||this.removeTarget(t);break;case 3:this.te(t)&&(n.Kt(),n.$t(e.resumeToken));break;case 4:this.te(t)&&(this.ee(t),n.$t(e.resumeToken));break;default:n3()}})}forEachTarget(e,t){e.targetIds.length>0?e.targetIds.forEach(t):this.Qt.forEach((e,n)=>{this.te(n)&&t(n)})}ne(e){var t;let n=e.targetId,r=e.Vt.count,i=this.se(n);if(i){let s=i.target;if(iw(s)){if(0===r){let e=new ry(s.path);this.Yt(n,e,r9.newNoDocument(e,rf.min()))}else 1===r||n3()}else{let i=this.ie(n);if(i!==r){let r=this.re(e,i);0!==r&&(this.ee(n),this.Wt=this.Wt.insert(n,2===r?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch")),null===(t=se.instance)||void 0===t||t.notifyOnExistenceFilterMismatch(function(e,t,n){var r,i,s,o,a,l;let u={localCacheCount:t,existenceFilterCount:n.count},c=n.unchangedNames;return c&&(u.bloomFilter={applied:0===e,hashCount:null!==(r=null==c?void 0:c.hashCount)&&void 0!==r?r:0,bitmapLength:null!==(o=null===(s=null===(i=null==c?void 0:c.bits)||void 0===i?void 0:i.bitmap)||void 0===s?void 0:s.length)&&void 0!==o?o:0,padding:null!==(l=null===(a=null==c?void 0:c.bits)||void 0===a?void 0:a.padding)&&void 0!==l?l:0}),u}(r,i,e.Vt))}}}}re(e,t){let n,r;let{unchangedNames:i,count:s}=e.Vt;if(!i||!i.bits)return 1;let{bits:{bitmap:o="",padding:a=0},hashCount:l=0}=i;try{n=rF(o).toUint8Array()}catch(e){if(e instanceof rD)return n6("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{r=new ss(n,a,l)}catch(e){return n6(e instanceof so?"BloomFilter error: ":"Applying bloom filter failed: ",e),1}return 0===r.It?1:s!==t-this.oe(e.targetId,r)?2:0}oe(e,t){let n=this.Gt.getRemoteKeysForTarget(e),r=0;
1934return n.forEach(n=>{let i=this.Gt.ue(),s=`projects/${i.projectId}/databases/${i.database}/documents/${n.path.canonicalString()}`;t.vt(s)||(this.Yt(e,n,null),r++)}),r}ce(e){let t=new Map;this.Qt.forEach((n,r)=>{let i=this.se(r);if(i){if(n.current&&iw(i.target)){let t=new ry(i.target.path);null!==this.jt.get(t)||this.ae(r,t)||this.Yt(r,t,r9.newNoDocument(t,e))}n.Mt&&(t.set(r,n.Ot()),n.Ft())}});let n=iZ();this.zt.forEach((e,t)=>{let r=!0;t.forEachWhile(e=>{let t=this.se(e);return!t||"TargetPurposeLimboResolution"===t.purpose||(r=!1,!1)}),r&&(n=n.add(e))}),this.jt.forEach((t,n)=>n.setReadTime(e));let r=new sa(e,t,this.Wt,this.jt,n);return this.jt=iP,this.zt=sp(),this.Wt=new rC(rc),r}Jt(e,t){if(!this.te(e))return;let n=this.ae(e,t.key)?2:0;this.Zt(e).Bt(t.key,n),this.jt=this.jt.insert(t.key,t),this.zt=this.zt.insert(t.key,this.he(t.key).add(e))}Yt(e,t,n){if(!this.te(e))return;let r=this.Zt(e);this.ae(e,t)?r.Bt(t,1):r.Lt(t),this.zt=this.zt.insert(t,this.he(t).delete(e)),n&&(this.jt=this.jt.insert(t,n))}removeTarget(e){this.Qt.delete(e)}ie(e){let t=this.Zt(e).Ot();return this.Gt.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size}qt(e){this.Zt(e).qt()}Zt(e){let t=this.Qt.get(e);return t||(t=new sd,this.Qt.set(e,t)),t}he(e){let t=this.zt.get(e);return t||(t=new rR(rc),this.zt=this.zt.insert(e,t)),t}te(e){let t=null!==this.se(e);return t||n4("WatchChangeAggregator","Detected inactive target",e),t}se(e){let t=this.Qt.get(e);return t&&t.kt?null:this.Gt.le(e)}ee(e){this.Qt.set(e,new sd),this.Gt.getRemoteKeysForTarget(e).forEach(t=>{this.Yt(e,t,null)})}ae(e,t){return this.Gt.getRemoteKeysForTarget(e).has(t)}}function sp(){return new rC(ry.comparator)}function sm(){return new rC(ry.comparator)}let sg={asc:"ASCENDING",desc:"DESCENDING"},sv={"<":"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"},sy={and:"AND",or:"OR"};class sb{constructor(e,t){this.databaseId=e,this.useProto3Json=t}}function sw(e,t){return e.useProto3Json||null==t?t:{value:t}}function s_(e){return e||n3(),rf.fromTimestamp(function(e){let t=rZ(e);return new rd(t.seconds,t.nanos)}(e))}function sE(e){let t=rm.fromString(e);return sA(t)||n3(),t}function sx(e,t){let n=sE(t);if(n.get(1)!==e.databaseId.projectId)throw new n8(n7.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 n8(n7.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+e.databaseId.database);return new ry(sT(n))}function sS(e,t){var n;return n=e.databaseId,new rm(["projects",n.projectId,"databases",n.database]).child("documents").child(t).canonicalString()}function sk(e){return new rm(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function sT(e){return e.length>4&&"documents"===e.get(4)||n3(),e.popFirst(5)}function sI(e){return{fieldPath:e.canonicalString()}}function sC(e){return rv.fromServerFormat(e.fieldPath)}function sA(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)}/**
1935 * @license
1936 * Copyright 2017 Google LLC
1937 *
1938 * Licensed under the Apache License, Version 2.0 (the "License");
1939 * you may not use this file except in compliance with the License.
1940 * You may obtain a copy of the License at
1941 *
1942 *   http://www.apache.org/licenses/LICENSE-2.0
1943 *
1944 * Unless required by applicable law or agreed to in writing, software
1945 * distributed under the License is distributed on an "AS IS" BASIS,
1946 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1947 * See the License for the specific language governing permissions and
1948 * limitations under the License.
1949 */class sO{constructor(e,t,n,r,i=rf.min(),s=rf.min(),o=rM.EMPTY_BYTE_STRING,a=null){this.target=e,this.targetId=t,this.purpose=n,this.sequenceNumber=r,this.snapshotVersion=i,this.lastLimboFreeSnapshotVersion=s,this.resumeToken=o,this.expectedCount=a}withSequenceNumber(e){return new sO(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(e,t){return new sO(this.target,this.targetId,this.purpose,this.sequenceNumber,t,this.lastLimboFreeSnapshotVersion,e,null)}withExpectedCount(e){return new sO(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,e)}withLastLimboFreeSnapshotVersion(e){return new sO(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken,this.expectedCount)}}/**
1950 * @license
1951 * Copyright 2017 Google LLC
1952 *
1953 * Licensed under the Apache License, Version 2.0 (the "License");
1954 * you may not use this file except in compliance with the License.
1955 * You may obtain a copy of the License at
1956 *
1957 *   http://www.apache.org/licenses/LICENSE-2.0
1958 *
1959 * Unless required by applicable law or agreed to in writing, software
1960 * distributed under the License is distributed on an "AS IS" BASIS,
1961 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1962 * See the License for the specific language governing permissions and
1963 * limitations under the License.
1964 */class sR{constructor(e){this.fe=e}}/**
1965 * @license
1966 * Copyright 2021 Google LLC
1967 *
1968 * Licensed under the Apache License, Version 2.0 (the "License");
1969 * you may not use this file except in compliance with the License.
1970 * You may obtain a copy of the License at
1971 *
1972 *   http://www.apache.org/licenses/LICENSE-2.0
1973 *
1974 * Unless required by applicable law or agreed to in writing, software
1975 * distributed under the License is distributed on an "AS IS" BASIS,
1976 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1977 * See the License for the specific language governing permissions and
1978 * limitations under the License.
1979 */class sP{constructor(){}_e(e,t){this.me(e,t),t.ge()}me(e,t){if("nullValue"in e)this.ye(t,5);else if("booleanValue"in e)this.ye(t,10),t.pe(e.booleanValue?1:0);else if("integerValue"in e)this.ye(t,15),t.pe(rj(e.integerValue));else if("doubleValue"in e){let n=rj(e.doubleValue);isNaN(n)?this.ye(t,13):(this.ye(t,15),rk(n)?t.pe(0):t.pe(n))}else if("timestampValue"in e){let n=e.timestampValue;this.ye(t,20),"string"==typeof n?t.Ie(n):(t.Ie(`${n.seconds||""}`),t.pe(n.nanos||0))}else if("stringValue"in e)this.Te(e.stringValue,t),this.Ee(t);else if("bytesValue"in e)this.ye(t,30),t.Ae(rF(e.bytesValue)),this.Ee(t);else if("referenceValue"in e)this.ve(e.referenceValue,t);else if("geoPointValue"in e){let n=e.geoPointValue;this.ye(t,45),t.pe(n.latitude||0),t.pe(n.longitude||0)}else"mapValue"in e?r5(e)?this.ye(t,Number.MAX_SAFE_INTEGER):(this.Re(e.mapValue,t),this.Ee(t)):"arrayValue"in e?(this.Pe(e.arrayValue,t),this.Ee(t)):n3()}Te(e,t){this.ye(t,25),this.be(e,t)}be(e,t){t.Ie(e)}Re(e,t){let n=e.fields||{};for(let e of(this.ye(t,55),Object.keys(n)))this.Te(e,t),this.me(n[e],t)}Pe(e,t){let n=e.values||[];for(let e of(this.ye(t,50),n))this.me(e,t)}ve(e,t){this.ye(t,37),ry.fromName(e).path.forEach(e=>{this.ye(t,60),this.be(e,t)})}ye(e,t){e.pe(t)}Ee(e){e.pe(2)}}sP.Ve=new sP;/**
1980 * @license
1981 * Copyright 2019 Google LLC
1982 *
1983 * Licensed under the Apache License, Version 2.0 (the "License");
1984 * you may not use this file except in compliance with the License.
1985 * You may obtain a copy of the License at
1986 *
1987 *   http://www.apache.org/licenses/LICENSE-2.0
1988 *
1989 * Unless required by applicable law or agreed to in writing, software
1990 * distributed under the License is distributed on an "AS IS" BASIS,
1991 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1992 * See the License for the specific language governing permissions and
1993 * limitations under the License.
1994 */class sN{constructor(){this.rn=new sD}addToCollectionParentIndex(e,t){return this.rn.add(t),rE.resolve()}getCollectionParents(e,t){return rE.resolve(this.rn.getEntries(t))}addFieldIndex(e,t){return rE.resolve()}deleteFieldIndex(e,t){return rE.resolve()}getDocumentsMatchingTarget(e,t){return rE.resolve(null)}getIndexType(e,t){return rE.resolve(0)}getFieldIndexes(e,t){return rE.resolve([])}getNextCollectionGroupToUpdate(e){return rE.resolve(null)}getMinOffset(e,t){return rE.resolve(rb.min())}getMinOffsetFromCollectionGroup(e,t){return rE.resolve(rb.min())}updateCollectionGroup(e,t,n){return rE.resolve()}updateIndexEntries(e,t){return rE.resolve()}}class sD{constructor(){this.index={}}add(e){let t=e.lastSegment(),n=e.popLast(),r=this.index[t]||new rR(rm.comparator),i=!r.has(n);return this.index[t]=r.add(n),i}has(e){let t=e.lastSegment(),n=e.popLast(),r=this.index[t];return r&&r.has(n)}getEntries(e){return(this.index[e]||new rR(rm.comparator)).toArray()}}new Uint8Array(0);class sM{constructor(e,t,n){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=t,this.maximumSequenceNumbersToCollect=n}static withCacheSize(e){return new sM(e,sM.DEFAULT_COLLECTION_PE
vendor: 4,142 bytes, lines 1994-2073
1994RCENTILE,sM.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}}/**
1995 * @license
1996 * Copyright 2017 Google LLC
1997 *
1998 * Licensed under the Apache License, Version 2.0 (the "License");
1999 * you may not use this file except in compliance with the License.
2000 * You may obtain a copy of the License at
2001 *
2002 *   http://www.apache.org/licenses/LICENSE-2.0
2003 *
2004 * Unless required by applicable law or agreed to in writing, software
2005 * distributed under the License is distributed on an "AS IS" BASIS,
2006 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2007 * See the License for the specific language governing permissions and
2008 * limitations under the License.
2009 */sM.DEFAULT_COLLECTION_PERCENTILE=10,sM.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,sM.DEFAULT=new sM(41943040,sM.DEFAULT_COLLECTION_PERCENTILE,sM.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),sM.DISABLED=new sM(-1,0,0);/**
2010 * @license
2011 * Copyright 2017 Google LLC
2012 *
2013 * Licensed under the Apache License, Version 2.0 (the "License");
2014 * you may not use this file except in compliance with the License.
2015 * You may obtain a copy of the License at
2016 *
2017 *   http://www.apache.org/licenses/LICENSE-2.0
2018 *
2019 * Unless required by applicable law or agreed to in writing, software
2020 * distributed under the License is distributed on an "AS IS" BASIS,
2021 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2022 * See the License for the specific language governing permissions and
2023 * limitations under the License.
2024 */class sL{constructor(e){this.Nn=e}next(){return this.Nn+=2,this.Nn}static kn(){return new sL(0)}static Mn(){return new sL(-1)}}/**
2025 * @license
2026 * Copyright 2017 Google LLC
2027 *
2028 * Licensed under the Apache License, Version 2.0 (the "License");
2029 * you may not use this file except in compliance with the License.
2030 * You may obtain a copy of the License at
2031 *
2032 *   http://www.apache.org/licenses/LICENSE-2.0
2033 *
2034 * Unless required by applicable law or agreed to in writing, software
2035 * distributed under the License is distributed on an "AS IS" BASIS,
2036 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2037 * See the License for the specific language governing permissions and
2038 * limitations under the License.
2039 */class sZ{constructor(){this.changes=new iR(e=>e.toString(),(e,t)=>e.isEqual(t)),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,t){this.assertNotApplied(),this.changes.set(e,r9.newInvalidDocument(e).setReadTime(t))}getEntry(e,t){this.assertNotApplied();let n=this.changes.get(t);return void 0!==n?rE.resolve(n):this.getFromCache(e,t)}getEntries(e,t){return this.getAllFromCache(e,t)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}assertNotApplied(){}}/**
2040 * @license
2041 * Copyright 2017 Google LLC
2042 *
2043 * Licensed under the Apache License, Version 2.0 (the "License");
2044 * you may not use this file except in compliance with the License.
2045 * You may obtain a copy of the License at
2046 *
2047 *   http://www.apache.org/licenses/LICENSE-2.0
2048 *
2049 * Unless required by applicable law or agreed to in writing, software
2050 * distributed under the License is distributed on an "AS IS" BASIS,
2051 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2052 * See the License for the specific language governing permissions and
2053 * limitations under the License.
2054 *//**
2055 * @license
2056 * Copyright 2022 Google LLC
2057 *
2058 * Licensed under the Apache License, Version 2.0 (the "License");
2059 * you may not use this file except in compliance with the License.
2060 * You may obtain a copy of the License at
2061 *
2062 *   http://www.apache.org/licenses/LICENSE-2.0
2063 *
2064 * Unless required by applicable law or agreed to in writing, software
2065 * distributed under the License is distributed on an "AS IS" BASIS,
2066 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2067 * See the License for the specific language governing permissions and
2068 * limitations under the License.
2069 */class sj{constructor(e,t){this.overlayedDocument=e,this.mutatedFields=t}}/**
2070 * @license
2071 * Copyright 2017 Google LLC
2072 *
2073 * Licensed under the Apache License, Version 2.0 (the "License");
2074 * you may not use this file except in compliance with the License.
2075 * You may obtain a copy of the License at
2076 *
2077 *   http://www.apache.org/licenses/LICENSE-2.0
2078 *
2079 * Unless required by applicable law or agreed to in writing, software
2080 * distributed under the License is distributed on an "AS IS" BASIS,
2081 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2082 * See the License for the specific language governing permissions and
2083 * limitations under the License.
2084 */class sF{constructor(e,t,n,r){this.remoteDocumentCache=e,this.mutationQueue=t,this.documentOverlayCache=n,this.indexManager=r}getDocument(e,t){let n=null;return this.documentOverlayCache.getOverlay(e,t).next(r=>(n=r,this.remoteDocumentCache.getEntry(e,t))).next(e=>(null!==n&&iX(n.mutation,e,rN.empty(),rd.now()),e))}getDocuments(e,t){return this.remoteDocumentCache.getEntries(e,t).next(t=>this.getLocalViewOfDocuments(e,t,iZ()).next(()=>t))}getLocalViewOfDocuments(e,t,n=iZ()){let r=iM();return this.populateOverlays(e,r,t).next(()=>this.computeViews(e,t,r,n).next(e=>{let t=iD();return e.forEach((e,n)=>{t=t.insert(e,n.overlayedDocument)}),t}))}getOverlayedDocuments(e,t){let n=iM();return this.populateOverlays(e,n,t).next(()=>this.computeViews(e,t,n,iZ()))}populateOverlays(e,t,n){let r=[];return n.forEach(e=>{t.has(e)||r.push(e)}),this.documentOverlayCache.getOverlays(e,r).next(e=>{e.forEach((e,n)=>{t.set(e,n)})})}computeViews(e,t,n,r){let i=iP,s=iM(),o=iM();return t.forEach((e,t)=>{let o=n.get(t.key);r.has(t.key)&&(void 0===o||o.mutation instanceof i1)?i=i.insert(t.key,t):void 0!==o?(s.set(t.key,o.mutation.getFieldMask()),iX(o.mutation,t,o.mutation.getFieldMask(),rd.now())):s.set(t.key,rN.empty())}),this.recalculateAndSaveOverlays(e,i).next(e=>(e.forEach((e,t)=>s.set(e,t)),t.forEach((e,t)=>{var n;return o.set(e,new sj(t,null!==(n=s.get(e))&&void 0!==n?n:null))}),o))}recalculateAndSaveOverlays(e,t){let n=iM(),r=new rC((e,t)=>e-t),i=iZ();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,t).next(e=>{for(let i of e)i.keys().forEach(e=>{let s=t.get(e);if(null===s)return;let o=n.get(e)||rN.empty();o=i.applyToLocalView(s,o),n.set(e,o);let a=(r.get(i.batchId)||iZ()).add(e);r=r.insert(i.batchId,a)})}).next(()=>{let s=[],o=r.getReverseIterator();for(;o.hasNext();){let r=o.getNext(),a=r.key,l=r.value,u=iM();l.forEach(e=>{if(!i.has(e)){let r=iY(t.get(e),n.get(e));null!==r&&u.set(e,r),i=i.add(e)}}),s.push(this.documentOverlayCache.saveOverlays(e,a,u))}return rE.waitFor(s)}).next(()=>n)}recalculateAndSaveOverlaysForDocumentKeys(e,t){return this.remoteDocumentCache.getEntries(e,t).next(t=>this.recalculateAndSaveOverlays(e,t))}getDocumentsMatchingQuery(e,t,n){return ry.isDocumentKey(t.path)&&null===t.collectionGroup&&0===t.filters.length?this.getDocumentsMatchingDocumentQuery(e,t.path):null!==t.collectionGroup?this.getDocumentsMatchingCollectionGroupQuery(e,t,n):this.getDocumentsMatchingCollectionQuery(e,t,n)}getNextDocuments(e,t,n,r){return this.remoteDocumentCache.getAllFromCollectionGroup(e,t,n,r).next(i=>{let s=r-i.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,t,n.largestBatchId,r-i.size):rE.resolve(iM()),o=-1,a=i;return s.next(t=>rE.forEach(t,(t,n)=>(o<n.largestBatchId&&(o=n.largestBatchId),i.get(t)?rE.resolve():this.remoteDocumentCache.getEntry(e,t).next(e=>{a=a.insert(t,e)}))).next(()=>this.populateOverlays(e,t,i)).next(()=>this.computeViews(e,a,t,iZ())).next(e=>{let t;return{batchId:o,changes:(t=iN,e.forEach((e,n)=>t=t.insert(e,n.overlayedDocument)),t)}}))})}getDocumentsMatchingDocumentQuery(e,t){return this.getDocument(e,new ry(t)).next(e=>{let t=iD();return e.isFoundDocument()&&(t=t.insert(e.key,e)),t})}getDocumentsMatchingCollectionGroupQuery(e,t,n){let r=t.collectionGroup,i=iD();return this.indexManager.getCollectionParents(e,r).next(s=>
2084rE.forEach(s,s=>{var o;let a=(o=s.child(r),new i_(o,null,t.explicitOrderBy.slice(),t.filters.slice(),t.limit,t.limitType,t.startAt,t.endAt));return this.getDocumentsMatchingCollectionQuery(e,a,n).next(e=>{e.forEach((e,t)=>{i=i.insert(e,t)})})}).next(()=>i))}getDocumentsMatchingCollectionQuery(e,t,n){let r;return this.documentOverlayCache.getOverlaysForCollection(e,t.path,n.largestBatchId).next(i=>(r=i,this.remoteDocumentCache.getDocumentsMatchingQuery(e,t,n,r))).next(e=>{r.forEach((t,n)=>{let r=n.getKey();null===e.get(r)&&(e=e.insert(r,r9.newInvalidDocument(r)))});let n=iD();return e.forEach((e,i)=>{let s=r.get(e);void 0!==s&&iX(s.mutation,i,rN.empty(),rd.now()),iA(t,i)&&(n=n.insert(e,i))}),n})}}/**
2085 * @license
2086 * Copyright 2020 Google LLC
2087 *
2088 * Licensed under the Apache License, Version 2.0 (the "License");
2089 * you may not use this file except in compliance with the License.
2090 * You may obtain a copy of the License at
2091 *
2092 *   http://www.apache.org/licenses/LICENSE-2.0
2093 *
2094 * Unless required by applicable law or agreed to in writing, software
2095 * distributed under the License is distributed on an "AS IS" BASIS,
2096 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2097 * See the License for the specific language governing permissions and
2098 * limitations under the License.
2099 */class sU{constructor(e){this.serializer=e,this.cs=new Map,this.hs=new Map}getBundleMetadata(e,t){return rE.resolve(this.cs.get(t))}saveBundleMetadata(e,t){return this.cs.set(t.id,{id:t.id,version:t.version,createTime:s_(t.createTime)}),rE.resolve()}getNamedQuery(e,t){return rE.resolve(this.hs.get(t))}saveNamedQuery(e,t){return this.hs.set(t.name,{name:t.name,query:function(e){let t=function(e){var t,n,r,i,s,o,a,l;let u,c=function(e){let t=sE(e);return 4===t.length?rm.emptyPath():sT(t)}(e.parent),h=e.structuredQuery,d=h.from?h.from.length:0,f=null;if(d>0){1===d||n3();let e=h.from[0];e.allDescendants?f=e.collectionId:c=c.child(e.collectionId)}let p=[];h.where&&(p=function(e){var t;let n=function e(t){return void 0!==t.unaryFilter?function(e){switch(e.unaryFilter.op){case"IS_NAN":let t=sC(e.unaryFilter.field);return ir.create(t,"==",{doubleValue:NaN});case"IS_NULL":let n=sC(e.unaryFilter.field);return ir.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":let r=sC(e.unaryFilter.field);return ir.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":let i=sC(e.unaryFilter.field);return ir.create(i,"!=",{nullValue:"NULL_VALUE"});default:return n3()}}(t):void 0!==t.fieldFilter?ir.create(sC(t.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 n3()}}(t.fieldFilter.op),t.fieldFilter.value):void 0!==t.compositeFilter?ii.create(t.compositeFilter.filters.map(t=>e(t)),function(e){switch(e){case"AND":return"and";case"OR":return"or";default:return n3()}}(t.compositeFilter.op)):n3()}(e);return n instanceof ii&&io(t=n)&&is(t)?n.getFilters():[n]}(h.where));let m=[];h.orderBy&&(m=h.orderBy.map(e=>new ie(sC(e.field),function(e){switch(e){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(e.direction))));let g=null;h.limit&&(g=null==(u="object"==typeof(t=h.limit)?t.value:t)?null:u);let v=null;h.startAt&&(v=function(e){let t=!!e.before,n=e.values||[];return new r3(n,t)}(h.startAt));let y=null;return h.endAt&&(y=function(e){let t=!e.before,n=e.values||[];return new r3(n,t)}(h.endAt)),n=c,r=f,i=m,s=p,o=g,a=v,l=y,new i_(n,r,i,s,o,"F",a,l)}({parent:e.parent,structuredQuery:e.structuredQuery});return"LAST"===e.limitType?ik(t,t.limit,"L"):t}(t.bundledQuery),readTime:s_(t.readTime)}),rE.resolve()}}/**
2100 * @license
2101 * Copyright 2022 Google LLC
2102 *
2103 * Licensed under the Apache License, Version 2.0 (the "License");
2104 * you may not use this file except in compliance with the License.
2105 * You may obtain a copy of the License at
2106 *
2107 *   http://www.apache.org/licenses/LICENSE-2.0
2108 *
2109 * Unless required by applicable law or agreed to in writing, softw
2109are
2110 * distributed under the License is distributed on an "AS IS" BASIS,
2111 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2112 * See the License for the specific language governing permissions and
2113 * limitations under the License.
2114 */class sV{constructor(){this.overlays=new rC(ry.comparator),this.ls=new Map}getOverlay(e,t){return rE.resolve(this.overlays.get(t))}getOverlays(e,t){let n=iM();return rE.forEach(t,t=>this.getOverlay(e,t).next(e=>{null!==e&&n.set(t,e)})).next(()=>n)}saveOverlays(e,t,n){return n.forEach((n,r)=>{this.we(e,t,r)}),rE.resolve()}removeOverlaysForBatchId(e,t,n){let r=this.ls.get(n);return void 0!==r&&(r.forEach(e=>this.overlays=this.overlays.remove(e)),this.ls.delete(n)),rE.resolve()}getOverlaysForCollection(e,t,n){let r=iM(),i=t.length+1,s=new ry(t.child("")),o=this.overlays.getIteratorFrom(s);for(;o.hasNext();){let e=o.getNext().value,s=e.getKey();if(!t.isPrefixOf(s.path))break;s.path.length===i&&e.largestBatchId>n&&r.set(e.getKey(),e)}return rE.resolve(r)}getOverlaysForCollectionGroup(e,t,n,r){let i=new rC((e,t)=>e-t),s=this.overlays.getIterator();for(;s.hasNext();){let e=s.getNext().value;if(e.getKey().getCollectionGroup()===t&&e.largestBatchId>n){let t=i.get(e.largestBatchId);null===t&&(t=iM(),i=i.insert(e.largestBatchId,t)),t.set(e.getKey(),e)}}let o=iM(),a=i.getIterator();for(;a.hasNext()&&(a.getNext().value.forEach((e,t)=>o.set(e,t)),!(o.size()>=r)););return rE.resolve(o)}we(e,t,n){let r=this.overlays.get(n.key);if(null!==r){let e=this.ls.get(r.largestBatchId).delete(n.key);this.ls.set(r.largestBatchId,e)}this.overlays=this.overlays.insert(n.key,new i3(t,n));let i=this.ls.get(t);void 0===i&&(i=iZ(),this.ls.set(t,i)),this.ls.set(t,i.add(n.key))}}/**
2115 * @license
2116 * Copyright 2017 Google LLC
2117 *
2118 * Licensed under the Apache License, Version 2.0 (the "License");
2119 * you may not use this file except in compliance with the License.
2120 * You may obtain a copy of the License at
2121 *
2122 *   http://www.apache.org/licenses/LICENSE-2.0
2123 *
2124 * Unless required by applicable law or agreed to in writing, software
2125 * distributed under the License is distributed on an "AS IS" BASIS,
2126 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2127 * See the License for the specific language governing permissions and
2128 * limitations under the License.
2129 */class s${constructor(){this.fs=new rR(sz.ds),this.ws=new rR(sz._s)}isEmpty(){return this.fs.isEmpty()}addReference(e,t){let n=new sz(e,t);this.fs=this.fs.add(n),this.ws=this.ws.add(n)}gs(e,t){e.forEach(e=>this.addReference(e,t))}removeReference(e,t){this.ys(new sz(e,t))}ps(e,t){e.forEach(e=>this.removeReference(e,t))}Is(e){let t=new ry(new rm([])),n=new sz(t,e),r=new sz(t,e+1),i=[];return this.ws.forEachInRange([n,r],e=>{this.ys(e),i.push(e.key)}),i}Ts(){this.fs.forEach(e=>this.ys(e))}ys(e){this.fs=this.fs.delete(e),this.ws=this.ws.delete(e)}Es(e){let t=new ry(new rm([])),n=new sz(t,e),r=new sz(t,e+1),i=iZ();return this.ws.forEachInRange([n,r],e=>{i=i.add(e.key)}),i}containsKey(e){let t=new sz(e,0),n=this.fs.firstAfterOrEqual(t);return null!==n&&e.isEqual(n.key)}}class sz{constructor(e,t){this.key=e,this.As=t}static ds(e,t){return ry.comparator(e.key,t.key)||rc(e.As,t.As)}static _s(e,t){return rc(e.As,t.As)||ry.comparator(e.key,t.key)}}/**
2130 * @license
2131 * Copyright 2017 Google LLC
2132 *
2133 * Licensed under the Apache License, Version 2.0 (the "License");
2134 * you may not use this file except in compliance with the License.
2135 * You may obtain a copy of the License at
2136 *
2137 *   http://www.apache.org/licenses/LICENSE-2.0
2138 *
2139 * Unless required by applicable law or agreed to in writing, software
2140 * distributed under the License is distributed on an "AS IS" BASIS,
2141 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2142 * See the License for the specific language governing permissions and
2143 * limitations under the License.
2144 */class sB{constructor(e,t){this.indexManager=e,this.referenceDelegate=t,this.mutationQueue=[],this.vs=1,this.Rs=new rR(sz.ds)}checkEmpty(e){return rE.resolve(0===this.mutationQueue.length)}addMutationBatch(e,t,n,r){let i=this.vs;
2144this.vs++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];let s=new i9(i,t,n,r);for(let t of(this.mutationQueue.push(s),r))this.Rs=this.Rs.add(new sz(t.key,i)),this.indexManager.addToCollectionParentIndex(e,t.key.path.popLast());return rE.resolve(s)}lookupMutationBatch(e,t){return rE.resolve(this.Ps(t))}getNextMutationBatchAfterBatchId(e,t){let n=this.bs(t+1),r=n<0?0:n;return rE.resolve(this.mutationQueue.length>r?this.mutationQueue[r]:null)}getHighestUnacknowledgedBatchId(){return rE.resolve(0===this.mutationQueue.length?-1:this.vs-1)}getAllMutationBatches(e){return rE.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,t){let n=new sz(t,0),r=new sz(t,Number.POSITIVE_INFINITY),i=[];return this.Rs.forEachInRange([n,r],e=>{let t=this.Ps(e.As);i.push(t)}),rE.resolve(i)}getAllMutationBatchesAffectingDocumentKeys(e,t){let n=new rR(rc);return t.forEach(e=>{let t=new sz(e,0),r=new sz(e,Number.POSITIVE_INFINITY);this.Rs.forEachInRange([t,r],e=>{n=n.add(e.As)})}),rE.resolve(this.Vs(n))}getAllMutationBatchesAffectingQuery(e,t){let n=t.path,r=n.length+1,i=n;ry.isDocumentKey(i)||(i=i.child(""));let s=new sz(new ry(i),0),o=new rR(rc);return this.Rs.forEachWhile(e=>{let t=e.key.path;return!!n.isPrefixOf(t)&&(t.length===r&&(o=o.add(e.As)),!0)},s),rE.resolve(this.Vs(o))}Vs(e){let t=[];return e.forEach(e=>{let n=this.Ps(e);null!==n&&t.push(n)}),t}removeMutationBatch(e,t){0===this.Ss(t.batchId,"removed")||n3(),this.mutationQueue.shift();let n=this.Rs;return rE.forEach(t.mutations,r=>{let i=new sz(r.key,t.batchId);return n=n.delete(i),this.referenceDelegate.markPotentiallyOrphaned(e,r.key)}).next(()=>{this.Rs=n})}Cn(e){}containsKey(e,t){let n=new sz(t,0),r=this.Rs.firstAfterOrEqual(n);return rE.resolve(t.isEqual(r&&r.key))}performConsistencyCheck(e){return this.mutationQueue.length,rE.resolve()}Ss(e,t){return this.bs(e)}bs(e){return 0===this.mutationQueue.length?0:e-this.mutationQueue[0].batchId}Ps(e){let t=this.bs(e);return t<0||t>=this.mutationQueue.length?null:this.mutationQueue[t]}}/**
2145 * @license
2146 * Copyright 2017 Google LLC
2147 *
2148 * Licensed under the Apache License, Version 2.0 (the "License");
2149 * you may not use this file except in compliance with the License.
2150 * You may obtain a copy of the License at
2151 *
2152 *   http://www.apache.org/licenses/LICENSE-2.0
2153 *
2154 * Unless required by applicable law or agreed to in writing, software
2155 * distributed under the License is distributed on an "AS IS" BASIS,
2156 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2157 * See the License for the specific language governing permissions and
2158 * limitations under the License.
2159 */class sq{constructor(e){this.Ds=e,this.docs=new rC(ry.comparator),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,t){let n=t.key,r=this.docs.get(n),i=r?r.size:0,s=this.Ds(t);return this.docs=this.docs.insert(n,{document:t.mutableCopy(),size:s}),this.size+=s-i,this.indexManager.addToCollectionParentIndex(e,n.path.popLast())}removeEntry(e){let t=this.docs.get(e);t&&(this.docs=this.docs.remove(e),this.size-=t.size)}getEntry(e,t){let n=this.docs.get(t);return rE.resolve(n?n.document.mutableCopy():r9.newInvalidDocument(t))}getEntries(e,t){let n=iP;return t.forEach(e=>{let t=this.docs.get(e);n=n.insert(e,t?t.document.mutableCopy():r9.newInvalidDocument(e))}),rE.resolve(n)}getDocumentsMatchingQuery(e,t,n,r){let i=iP,s=t.path,o=new ry(s.child("")),a=this.docs.getIteratorFrom(o);for(;a.hasNext();){let{key:e,value:{document:o}}=a.getNext();if(!s.isPrefixOf(e.path))break;e.path.length>s.length+1||0>=function(e,t){let n=e.readTime.compareTo(t.readTime);return 0!==n?n:0!==(n=ry.comparator(e.documentKey,t.documentKey))?n:rc(e.largestBatchId,t.largestBatchId)}(new rb(o.readTime,o.key,-1),n)||(r.has(o.key)||iA(t,o))&&(i=i.insert(o.key,o.mutableCopy()))}return rE.resolve(i)}getAllFromCollectionGroup(e,t,n,r){n3()}Cs(e,t){return rE.forEach(this.docs,e=>t(e))}newChangeBuffer(e){return new sH(this)}getSize(e){return rE.resolve(this.size)}}class sH extends sZ{constructor(e){super(),this.os=e}applyChanges(e){let t=[];
vendor: 4,868 bytes, lines 2159-2189
2159return this.changes.forEach((n,r)=>{r.isValidDocument()?t.push(this.os.addEntry(e,r)):this.os.removeEntry(n)}),rE.waitFor(t)}getFromCache(e,t){return this.os.getEntry(e,t)}getAllFromCache(e,t){return this.os.getEntries(e,t)}}/**
2160 * @license
2161 * Copyright 2017 Google LLC
2162 *
2163 * Licensed under the Apache License, Version 2.0 (the "License");
2164 * you may not use this file except in compliance with the License.
2165 * You may obtain a copy of the License at
2166 *
2167 *   http://www.apache.org/licenses/LICENSE-2.0
2168 *
2169 * Unless required by applicable law or agreed to in writing, software
2170 * distributed under the License is distributed on an "AS IS" BASIS,
2171 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2172 * See the License for the specific language governing permissions and
2173 * limitations under the License.
2174 */class sW{constructor(e){this.persistence=e,this.xs=new iR(e=>iy(e),ib),this.lastRemoteSnapshotVersion=rf.min(),this.highestTargetId=0,this.Ns=0,this.ks=new s$,this.targetCount=0,this.Ms=sL.kn()}forEachTarget(e,t){return this.xs.forEach((e,n)=>t(n)),rE.resolve()}getLastRemoteSnapshotVersion(e){return rE.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return rE.resolve(this.Ns)}allocateTargetId(e){return this.highestTargetId=this.Ms.next(),rE.resolve(this.highestTargetId)}setTargetsMetadata(e,t,n){return n&&(this.lastRemoteSnapshotVersion=n),t>this.Ns&&(this.Ns=t),rE.resolve()}Fn(e){this.xs.set(e.target,e);let t=e.targetId;t>this.highestTargetId&&(this.Ms=new sL(t),this.highestTargetId=t),e.sequenceNumber>this.Ns&&(this.Ns=e.sequenceNumber)}addTargetData(e,t){return this.Fn(t),this.targetCount+=1,rE.resolve()}updateTargetData(e,t){return this.Fn(t),rE.resolve()}removeTargetData(e,t){return this.xs.delete(t.target),this.ks.Is(t.targetId),this.targetCount-=1,rE.resolve()}removeTargets(e,t,n){let r=0,i=[];return this.xs.forEach((s,o)=>{o.sequenceNumber<=t&&null===n.get(o.targetId)&&(this.xs.delete(s),i.push(this.removeMatchingKeysForTargetId(e,o.targetId)),r++)}),rE.waitFor(i).next(()=>r)}getTargetCount(e){return rE.resolve(this.targetCount)}getTargetData(e,t){let n=this.xs.get(t)||null;return rE.resolve(n)}addMatchingKeys(e,t,n){return this.ks.gs(t,n),rE.resolve()}removeMatchingKeys(e,t,n){this.ks.ps(t,n);let r=this.persistence.referenceDelegate,i=[];return r&&t.forEach(t=>{i.push(r.markPotentiallyOrphaned(e,t))}),rE.waitFor(i)}removeMatchingKeysForTargetId(e,t){return this.ks.Is(t),rE.resolve()}getMatchingKeysForTargetId(e,t){let n=this.ks.Es(t);return rE.resolve(n)}containsKey(e,t){return rE.resolve(this.ks.containsKey(t))}}/**
2175 * @license
2176 * Copyright 2017 Google LLC
2177 *
2178 * Licensed under the Apache License, Version 2.0 (the "License");
2179 * you may not use this file except in compliance with the License.
2180 * You may obtain a copy of the License at
2181 *
2182 *   http://www.apache.org/licenses/LICENSE-2.0
2183 *
2184 * Unless required by applicable law or agreed to in writing, software
2185 * distributed under the License is distributed on an "AS IS" BASIS,
2186 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2187 * See the License for the specific language governing permissions and
2188 * limitations under the License.
2189 */class sG{constructor(e,t){var n;this.$s={},this.overlays={},this.Os=new rS(0),this.Fs=!1,this.Fs=!0,this.referenceDelegate=e(this),this.Bs=new sW(this),this.indexManager=new sN,this.remoteDocumentCache=(n=e=>this.referenceDelegate.Ls(e),new sq(n)),this.serializer=new sR(t),this.qs=new sU(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.Fs=!1,Promise.resolve()}get started(){return this.Fs}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let t=this.overlays[e.toKey()];return t||(t=new sV,this.overlays[e.toKey()]=t),t}getMutationQueue(e,t){let n=this.$s[e.toKey()];return n||(n=new sB(t,this.referenceDelegate),this.$s[e.toKey()]=n),n}getTargetCache(){return this.Bs}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.qs}runTransaction(e,t,n){n4("MemoryPersistence","Starting transaction:",e);let r=new sK(this.Os.next());return this.referenceDelegate.Us(),n(r).next(e=>this.referenceDelegate.Ks(r).next(()=>e)).toPromise().then(e=>(r.raiseOnCommittedEvent(),e))}Gs(e,t){return rE.or(Object.values(this.$s).map(n=>()=>n.containsKey(e,t)))}}class sK extends rw{constructor(e){super(),this.currentSequenceNumber=e}}class sQ{constructor(e){this.persistence=e,this.Qs=new s$,this.js=null}static zs(e){return new sQ(e)}get Ws(){if(this.js)return this.js;throw n3()}addReference(e,t,n){return this.Qs.addReference(n,t),this.Ws.delete(n.toString()),rE.resolve()}removeReference(e,t,n){return this.Qs.removeReference(n,t),this.Ws.add(n.toString()),rE.resolve()}markPotentiallyOrphaned(e,t){return this.Ws.add(t.toString()),rE.resolve()}
2189removeTarget(e,t){this.Qs.Is(t.targetId).forEach(e=>this.Ws.add(e.toString()));let n=this.persistence.getTargetCache();return n.getMatchingKeysForTargetId(e,t.targetId).next(e=>{e.forEach(e=>this.Ws.add(e.toString()))}).next(()=>n.removeTargetData(e,t))}Us(){this.js=new Set}Ks(e){let t=this.persistence.getRemoteDocumentCache().newChangeBuffer();return rE.forEach(this.Ws,n=>{let r=ry.fromPath(n);return this.Hs(e,r).next(e=>{e||t.removeEntry(r,rf.min())})}).next(()=>(this.js=null,t.apply(e)))}updateLimboDocument(e,t){return this.Hs(e,t).next(e=>{e?this.Ws.delete(t.toString()):this.Ws.add(t.toString())})}Ls(e){return 0}Hs(e,t){return rE.or([()=>rE.resolve(this.Qs.containsKey(t)),()=>this.persistence.getTargetCache().containsKey(e,t),()=>this.persistence.Gs(e,t)])}}/**
2190 * @license
2191 * Copyright 2017 Google LLC
2192 *
2193 * Licensed under the Apache License, Version 2.0 (the "License");
2194 * you may not use this file except in compliance with the License.
2195 * You may obtain a copy of the License at
2196 *
2197 *   http://www.apache.org/licenses/LICENSE-2.0
2198 *
2199 * Unless required by applicable law or agreed to in writing, software
2200 * distributed under the License is distributed on an "AS IS" BASIS,
2201 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2202 * See the License for the specific language governing permissions and
2203 * limitations under the License.
2204 */class sY{constructor(e,t,n,r){this.targetId=e,this.fromCache=t,this.Fi=n,this.Bi=r}static Li(e,t){let n=iZ(),r=iZ();for(let e of t.docChanges)switch(e.type){case 0:n=n.add(e.doc.key);break;case 1:r=r.add(e.doc.key)}return new sY(e,t.fromCache,n,r)}}/**
2205 * @license
2206 * Copyright 2019 Google LLC
2207 *
2208 * Licensed under the Apache License, Version 2.0 (the "License");
2209 * you may not use this file except in compliance with the License.
2210 * You may obtain a copy of the License at
2211 *
2212 *   http://www.apache.org/licenses/LICENSE-2.0
2213 *
2214 * Unless required by applicable law or agreed to in writing, software
2215 * distributed under the License is distributed on an "AS IS" BASIS,
2216 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2217 * See the License for the specific language governing permissions and
2218 * limitations under the License.
2219 */class sX{constructor(){this.qi=!1}initialize(e,t){this.Ui=e,this.indexManager=t,this.qi=!0}getDocumentsMatchingQuery(e,t,n,r){return this.Ki(e,t).next(i=>i||this.Gi(e,t,r,n)).next(n=>n||this.Qi(e,t))}Ki(e,t){if(iE(t))return rE.resolve(null);let n=iS(t);return this.indexManager.getIndexType(e,n).next(r=>0===r?null:(null!==t.limit&&1===r&&(n=iS(t=ik(t,null,"F"))),this.indexManager.getDocumentsMatchingTarget(e,n).next(r=>{let i=iZ(...r);return this.Ui.getDocuments(e,i).next(r=>this.indexManager.getMinOffset(e,n).next(n=>{let s=this.ji(t,r);return this.zi(t,s,i,n.readTime)?this.Ki(e,ik(t,null,"F")):this.Wi(e,s,t,n)}))})))}Gi(e,t,n,r){return iE(t)||r.isEqual(rf.min())?this.Qi(e,t):this.Ui.getDocuments(e,n).next(i=>{let s=this.ji(t,i);return this.zi(t,s,n,r)?this.Qi(e,t):(n2()<=d.in.DEBUG&&n4("QueryEngine","Re-using previous result from %s to execute query: %s",r.toString(),iC(t)),this.Wi(e,s,t,function(e,t){let n=e.toTimestamp().seconds,r=e.toTimestamp().nanoseconds+1,i=rf.fromTimestamp(1e9===r?new rd(n+1,0):new rd(n,r));return new rb(i,ry.empty(),-1)}(r,0)))})}ji(e,t){let n=new rR(iO(e));return t.forEach((t,r)=>{iA(e,r)&&(n=n.add(r))}),n}zi(e,t,n,r){if(null===e.limit)return!1;if(n.size!==t.size)return!0;let i="F"===e.limitType?t.last():t.first();return!!i&&(i.hasPendingWrites||i.version.compareTo(r)>0)}Qi(e,t){return n2()<=d.in.DEBUG&&n4("QueryEngine","Using full collection scan to execute query:",iC(t)),this.Ui.getDocumentsMatchingQuery(e,t,rb.min())}Wi(e,t,n,r){return this.Ui.getDocumentsMatchingQuery(e,n,r).next(e=>(t.forEach(t=>{e=e.insert(t.key,t)}),e))}}/**
2220 * @license
2221 * Copyright 2020 Google LLC
2222 *
2223 * Licensed under the Apache License, Version 2.0 (the "License");
2224 * you may not use this file except in compliance with the License.
2225 * You may obtain a copy of the License at
2226 *
2227 *   http://www.apache.org/licenses/LICENSE-2.0
2228 *
2229 * Unless required by applicable law or agreed to in writing, softw
2229are
2230 * distributed under the License is distributed on an "AS IS" BASIS,
2231 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2232 * See the License for the specific language governing permissions and
2233 * limitations under the License.
2234 */class sJ{constructor(e,t,n,r){this.persistence=e,this.Hi=t,this.serializer=r,this.Ji=new rC(rc),this.Yi=new iR(e=>iy(e),ib),this.Xi=new Map,this.Zi=e.getRemoteDocumentCache(),this.Bs=e.getTargetCache(),this.qs=e.getBundleCache(),this.tr(n)}tr(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new sF(this.Zi,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.Zi.setIndexManager(this.indexManager),this.Hi.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",t=>e.collect(t,this.Ji))}}async function s0(e,t){return await e.persistence.runTransaction("Handle user change","readonly",n=>{let r;return e.mutationQueue.getAllMutationBatches(n).next(i=>(r=i,e.tr(t),e.mutationQueue.getAllMutationBatches(n))).next(t=>{let i=[],s=[],o=iZ();for(let e of r)for(let t of(i.push(e.batchId),e.mutations))o=o.add(t.key);for(let e of t)for(let t of(s.push(e.batchId),e.mutations))o=o.add(t.key);return e.localDocuments.getDocuments(n,o).next(e=>({er:e,removedBatchIds:i,addedBatchIds:s}))})})}function s1(e){return e.persistence.runTransaction("Get last remote snapshot version","readonly",t=>e.Bs.getLastRemoteSnapshotVersion(t))}async function s2(e,t,n){let r=e,i=r.Ji.get(t);try{n||await r.persistence.runTransaction("Release target",n?"readwrite":"readwrite-primary",e=>r.persistence.referenceDelegate.removeTarget(e,i))}catch(e){if(!rx(e))throw e;n4("LocalStore",`Failed to update sequence numbers for target ${t}: ${e}`)}r.Ji=r.Ji.remove(t),r.Yi.delete(i.target)}function s4(e,t,n){let r=rf.min(),i=iZ();return e.persistence.runTransaction("Execute query","readonly",s=>(function(e,t,n){let r=e.Yi.get(n);return void 0!==r?rE.resolve(e.Ji.get(r)):e.Bs.getTargetData(t,n)})(e,s,iS(t)).next(t=>{if(t)return r=t.lastLimboFreeSnapshotVersion,e.Bs.getMatchingKeysForTargetId(s,t.targetId).next(e=>{i=e})}).next(()=>e.Hi.getDocumentsMatchingQuery(s,t,n?r:rf.min(),n?i:iZ())).next(n=>{var r;let s;return r=t.collectionGroup||(t.path.length%2==1?t.path.lastSegment():t.path.get(t.path.length-2)),s=e.Xi.get(r)||rf.min(),n.forEach((e,t)=>{t.readTime.compareTo(s)>0&&(s=t.readTime)}),e.Xi.set(r,s),{documents:n,ir:i}}))}class s5{constructor(){this.activeTargetIds=ij}lr(e){this.activeTargetIds=this.activeTargetIds.add(e)}dr(e){this.activeTargetIds=this.activeTargetIds.delete(e)}hr(){let e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class s6{constructor(){this.Hr=new s5,this.Jr={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,t,n){}addLocalQueryTarget(e){return this.Hr.lr(e),this.Jr[e]||"not-current"}updateQueryState(e,t,n){this.Jr[e]=t}removeLocalQueryTarget(e){this.Hr.dr(e)}isLocalQueryTarget(e){return this.Hr.activeTargetIds.has(e)}clearQueryState(e){delete this.Jr[e]}getAllActiveQueryTargets(){return this.Hr.activeTargetIds}isActiveQueryTarget(e){return this.Hr.activeTargetIds.has(e)}start(){return this.Hr=new s5,Promise.resolve()}handleUserChange(e,t,n){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}/**
2235 * @license
2236 * Copyright 2019 Google LLC
2237 *
2238 * Licensed under the Apache License, Version 2.0 (the "License");
2239 * you may not use this file except in compliance with the License.
2240 * You may obtain a copy of the License at
2241 *
2242 *   http://www.apache.org/licenses/LICENSE-2.0
2243 *
2244 * Unless required by applicable law or agreed to in writing, software
2245 * distributed under the License is distributed on an "AS IS" BASIS,
2246 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2247 * See the License for the specific language governing permissions and
2248 * limitations under the License.
2249 */class s9{Yr(e){}shutdown(){}}/**
2250 * @license
2251 * Copyright 2019 Google LLC
2252 *
2253 * Licensed under the Apache License, Version 2.0 (the "License");
2254 * you may not use this file except in compliance with the License.
2255 * You may obtain a copy of the License at
2256 *
2257 *   http://www.apache.org/licenses/LICENSE-2.0
2258 *
2259 * Unless required by applicable law or agreed to in writing, software
2260 * distributed under the License is distributed on an "AS IS" BASIS,
2261 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2262 * See the License for the specific language governing permissions and
2263 * limitations under the License.
2264 */class s3{constructor(){this.Xr=()=>this.Zr(),this.eo=()=>this.no(),this.so=[],this.io()}Yr(e){this.so.push(e)}shutdown(){window.removeEventListener("online",this.Xr),window.removeEventListener("offline",this.eo)}io(){window.addEventListener("online",this.Xr),window.addEventListener("offline",this.eo)}Zr(){for(let e of(n4("ConnectivityMonitor","Network connectivity changed: AVAILABLE"),this.so))e(0)}no(){for(let e of(n4("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE"),this.so))e(1)}static D(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}}/**
2265 * @license
2266 * Copyright 2023 Google LLC
2267 *
2268 * Licensed under the Apache License, Version 2.0 (the "License");
2269 * you may not use this file except in compliance with the License.
2270 * You may obtain a copy of the License at
2271 *
2272 *   http://www.apache.org/licenses/LICENSE-2.0
2273 *
2274 * Unless required by applicable law or agreed to in writing, software
2275 * distributed under the License is distributed on an "AS IS" BASIS,
2276 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2277 * See the License for the specific language governing permissions and
2278 * limitations under the License.
2279 */let s7=null;function s8(){return null===s7?s7=268435456+Math.round(2147483648*Math.random()):s7++,"0x"+s7.toString(16)}/**
2280 * @license
2281 * Copyright 2020 Google LLC
2282 *
2283 * Licensed under the Apache License, Version 2.0 (the "License");
2284 * you may not use this file except in compliance with the License.
2285 * You may obtain a copy of the License at
2286 *
2287 *   http://www.apache.org/licenses/LICENSE-2.0
2288 *
2289 * Unless required by applicable law or agreed to in writing, software
2290 * distributed under the License is distributed on an "AS IS" BASIS,
2291 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2292 * See the License for the specific language governing permissions and
2293 * limitations under the License.
2294 */let oe={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};/**
2295 * @license
2296 * Copyright 2017 Google LLC
2297 *
2298 * Licensed under the Apache License, Version 2.0 (the "License");
2299 * you may not use this file except in compliance with the License.
2300 * You may obtain a copy of the License at
2301 *
2302 *   http://www.apache.org/licenses/LICENSE-2.0
2303 *
2304 * Unless required by applicable law or agreed to in writing, software
2305 * distributed under the License is distributed on an "AS IS" BASIS,
2306 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2307 * See the License for the specific language governing permissions and
2308 * limitations under the License.
2309 */class ot{constructor(e){this.ro=e.ro,this.oo=e.oo}uo(e){this.co=e}ao(e){this.ho=e}onMessage(e){this.lo=e}close(){this.oo()}send(e){this.ro(e)}fo(){this.co()}wo(e){this.ho(e)}_o(e){this.lo(e)}}/**
2310 * @license
2311 * Copyright 2017 Google LLC
2312 *
2313 * Licensed under the Apache License, Version 2.0 (the "License");
2314 * you may not use this file except in compliance with the License.
2315 * You may obtain a copy of the License at
2316 *
2317 *   http://www.apache.org/licenses/LICENSE-2.0
2318 *
2319 * Unless required by applicable law or agreed to in writing, software
2320 * distributed under the License is distributed on an "AS IS" BASIS,
2321 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2322 * See the License for the specific language governing permissions and
2323 * limitations under the License.
2324 */let on="WebChannelConnection";class or extends class{constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;let t=e.ssl?"https":"http";this.mo=t+"://"+e.host,this.yo="projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database+"/documents"}get po(){return!1}Io(e,t,n,r,i){let s=s8(),o=this.To(e,t);n4("RestConnection",`Sending RPC '${e}' ${s}:`,o,n);let a={};return this.Eo(a,r,i),this.Ao(e,o,a,n).then(t=>(n4("RestConnection",`Received RPC '${e}' ${s}: `,t),t),t=>{throw n6("RestConnection",`RPC '${e}' ${s} failed with error: `,t,"url: ",o,"request:",n),t})}vo(e,t,n,r,i,s){return this.Io(e,t,n,r,i)}
2324Eo(e,t,n){e["X-Goog-Api-Client"]="gl-js/ fire/"+n0,e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t&&t.headers.forEach((t,n)=>e[n]=t),n&&n.headers.forEach((t,n)=>e[n]=t)}To(e,t){let n=oe[e];return`${this.mo}/v1/${t}:${n}`}}{constructor(e){super(e),this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}Ao(e,t,n,r){let i=s8();return new Promise((s,o)=>{let a=new nK;a.setWithCredentials(!0),a.listenOnce(nB.COMPLETE,()=>{try{switch(a.getLastErrorCode()){case nz.NO_ERROR:let t=a.getResponseJson();n4(on,`XHR for RPC '${e}' ${i} received:`,JSON.stringify(t)),s(t);break;case nz.TIMEOUT:n4(on,`RPC '${e}' ${i} timed out`),o(new n8(n7.DEADLINE_EXCEEDED,"Request time out"));break;case nz.HTTP_ERROR:let n=a.getStatus();if(n4(on,`RPC '${e}' ${i} failed with status:`,n,"response text:",a.getResponseText()),n>0){let e=a.getResponseJson();Array.isArray(e)&&(e=e[0]);let t=null==e?void 0:e.error;if(t&&t.status&&t.message){let e=function(e){let t=e.toLowerCase().replace(/_/g,"-");return Object.values(n7).indexOf(t)>=0?t:n7.UNKNOWN}(t.status);o(new n8(e,t.message))}else o(new n8(n7.UNKNOWN,"Server responded with status "+a.getStatus()))}else o(new n8(n7.UNAVAILABLE,"Connection failed."));break;default:n3()}}finally{n4(on,`RPC '${e}' ${i} completed.`)}});let l=JSON.stringify(r);n4(on,`RPC '${e}' ${i} sending request:`,r),a.send(t,"POST",l,n,15)})}Ro(e,t,n){let r=s8(),i=[this.mo,"/","google.firestore.v1.Firestore","/",e,"/channel"],s=nV(),o=n$(),l={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},u=this.longPollingOptions.timeoutSeconds;void 0!==u&&(l.longPollingTimeout=Math.round(1e3*u)),this.useFetchStreams&&(l.xmlHttpFactory=new nW({})),this.Eo(l.initMessageHeaders,t,n),l.encodeInitMessageHeaders=!0;let c=i.join("");n4(on,`Creating RPC '${e}' stream ${r}: ${c}`,l);let h=s.createWebChannel(c,l),d=!1,f=!1,p=new ot({ro:t=>{f?n4(on,`Not sending because RPC '${e}' stream ${r} is closed:`,t):(d||(n4(on,`Opening RPC '${e}' stream ${r} transport.`),h.open(),d=!0),n4(on,`RPC '${e}' stream ${r} sending:`,t),h.send(t))},oo:()=>h.close()}),m=(e,t,n)=>{e.listen(t,e=>{try{n(e)}catch(e){setTimeout(()=>{throw e},0)}})};return m(h,nG.EventType.OPEN,()=>{f||n4(on,`RPC '${e}' stream ${r} transport opened.`)}),m(h,nG.EventType.CLOSE,()=>{f||(f=!0,n4(on,`RPC '${e}' stream ${r} transport closed`),p.wo())}),m(h,nG.EventType.ERROR,t=>{f||(f=!0,n6(on,`RPC '${e}' stream ${r} transport errored:`,t),p.wo(new n8(n7.UNAVAILABLE,"The operation could not be completed")))}),m(h,nG.EventType.MESSAGE,t=>{var n;if(!f){let i=t.data[0];i||n3();let s=i.error||(null===(n=i[0])||void 0===n?void 0:n.error);if(s){n4(on,`RPC '${e}' stream ${r} received error:`,s);let t=s.status,n=function(e){let t=a[e];if(void 0!==t)return i8(t)}(t),i=s.message;void 0===n&&(n=n7.INTERNAL,i="Unknown error status: "+t+" with message "+s.message),f=!0,p.wo(new n8(n,i)),h.close()}else n4(on,`RPC '${e}' stream ${r} received:`,i),p._o(i)}}),m(o,nq.STAT_EVENT,t=>{t.stat===nH.PROXY?n4(on,`RPC '${e}' stream ${r} detected buffering proxy`):t.stat===nH.NOPROXY&&n4(on,`RPC '${e}' stream ${r} detected no buffering proxy`)}),setTimeout(()=>{p.fo()},0),p}}function oi(){return"undefined"!=typeof document?document:null}/**
2325 * @license
2326 * Copyright 2017 Google LLC
2327 *
2328 * Licensed under the Apache License, Version 2.0 (the "License");
2329 * you may not use this file except in compliance with the License.
2330 * You may obtain a copy of the License at
2331 *
2332 *   http://www.apache.org/licenses/LICENSE-2.0
2333 *
2334 * Unless required by applicable law or agreed to in writing, software
2335 * distributed under the License is distributed on an "AS IS" BASIS,
2336 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2337 * See the License for the specific language governing permissions and
2338 * limitations under the License.
2339 */class os{constructor(e,t,n=1e3,r=1.5,i=6e4){this.ii=e,this.timerId=t,this.Po=n,this.bo=r,this.Vo=i,this.So=0,this.Do=null,this.Co=Date.now(),this.reset()}reset(){this.So=0}xo(){this.So=this.Vo}No(e){this.cancel();let t=Math.floor(this.So+this.ko()),n=Math.max(0,Date.now()-this.Co),r=Math.max(0,t-n);r>0&&n4("ExponentialBackoff",`Backing off for ${r} ms (base delay: ${this.So}
2339 ms, delay with jitter: ${t} ms, last attempt: ${n} ms ago)`),this.Do=this.ii.enqueueAfterDelay(this.timerId,r,()=>(this.Co=Date.now(),e())),this.So*=this.bo,this.So<this.Po&&(this.So=this.Po),this.So>this.Vo&&(this.So=this.Vo)}Mo(){null!==this.Do&&(this.Do.skipDelay(),this.Do=null)}cancel(){null!==this.Do&&(this.Do.cancel(),this.Do=null)}ko(){return(Math.random()-.5)*this.So}}/**
2340 * @license
2341 * Copyright 2017 Google LLC
2342 *
2343 * Licensed under the Apache License, Version 2.0 (the "License");
2344 * you may not use this file except in compliance with the License.
2345 * You may obtain a copy of the License at
2346 *
2347 *   http://www.apache.org/licenses/LICENSE-2.0
2348 *
2349 * Unless required by applicable law or agreed to in writing, software
2350 * distributed under the License is distributed on an "AS IS" BASIS,
2351 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2352 * See the License for the specific language governing permissions and
2353 * limitations under the License.
2354 */class oo{constructor(e,t,n,r,i,s,o,a){this.ii=e,this.$o=n,this.Oo=r,this.connection=i,this.authCredentialsProvider=s,this.appCheckCredentialsProvider=o,this.listener=a,this.state=0,this.Fo=0,this.Bo=null,this.Lo=null,this.stream=null,this.qo=new os(e,t)}Uo(){return 1===this.state||5===this.state||this.Ko()}Ko(){return 2===this.state||3===this.state}start(){4!==this.state?this.auth():this.Go()}async stop(){this.Uo()&&await this.close(0)}Qo(){this.state=0,this.qo.reset()}jo(){this.Ko()&&null===this.Bo&&(this.Bo=this.ii.enqueueAfterDelay(this.$o,6e4,()=>this.zo()))}Wo(e){this.Ho(),this.stream.send(e)}async zo(){if(this.Ko())return this.close(0)}Ho(){this.Bo&&(this.Bo.cancel(),this.Bo=null)}Jo(){this.Lo&&(this.Lo.cancel(),this.Lo=null)}async close(e,t){this.Ho(),this.Jo(),this.qo.cancel(),this.Fo++,4!==e?this.qo.reset():t&&t.code===n7.RESOURCE_EXHAUSTED?(n5(t.toString()),n5("Using maximum backoff delay to prevent overloading the backend."),this.qo.xo()):t&&t.code===n7.UNAUTHENTICATED&&3!==this.state&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),null!==this.stream&&(this.Yo(),this.stream.close(),this.stream=null),this.state=e,await this.listener.ao(t)}Yo(){}auth(){this.state=1;let e=this.Xo(this.Fo),t=this.Fo;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([e,n])=>{this.Fo===t&&this.Zo(e,n)},t=>{e(()=>{let e=new n8(n7.UNKNOWN,"Fetching auth token failed: "+t.message);return this.tu(e)})})}Zo(e,t){let n=this.Xo(this.Fo);this.stream=this.eu(e,t),this.stream.uo(()=>{n(()=>(this.state=2,this.Lo=this.ii.enqueueAfterDelay(this.Oo,1e4,()=>(this.Ko()&&(this.state=3),Promise.resolve())),this.listener.uo()))}),this.stream.ao(e=>{n(()=>this.tu(e))}),this.stream.onMessage(e=>{n(()=>this.onMessage(e))})}Go(){this.state=5,this.qo.No(async()=>{this.state=0,this.start()})}tu(e){return n4("PersistentStream",`close with error: ${e}`),this.stream=null,this.close(4,e)}Xo(e){return t=>{this.ii.enqueueAndForget(()=>this.Fo===e?t():(n4("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class oa extends oo{constructor(e,t,n,r,i,s){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",t,n,r,s),this.serializer=i}eu(e,t){return this.connection.Ro("Listen",e,t)}onMessage(e){this.qo.reset();let t=function(e,t){let n;if("targetChange"in t){var r,i;t.targetChange;let s="NO_CHANGE"===(r=t.targetChange.targetChangeType||"NO_CHANGE")?0:"ADD"===r?1:"REMOVE"===r?2:"CURRENT"===r?3:"RESET"===r?4:n3(),o=t.targetChange.targetIds||[],a=(i=t.targetChange.resumeToken,e.useProto3Json?(void 0===i||"string"==typeof i||n3(),rM.fromBase64String(i||"")):(void 0===i||i instanceof Uint8Array||n3(),rM.fromUint8Array(i||new Uint8Array))),l=t.targetChange.cause,u=l&&function(e){let t=void 0===e.code?n7.UNKNOWN:i8(e.code);return new n8(t,e.message||"")}(l);n=new sh(s,o,a,u||null)}else if("documentChange"in t){t.documentChange;let r=t.documentChange;r.document,r.document.name,r.document.updateTime;let i=sx(e,r.document.name),s=s_(r.document.updateTime),o=r.document.createTime?s_(r.document.createTime):rf.min(),a=new r6({mapValue:{fields:r.document.fields}}
2354),l=r9.newFoundDocument(i,s,o,a),u=r.targetIds||[],c=r.removedTargetIds||[];n=new su(u,c,l.key,l)}else if("documentDelete"in t){t.documentDelete;let r=t.documentDelete;r.document;let i=sx(e,r.document),s=r.readTime?s_(r.readTime):rf.min(),o=r9.newNoDocument(i,s),a=r.removedTargetIds||[];n=new su([],a,o.key,o)}else if("documentRemove"in t){t.documentRemove;let r=t.documentRemove;r.document;let i=sx(e,r.document),s=r.removedTargetIds||[];n=new su([],s,i,null)}else{if(!("filter"in t))return n3();{t.filter;let e=t.filter;e.targetId;let{count:r=0,unchangedNames:i}=e,s=new i7(r,i),o=e.targetId;n=new sc(o,s)}}return n}(this.serializer,e),n=function(e){if(!("targetChange"in e))return rf.min();let t=e.targetChange;return t.targetIds&&t.targetIds.length?rf.min():t.readTime?s_(t.readTime):rf.min()}(e);return this.listener.nu(t,n)}su(e){let t={};t.database=sk(this.serializer),t.addTarget=function(e,t){var n,r;let i;let s=t.target;if((i=iw(s)?{documents:{documents:[sS(e,s.path)]}}:{query:function(e,t){var n,r;let i={structuredQuery:{}},s=t.path;null!==t.collectionGroup?(i.parent=sS(e,s),i.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(i.parent=sS(e,s.popLast()),i.structuredQuery.from=[{collectionId:s.lastSegment()}]);let o=function(e){if(0!==e.length)return function e(t){return t instanceof ir?function(e){if("=="===e.op){if(r1(e.value))return{unaryFilter:{field:sI(e.field),op:"IS_NAN"}};if(r0(e.value))return{unaryFilter:{field:sI(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(r1(e.value))return{unaryFilter:{field:sI(e.field),op:"IS_NOT_NAN"}};if(r0(e.value))return{unaryFilter:{field:sI(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:sI(e.field),op:sv[e.op],value:e.value}}}(t):t instanceof ii?function(t){let n=t.getFilters().map(t=>e(t));return 1===n.length?n[0]:{compositeFilter:{op:sy[t.op],filters:n}}}(t):n3()}(ii.create(e,"and"))}(t.filters);o&&(i.structuredQuery.where=o);let a=function(e){if(0!==e.length)return e.map(e=>({field:sI(e.field),direction:sg[e.dir]}))}(t.orderBy);a&&(i.structuredQuery.orderBy=a);let l=sw(e,t.limit);return null!==l&&(i.structuredQuery.limit=l),t.startAt&&(i.structuredQuery.startAt={before:(n=t.startAt).inclusive,values:n.position}),t.endAt&&(i.structuredQuery.endAt={before:!(r=t.endAt).inclusive,values:r.position}),i}(e,s)}).targetId=t.targetId,t.resumeToken.approximateByteSize()>0){i.resumeToken=(n=t.resumeToken,e.useProto3Json?n.toBase64():n.toUint8Array());let r=sw(e,t.expectedCount);null!==r&&(i.expectedCount=r)}else if(t.snapshotVersion.compareTo(rf.min())>0){i.readTime=(r=t.snapshotVersion.toTimestamp(),e.useProto3Json?`${new Date(1e3*r.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+r.nanoseconds).slice(-9)}Z`:{seconds:""+r.seconds,nanos:r.nanoseconds});let n=sw(e,t.expectedCount);null!==n&&(i.expectedCount=n)}return i}(this.serializer,e);let n=function(e,t){let 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 n3()}}(t.purpose);return null==n?null:{"goog-listen-tags":n}}(this.serializer,e);n&&(t.labels=n),this.Wo(t)}iu(e){let t={};t.database=sk(this.serializer),t.removeTarget=e,this.Wo(t)}}/**
2355 * @license
2356 * Copyright 2017 Google LLC
2357 *
2358 * Licensed under the Apache License, Version 2.0 (the "License");
2359 * you may not use this file except in compliance with the License.
2360 * You may obtain a copy of the License at
2361 *
2362 *   http://www.apache.org/licenses/LICENSE-2.0
2363 *
2364 * Unless required by applicable law or agreed to in writing, software
2365 * distributed under the License is distributed on an "AS IS" BASIS,
2366 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2367 * See the License for the specific language governing permissions and
2368 * limitations under the License.
2369 */class ol extends class{}{constructor(e,t,n,r){super(),this.authCredentials=e,this.appCheckCredentials=t,this.connection=n,this.serializer
2369=r,this.lu=!1}fu(){if(this.lu)throw new n8(n7.FAILED_PRECONDITION,"The client has already been terminated.")}Io(e,t,n){return this.fu(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([r,i])=>this.connection.Io(e,t,n,r,i)).catch(e=>{throw"FirebaseError"===e.name?(e.code===n7.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),e):new n8(n7.UNKNOWN,e.toString())})}vo(e,t,n,r){return this.fu(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([i,s])=>this.connection.vo(e,t,n,i,s,r)).catch(e=>{throw"FirebaseError"===e.name?(e.code===n7.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),e):new n8(n7.UNKNOWN,e.toString())})}terminate(){this.lu=!0}}class ou{constructor(e,t){this.asyncQueue=e,this.onlineStateHandler=t,this.state="Unknown",this.wu=0,this._u=null,this.mu=!0}gu(){0===this.wu&&(this.yu("Unknown"),this._u=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this._u=null,this.pu("Backend didn't respond within 10 seconds."),this.yu("Offline"),Promise.resolve())))}Iu(e){"Online"===this.state?this.yu("Unknown"):(this.wu++,this.wu>=1&&(this.Tu(),this.pu(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.yu("Offline")))}set(e){this.Tu(),this.wu=0,"Online"===e&&(this.mu=!1),this.yu(e)}yu(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}pu(e){let t=`Could not reach Cloud Firestore backend. ${e}
2370This 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.mu?(n5(t),this.mu=!1):n4("OnlineStateTracker",t)}Tu(){null!==this._u&&(this._u.cancel(),this._u=null)}}/**
2371 * @license
2372 * Copyright 2017 Google LLC
2373 *
2374 * Licensed under the Apache License, Version 2.0 (the "License");
2375 * you may not use this file except in compliance with the License.
2376 * You may obtain a copy of the License at
2377 *
2378 *   http://www.apache.org/licenses/LICENSE-2.0
2379 *
2380 * Unless required by applicable law or agreed to in writing, software
2381 * distributed under the License is distributed on an "AS IS" BASIS,
2382 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2383 * See the License for the specific language governing permissions and
2384 * limitations under the License.
2385 */class oc{constructor(e,t,n,r,i){this.localStore=e,this.datastore=t,this.asyncQueue=n,this.remoteSyncer={},this.Eu=[],this.Au=new Map,this.vu=new Set,this.Ru=[],this.Pu=i,this.Pu.Yr(e=>{n.enqueueAndForget(async()=>{ob(this)&&(n4("RemoteStore","Restarting streams for network reachability change."),await async function(e){e.vu.add(4),await od(e),e.bu.set("Unknown"),e.vu.delete(4),await oh(e)}(this))})}),this.bu=new ou(n,r)}}async function oh(e){if(ob(e))for(let t of e.Ru)await t(!0)}async function od(e){for(let t of e.Ru)await t(!1)}function of(e,t){e.Au.has(t.targetId)||(e.Au.set(t.targetId,t),oy(e)?ov(e):oT(e).Ko()&&om(e,t))}function op(e,t){let n=oT(e);e.Au.delete(t),n.Ko()&&og(e,t),0===e.Au.size&&(n.Ko()?n.jo():ob(e)&&e.bu.set("Unknown"))}function om(e,t){if(e.Vu.qt(t.targetId),t.resumeToken.approximateByteSize()>0||t.snapshotVersion.compareTo(rf.min())>0){let n=e.remoteSyncer.getRemoteKeysForTarget(t.targetId).size;t=t.withExpectedCount(n)}oT(e).su(t)}function og(e,t){e.Vu.qt(t),oT(e).iu(t)}function ov(e){e.Vu=new sf({getRemoteKeysForTarget:t=>e.remoteSyncer.getRemoteKeysForTarget(t),le:t=>e.Au.get(t)||null,ue:()=>e.datastore.serializer.databaseId}),oT(e).start(),e.bu.gu()}function oy(e){return ob(e)&&!oT(e).Uo()&&e.Au.size>0}function ob(e){return 0===e.vu.size}async function ow(e){e.Au.forEach((t,n)=>{om(e,t)})}async function o_(e,t){e.Vu=void 0,oy(e)?(e.bu.Iu(t),ov(e)):e.bu.set("Unknown")}async function oE(e,t,n){if(e.bu.set("Online"),t instanceof sh&&2===t.state&&t.cause)try{await async function(e,t){let n=t.cause;for(let r of t.targetIds)e.Au.has(r)&&(await e.remoteSyncer.rejectListen(r,n),e.Au.delete(r),e.Vu.removeTarget(r))}(e,t)}catch(n){n4("RemoteStore","Failed to remove targets %s: %s ",t.targetIds.join(","),n),await ox(e,n)}else if(t instanceof su?e.Vu.Ht(t):t instanceof sc?e.Vu.ne(t):e.Vu.Xt(t),!n.isEqual(rf.min()))try{let t=await s1(e.localStore);n.compareTo(t)>=0&&await function(e,t){let n=e.Vu.ce(t);
2385return n.targetChanges.forEach((n,r)=>{if(n.resumeToken.approximateByteSize()>0){let i=e.Au.get(r);i&&e.Au.set(r,i.withResumeToken(n.resumeToken,t))}}),n.targetMismatches.forEach((t,n)=>{let r=e.Au.get(t);if(!r)return;e.Au.set(t,r.withResumeToken(rM.EMPTY_BYTE_STRING,r.snapshotVersion)),og(e,t);let i=new sO(r.target,t,n,r.sequenceNumber);om(e,i)}),e.remoteSyncer.applyRemoteEvent(n)}(e,n)}catch(t){n4("RemoteStore","Failed to raise snapshot:",t),await ox(e,t)}}async function ox(e,t,n){if(!rx(t))throw t;e.vu.add(1),await od(e),e.bu.set("Offline"),n||(n=()=>s1(e.localStore)),e.asyncQueue.enqueueRetryable(async()=>{n4("RemoteStore","Retrying IndexedDB access"),await n(),e.vu.delete(1),await oh(e)})}async function oS(e,t){e.asyncQueue.verifyOperationInProgress(),n4("RemoteStore","RemoteStore received new credentials");let n=ob(e);e.vu.add(3),await od(e),n&&e.bu.set("Unknown"),await e.remoteSyncer.handleCredentialChange(t),e.vu.delete(3),await oh(e)}async function ok(e,t){t?(e.vu.delete(2),await oh(e)):t||(e.vu.add(2),await od(e),e.bu.set("Unknown"))}function oT(e){var t,n,r;return e.Su||(e.Su=(t=e.datastore,n=e.asyncQueue,r={uo:ow.bind(null,e),ao:o_.bind(null,e),nu:oE.bind(null,e)},t.fu(),new oa(n,t.connection,t.authCredentials,t.appCheckCredentials,t.serializer,r)),e.Ru.push(async t=>{t?(e.Su.Qo(),oy(e)?ov(e):e.bu.set("Unknown")):(await e.Su.stop(),e.Vu=void 0)})),e.Su}/**
2386 * @license
2387 * Copyright 2017 Google LLC
2388 *
2389 * Licensed under the Apache License, Version 2.0 (the "License");
2390 * you may not use this file except in compliance with the License.
2391 * You may obtain a copy of the License at
2392 *
2393 *   http://www.apache.org/licenses/LICENSE-2.0
2394 *
2395 * Unless required by applicable law or agreed to in writing, software
2396 * distributed under the License is distributed on an "AS IS" BASIS,
2397 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2398 * See the License for the specific language governing permissions and
2399 * limitations under the License.
2400 */class oI{constructor(e,t,n,r,i){this.asyncQueue=e,this.timerId=t,this.targetTimeMs=n,this.op=r,this.removalCallback=i,this.deferred=new re,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(e=>{})}static createAndSchedule(e,t,n,r,i){let s=Date.now()+n,o=new oI(e,t,s,r,i);return o.start(n),o}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new n8(n7.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>null!==this.timerHandle?(this.clearTimeout(),this.op().then(e=>this.deferred.resolve(e))):Promise.resolve())}clearTimeout(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function oC(e,t){if(n5("AsyncQueue",`${t}: ${e}`),rx(e))return new n8(n7.UNAVAILABLE,`${t}: ${e}`);throw e}/**
2401 * @license
2402 * Copyright 2017 Google LLC
2403 *
2404 * Licensed under the Apache License, Version 2.0 (the "License");
2405 * you may not use this file except in compliance with the License.
2406 * You may obtain a copy of the License at
2407 *
2408 *   http://www.apache.org/licenses/LICENSE-2.0
2409 *
2410 * Unless required by applicable law or agreed to in writing, software
2411 * distributed under the License is distributed on an "AS IS" BASIS,
2412 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2413 * See the License for the specific language governing permissions and
2414 * limitations under the License.
2415 */class oA{constructor(e){this.comparator=e?(t,n)=>e(t,n)||ry.comparator(t.key,n.key):(e,t)=>ry.comparator(e.key,t.key),this.keyedMap=iD(),this.sortedSet=new rC(this.comparator)}static emptySet(e){return new oA(e.comparator)}has(e){return null!=this.keyedMap.get(e)}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){let t=this.keyedMap.get(e);return t?this.sortedSet.indexOf(t):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal((t,n)=>(e(t),!1))}add(e){let t=this.delete(e.key);return t.copy(t.keyedMap.insert(e.key,e),t.sortedSet.insert(e,null))}delete(e){let t=this.get(e);return t?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(t)):this}isEqual(e){if(!(e instanceof oA)||this.size!==e.size)return!1;let t=this.sortedSet.getIterator(),n=e.sortedSet.getIterator();for(;t.hasNext();){let e=t.getNext().key,r=n.getNext().key;if(!e.isEqual(r))return!1}return!0}toString(){let e=[];return this.forEach(t=>{e.push(t.toString())}),0===e.length?"DocumentSet ()":"DocumentSet (\n  "+e.join("  \n")+"\n)"}copy(e,t){let n=new oA;return n.comparator=this.comparator,n.keyedMap=e,n.sortedSet=t,n}}/**
2416 * @license
2417 * Copyright 2017 Google LLC
2418 *
2419 * Licensed under the Apache License, Version 2.0 (the "License");
2420 * you may not use this file except in compliance with the License.
2421 * You may obtain a copy of the License at
2422 *
2423 *   http://www.apache.org/licenses/LICENSE-2.0
2424 *
2425 * Unless required by applicable law or agreed to in writing, software
2426 * distributed under the License is distributed on an "AS IS" BASIS,
2427 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2428 * See the License for the specific language governing permissions and
2429 * limitations under the License.
2430 */class oO{constructor(){this.Cu=new rC(ry.comparator)}track(e){let t=e.doc.key,n=this.Cu.get(t);n?0!==e.type&&3===n.type?this.Cu=this.Cu.insert(t,e):3===e.type&&1!==n.type?this.Cu=this.Cu.insert(t,{type:n.type,doc:e.doc}):2===e.type&&2===n.type?this.Cu=this.Cu.insert(t,{type:2,doc:e.doc}):2===e.type&&0===n.type?this.Cu=this.Cu.insert(t,{type:0,doc:e.doc}):1===e.type&&0===n.type?this.Cu=this.Cu.remove(t):1===e.type&&2===n.type?this.Cu=this.Cu.insert(t,{type:1,doc:n.doc}):0===e.type&&1===n.type?this.Cu=this.Cu.insert(t,{type:2,doc:e.doc}):n3():this.Cu=this.Cu.insert(t,e)}xu(){let e=[];return this.Cu.inorderTraversal((t,n)=>{e.push(n)}),e}}class oR{constructor(e,t,n,r,i,s,o,a,l){this.query=e,this.docs=t,this.oldDocs=n,this.docChanges=r,this.mutatedKeys=i,this.fromCache=s,this.syncStateChanged=o,this.excludesMetadataChanges=a,this.hasCachedResults=l}static fromInitialDocuments(e,t,n,r,i){let s=[];return t.forEach(e=>{s.push({type:0,doc:e})}),new oR(e,t,oA.emptySet(t),s,n,r,!0,!1,i)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&iT(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;let t=this.docChanges,n=e.docChanges;if(t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(t[e].type!==n[e].type||!t[e].doc.isEqual(n[e].doc))return!1;return!0}}/**
2431 * @license
2432 * Copyright 2017 Google LLC
2433 *
2434 * Licensed under the Apache License, Version 2.0 (the "License");
2435 * you may not use this file except in compliance with the License.
2436 * You may obtain a copy of the License at
2437 *
2438 *   http://www.apache.org/licenses/LICENSE-2.0
2439 *
2440 * Unless required by applicable law or agreed to in writing, software
2441 * distributed under the License is distributed on an "AS IS" BASIS,
2442 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2443 * See the License for the specific language governing permissions and
2444 * limitations under the License.
2445 */class oP{constructor(){this.Nu=void 0,this.listeners=[]}}class oN{constructor(){this.queries=new iR(e=>iI(e),iT),this.onlineState="Unknown",this.ku=new Set}}async function oD(e,t){let n=t.query,r=!1,i=e.queries.get(n);if(i||(r=!0,i=new oP),r)try{i.Nu=await e.onListen(n)}catch(n){let e=oC(n,`Initialization of query '${iC(t.query)}' failed`);return void t.onError(e)}e.queries.set(n,i),i.listeners.push(t),t.Mu(e.onlineState),i.Nu&&t.$u(i.Nu)&&oj(e)}async function oM(e,t){let n=t.query,r=!1,i=e.queries.get(n);if(i){let e=i.listeners.indexOf(t);e>=0&&(i.listeners.splice(e,1),r=0===i.listeners.length)}if(r)return e.queries.delete(n),e.onUnlisten(n)}function oL(e,t){let n=!1;for(let r of t){let t=r.query,i=e.queries.get(t);if(i){for(let e of i.listeners)e.$u(r)&&(n=!0);i.Nu=r}}n&&oj(e)}function oZ(e,t,n){let r=e.queries.get(t);if(r)for(let e of r.listeners)e.onError(n);e.queries.delete(t)}function oj(e){e.ku.forEach(e=>{e.next()})}class oF{constructor(e,t,n){this.query=e,this.Ou=t,this.Fu=!1,this.Bu=null,this.onlineState="Unknown",this.options=n||{}}$u(e){if(!this.options.includeMetadataChanges){let t=[];for(let n of e.docChanges)3!==n.type&&t.push(n);e=new oR(e.query,e.docs,e.oldDocs,t,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let t=!1;return this.Fu?this.Lu(e)&&(this.Ou.next(e),t=!0):this.qu(e,this.onlineState)&&(this.Uu(e),t=!0),this.Bu=e,t}onError(e){this.Ou.error(e)}Mu(e){this.onlineState=e;let t=!1;return this.Bu&&!this.Fu&&this.qu(this.Bu,e)&&(this.Uu(this.Bu),t=!0),t}qu(e,t){return!e.fromCache||(!this.options.Ku||!("Offline"!==t))&&(!e.docs.isEmpty()||e.hasCachedResults||"Offline"===t)}Lu(e){if(e.docChanges.length>0)return!0;let t=this.Bu&&this.Bu.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!t)&&!0===this.options.includeMetadataChanges}Uu(e){e=oR.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.Fu=!0,this.Ou.next(e)}}/**
2446 * @license
2447 * Copyright 2017 Google LLC
2448 *
2449 * Licensed under the Apache License, Version 2.0 (the "License");
2450 * you may not use this file except in compliance with the License.
2451 * You may obtain a copy of the License at
2452 *
2453 *   http://www.apache.org/licenses/LICENSE-2.0
2454 *
2455 * Unless required by applicable law or agreed to in writing, software
2456 * distributed under the License is distributed on an "AS IS" BASIS,
2457 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2458 * See the License for the specific language governing permissions and
2459 * limitations under the License.
2460 */class oU{constructor(e){this.key=e}}class oV{constructor(e){this.key=e}}class o${constructor(e,t){this.query=e,this.Yu=t,this.Xu=null,this.hasCachedResults=!1,this.current=!1,this.Zu=iZ(),this.mutatedKeys=iZ(),this.tc=iO(e),this.ec=new oA(this.tc)}get nc(){return this.Yu}sc(e,t){let n=t?t.ic:new oO,r=t?t.ec:this.ec,i=t?t.mutatedKeys:this.mutatedKeys,s=r,o=!1,a="F"===this.query.limitType&&r.size===this.query.limit?r.last():null,l="L"===this.query.limitType&&r.size===this.query.limit?r.first():null;if(e.inorderTraversal((e,t)=>{let u=r.get(e),c=iA(this.query,t)?t:null,h=!!u&&this.mutatedKeys.has(u.key),d=!!c&&(c.hasLocalMutations||this.mutatedKeys.has(c.key)&&c.hasCommittedMutations),f=!1;u&&c?u.data.isEqual(c.data)?h!==d&&(n.track({type:3,doc:c}
2460),f=!0):this.rc(u,c)||(n.track({type:2,doc:c}),f=!0,(a&&this.tc(c,a)>0||l&&0>this.tc(c,l))&&(o=!0)):!u&&c?(n.track({type:0,doc:c}),f=!0):u&&!c&&(n.track({type:1,doc:u}),f=!0,(a||l)&&(o=!0)),f&&(c?(s=s.add(c),i=d?i.add(e):i.delete(e)):(s=s.delete(e),i=i.delete(e)))}),null!==this.query.limit)for(;s.size>this.query.limit;){let e="F"===this.query.limitType?s.last():s.first();s=s.delete(e.key),i=i.delete(e.key),n.track({type:1,doc:e})}return{ec:s,ic:n,zi:o,mutatedKeys:i}}rc(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}applyChanges(e,t,n){let r=this.ec;this.ec=e.ec,this.mutatedKeys=e.mutatedKeys;let i=e.ic.xu();i.sort((e,t)=>(function(e,t){let n=e=>{switch(e){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return n3()}};return n(e)-n(t)})(e.type,t.type)||this.tc(e.doc,t.doc)),this.oc(n);let s=t?this.uc():[],o=0===this.Zu.size&&this.current?1:0,a=o!==this.Xu;return(this.Xu=o,0!==i.length||a)?{snapshot:new oR(this.query,e.ec,r,i,e.mutatedKeys,0===o,a,!1,!!n&&n.resumeToken.approximateByteSize()>0),cc:s}:{cc:s}}Mu(e){return this.current&&"Offline"===e?(this.current=!1,this.applyChanges({ec:this.ec,ic:new oO,mutatedKeys:this.mutatedKeys,zi:!1},!1)):{cc:[]}}ac(e){return!this.Yu.has(e)&&!!this.ec.has(e)&&!this.ec.get(e).hasLocalMutations}oc(e){e&&(e.addedDocuments.forEach(e=>this.Yu=this.Yu.add(e)),e.modifiedDocuments.forEach(e=>{}),e.removedDocuments.forEach(e=>this.Yu=this.Yu.delete(e)),this.current=e.current)}uc(){if(!this.current)return[];let e=this.Zu;this.Zu=iZ(),this.ec.forEach(e=>{this.ac(e.key)&&(this.Zu=this.Zu.add(e.key))});let t=[];return e.forEach(e=>{this.Zu.has(e)||t.push(new oV(e))}),this.Zu.forEach(n=>{e.has(n)||t.push(new oU(n))}),t}hc(e){this.Yu=e.ir,this.Zu=iZ();let t=this.sc(e.documents);return this.applyChanges(t,!0)}lc(){return oR.fromInitialDocuments(this.query,this.ec,this.mutatedKeys,0===this.Xu,this.hasCachedResults)}}class oz{constructor(e,t,n){this.query=e,this.targetId=t,this.view=n}}class oB{constructor(e){this.key=e,this.fc=!1}}class oq{constructor(e,t,n,r,i,s){this.localStore=e,this.remoteStore=t,this.eventManager=n,this.sharedClientState=r,this.currentUser=i,this.maxConcurrentLimboResolutions=s,this.dc={},this.wc=new iR(e=>iI(e),iT),this._c=new Map,this.mc=new Set,this.gc=new rC(ry.comparator),this.yc=new Map,this.Ic=new s$,this.Tc={},this.Ec=new Map,this.Ac=sL.Mn(),this.onlineState="Unknown",this.vc=void 0}get isPrimaryClient(){return!0===this.vc}}async function oH(e,t){let n,r;let i=function(e){let t=e;return t.remoteStore.remoteSyncer.applyRemoteEvent=oK.bind(null,t),t.remoteStore.remoteSyncer.getRemoteKeysForTarget=o5.bind(null,t),t.remoteStore.remoteSyncer.rejectListen=oY.bind(null,t),t.dc.nu=oL.bind(null,t.eventManager),t.dc.Pc=oZ.bind(null,t.eventManager),t}(e),s=i.wc.get(t);if(s)n=s.targetId,i.sharedClientState.addLocalQueryTarget(n),r=s.view.lc();else{let e=await function(e,t){let n=e;return n.persistence.runTransaction("Allocate target","readwrite",e=>{let r;return n.Bs.getTargetData(e,t).next(i=>i?(r=i,rE.resolve(r)):n.Bs.allocateTargetId(e).next(i=>(r=new sO(t,i,"TargetPurposeListen",e.currentSequenceNumber),n.Bs.addTargetData(e,r).next(()=>r))))}).then(e=>{let r=n.Ji.get(e.targetId);return(null===r||e.snapshotVersion.compareTo(r.snapshotVersion)>0)&&(n.Ji=n.Ji.insert(e.targetId,e),n.Yi.set(t,e.targetId)),e})}(i.localStore,iS(t)),s=i.sharedClientState.addLocalQueryTarget(e.targetId);n=e.targetId,r=await oW(i,t,n,"current"===s,e.resumeToken),i.isPrimaryClient&&of(i.remoteStore,e)}return r}async function oW(e,t,n,r,i){e.Rc=(t,n,r)=>(async function(e,t,n,r){let i=t.view.sc(n);i.zi&&(i=await s4(e.localStore,t.query,!1).then(({documents:e})=>t.view.sc(e,i)));let s=r&&r.targetChanges.get(t.targetId),o=t.view.applyChanges(i,e.isPrimaryClient,s);return o0(e,t.targetId,o.cc),o.snapshot})(e,t,n,r);let s=await s4(e.localStore,t,!0),o=new o$(t,s.ir),a=o.sc(s.documents),l=sl.createSynthesizedTargetChangeForCurrentChange(n,r&&"Offline"!==e.onlineState,i),u=o.applyChanges(a,e.isPrimaryClient,l);o0(e,n,u.cc);let c=new oz(t,n,o);return e.wc.set(t,c),e._c.has(n)?e._c.get(n).push(t):e._c.set(n,[t]),u.snapshot}async function oG(e,t){let n=e.wc.get(t),r=e._c.get(n.targetId);if(r.length>1)return e._c.set(n.targetId,r.filter(e=>!iT(e,t))),void e.wc.delete(t);
2460e.isPrimaryClient?(e.sharedClientState.removeLocalQueryTarget(n.targetId),e.sharedClientState.isActiveQueryTarget(n.targetId)||await s2(e.localStore,n.targetId,!1).then(()=>{e.sharedClientState.clearQueryState(n.targetId),op(e.remoteStore,n.targetId),oX(e,n.targetId)}).catch(r_)):(oX(e,n.targetId),await s2(e.localStore,n.targetId,!0))}async function oK(e,t){try{let n=await function(e,t){let n=e,r=t.snapshotVersion,i=n.Ji;return n.persistence.runTransaction("Apply remote event","readwrite-primary",e=>{var s;let o,a;let l=n.Zi.newChangeBuffer({trackRemovals:!0});i=n.Ji;let u=[];t.targetChanges.forEach((s,o)=>{var a;let l=i.get(o);if(!l)return;u.push(n.Bs.removeMatchingKeys(e,s.removedDocuments,o).next(()=>n.Bs.addMatchingKeys(e,s.addedDocuments,o)));let c=l.withSequenceNumber(e.currentSequenceNumber);null!==t.targetMismatches.get(o)?c=c.withResumeToken(rM.EMPTY_BYTE_STRING,rf.min()).withLastLimboFreeSnapshotVersion(rf.min()):s.resumeToken.approximateByteSize()>0&&(c=c.withResumeToken(s.resumeToken,r)),i=i.insert(o,c),a=c,(0===l.resumeToken.approximateByteSize()||a.snapshotVersion.toMicroseconds()-l.snapshotVersion.toMicroseconds()>=3e8||s.addedDocuments.size+s.modifiedDocuments.size+s.removedDocuments.size>0)&&u.push(n.Bs.updateTargetData(e,c))});let c=iP,h=iZ();if(t.documentUpdates.forEach(r=>{t.resolvedLimboDocuments.has(r)&&u.push(n.persistence.referenceDelegate.updateLimboDocument(e,r))}
2460),u.push((s=t.documentUpdates,o=iZ(),a=iZ(),s.forEach(e=>o=o.add(e)),l.getEntries(e,o).next(e=>{let t=iP;return s.forEach((n,r)=>{let i=e.get(n);r.isFoundDocument()!==i.isFoundDocument()&&(a=a.add(n)),r.isNoDocument()&&r.version.isEqual(rf.min())?(l.removeEntry(n,r.readTime),t=t.insert(n,r)):!i.isValidDocument()||r.version.compareTo(i.version)>0||0===r.version.compareTo(i.version)&&i.hasPendingWrites?(l.addEntry(r),t=t.insert(n,r)):n4("LocalStore","Ignoring outdated watch update for ",n,". Current version:",i.version," Watch version:",r.version)}),{nr:t,sr:a}})).next(e=>{c=e.nr,h=e.sr})),!r.isEqual(rf.min())){let t=n.Bs.getLastRemoteSnapshotVersion(e).next(t=>n.Bs.setTargetsMetadata(e,e.currentSequenceNumber,r));u.push(t)}return rE.waitFor(u).next(()=>l.apply(e)).next(()=>n.localDocuments.getLocalViewOfDocuments(e,c,h)).next(()=>c)}).then(e=>(n.Ji=i,e))}(e.localStore,t);t.targetChanges.forEach((t,n)=>{let r=e.yc.get(n);r&&(t.addedDocuments.size+t.modifiedDocuments.size+t.removedDocuments.size<=1||n3(),t.addedDocuments.size>0?r.fc=!0:t.modifiedDocuments.size>0?r.fc||n3():t.removedDocuments.size>0&&(r.fc||n3(),r.fc=!1))}),await o2(e,n,t)}catch(e){await r_(e)}}function oQ(e,t,n){let r=e;if(r.isPrimaryClient&&0===n||!r.isPrimaryClient&&1===n){let e=[];r.wc.forEach((n,r)=>{let i=r.view.Mu(t);i.snapshot&&e.push(i.snapshot)}),function(e,t){let n=e;n.onlineState=t;let r=!1;n.queries.forEach((e,n)=>{for(let e of n.listeners)e.Mu(t)&&(r=!0)}),r&&oj(n)}(r.eventManager,t),e.length&&r.dc.nu(e),r.onlineState=t,r.isPrimaryClient&&r.sharedCl
2460ientState.setOnlineState(t)}}async function oY(e,t,n){let r=e;r.sharedClientState.updateQueryState(t,"rejected",n);let i=r.yc.get(t),s=i&&i.key;if(s){let e=new rC(ry.comparator);e=e.insert(s,r9.newNoDocument(s,rf.min()));let n=iZ().add(s),i=new sa(rf.min(),new Map,new rC(rc),e,n);await oK(r,i),r.gc=r.gc.remove(s),r.yc.delete(t),o1(r)}else await s2(r.localStore,t,!1).then(()=>oX(r,t,n)).catch(r_)}function oX(e,t,n=null){for(let r of(e.sharedClientState.removeLocalQueryTarget(t),e._c.get(t)))e.wc.delete(r),n&&e.dc.Pc(r,n);e._c.delete(t),e.isPrimaryClient&&e.Ic.Is(t).forEach(t=>{e.Ic.containsKey(t)||oJ(e,t)})}function oJ(e,t){e.mc.delete(t.path.canonicalString());let n=e.gc.get(t);null!==n&&(op(e.remoteStore,n),e.gc=e.gc.remove(t),e.yc.delete(n),o1(e))}function o0(e,t,n){for(let r of n)r instanceof oU?(e.Ic.addReference(r.key,t),function(e,t){let n=t.key,r=n.path.canonicalString();e.gc.get(n)||e.mc.has(r)||(n4("SyncEngine","New document in limbo: "+n),e.mc.add(r),o1(e))}(e,r)):r instanceof oV?(n4("SyncEngine","Document no longer in limbo: "+r.key),e.Ic.removeReference(r.key,t),e.Ic.containsKey(r.key)||oJ(e,r.key)):n3()}function o1(e){for(;e.mc.size>0&&e.gc.size<e.maxConcurrentLimboResolutions;){var t;let n=e.mc.values().next().value;e.mc.delete(n);let r=new ry(rm.fromString(n)),i=e.Ac.next();e.yc.set(i,new oB(r)),e.gc=e.gc.insert(r,i),of(e.remoteStore,new sO(iS((t=r.path,new i_(t))),i,"TargetPurposeLimboResolution",rS.ct))}}async function o2(e,t,n){let r=[],i=[],s=[];e.wc.isEmpty()||(e.wc.forEach((o,a)=>{s.push(e.Rc(a,t,n).then(t=>{if((t||n)&&e.isPrimaryClient&&e.sharedClientState.updateQueryState(a.targetId,(null==t?void 0:t.fromCache)?"not-current":"current"),t){r.push(t);let e=sY.Li(a.targetId,t);i.push(e)}}))}),await Promise.all(s),e.dc.nu(r),await async function(e,t){let n=e;try{await n.persistence.runTransaction("notifyLocalViewChanges","readwrite",e=>rE.forEach(t,t=>rE.forEach(t.Fi,r=>n.persistence.referenceDelegate.addReference(e,t.targetId,r)).next(()=>rE.forEach(t.Bi,r=>n.persistence.referenceDelegate.removeReference(e,t.targetId,r)))))}catch(e){if(!rx(e))throw e;n4("LocalStore","Failed to update sequence numbers: "+e)}for(let e of t){let t=e.targetId;if(!e.fromCache){let e=n.Ji.get(t),r=e.snapshotVersion,i=e.withLastLimboFreeSnapshotVersion(r);n.Ji=n.Ji.insert(t,i)}}}(e.localStore,i))}async function o4(e,t){let n=e;if(!n.currentUser.isEqual(t)){n4("SyncEngine","User change. New user:",t.toKey());let e=await s0(n.localStore,t);n.currentUser=t,n.Ec.forEach(e=>{e.forEach(e=>{e.reject(new n8(n7.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))})}),n.Ec.clear(),n.sharedClientState.handleUserChange(t,e.removedBatchIds,e.addedBatchIds),await o2(n,e.er)}}function o5(e,t){let n=e.yc.get(t);if(n&&n.fc)return iZ().add(n.key);{let n=iZ(),r=e._c.get(t);if(!r)return n;for(let t of r){let r=e.wc.get(t);n=n.unionWith(r.view.nc)}return n}}class o6{constructor(){this.synchronizeTabs=!1}async initialize(e){var t;this.serializer=(t=e.databaseInfo.databaseId,new sb(t,!0)),this.sharedClientState=this.createSharedClientState(e),this.persistence=this.createPersistence(e),await this.persistence.start(),this.localStore=this.createLocalStore(e),this.gcScheduler=this.createGarbageCollectionScheduler(e,this.localStore),this.indexBackfillerScheduler=this.createIndexBackfillerScheduler(e,this.localStore)}createGarbageCollectionScheduler(e,t){return null}createIndexBackfillerScheduler(e,t){return null}createLocalStore(e){var t,n,r,i;return t=this.persistence,n=new sX,r=e.initialUser,i=this.serializer,new sJ(t,n,r,i)}createPersistence(e){return new sG(sQ.zs,this.serializer)}createSharedClientState(e){return new s6}async terminate(){this.gcScheduler&&this.gcScheduler.stop(),await this.sharedClientState.shutdown(),await this.persistence.shutdown()}}class o9{async initialize(e,t){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(t),this.remoteStore=this.createRemoteStore(t),this.eventManager=this.createEventManager(t),this.syncEngine=this.createSyncEngine(t,!e.synchronizeTabs),this.sharedCl
2460ientState.onlineStateHandler=e=>oQ(this.syncEngine,e,1),this.remoteStore.remoteSyncer.handleCredentialChange=o4.bind(null,this.syncEngine),await ok(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return new oN}createDatastore(e){var t,n,r,i;let s=(n=e.databaseInfo.databaseId,new sb(n,!0)),o=(t=e.databaseInfo,new or(t));return r=e.authCredentials,i=e.appCheckCredentials,new ol(r,i,o,s)}createRemoteStore(e){var t,n,r,i,s;return t=this.localStore,n=this.datastore,r=e.asyncQueue,i=e=>oQ(this.syncEngine,e,0),s=s3.D()?new s3:new s9,new oc(t,n,r,i,s)}createSyncEngine(e,t){return function(e,t,n,r,i,s,o){let a=new oq(e,t,n,r,i,s);return o&&(a.vc=!0),a}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,t)}terminate(){return async function(e){n4("RemoteStore","RemoteStore shutting down."),e.vu.add(5),await od(e),e.Pu.shutdown(),e.bu.set("Unknown")}(this.remoteStore)}}/**
2461 * @license
2462 * Copyright 2020 Google LLC
2463 *
2464 * Licensed under the Apache License, Version 2.0 (the "License");
2465 * you may not use this file except in compliance with the License.
2466 * You may obtain a copy of the License at
2467 *
2468 *   http://www.apache.org/licenses/LICENSE-2.0
2469 *
2470 * Unless required by applicable law or agreed to in writing, software
2471 * distributed under the License is distributed on an "AS IS" BASIS,
2472 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2473 * See the License for the specific language governing permissions and
2474 * limitations under the License.
2475 *//**
2476 * @license
2477 * Copyright 2017 Google LLC
2478 *
2479 * Licensed under the Apache License, Version 2.0 (the "License");
2480 * you may not use this file except in compliance with the License.
2481 * You may obtain a copy of the License at
2482 *
2483 *   http://www.apache.org/licenses/LICENSE-2.0
2484 *
2485 * Unless required by applicable law or agreed to in writing, software
2486 * distributed under the License is distributed on an "AS IS" BASIS,
2487 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2488 * See the License for the specific language governing permissions and
2489 * limitations under the License.
2490 */class o3{constructor(e){this.observer=e,this.muted=!1}next(e){this.observer.next&&this.Sc(this.observer.next,e)}error(e){this.observer.error?this.Sc(this.observer.error,e):n5("Uncaught Error in snapshot listener:",e.toString())}Dc(){this.muted=!0}Sc(e,t){this.muted||setTimeout(()=>{this.muted||e(t)},0)}}/**
2491 * @license
2492 * Copyright 2017 Google LLC
2493 *
2494 * Licensed under the Apache License, Version 2.0 (the "License");
2495 * you may not use this file except in compliance with the License.
2496 * You may obtain a copy of the License at
2497 *
2498 *   http://www.apache.org/licenses/LICENSE-2.0
2499 *
2500 * Unless required by applicable law or agreed to in writing, software
2501 * distributed under the License is distributed on an "AS IS" BASIS,
2502 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2503 * See the License for the specific language governing permissions and
2504 * limitations under the License.
2505 */class o7{constructor(e,t,n,r){this.authCredentials=e,this.appCheckCredentials=t,this.asyncQueue=n,this.databaseInfo=r,this.user=nJ.UNAUTHENTICATED,this.clientId=ru.A(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(n,async e=>{n4("FirestoreClient","Received user=",e.uid),await this.authCredentialListener(e),this.user=e}),this.appCheckCredentials.start(n,e=>(n4("FirestoreClient","Received new app check token=",e),this.appCheckCredentialListener(e,this.user)))}async getConfiguration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new n8(n7.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){this.asyncQueue.enterRestrictedMode();let e=new re;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}
2505catch(n){let t=oC(n,"Failed to shutdown persistence");e.reject(t)}}),e.promise}}async function o8(e,t){e.asyncQueue.verifyOperationInProgress(),n4("FirestoreClient","Initializing OfflineComponentProvider");let n=await e.getConfiguration();await t.initialize(n);let r=n.initialUser;e.setCredentialChangeListener(async e=>{r.isEqual(e)||(await s0(t.localStore,e),r=e)}),t.persistence.setDatabaseDeletedListener(()=>e.terminate()),e._offlineComponents=t}async function ae(e,t){e.asyncQueue.verifyOperationInProgress();let n=await at(e);n4("FirestoreClient","Initializing OnlineComponentProvider");let r=await e.getConfiguration();await t.initialize(n,r),e.setCredentialChangeListener(e=>oS(t.remoteStore,e)),e.setAppCheckTokenChangeListener((e,n)=>oS(t.remoteStore,n)),e._onlineComponents=t}async function at(e){if(!e._offlineComponents){if(e._uninitializedComponentsProvider){n4("FirestoreClient","Using user provided OfflineComponentProvider");try{await o8(e,e._uninitializedComponentsProvider._offline)}catch(t){if(!("FirebaseError"===t.name?t.code===n7.FAILED_PRECONDITION||t.code===n7.UNIMPLEMENTED:!("undefined"!=typeof DOMException&&t instanceof DOMException)||22===t.code||20===t.code||11===t.code))throw t;n6("Error using user provided cache. Falling back to memory cache: "+t),await o8(e,new o6)}}else n4("FirestoreClient","Using default OfflineComponentProvider"),await o8(e,new o6)}return e._offlineComponents}async function an(e){return e._onlineComponents||(e._uninitializedComponentsProvider?(n4("FirestoreClient","Using user provided OnlineComponentProvider"),await ae(e,e._uninitializedComponentsProvider._online)):(n4("FirestoreClient","Using default OnlineComponentProvider"),await ae(e,new o9))),e._onlineComponents}async function ar(e){let t=await an(e),n=t.eventManager;return n.onListen=oH.bind(null,t.syncEngine),n.onUnlisten=oG.bind(null,t.syncEngine),n}/**
2506 * @license
2507 * Copyright 2023 Google LLC
2508 *
2509 * Licensed under the Apache License, Version 2.0 (the "License");
2510 * you may not use this file except in compliance with the License.
2511 * You may obtain a copy of the License at
2512 *
2513 *   http://www.apache.org/licenses/LICENSE-2.0
2514 *
2515 * Unless required by applicable law or agreed to in writing, software
2516 * distributed under the License is distributed on an "AS IS" BASIS,
2517 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2518 * See the License for the specific language governing permissions and
2519 * limitations under the License.
2520 */function ai(e){let t={};return void 0!==e.timeoutSeconds&&(t.timeoutSeconds=e.timeoutSeconds),t}/**
2521 * @license
2522 * Copyright 2020 Google LLC
2523 *
2524 * Licensed under the Apache License, Version 2.0 (the "License");
2525 * you may not use this file except in compliance with the License.
2526 * You may obtain a copy of the License at
2527 *
2528 *   http://www.apache.org/licenses/LICENSE-2.0
2529 *
2530 * Unless required by applicable law or agreed to in writing, software
2531 * distributed under the License is distributed on an "AS IS" BASIS,
2532 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2533 * See the License for the specific language governing permissions and
2534 * limitations under the License.
2535 */let as=new Map;function ao(e){if(!ry.isDocumentKey(e))throw new n8(n7.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${e} has ${e.length}.`)}function aa(e,t){if("_delegate"in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new n8(n7.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{let n=function(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"==typeof e)return e.length>20&&(e=`${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;let n=(t=e).constructor?t.constructor.name:null;return n?`a custom ${n} object`:"an object"}}return"function"==typeof e?"a function":n3()}(e);throw new n8(n7.INVALID_ARGUMENT,`Expected type '${t.name}', but it was: ${n}`)}}return e}/**
2536 * @license
2537 * Copyright 2020 Google LLC
2538 *
2539 * Licensed under the Apache License, Version 2.0 (the "License");
2540 * you may not use this file except in compliance with the License.
2541 * You may obtain a copy of the License at
2542 *
2543 *   http://www.apache.org/licenses/LICENSE-2.0
2544 *
2545 * Unless required by applicable law or agreed to in writing, software
2546 * distributed under the License is distributed on an "AS IS" BASIS,
2547 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2548 * See the License for the specific language governing permissions and
2549 * limitations under the License.
2550 */class al{constructor(e){var t,n;if(void 0===e.host){if(void 0!==e.ssl)throw new n8(n7.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=e.host,this.ssl=null===(t=e.ssl)||void 0===t||t;if(this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,this.cache=e.localCache,void 0===e.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==e.cacheSizeBytes&&e.cacheSizeBytes<1048576)throw new n8(n7.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}(function(e,t,n,r){if(!0===t&&!0===r)throw new n8(n7.INVALID_ARGUMENT,`${e} and ${n} cannot be used together.`)})("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:void 0===e.experimentalAutoDetectLongPolling?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=ai(null!==(n=e.experimentalLongPollingOptions)&&void 0!==n?n:{}),function(e){if(void 0!==e.timeoutSeconds){if(isNaN(e.timeoutSeconds))throw new n8(n7.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (must not be NaN)`);if(e.timeoutSeconds<5)throw new n8(n7.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (minimum allowed value is 5)`);if(e.timeoutSeconds>30)throw new n8(n7.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!e.useFetchStreams}isEqual(e){var t,n;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&&(t=this.experimentalLongPollingOptions,n=e.experimentalLongPollingOptions,t.timeoutSeconds===n.timeoutSeconds)&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class au{constructor(e,t,n,r){this._authCredentials=e,this._appCheckCredentials=t,this._databaseId=n,this._app=r,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new al({}),this._settingsFrozen=!1}get app(){if(!this._app)throw new n8(n7.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return void 0!==this._terminateTask}_setSettings(e){if(this._settingsFrozen)throw new n8(n7.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 al(e),void 0!==e.credentials&&(this._authCredentials=function(e){if(!e)return new rn;switch(e.type){case"firstParty":return new ro(e.sessionIndex||"0",e.iamToken||null,e.authTokenFactory||null);case"provider":return e.client;default:throw new n8(n7.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(e.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(e){let t=as.get(e);t&&(n4("ComponentProvider","Removing Datastore"),as.delete(e),t.terminate())}(this),Promise.resolve()}}/**
2551 * @license
2552 * Copyright 2020 Google LLC
2553 *
2554 * Licensed under the Apache License, Version 2.0 (the "License");
2555 * you may not use this file except in compliance with the License.
2556 * You may obtain a copy of the License at
2557 *
2558 *   http://www.apache.org/licenses/LICENSE-2.0
2559 *
2560 * Unless required by applicable law or agreed to in writing, software
2561 * distributed under the License is distributed on an "AS IS" BASIS,
2562 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2563 * See the License for the specific language governing permissions and
2564 * limitations under the License.
2565 */class ac{constructor(e,t,n){this.converter=t,this._key=n,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new ad(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new ac(this.firestore,e,this._key)}}class ah{constructor(e,t,n){this.converter=t,this._query=n,this.type="query",this.firestore=e}withConverter(e){return new ah(this.firestore,e,this._query)}}class ad extends ah{constructor(e,t,n){super(e,t,new i_(n)),this._path=n,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){let e=this._path.popLast();return e.isEmpty()?null:new ac(this.firestore,null,new ry(e))}withConverter(e){return new ad(this.firestore,e,this._path)}}function af(e,t,...n){if(e=(0,f.m9)(e),1==arguments.length&&(t=ru.A()),/**
2566 * @license
2567 * Copyright 2017 Google LLC
2568 *
2569 * Licensed under the Apache License, Version 2.0 (the "License");
2570 * you may not use this file except in compliance with the License.
2571 * You may obtain a copy of the License at
2572 *
2573 *   http://www.apache.org/licenses/LICENSE-2.0
2574 *
2575 * Unless required by applicable law or agreed to in writing, software
2576 * distributed under the License is distributed on an "AS IS" BASIS,
2577 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2578 * See the License for the specific language governing permissions and
2579 * limitations under the License.
2580 */function(e,t,n){if(!n)throw new n8(n7.INVALID_ARGUMENT,`Function doc() cannot be called with an empty ${t}.`)}(0,"path",t),e instanceof au){let r=rm.fromString(t,...n);return ao(r),new ac(e,null,new ry(r))}{if(!(e instanceof ac||e instanceof ad))throw new n8(n7.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");let r=e._path.child(rm.fromString(t,...n));return ao(r),new ac(e.firestore,e instanceof ad?e.converter:null,new ry(r))}}/**
2581 * @license
2582 * Copyright 2020 Google LLC
2583 *
2584 * Licensed under the Apache License, Version 2.0 (the "License");
2585 * you may not use this file except in compliance with the License.
2586 * You may obtain a copy of the License at
2587 *
2588 *   http://www.apache.org/licenses/LICENSE-2.0
2589 *
2590 * Unless required by applicable law or agreed to in writing, software
2591 * distributed under the License is distributed on an "AS IS" BASIS,
2592 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2593 * See the License for the specific language governing permissions and
2594 * limitations under the License.
2595 */class ap{constructor(){this.Gc=Promise.resolve(),this.Qc=[],this.jc=!1,this.zc=[],this.Wc=null,this.Hc=!1,this.Jc=!1,this.Yc=[],this.qo=new os(this,"async_queue_retry"),this.Xc=()=>{let e=oi();e&&n4("AsyncQueue","Visibility state changed to "+e.visibilityState),this.qo.Mo()};let e=oi();e&&"function"==typeof e.addEventListener&&e.addEventListener("visibilitychange",this.Xc)}get isShuttingDown(){return this.jc}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.Zc(),this.ta(e)}enterRestrictedMode(e){if(!this.jc){this.jc=!0,this.Jc=e||!1;let t=oi();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.Xc)}}enqueue(e){if(this.Zc(),this.jc)return new Promise(()=>{});let t=new re;return this.ta(()=>this.jc&&this.Jc?Promise.resolve():(e().then(t.resolve,t.reject),t.promise)).then(()=>t.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.Qc.push(e),this.ea()))}async ea(){if(0!==this.Qc.length){try{await this.Qc[0](),this.Qc.shift(),this.qo.reset()}catch(e){if(!rx(e))throw e;n4("AsyncQueue","Operation failed with retryable error: "+e)}this.Qc.length>0&&this.qo.No(()=>this.ea())}}ta(e){let t=this.Gc.then(()=>(this.Hc=!0,e().catch(e=>{let t;this.Wc=e,this.Hc=!1;let n=(t=e.message||"",e.stack&&(t=e.stack.includes(e.message)?e.stack:e.message+"\n"+e.stack),t);throw n5("INTERNAL UNHANDLED ERROR: ",n),e}).then(e=>(this.Hc=!1,e))));return this.Gc=t,t}enqueueAfterDelay(e,t,n){this.Zc(),this.Yc.indexOf(e)>-1&&(t=0);let r=oI.createAndSchedule(this,e,t,n,e=>this.na(e));return this.zc.push(r),r}Zc(){this.Wc&&n3()}verifyOperationInProgress(){}async sa(){let e;do e=this.Gc,await e;while(e!==this.Gc)}ia(e){for(let t of this.zc)if(t.timerId===e)return!0;return!1}ra(e){return this.sa().then(()=>{for(let t of(this.zc.sort((e,t)=>
2595e.targetTimeMs-t.targetTimeMs),this.zc))if(t.skipDelay(),"all"!==e&&t.timerId===e)break;return this.sa()})}oa(e){this.Yc.push(e)}na(e){let t=this.zc.indexOf(e);this.zc.splice(t,1)}}function am(e){return function(e,t){if("object"!=typeof e||null===e)return!1;for(let n of t)if(n in e&&"function"==typeof e[n])return!0;return!1}(e,["next","error","complete"])}class ag extends au{constructor(e,t,n,r){super(e,t,n,r),this.type="firestore",this._queue=new ap,this._persistenceKey=(null==r?void 0:r.name)||"[DEFAULT]"}_terminate(){return this._firestoreClient||ay(this),this._firestoreClient.terminate()}}function av(e,t){let n="object"==typeof e?e:(0,c.Mq)(),r=(0,c.qX)(n,"firestore").getImmediate({identifier:"string"==typeof e?e:t||"(default)"});if(!r._initialized){let e=(0,f.P0)("firestore");e&&function(e,t,n,r={}){var i;let s=(e=aa(e,au))._getSettings(),o=`${t}:${n}`;if("firestore.googleapis.com"!==s.host&&s.host!==o&&n6("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),e._setSettings(Object.assign(Object.assign({},s),{host:o,ssl:!1})),r.mockUserToken){let t,n;if("string"==typeof r.mockUserToken)t=r.mockUserToken,n=nJ.MOCK_USER;else{t=(0,f.Sg)(r.mockUserToken,null===(i=e._app)||void 0===i?void 0:i.options.projectId);let s=r.mockUserToken.sub||r.mockUserToken.user_id;if(!s)throw new n8(n7.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");n=new nJ(s)}e._authCredentials=new rr(new rt(t,n))}}(r,...e)}return r}function ay(e){var t,n,r,i,s,o;let a=e._freezeSettings(),l=(i=e._databaseId,s=(null===(t=e._app)||void 0===t?void 0:t.options.appId)||"",o=e._persistenceKey,new rz(i,s,o,a.host,a.ssl,a.experimentalForceLongPolling,a.experimentalAutoDetectLongPolling,ai(a.experimentalLongPollingOptions),a.useFetchStreams));e._firestoreClient=new o7(e._authCredentials,e._appCheckCredentials,e._queue,l),(null===(n=a.cache)||void 0===n?void 0:n._offlineComponentProvider)&&(null===(r=a.cache)||void 0===r?void 0:r._onlineComponentProvider)&&(e._firestoreClient._uninitializedComponentsProvider={_offlineKind:a.cache.kind,_offline:a.cache._offlineComponentProvider,_online:a.cache._onlineComponentProvider})}/**
2596 * @license
2597 * Copyright 2020 Google LLC
2598 *
2599 * Licensed under the Apache License, Version 2.0 (the "License");
2600 * you may not use this file except in compliance with the License.
2601 * You may obtain a copy of the License at
2602 *
2603 *   http://www.apache.org/licenses/LICENSE-2.0
2604 *
2605 * Unless required by applicable law or agreed to in writing, software
2606 * distributed under the License is distributed on an "AS IS" BASIS,
2607 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2608 * See the License for the specific language governing permissions and
2609 * limitations under the License.
2610 */class ab{constructor(e){this._byteString=e}static fromBase64String(e){try{return new ab(rM.fromBase64String(e))}catch(e){throw new n8(n7.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+e)}}static fromUint8Array(e){return new ab(rM.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}}/**
2611 * @license
2612 * Copyright 2020 Google LLC
2613 *
2614 * Licensed under the Apache License, Version 2.0 (the "License");
2615 * you may not use this file except in compliance with the License.
2616 * You may obtain a copy of the License at
2617 *
2618 *   http://www.apache.org/licenses/LICENSE-2.0
2619 *
2620 * Unless required by applicable law or agreed to in writing, software
2621 * distributed under the License is distributed on an "AS IS" BASIS,
2622 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2623 * See the License for the specific language governing permissions and
2624 * limitations under the License.
2625 */class aw{constructor(...e){for(let t=0;t<e.length;++t)if(0===e[t].length)throw new n8(n7.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new rv(e)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}}/**
2626 * @license
2627 * Copyright 2017 Google LLC
2628 *
2629 * Licensed under the Apache License, Version 2.0 (the "License");
2630 * you may not use this file except in compliance with the License.
2631 * You may obtain a copy of the License at
2632 *
2633 *   http://www.apache.org/licenses/LICENSE-2.0
2634 *
2635 * Unless required by applicable law or agreed to in writing, software
2636 * distributed under the License is distributed on an "AS IS" BASIS,
2637 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2638 * See the License for the specific language governing permissions and
2639 * limitations under the License.
2640 */class a_{constructor(e,t){if(!isFinite(e)||e<-90||e>90)throw new n8(n7.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(t)||t<-180||t>180)throw new n8(n7.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+t);this._lat=e,this._long=t}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(e){return rc(this._lat,e._lat)||rc(this._long,e._long)}}let aE=RegExp("[~\\*/\\[\\]]");function ax(e,t,n,r,i){let s=r&&!r.isEmpty(),o=void 0!==i,a=`Function ${t}() called with invalid data`;n&&(a+=" (via `toFirestore()`)"),a+=". ";let l="";return(s||o)&&(l+=" (found",s&&(l+=` in field ${r}`),o&&(l+=` in document ${i}`),l+=")"),new n8(n7.INVALID_ARGUMENT,a+e+l)}/**
2641 * @license
2642 * Copyright 2020 Google LLC
2643 *
2644 * Licensed under the Apache License, Version 2.0 (the "License");
2645 * you may not use this file except in compliance with the License.
2646 * You may obtain a copy of the License at
2647 *
2648 *   http://www.apache.org/licenses/LICENSE-2.0
2649 *
2650 * Unless required by applicable law or agreed to in writing, software
2651 * distributed under the License is distributed on an "AS IS" BASIS,
2652 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2653 * See the License for the specific language governing permissions and
2654 * limitations under the License.
2655 */class aS{constructor(e,t,n,r,i){this._firestore=e,this._userDataWriter=t,this._key=n,this._document=r,this._converter=i}get id(){return this._key.path.lastSegment()}get ref(){return new ac(this._firestore,this._converter,this._key)}exists(){return null!==this._document}data(){if(this._document){if(this._converter){let e=new ak(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}get(e){if(this._document){let t=this._document.data.field(aT("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}}}class ak extends aS{data(){return super.data()}}function aT(e,t){return"string"==typeof t?function(e,t,n){if(t.search(aE)>=0)throw ax(`Invalid field path (${t}). Paths must not contain '~', '*', '/', '[', or ']'`,e,!1,void 0,n);try{return new aw(...t.split("."))._internalPath}catch(r){throw ax(`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,e,!1,void 0,n)}}(e,t):t instanceof aw?t._internalPath:t._delegate._internalPath}class aI{convertValue(e,t="none"){switch(rH(e)){case 0:return null;case 1:return e.booleanValue;case 2:return rj(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(rF(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 n3()}}convertObject(e,t){return this.convertObjectMap(e.fields,t)}convertObjectMap(e,t="none"){let n={};return rI(e,(e,r)=>{n[e]=this.convertValue(r,t)}),n}convertGeoPoint(e){return new a_(rj(e.latitude),rj(e.longitude))}convertArray(e,t){return(e.values||[]).map(e=>this.convertValue(e,t))}convertServerTimestamp(e,t){switch(t){case"previous":let n=rV(e);return null==n?null:this.convertValue(n,t);case"estimate":return this.convertTimestamp(r$(e));default:return null}}convertTimestamp(e){let t=rZ(e);return new rd(t.seconds,t.nanos)}convertDocumentKey(e,t){let n=rm.fromString(e);sA(n)||n3();let r=new rB(n.get(1),n.get(3)),i=new ry(n.popFirst(5));return r.isEqual(t)||n5(`Document ${i} contains a document reference within a different database (${r.projectId}/${r.database}) which is not supported. It will be treated as a reference in the current database (${t.projectId}/${t.database}) instead.`),i}}/**
2656 * @license
2657 * Copyright 2020 Google LLC
2658 *
2659 * Licensed under the Apache License, Version 2.0 (the "License");
2660 * you may not use this file except in compliance with the License.
2661 * You may obtain a copy of the License at
2662 *
2663 *   http://www.apache.org/licenses/LICENSE-2.0
2664 *
2665 * Unless required by applicable law or agreed to in writing, software
2666 * distributed under the License is distributed on an "AS IS" BASIS,
2667 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2668 * See the License for the specific language governing permissions and
2669 * limitations under the License.
2670 */class aC{constructor(e,t){this.hasPendingWrites=e,this.fromCache=t}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class aA extends aS{constructor(e,t,n,r,i,s){super(e,t,n,r,s),this._firestore=e,this._firestoreImpl=e,this.metadata=i}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){let t=new aO(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)}}get(e,t={}){if(this._document){let n=this._document.data.field(aT("DocumentSnapshot.get",e));if(null!==n)return this._userDataWriter.convertValue(n,t.serverTimestamps)}}}class aO extends aA{data(e={}){return super.data(e)}}class aR{constructor(e,t,n,r){this._firestore=e,this._userDataWriter=t,this._snapshot=r,this.metadata=new aC(r.hasPendingWrites,r.fromCache),this.query=n}get docs(){let e=[];return this.forEach(t=>e.push(t)),e}get size(){return this._snapshot.docs.size}get empty(){return 0===this.size}forEach(e,t){this._snapshot.docs.forEach(n=>{e.call(t,new aO(this._firestore,this._userDataWriter,n.key,n,new aC(this._snapshot.mutatedKeys.has(n.key),this._snapshot.fromCache),this.query.converter))})}docChanges(e={}){let t=!!e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new n8(n7.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=function(e,t){if(e._snapshot.oldDocs.isEmpty()){let t=0;return e._snapshot.docChanges.map(n=>{let r=new aO(e._firestore,e._userDataWriter,n.doc.key,n.doc,new aC(e._snapshot.mutatedKeys.has(n.doc.key),e._snapshot.fromCache),e.query.converter);return n.doc,{type:"added",doc:r,oldIndex:-1,newIndex:t++}})}{let n=e._snapshot.oldDocs;return e._snapshot.docChanges.filter(e=>t||3!==e.type).map(t=>{let r=new aO(e._firestore,e._userDataWriter,t.doc.key,t.doc,new aC(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter),i=-1,s=-1;return 0!==t.type&&(i=n.indexOf(t.doc.key),n=n.delete(t.doc.key)),1!==t.type&&(s=(n=n.add(t.doc)).indexOf(t.doc.key)),{type:function(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return n3()}}(t.type),doc:r,oldIndex:i,newIndex:s}})}}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges}}class aP extends aI{constructor(e){super(),this.firestore=e}convertBytes(e){return new ab(e)}convertReference(e){let t=this.convertDocumentKey(e,this.firestore._databaseId);return new ac(this.firestore,null,t)}}function aN(e,...t){var n,r,i,s,o;let a,l,u;e=(0,f.m9)(e);let c={includeMetadataChanges:!1},h=0;"object"!=typeof t[0]||am(t[h])||(c=t[h],h++);let d={includeMetadataChanges:c.includeMetadataChanges};if(am(t[h])){let e=t[h];t[h]=null===(n=e.next)||void 0===n?void 0:n.bind(e),t[h+1]=null===(r=e.error)||void 0===r?void 0:r.bind(e),t[h+2]=null===(i=e.complete)||void 0===i?void 0:i.bind(e)}if(e instanceof ac)l=aa(e.firestore,ag),s=e._key.path,u=new i_(s),a={next:n=>{t[h]&&t[h](function(e,t,n){let r=n.docs.get(t._key),i=new aP(e);return new aA(e,i,t._key,r,new aC(n.hasPendingWrites,n.fromCache),t.converter)}(l,e,n))},error:t[h+1],complete:t[h+2]};else{let n=aa(e,ah);l=aa(n.firestore,ag),u=n._query;let r=new aP(l);a={next:e=>{t[h]&&t[h](new aR(l,r,n,e))},error:t[h+1],complete:t[h+2]},/**
2671 * @license
2672 * Copyright 2020 Google LLC
2673 *
2674 * Licensed under the Apache License, Version 2.0 (the "License");
2675 * you may not use this file except in compliance with the License.
2676 * You may obtain a copy of the License at
2677 *
2678 *   http://www.apache.org/licenses/LICENSE-2.0
2679 *
2680 * Unless required by applicable law or agreed to in writing, software
2681 * distributed under the License is distributed on an "AS IS" BASIS,
2682 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2683 * See the License for the specific language governing permissions and
2684 * limitations under the License.
2685 */function(e){if("L"===e.limitType&&0===e.explicitOrderBy.length)throw new n8(n7.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}(e._query)}return function(e,t,n,r){let i=new o3(r),s=new oF(t,i,n);return e.asyncQueue.enqueueAndForget(async()=>oD(await ar(e),s)),()=>{i.Dc(),e.asyncQueue.enqueueAndForget(async()=>oM(await ar(e),s))}}(((o=l)._firestoreClient||ay(o),o._firestoreClient.verifyNotTerminated(),o._firestoreClient),u,d,a)}!function(e,t=!0){n0=c.Jn,(0,c.Xd)(new h.wA("firestore",(e,{instanceIdentifier:n,options:r})=>{let i=e.getProvider("app").getImmediate(),s=new ag(new ri(e.getProvider("auth-internal")),new rl(e.getProvider("app-check-internal")),function(e,t){if(!Object.prototype.hasOwnProperty.apply(e.options,["projectId"]))throw new n8(n7.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new rB(e.options.projectId,t)}(i,n),i);return r=Object.assign({useFetchStreams:t},r),s._setSettings(r),s},"PUBLIC").setMultipleInstances(!0)),(0,c.KN)(nX,"3.13.0",void 0),(0,c.KN)(nX,"3.13.0","esm2017")}()},86650:function(e,t,n){"use strict";n.d(t,{Jt:function(){return el},sd:function(){return eo},cF:function(){return ec},iH:function(){return eu},Ym:function(){return ea},sf:function(){return es}});var r,i,s,o,a=n(47456),l=n(74444),u=n(8463);/**
2686 * @license
2687 * Copyright 2017 Google LLC
2688 *
2689 * Licensed under the Apache License, Version 2.0 (the "License");
2690 * you may not use this file except in compliance with the License.
2691 * You may obtain a copy of the License at
2692 *
2693 *   http://www.apache.org/licenses/LICENSE-2.0
2694 *
2695 * Unless required by applicable law or agreed to in writing, software
2696 * distributed under the License is distributed on an "AS IS" BASIS,
2697 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2698 * See the License for the specific language governing permissions and
2699 * limitations under the License.
2700 */let c="firebasestorage.googleapis.com",h="storageBucket";/**
2701 * @license
2702 * Copyright 2017 Google LLC
2703 *
2704 * Licensed under the Apache License, Version 2.0 (the "License");
2705 * you may not use this file except in compliance with the License.
2706 * You may obtain a copy of the License at
2707 *
2708 *   http://www.apache.org/licenses/LICENSE-2.0
2709 *
2710 * Unless required by applicable law or agreed to in writing, software
2711 * distributed under the License is distributed on an "AS IS" BASIS,
2712 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2713 * See the License for the specific language governing permissions and
2714 * limitations under the License.
2715 */class d extends l.ZR{constructor(e,t,n=0){super(f(e),`Firebase Storage: ${t} (${f(e)})`),this.status_=n,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,d.prototype)}get status(){return this.status_}set status(e){this.status_=e}_codeEquals(e){return f(e)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message=`${this._baseMessage}
2716${this.customData.serverResponse}`:this.message=this._baseMessage}}function f(e){return"storage/"+e}function p(){return new d(s.UNKNOWN,"An unknown error occurred, please check the error payload for server response.")}function m(e){return new d(s.INVALID_ARGUMENT,e)}function g(){return new d(s.APP_DELETED,"The Firebase app was deleted.")}function v(e,t){return new d(s.INVALID_FORMAT,"String does not match format '"+e+"': "+t)}function y(e){throw new d(s.INTERNAL_ERROR,"Internal error: "+e)}(r=s||(s={})).UNKNOWN="unknown",r.OBJECT_NOT_FOUND="object-not-found",r.BUCKET_NOT_FOUND="bucket-not-found",r.PROJECT_NOT_FOUND="project-not-found",r.QUOTA_EXCEEDED="quota-exceeded",r.UNAUTHENTICATED="unauthenticated",r.UNAUTHORIZED="unauthorized",r.UNAUTHORIZED_APP="unauthorized-app",r.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",r.INVALID_CHECKSUM="invalid-checksum",r.CANCELED="canceled",r.INVALID_EVENT_NAME="invalid-event-name",r.INVALID_URL="invalid-url",r.INVALID_DEFAULT_BUCKET="invalid-default-bucket",r.NO_DEFAULT_BUCKET="no-default-bucket",r.CANNOT_SLICE_BLOB="cannot-slice-blob",r.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",r.NO_DOWNLOAD_URL="no-download-url",r.INVALID_ARGUMENT="invalid-argument",r.INVALID_ARGUMENT_COUNT="invalid-argument-count",r.APP_DELETED="app-deleted",r.INVALID_ROOT_OPERATION="invalid-root-operation",r.INVALID_FORMAT="invalid-format",r.INTERNAL_ERROR="internal-error",r.UNSUPPORTED_ENVIRONMENT="unsupported-environment";/**
2717 * @license
2718 * Copyright 2017 Google LLC
2719 *
2720 * Licensed under the Apache License, Version 2.0 (the "License");
2721 * you may not use this file except in compliance with the License.
2722 * You may obtain a copy of the License at
2723 *
2724 *   http://www.apache.org/licenses/LICENSE-2.0
2725 *
2726 * Unless required by applicable law or agreed to in writing, software
2727 * distributed under the License is distributed on an "AS IS" BASIS,
2728 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2729 * See the License for the specific language governing permissions and
2730 * limitations under the License.
2731 */class b{constructor(e,t){this.bucket=e,this.path_=t}get path(){return this.path_}get isRoot(){return 0===this.path.length}fullServerUrl(){let e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)}bucketOnlyServerUrl(){let e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o"}static makeFromBucketSpec(e,t){let n;try{n=b.makeFromUrl(e,t)}catch(t){return new b(e,"")}if(""===n.path)return n;throw new d(s.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+e+"'.")}static makeFromUrl(e,t){let n=null,r="([A-Za-z0-9.\\-_]+)",i=RegExp("^gs://"+r+"(/(.*))?$","i");function o(e){e.path_=decodeURIComponent(e.path)}let a=t.replace(/[.]/g,"\\."),l=RegExp(`^https?://${a}/v[A-Za-z0-9_]+/b/${r}/o(/([^?#]*).*)?$`,"i"),u=RegExp(`^https?://${t===c?"(?:storage.googleapis.com|storage.cloud.google.com)":t}/${r}/([^?#]*)`,"i"),h=[{regex:i,indices:{bucket:1,path:3},postModify:function(e){"/"===e.path.charAt(e.path.length-1)&&(e.path_=e.path_.slice(0,-1))}},{regex:l,indices:{bucket:1,path:3},postModify:o},{regex:u,indices:{bucket:1,path:2},postModify:o}];for(let t=0;t<h.length;t++){let r=h[t],i=r.regex.exec(e);if(i){let e=i[r.indices.bucket],t=i[r.indices.path];t||(t=""),n=new b(e,t),r.postModify(n);break}}if(null==n)throw new d(s.INVALID_URL,"Invalid URL '"+e+"'.");return n}}class w{constructor(e){this.promise_=Promise.reject(e)}getPromise(){return this.promise_}cancel(e=!1){}}function _(e){return"string"==typeof e||e instanceof String}function E(e){return x()&&e instanceof Blob}function x(){return"undefined"!=typeof Blob&&!(0,l.UG)()}function S(e,t,n,r){if(r<t)throw m(`Invalid value for '${e}'. Expected ${t} or greater.`);if(r>n)throw m(`Invalid value for '${e}'. Expected ${n} or less.`)}/**
2732 * @license
2733 * Copyright 2017 Google LLC
2734 *
2735 * Licensed under the Apache License, Version 2.0 (the "License");
2736 * you may not use this file except in compliance with the License.
2737 * You may obtain a copy of the License at
2738 *
2739 *   http://www.apache.org/licenses/LICENSE-2.0
2740 *
2741 * Unless required by applicable law or agreed to in writing, software
2742 * distributed under the License is distributed on an "AS IS" BASIS,
2743 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2744 * See the License for the specific language governing permissions and
2745 * limitations under the License.
2746 */function k(e,t,n){let r=t;return null==n&&(r=`https://${t}`),`${n}://${r}/v0${e}`}function T(e){let t=encodeURIComponent,n="?";for(let r in e)if(e.hasOwnProperty(r)){let i=t(r)+"="+t(e[r]);n=n+i+"&"}return n.slice(0,-1)}(i=o||(o={}))[i.NO_ERROR=0]="NO_ERROR",i[i.NETWORK_ERROR=1]="NETWORK_ERROR",i[i.ABORT=2]="ABORT";/**
2747 * @license
2748 * Copyright 2017 Google LLC
2749 *
2750 * Licensed under the Apache License, Version 2.0 (the "License");
2751 * you may not use this file except in compliance with the License.
2752 * You may obtain a copy of the License at
2753 *
2754 *   http://www.apache.org/licenses/LICENSE-2.0
2755 *
2756 * Unless required by applicable law or agreed to in writing, software
2757 * distributed under the License is distributed on an "AS IS" BASIS,
2758 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2759 * See the License for the specific language governing permissions and
2760 * limitations under the License.
2761 */class I{constructor(e,t,n,r,i,s,o,a,l,u,c,h=!0){this.url_=e,this.method_=t,this.headers_=n,this.body_=r,this.successCodes_=i,this.additionalRetryCodes_=s,this.callback_=o,this.errorCallback_=a,this.timeout_=l,this.progressCallback_=u,this.connectionFactory_=c,this.retry=h,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((e,t)=>
2761{this.resolve_=e,this.reject_=t,this.start_()})}start_(){let e=(e,t)=>{if(t){e(!1,new C(!1,null,!0));return}let n=this.connectionFactory_();this.pendingConnection_=n;let r=e=>{let t=e.loaded,n=e.lengthComputable?e.total:-1;null!==this.progressCallback_&&this.progressCallback_(t,n)};null!==this.progressCallback_&&n.addUploadProgressListener(r),n.send(this.url_,this.method_,this.body_,this.headers_).then(()=>{null!==this.progressCallback_&&n.removeUploadProgressListener(r),this.pendingConnection_=null;let t=n.getErrorCode()===o.NO_ERROR,i=n.getStatus();if(!t||/**
2762 * @license
2763 * Copyright 2022 Google LLC
2764 *
2765 * Licensed under the Apache License, Version 2.0 (the "License");
2766 * you may not use this file except in compliance with the License.
2767 * You may obtain a copy of the License at
2768 *
2769 *   http://www.apache.org/licenses/LICENSE-2.0
2770 *
2771 * Unless required by applicable law or agreed to in writing, software
2772 * distributed under the License is distributed on an "AS IS" BASIS,
2773 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2774 * See the License for the specific language governing permissions and
2775 * limitations under the License.
2776 */function(e,t){let n=-1!==[408,429].indexOf(e),r=-1!==t.indexOf(e);return e>=500&&e<600||n||r}(i,this.additionalRetryCodes_)&&this.retry){let t=n.getErrorCode()===o.ABORT;e(!1,new C(!1,null,t));return}let s=-1!==this.successCodes_.indexOf(i);e(!0,new C(s,n))})},t=(e,t)=>{let n=this.resolve_,r=this.reject_,i=t.connection;if(t.wasSuccessCode)try{let e=this.callback_(i,i.getResponse());void 0!==e?n(e):n()}catch(e){r(e)}else if(null!==i){let e=p();e.serverResponse=i.getErrorText(),r(this.errorCallback_?this.errorCallback_(i,e):e)}else if(t.canceled){let e=this.appDelete_?g():new d(s.CANCELED,"User canceled the upload/download.");r(e)}else{let e=new d(s.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.");r(e)}};this.canceled_?t(!1,new C(!1,null,!0)):this.backoffId_=/**
2777 * @license
2778 * Copyright 2017 Google LLC
2779 *
2780 * Licensed under the Apache License, Version 2.0 (the "License");
2781 * you may not use this file except in compliance with the License.
2782 * You may obtain a copy of the License at
2783 *
2784 *   http://www.apache.org/licenses/LICENSE-2.0
2785 *
2786 * Unless required by applicable law or agreed to in writing, software
2787 * distributed under the License is distributed on an "AS IS" BASIS,
2788 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2789 * See the License for the specific language governing permissions and
2790 * limitations under the License.
2791 */function(e,t,n){let r=1,i=null,s=null,o=!1,a=0,l=!1;function u(...e){l||(l=!0,t.apply(null,e))}function c(t){i=setTimeout(()=>{i=null,e(d,2===a)},t)}function h(){s&&clearTimeout(s)}function d(e,...t){let n;if(l){h();return}if(e){h(),u.call(null,e,...t);return}let i=2===a||o;if(i){h(),u.call(null,e,...t);return}r<64&&(r*=2),1===a?(a=2,n=0):n=(r+Math.random())*1e3,c(n)}let f=!1;function p(e){!f&&(f=!0,h(),!l&&(null!==i?(e||(a=2),clearTimeout(i),c(0)):e||(a=1)))}return c(0),s=setTimeout(()=>{o=!0,p(!0)},n),p}(e,t,this.timeout_)}getPromise(){return this.promise_}cancel(e){this.canceled_=!0,this.appDelete_=e||!1,null!==this.backoffId_&&(0,this.backoffId_)(!1),null!==this.pendingConnection_&&this.pendingConnection_.abort()}}class C{constructor(e,t,n){this.wasSuccessCode=e,this.connection=t,this.canceled=!!n}}function A(...e){let t="undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0;if(void 0!==t){let n=new t;for(let t=0;t<e.length;t++)n.append(e[t]);return n.getBlob()}if(x())return new Blob(e);throw new d(s.UNSUPPORTED_ENVIRONMENT,"This browser doesn't seem to support creating Blobs")}/**
2792 * @license
2793 * Copyright 2017 Google LLC
2794 *
2795 * Licensed under the Apache License, Version 2.0 (the "License");
2796 * you may not use this file except in compliance with the License.
2797 * You may obtain a copy of the License at
2798 *
2799 *   http://www.apache.org/licenses/LICENSE-2.0
2800 *
2801 * Unless required by applicable law or agreed to in writing, softw
2801are
2802 * distributed under the License is distributed on an "AS IS" BASIS,
2803 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2804 * See the License for the specific language governing permissions and
2805 * limitations under the License.
2806 */let O={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"};class R{constructor(e,t){this.data=e,this.contentType=t||null}}function P(e,t){switch(e){case O.RAW:return new R(N(t));case O.BASE64:case O.BASE64URL:return new R(D(e,t));case O.DATA_URL:return new R(function(e){let t=new M(e);return t.base64?D(O.BASE64,t.rest):function(e){let t;try{t=decodeURIComponent(e)}catch(e){throw v(O.DATA_URL,"Malformed data URL.")}return N(t)}(t.rest)}(t),function(e){let t=new M(e);return t.contentType}(t))}throw p()}function N(e){let t=[];for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r<=127)t.push(r);else if(r<=2047)t.push(192|r>>6,128|63&r);else if((64512&r)==55296){let i=n<e.length-1&&(64512&e.charCodeAt(n+1))==56320;if(i){let i=r,s=e.charCodeAt(++n);r=65536|(1023&i)<<10|1023&s,t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r)}else t.push(239,191,189)}else(64512&r)==56320?t.push(239,191,189):t.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(t)}function D(e,t){let n;switch(e){case O.BASE64:{let n=-1!==t.indexOf("-"),r=-1!==t.indexOf("_");if(n||r)throw v(e,"Invalid character '"+(n?"-":"_")+"' found: is it base64url encoded?");break}case O.BASE64URL:{let n=-1!==t.indexOf("+"),r=-1!==t.indexOf("/");if(n||r)throw v(e,"Invalid character '"+(n?"+":"/")+"' found: is it base64 encoded?");t=t.replace(/-/g,"+").replace(/_/g,"/")}}try{n=/**
2807 * @license
2808 * Copyright 2021 Google LLC
2809 *
2810 * Licensed under the Apache License, Version 2.0 (the "License");
2811 * you may not use this file except in compliance with the License.
2812 * You may obtain a copy of the License at
2813 *
2814 *   http://www.apache.org/licenses/LICENSE-2.0
2815 *
2816 * Unless required by applicable law or agreed to in writing, software
2817 * distributed under the License is distributed on an "AS IS" BASIS,
2818 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2819 * See the License for the specific language governing permissions and
2820 * limitations under the License.
2821 */function(e){if("undefined"==typeof atob)throw new d(s.UNSUPPORTED_ENVIRONMENT,"base-64 is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.");return atob(e)}(t)}catch(t){if(t.message.includes("polyfill"))throw t;throw v(e,"Invalid character found")}let r=new Uint8Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);return r}class M{constructor(e){this.base64=!1,this.contentType=null;let t=e.match(/^data:([^,]+)?,/);if(null===t)throw v(O.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");let n=t[1]||null;null!=n&&(this.base64=function(e,t){let n=e.length>=t.length;return!!n&&e.substring(e.length-t.length)===t}(n,";base64"),this.contentType=this.base64?n.substring(0,n.length-7):n),this.rest=e.substring(e.indexOf(",")+1)}}/**
2822 * @license
2823 * Copyright 2017 Google LLC
2824 *
2825 * Licensed under the Apache License, Version 2.0 (the "License");
2826 * you may not use this file except in compliance with the License.
2827 * You may obtain a copy of the License at
2828 *
2829 *   http://www.apache.org/licenses/LICENSE-2.0
2830 *
2831 * Unless required by applicable law or agreed to in writing, software
2832 * distributed under the License is distributed on an "AS IS" BASIS,
2833 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2834 * See the License for the specific language governing permissions and
2835 * limitations under the License.
2836 */class L{constructor(e,t){let n=0,r="";E(e)?(this.data_=e,n=e.size,r=e.type):e instanceof ArrayBuffer?(t?this.data_=new Uint8Array(e):(this.data_=new Uint8Array(e.byteLength),this.data_.set(new Uint8Array(e))),n=this.data_.length):e instanceof Uint8Array&&(t?this.data_=e:(this.data_=new Uint8Array(e.length),this.data_.set(e)),n=e.length),this.size_=n,this.type_=r}size(){return this.size_}type(){return this.type_}slice(e,t){if(E(this.data_)){let n=this.data_,r=n.webkitSlice?n.webkitSlice(e,t):n.mozSlice?n.mozSlice(e,t):n.slice?n.slice(e,t):null;return null===r?null:new L(r)}{let n=new Uint8Array(this.data_.buffer,e,t-e);return new L(n,!0)}}static getBlob(...e){if(x()){let t=e.map(e=>e instanceof L?e.data_:e);return new L(A.apply(null,t))}{let t=e.map(e=>_(e)?P(O.RAW,e).data:e.data_),n=0;
2836t.forEach(e=>{n+=e.byteLength});let r=new Uint8Array(n),i=0;return t.forEach(e=>{for(let t=0;t<e.length;t++)r[i++]=e[t]}),new L(r,!0)}}uploadData(){return this.data_}}/**
2837 * @license
2838 * Copyright 2017 Google LLC
2839 *
2840 * Licensed under the Apache License, Version 2.0 (the "License");
2841 * you may not use this file except in compliance with the License.
2842 * You may obtain a copy of the License at
2843 *
2844 *   http://www.apache.org/licenses/LICENSE-2.0
2845 *
2846 * Unless required by applicable law or agreed to in writing, software
2847 * distributed under the License is distributed on an "AS IS" BASIS,
2848 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2849 * See the License for the specific language governing permissions and
2850 * limitations under the License.
2851 */function Z(e){var t;let n;try{n=JSON.parse(e)}catch(e){return null}return"object"!=typeof(t=n)||Array.isArray(t)?null:n}function j(e){let t=e.lastIndexOf("/",e.length-2);return -1===t?e:e.slice(t+1)}/**
2852 * @license
2853 * Copyright 2017 Google LLC
2854 *
2855 * Licensed under the Apache License, Version 2.0 (the "License");
2856 * you may not use this file except in compliance with the License.
2857 * You may obtain a copy of the License at
2858 *
2859 *   http://www.apache.org/licenses/LICENSE-2.0
2860 *
2861 * Unless required by applicable law or agreed to in writing, software
2862 * distributed under the License is distributed on an "AS IS" BASIS,
2863 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2864 * See the License for the specific language governing permissions and
2865 * limitations under the License.
2866 */function F(e,t){return t}class U{constructor(e,t,n,r){this.server=e,this.local=t||e,this.writable=!!n,this.xform=r||F}}let V=null;function $(){if(V)return V;let e=[];e.push(new U("bucket")),e.push(new U("generation")),e.push(new U("metageneration")),e.push(new U("name","fullPath",!0));let t=new U("name");t.xform=function(e,t){return!_(t)||t.length<2?t:j(t)},e.push(t);let n=new U("size");return n.xform=function(e,t){return void 0!==t?Number(t):t},e.push(n),e.push(new U("timeCreated")),e.push(new U("updated")),e.push(new U("md5Hash",null,!0)),e.push(new U("cacheControl",null,!0)),e.push(new U("contentDisposition",null,!0)),e.push(new U("contentEncoding",null,!0)),e.push(new U("contentLanguage",null,!0)),e.push(new U("contentType",null,!0)),e.push(new U("metadata","customMetadata",!0)),V=e}function z(e,t,n){let r=Z(t);return null===r?null:function(e,t,n){let r={};r.type="file";let i=n.length;for(let e=0;e<i;e++){let i=n[e];r[i.local]=i.xform(r,t[i.server])}return Object.defineProperty(r,"ref",{get:function(){let t=r.bucket,n=r.fullPath,i=new b(t,n);return e._makeStorageReference(i)}}),r}(e,r,n)}function B(e,t){let n={},r=t.length;for(let i=0;i<r;i++){let r=t[i];r.writable&&(n[r.server]=e[r.local])}return JSON.stringify(n)}class q{constructor(e,t,n,r){this.url=e,this.method=t,this.handler=n,this.timeout=r,this.urlParams={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}}/**
2867 * @license
2868 * Copyright 2017 Google LLC
2869 *
2870 * Licensed under the Apache License, Version 2.0 (the "License");
2871 * you may not use this file except in compliance with the License.
2872 * You may obtain a copy of the License at
2873 *
2874 *   http://www.apache.org/licenses/LICENSE-2.0
2875 *
2876 * Unless required by applicable law or agreed to in writing, software
2877 * distributed under the License is distributed on an "AS IS" BASIS,
2878 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2879 * See the License for the specific language governing permissions and
2880 * limitations under the License.
2881 */function H(e){if(!e)throw p()}function W(e,t){return function(n,r){let i=z(e,r,t);return H(null!==i),i}}function G(e){return function(t,n){var r,i;let o;return 401===t.getStatus()?o=t.getErrorText().includes("Firebase App Check token is invalid")?new d(s.UNAUTHORIZED_APP,"This app does not have permission to access Firebase Storage on this project."):new d(s.UNAUTHENTICATED,"User is not authenticated, please authenticate using Firebase Authentication and try again."):402===t.getStatus()?(r=e.bucket,o=new d(s.QUOTA_EXCEEDED,"Quota for bucket '"+r+"' exceeded, please view quota on https://firebase.google.com/pricing/.")):403===t.getStatus()?(i=e.path,o=new d(s.UNAUTHORIZED,"User does not have permission to access '"+i+"'.")):o=n,o.status=t.getStatus(),o.serverResponse=n.serverResponse,o}}function K(e){let t=G(e);return function(n,r){let i=t(n,r);
2881if(404===n.getStatus()){var o;o=e.path,i=new d(s.OBJECT_NOT_FOUND,"Object '"+o+"' does not exist.")}return i.serverResponse=r.serverResponse,i}}class Q{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=o.NO_ERROR,this.sendPromise_=new Promise(e=>{this.xhr_.addEventListener("abort",()=>{this.errorCode_=o.ABORT,e()}),this.xhr_.addEventListener("error",()=>{this.errorCode_=o.NETWORK_ERROR,e()}),this.xhr_.addEventListener("load",()=>{e()})})}send(e,t,n,r){if(this.sent_)throw y("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(t,e,!0),void 0!==r)for(let e in r)r.hasOwnProperty(e)&&this.xhr_.setRequestHeader(e,r[e].toString());return void 0!==n?this.xhr_.send(n):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw y("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw y("cannot .getStatus() before sending");try{return this.xhr_.status}catch(e){return -1}}getResponse(){if(!this.sent_)throw y("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw y("cannot .getErrorText() before sending");return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader(e){return this.xhr_.getResponseHeader(e)}addUploadProgressListener(e){null!=this.xhr_.upload&&this.xhr_.upload.addEventListener("progress",e)}removeUploadProgressListener(e){null!=this.xhr_.upload&&this.xhr_.upload.removeEventListener("progress",e)}}class Y extends Q{initXhr(){this.xhr_.responseType="text"}}function X(){return new Y}/**
2882 * @license
2883 * Copyright 2019 Google LLC
2884 *
2885 * Licensed under the Apache License, Version 2.0 (the "License");
2886 * you may not use this file except in compliance with the License.
2887 * You may obtain a copy of the License at
2888 *
2889 *   http://www.apache.org/licenses/LICENSE-2.0
2890 *
2891 * Unless required by applicable law or agreed to in writing, software
2892 * distributed under the License is distributed on an "AS IS" BASIS,
2893 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2894 * See the License for the specific language governing permissions and
2895 * limitations under the License.
2896 */class J{constructor(e,t){this._service=e,t instanceof b?this._location=t:this._location=b.makeFromUrl(t,e.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(e,t){return new J(e,t)}get root(){let e=new b(this._location.bucket,"");return this._newRef(this._service,e)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return j(this._location.path)}get storage(){return this._service}get parent(){let e=/**
2897 * @license
2898 * Copyright 2017 Google LLC
2899 *
2900 * Licensed under the Apache License, Version 2.0 (the "License");
2901 * you may not use this file except in compliance with the License.
2902 * You may obtain a copy of the License at
2903 *
2904 *   http://www.apache.org/licenses/LICENSE-2.0
2905 *
2906 * Unless required by applicable law or agreed to in writing, software
2907 * distributed under the License is distributed on an "AS IS" BASIS,
2908 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2909 * See the License for the specific language governing permissions and
2910 * limitations under the License.
2911 */function(e){if(0===e.length)return null;let t=e.lastIndexOf("/");if(-1===t)return"";let n=e.slice(0,t);return n}(this._location.path);if(null===e)return null;let t=new b(this._location.bucket,e);return new J(this._service,t)}_throwIfRoot(e){if(""===this._location.path)throw new d(s.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').")}}function ee(e,t){let n=null==t?void 0:t[h];return null==n?null:b.makeFromBucketSpec(n,e)}class et{constructor(e,t,n,r,i){this.app=e,this._authProvider=t,this._appCheckProvider=n,this._url=r,this._firebaseVersion=i,this._bucket=null,this._host=c,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,null!=r?this._bucket=b.makeFromBucketSpec(r,this._host):this._bucket=ee(this._host,this.app.options)}get host(){return this._host}set host(e){this._host=e,null!=this._url?this._bucket=b.makeFromBucketSpec(this._url,e):this._bucket=ee(e,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(e){S("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(e){S("time",0,Number.POSITIVE_INFINITY,e),this._maxOperationRetryTime=e}async _getAuthToken(){if(this._overrideAuthToken)return this._overrideAuthToken;let e=this._authProvider.getImmediate({optional:!0});if(e){let t=await e.getToken();if(null!==t)return t.accessToken}return null}async _getAppCheckToken(){let e=this._appCheckProvider.getImmediate({optional:!0});if(e){let t=await e.getToken();return t.token}return null}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEac
2911h(e=>e.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference(e){return new J(this,e)}_makeRequest(e,t,n,r,i=!0){if(this._deleted)return new w(g());{let s=function(e,t,n,r,i,s,o=!0){var a,l,u;let c=T(e.urlParams),h=e.url+c,d=Object.assign({},e.headers);return a=d,t&&(a["X-Firebase-GMPID"]=t),l=d,null!==n&&n.length>0&&(l.Authorization="Firebase "+n),d["X-Firebase-Storage-Version"]="webjs/"+(null!=s?s:"AppManager"),u=d,null!==r&&(u["X-Firebase-AppCheck"]=r),new I(h,e.method,d,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,i,o)}(e,this._appId,n,r,t,this._firebaseVersion,i);return this._requests.add(s),s.getPromise().then(()=>this._requests.delete(s),()=>this._requests.delete(s)),s}}async makeRequestWithTokens(e,t){let[n,r]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(e,t,n,r).getPromise()}}let en="@firebase/storage",er="0.11.2",ei="storage";function es(e,t,n,r){return function(e,t,n=O.RAW,r){e._throwIfRoot("uploadString");let i=P(n,t),o=Object.assign({},r);return null==o.contentType&&null!=i.contentType&&(o.contentType=i.contentType),function(e,t,n){e._throwIfRoot("uploadBytes");let r=function(e,t,n,r,i){let o=t.bucketOnlyServerUrl(),a={"X-Goog-Upload-Protocol":"multipart"},l=function(){let e="";for(let t=0;t<2;t++)e+=Math.random().toString().slice(2);return e}();a["Content-Type"]="multipart/related; boundary="+l;let u=function(e,t,n){let r=Object.assign({},n);return r.fullPath=e.path,r.size=t.size(),!r.contentType&&(r.contentType=t&&t.type()||"application/octet-stream"),r}(t,r,i),c=B(u,n),h="--"+l+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+c+"\r\n--"+l+"\r\nContent-Type: "+u.contentType+"\r\n\r\n",f=L.getBlob(h,r,"\r\n--"
2911+l+"--");if(null===f)throw new d(s.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.");let p={name:u.fullPath},m=k(o,e.host,e._protocol),g=e.maxUploadRetryTime,v=new q(m,"POST",W(e,n),g);return v.urlParams=p,v.headers=a,v.body=f.uploadData(),v.errorHandler=G(t),v}(e.storage,e._location,$(),new L(t,!0),n);return e.storage.makeRequestWithTokens(r,X).then(t=>({metadata:t,ref:e}))}(e,i.data,o)}(e=(0,l.m9)(e),t,n,r)}function eo(e){return function(e){e._throwIfRoot("getMetadata");let t=function(e,t,n){let r=t.fullServerUrl(),i=k(r,e.host,e._protocol),s=e.maxOperationRetryTime,o=new q(i,"GET",W(e,n),s);return o.errorHandler=K(t),o}(e.storage,e._location,$());return e.storage.makeRequestWithTokens(t,X)}(e=(0,l.m9)(e))}function ea(e,t){return function(e,t){e._throwIfRoot("updateMetadata");let n=function(e,t,n,r){let i=t.fullServerUrl(),s=k(i,e.host,e._protocol),o=B(n,r),a=e.maxOperationRetryTime,l=new q(s,"PATCH",W(e,r),a);return l.headers={"Content-Type":"application/json; charset=utf-8"},l.body=o,l.errorHandler=K(t),l}(e.storage,e._location,t,$());return e.storage.makeRequestWithTokens(n,X)}(e=(0,l.m9)(e),t)}function el(e){return function(e){e._throwIfRoot("getDownloadURL");let t=function(e,t,n){let r=t.fullServerUrl(),i=k(r,e.host,e._protocol),s=e.maxOperationRetryTime,o=new q(i,"GET",function(t,r){let i=z(e,r,n);return H(null!==i),function(e,t,n,r){let i=Z(t);if(null===i||!_(i.downloadTokens))return null;let s=i.downloadTokens;if(0===s.length)return null;let o=encodeURIComponent,a=s.split(","),l=a.map(t=>{let i=e.bucket,s=e.fullPath,a="/b/"+o(i)+"/o/"+o(s),l=k(a,n,r),u=T({alt:"media",token:t});return l+u});return l[0]}(i,r,e.host,e._protocol)},s);return o.errorHandler=K(t),o}(e.storage,e._location,$());return e.storage.makeRequestWithTokens(t,X).then(e=>{if(null===e)throw new d(s.NO_DOWNLOAD_URL,"The given file does not have any download URLs.");return e})}(e=(0,l.m9)(e))}function eu(e,t){return function(e,t){if(!(t&&/^[A-Za-z]+:\/\//.test(t)))return function e(t,n){if(t instanceof et){if(null==t._bucket)throw new d(s.NO_DEFAULT_BUCKET,"No default bucket found. Did you set the '"+h+"' property when initializing the app?");let r=new J(t,t._bucket);return null!=n?e(r,n):r}return void 0!==n?function(e,t){let n=function(e,t){let n=t.split("/").filter(e=>e.length>0).join("/");return 0===e.length?n:e+"/"+n}(e._location.path,t),r=new b(e._location.bucket,n);return new J(e.storage,r)}(t,n):t}(e,t);if(e instanceof et)return new J(e,t);throw m("To use ref(service, url), the first argument must be a Storage instance.")}(e=(0,l.m9)(e),t)}function ec(e=(0,a.Mq)(),t){e=(0,l.m9)(e);let n=(0,a.qX)(e,ei),r=n.getImmediate({identifier:t}),i=(0,l.P0)("storage");return i&&function(e,t,n,r={}){!function(e,t,n,r={}){e.host=`${t}:${n}`,e._protocol="http";let{mockUserToken:i}=r;i&&(e._overrideAuthToken="string"==typeof i?i:(0,l.Sg)(i,e.app.options.projectId))}(e,t,n,r)}(r,...i),r}(0,a.Xd)(new u.wA(ei,function(e,{instanceIdentifier:t}){let n=e.getProvider("app").getImmediate(),r=e.getProvider("auth-internal"),i=e.getProvider("app-check-internal");return new et(n,r,i,t,a.Jn)},"PUBLIC").setMultipleInstances(!0)),(0,a.KN)(en,er,""),(0,a.KN)(en,er,"esm2017")}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[9774,179],function(){return t(6840),t(96885)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.