@flarehr/apollo-customer-workplace-link 1.69.62548 → 1.70.63378

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/build/bundle.esm.js +116 -116
  2. package/package.json +1 -1
@@ -1,10 +1,10 @@
1
- let e,t,r,n={data:""},i=e=>"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||n,o=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,s=/\/\*[^]*?\*\/| +/g,a=/\n+/g,c=(e,t)=>{let r="",n="",i="";for(let o in e){let s=e[o];"@"==o[0]?"i"==o[1]?r=o+" "+s+";":n+="f"==o[1]?c(s,o):o+"{"+c(s,"k"==o[1]?"":t)+"}":"object"==typeof s?n+=c(s,t?t.replace(/([^,])+/g,(e=>o.replace(/(^:.*)|([^,])+/g,(t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)))):o):null!=s&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=c.p?c.p(o,s):o+":"+s+";")}return r+(t&&i?t+"{"+i+"}":i)+n},l={},u=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+u(e[r]);return t}return e},d=(e,t,r,n,i)=>{let d=u(e),h=l[d]||(l[d]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return"go"+r})(d));if(!l[h]){let t=d!==e?e:(e=>{let t,r,n=[{}];for(;t=o.exec(e.replace(s,""));)t[4]?n.shift():t[3]?(r=t[3].replace(a," ").trim(),n.unshift(n[0][r]=n[0][r]||{})):n[0][t[1]]=t[2].replace(a," ").trim();return n[0]})(e);l[h]=c(i?{["@keyframes "+h]:t}:t,r?"":"."+h)}let p=r&&l.g?l.g:null;return r&&(l.g=l[h]),f=l[h],m=t,g=n,(_=p)?m.data=m.data.replace(_,f):-1===m.data.indexOf(f)&&(m.data=g?f+m.data:m.data+f),h;var f,m,g,_},h=(e,t,r)=>e.reduce(((e,n,i)=>{let o=t[i];if(o&&o.call){let e=o(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":c(e,""):!1===e?"":e}return e+n+(null==o?"":o)}),"");function p(e){let t=this||{},r=e.call?e(t.p):e;return d(r.unshift?r.raw?h(r,[].slice.call(arguments,1),t.p):r.reduce(((e,r)=>Object.assign(e,r&&r.call?r(t.p):r)),{}):r,i(t.target),t.g,t.o,t.k)}function f(n,i){let o=this||{};return function(){let s=arguments;function a(c,l){let u=Object.assign({},c),d=u.className||a.className;o.p=Object.assign({theme:t&&t()},u),o.o=/ *go\d+/.test(d),u.className=p.apply(o,s)+(d?" "+d:""),i&&(u.ref=l);let h=n;return n[0]&&(h=u.as||n,delete u.as),r&&h[0]&&r(u),e(h,u)}return i?i(a):a}}p.bind({g:1}),p.bind({k:1});var m,g,_,v,y,w,b,E,k={},I=[],T=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,C=Array.isArray;function S(e,t){for(var r in t)e[r]=t[r];return e}function R(e){var t=e.parentNode;t&&t.removeChild(e)}function O(e,t,r){var n,i,o,s={};for(o in t)"key"==o?n=t[o]:"ref"==o?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?m.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return A(e,s,n,i,null)}function A(e,t,r,n,i){var o={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++_:i};return null==i&&null!=g.vnode&&g.vnode(o),o}function P(){return{current:null}}function N(e){return e.children}function x(e,t){this.props=e,this.context=t}function L(e,t){if(null==t)return e.__?L(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e)return r.__d||r.__e;return"function"==typeof e.type?L(e):null}function D(e){var t,r;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e){e.__e=e.__c.base=r.__e;break}return D(e)}}function M(e){(!e.__d&&(e.__d=!0)&&v.push(e)&&!U.__r++||y!==g.debounceRendering)&&((y=g.debounceRendering)||w)(U)}function U(){var e,t,r,n,i,o,s,a,c;for(v.sort(b);e=v.shift();)e.__d&&(t=v.length,n=void 0,i=void 0,o=void 0,a=(s=(r=e).__v).__e,(c=r.__P)&&(n=[],i=[],(o=S({},s)).__v=s.__v+1,J(c,s,o,r.__n,void 0!==c.ownerSVGElement,null!=s.__h?[a]:null,n,null==a?L(s):a,s.__h,i),G(n,s,i),s.__e!=a&&D(s)),v.length>t&&v.sort(b));U.__r=0}function j(e,t,r,n,i,o,s,a,c,l,u){var d,h,p,f,m,g,_,v,y,w=0,b=n&&n.__k||I,E=b.length,T=E,S=t.length;for(r.__k=[],d=0;d<S;d++)null!=(f=r.__k[d]=null==(f=t[d])||"boolean"==typeof f||"function"==typeof f?null:"string"==typeof f||"number"==typeof f||"bigint"==typeof f?A(null,f,null,null,f):C(f)?A(N,{children:f},null,null,null):f.__b>0?A(f.type,f.props,f.key,f.ref?f.ref:null,f.__v):f)?(f.__=r,f.__b=r.__b+1,-1===(v=H(f,b,_=d+w,T))?p=k:(p=b[v]||k,b[v]=void 0,T--),J(e,f,p,i,o,s,a,c,l,u),m=f.__e,(h=f.ref)&&p.ref!=h&&(p.ref&&Y(p.ref,null,f),u.push(h,f.__c||m,f)),null!=m&&(null==g&&(g=m),(y=p===k||null===p.__v)?-1==v&&w--:v!==_&&(v===_+1?w++:v>_?T>S-_?w+=v-_:w--:w=v<_&&v==_-1?v-_:0),_=d+w,"function"!=typeof f.type||v===_&&p.__k!==f.__k?"function"==typeof f.type||v===_&&!y?void 0!==f.__d?(c=f.__d,f.__d=void 0):c=m.nextSibling:c=z(e,m,c):c=F(f,c,e),"function"==typeof r.type&&(r.__d=c))):(p=b[d])&&null==p.key&&p.__e&&(p.__e==c&&(p.__=n,c=L(p)),Q(p,p,!1),b[d]=null);for(r.__e=g,d=E;d--;)null!=b[d]&&("function"==typeof r.type&&null!=b[d].__e&&b[d].__e==r.__d&&(r.__d=b[d].__e.nextSibling),Q(b[d],b[d]))}function F(e,t,r){for(var n,i=e.__k,o=0;i&&o<i.length;o++)(n=i[o])&&(n.__=e,t="function"==typeof n.type?F(n,t,r):z(r,n.__e,t));return t}function B(e,t){return t=t||[],null==e||"boolean"==typeof e||(C(e)?e.some((function(e){B(e,t)})):t.push(e)),t}function z(e,t,r){return null==r||r.parentNode!==e?e.insertBefore(t,null):t==r&&null!=t.parentNode||e.insertBefore(t,r),t.nextSibling}function H(e,t,r,n){var i=e.key,o=e.type,s=r-1,a=r+1,c=t[r];if(null===c||c&&i==c.key&&o===c.type)return r;if(n>(null!=c?1:0))for(;s>=0||a<t.length;){if(s>=0){if((c=t[s])&&i==c.key&&o===c.type)return s;s--}if(a<t.length){if((c=t[a])&&i==c.key&&o===c.type)return a;a++}}return-1}function V(e,t,r){"-"===t[0]?e.setProperty(t,null==r?"":r):e[t]=null==r?"":"number"!=typeof r||T.test(t)?r:r+"px"}function q(e,t,r,n,i){var o;e:if("style"===t)if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||V(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||V(e.style,t,r[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=r,r?n?r.u=n.u:(r.u=Date.now(),e.addEventListener(t,o?K:W,o)):e.removeEventListener(t,o?K:W,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&"role"!==t&&t in e)try{e[t]=null==r?"":r;break e}catch(s){}"function"==typeof r||(null==r||!1===r&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,r))}}function W(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(g.event?g.event(e):e)}function K(e){return this.l[e.type+!0](g.event?g.event(e):e)}function J(e,t,r,n,i,o,s,a,c,l){var u,d,h,p,f,_,v,y,w,b,E,I,T,O,A,P=t.type;if(void 0!==t.constructor)return null;null!=r.__h&&(c=r.__h,a=t.__e=r.__e,t.__h=null,o=[a]),(u=g.__b)&&u(t);e:if("function"==typeof P)try{if(y=t.props,w=(u=P.contextType)&&n[u.__c],b=u?w?w.props.value:u.__:n,r.__c?v=(d=t.__c=r.__c).__=d.__E:("prototype"in P&&P.prototype.render?t.__c=d=new P(y,b):(t.__c=d=new x(y,b),d.constructor=P,d.render=X),w&&w.sub(d),d.props=y,d.state||(d.state={}),d.context=b,d.__n=n,h=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=P.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=S({},d.__s)),S(d.__s,P.getDerivedStateFromProps(y,d.__s))),p=d.props,f=d.state,d.__v=t,h)null==P.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==P.getDerivedStateFromProps&&y!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(y,b),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(y,d.__s,b)||t.__v===r.__v)){for(t.__v!==r.__v&&(d.props=y,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach((function(e){e&&(e.__=t)})),E=0;E<d._sb.length;E++)d.__h.push(d._sb[E]);d._sb=[],d.__h.length&&s.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(y,d.__s,b),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,f,_)}))}if(d.context=b,d.props=y,d.__P=e,d.__e=!1,I=g.__r,T=0,"prototype"in P&&P.prototype.render){for(d.state=d.__s,d.__d=!1,I&&I(t),u=d.render(d.props,d.state,d.context),O=0;O<d._sb.length;O++)d.__h.push(d._sb[O]);d._sb=[]}else do{d.__d=!1,I&&I(t),u=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++T<25);d.state=d.__s,null!=d.getChildContext&&(n=S(S({},n),d.getChildContext())),h||null==d.getSnapshotBeforeUpdate||(_=d.getSnapshotBeforeUpdate(p,f)),j(e,C(A=null!=u&&u.type===N&&null==u.key?u.props.children:u)?A:[A],t,r,n,i,o,s,a,c,l),d.base=t.__e,t.__h=null,d.__h.length&&s.push(d),v&&(d.__E=d.__=null)}catch(D){t.__v=null,(c||null!=o)&&(t.__e=a,t.__h=!!c,o[o.indexOf(a)]=null),g.__e(D,t,r)}else null==o&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=function(e,t,r,n,i,o,s,a,c){var l,u,d,h=r.props,p=t.props,f=t.type,g=0;if("svg"===f&&(i=!0),null!=o)for(;g<o.length;g++)if((l=o[g])&&"setAttribute"in l==!!f&&(f?l.localName===f:3===l.nodeType)){e=l,o[g]=null;break}if(null==e){if(null===f)return document.createTextNode(p);e=i?document.createElementNS("http://www.w3.org/2000/svg",f):document.createElement(f,p.is&&p),o=null,a=!1}if(null===f)h===p||a&&e.data===p||(e.data=p);else{if(o=o&&m.call(e.childNodes),u=(h=r.props||k).dangerouslySetInnerHTML,d=p.dangerouslySetInnerHTML,!a){if(null!=o)for(h={},g=0;g<e.attributes.length;g++)h[e.attributes[g].name]=e.attributes[g].value;(d||u)&&(d&&(u&&d.__html==u.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(function(e,t,r,n,i){var o;for(o in r)"children"===o||"key"===o||o in t||q(e,o,null,r[o],n);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||r[o]===t[o]||q(e,o,t[o],r[o],n)}(e,p,h,i,a),d)t.__k=[];else if(j(e,C(g=t.props.children)?g:[g],t,r,n,i&&"foreignObject"!==f,o,s,o?o[0]:r.__k&&L(r,0),a,c),null!=o)for(g=o.length;g--;)null!=o[g]&&R(o[g]);a||("value"in p&&void 0!==(g=p.value)&&(g!==e.value||"progress"===f&&!g||"option"===f&&g!==h.value)&&q(e,"value",g,h.value,!1),"checked"in p&&void 0!==(g=p.checked)&&g!==e.checked&&q(e,"checked",g,h.checked,!1))}return e}(r.__e,t,r,n,i,o,s,c,l);(u=g.diffed)&&u(t)}function G(e,t,r){for(var n=0;n<r.length;n++)Y(r[n],r[++n],r[++n]);g.__c&&g.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(r){g.__e(r,t.__v)}}))}function Y(e,t,r){try{"function"==typeof e?e(t):e.current=t}catch(n){g.__e(n,r)}}function Q(e,t,r){var n,i;if(g.unmount&&g.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||Y(n,null,t)),null!=(n=e.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(o){g.__e(o,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&Q(n[i],t,r||"function"!=typeof e.type);r||null==e.__e||R(e.__e),e.__=e.__e=e.__d=void 0}function X(e,t,r){return this.constructor(e,r)}function Z(e,t,r){var n,i,o,s;g.__&&g.__(e,t),i=(n="function"==typeof r)?null:r&&r.__k||t.__k,o=[],s=[],J(t,e=(!n&&r||t).__k=O(N,null,[e]),i||k,k,void 0!==t.ownerSVGElement,!n&&r?[r]:i?null:t.firstChild?m.call(t.childNodes):null,o,!n&&r?r:i?i.__e:t.firstChild,n,s),G(o,e,s)}function ee(e,t){Z(e,t,ee)}function te(e,t,r){var n,i,o,s,a=S({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)"key"==o?n=t[o]:"ref"==o?i=t[o]:a[o]=void 0===t[o]&&void 0!==s?s[o]:t[o];return arguments.length>2&&(a.children=arguments.length>3?m.call(arguments,2):r),A(e.type,a,n||e.key,i||e.ref,null)}function re(e,t){var r={__c:t="__cC"+E++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,n;return this.getChildContext||(r=[],(n={})[t]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&r.some((function(e){e.__e=!0,M(e)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return r.Provider.__=r.Consumer.contextType=r}m=I.slice,g={__e:function(e,t,r,n){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,n||{}),s=i.__d),s)return i.__E=i}catch(a){e=a}throw e}},_=0,x.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=S({},this.state),"function"==typeof e&&(e=e(S({},r),this.props)),e&&S(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),M(this))},x.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),M(this))},x.prototype.render=N,v=[],w="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,b=function(e,t){return e.__v.__b-t.__v.__b},U.__r=0,E=0;var ne,ie,oe,se,ae=0,ce=[],le=[],ue=g.__b,de=g.__r,he=g.diffed,pe=g.__c,fe=g.unmount;function me(e,t){g.__h&&g.__h(ie,e,ae||t),ae=0;var r=ie.__H||(ie.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:le}),r.__[e]}function ge(e){return ae=1,_e(xe,e)}function _e(e,t,r){var n=me(ne++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):xe(void 0,t),function(e){var t=n.__N?n.__N[0]:n.__[0],r=n.t(t,e);t!==r&&(n.__N=[r,n.__[1]],n.__c.setState({}))}],n.__c=ie,!ie.u)){var i=function(e,t,r){if(!n.__c.__H)return!0;var i=n.__c.__H.__.filter((function(e){return e.__c}));if(i.every((function(e){return!e.__N})))return!o||o.call(this,e,t,r);var s=!1;return i.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),!(!s&&n.__c.props===e)&&(!o||o.call(this,e,t,r))};ie.u=!0;var o=ie.shouldComponentUpdate,s=ie.componentWillUpdate;ie.componentWillUpdate=function(e,t,r){if(this.__e){var n=o;o=void 0,i(e,t,r),o=n}s&&s.call(this,e,t,r)},ie.shouldComponentUpdate=i}return n.__N||n.__}function ve(e,t){var r=me(ne++,3);!g.__s&&Ne(r.__H,t)&&(r.__=e,r.i=t,ie.__H.__h.push(r))}function ye(e,t){var r=me(ne++,4);!g.__s&&Ne(r.__H,t)&&(r.__=e,r.i=t,ie.__h.push(r))}function we(e){return ae=5,Ee((function(){return{current:e}}),[])}function be(e,t,r){ae=6,ye((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==r?r:r.concat(e))}function Ee(e,t){var r=me(ne++,7);return Ne(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function ke(e,t){return ae=8,Ee((function(){return e}),t)}function Ie(e){var t=ie.context[e.__c],r=me(ne++,9);return r.c=e,t?(null==r.__&&(r.__=!0,t.sub(ie)),t.props.value):e.__}function Te(e,t){g.useDebugValue&&g.useDebugValue(t?t(e):e)}function Ce(){var e=me(ne++,11);if(!e.__){for(var t=ie.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function Se(){for(var e;e=ce.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ae),e.__H.__h.forEach(Pe),e.__H.__h=[]}catch(rh){e.__H.__h=[],g.__e(rh,e.__v)}}g.__b=function(e){ie=null,ue&&ue(e)},g.__r=function(e){de&&de(e),ne=0;var t=(ie=e.__c).__H;t&&(oe===ie?(t.__h=[],ie.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=le,e.__N=e.i=void 0}))):(t.__h.forEach(Ae),t.__h.forEach(Pe),t.__h=[],ne=0)),oe=ie},g.diffed=function(e){he&&he(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==ce.push(t)&&se===g.requestAnimationFrame||((se=g.requestAnimationFrame)||Oe)(Se)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==le&&(e.__=e.__V),e.i=void 0,e.__V=le}))),oe=ie=null},g.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Ae),e.__h=e.__h.filter((function(e){return!e.__||Pe(e)}))}catch(r){t.some((function(e){e.__h&&(e.__h=[])})),t=[],g.__e(r,e.__v)}})),pe&&pe(e,t)},g.unmount=function(e){fe&&fe(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{Ae(e)}catch(r){t=r}})),r.__H=void 0,t&&g.__e(t,r.__v))};var Re="function"==typeof requestAnimationFrame;function Oe(e){var t,r=function(){clearTimeout(n),Re&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);Re&&(t=requestAnimationFrame(r))}function Ae(e){var t=ie,r=e.__c;"function"==typeof r&&(e.__c=void 0,r()),ie=t}function Pe(e){var t=ie;e.__c=e.__(),ie=t}function Ne(e,t){return!e||e.length!==t.length||t.some((function(t,r){return t!==e[r]}))}function xe(e,t){return"function"==typeof t?t(e):t}class Le extends Error{}function De(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return function(e){return decodeURIComponent(atob(e).replace(/(.)/g,((e,t)=>{let r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r})))}(t)}catch(r){return atob(t)}}function Me(e,t){if("string"!=typeof e)throw new Le("Invalid token specified: must be a string");t||(t={});const r=!0===t.header?0:1,n=e.split(".")[r];if("string"!=typeof n)throw new Le(`Invalid token specified: missing part #${r+1}`);let i;try{i=De(n)}catch(Md){throw new Le(`Invalid token specified: invalid base64 for part #${r+1} (${Md.message})`)}try{return JSON.parse(i)}catch(Md){throw new Le(`Invalid token specified: invalid json for part #${r+1} (${Md.message})`)}}function Ue(e,t){return function(){return e.apply(t,arguments)}}Le.prototype.name="InvalidTokenError";const{toString:je}=Object.prototype,{getPrototypeOf:Fe}=Object,Be=(ze=Object.create(null),e=>{const t=je.call(e);return ze[t]||(ze[t]=t.slice(8,-1).toLowerCase())});var ze;const He=e=>(e=e.toLowerCase(),t=>Be(t)===e),Ve=e=>t=>typeof t===e,{isArray:$e}=Array,qe=Ve("undefined");const We=He("ArrayBuffer");const Ke=Ve("string"),Je=Ve("function"),Ge=Ve("number"),Ye=e=>null!==e&&"object"==typeof e,Qe=e=>{if("object"!==Be(e))return!1;const t=Fe(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Xe=He("Date"),Ze=He("File"),et=He("Blob"),tt=He("FileList"),rt=He("URLSearchParams");function nt(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,i;if("object"!=typeof e&&(e=[e]),$e(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let s;for(n=0;n<o;n++)s=i[n],t.call(null,e[s],s,e)}}function it(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,i=r.length;for(;i-- >0;)if(n=r[i],t===n.toLowerCase())return n;return null}const ot="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,st=e=>!qe(e)&&e!==ot;const at=(ct="undefined"!=typeof Uint8Array&&Fe(Uint8Array),e=>ct&&e instanceof ct);var ct;const lt=He("HTMLFormElement"),ut=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),dt=He("RegExp"),ht=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};nt(r,((r,i)=>{let o;!1!==(o=t(r,i,e))&&(n[i]=o||r)})),Object.defineProperties(e,n)},pt="abcdefghijklmnopqrstuvwxyz",ft="0123456789",mt={DIGIT:ft,ALPHA:pt,ALPHA_DIGIT:pt+pt.toUpperCase()+ft};const gt=He("AsyncFunction"),_t={isArray:$e,isArrayBuffer:We,isBuffer:function(e){return null!==e&&!qe(e)&&null!==e.constructor&&!qe(e.constructor)&&Je(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Je(e.append)&&("formdata"===(t=Be(e))||"object"===t&&Je(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&We(e.buffer),t},isString:Ke,isNumber:Ge,isBoolean:e=>!0===e||!1===e,isObject:Ye,isPlainObject:Qe,isUndefined:qe,isDate:Xe,isFile:Ze,isBlob:et,isRegExp:dt,isFunction:Je,isStream:e=>Ye(e)&&Je(e.pipe),isURLSearchParams:rt,isTypedArray:at,isFileList:tt,forEach:nt,merge:function e(){const{caseless:t}=st(this)&&this||{},r={},n=(n,i)=>{const o=t&&it(r,i)||i;Qe(r[o])&&Qe(n)?r[o]=e(r[o],n):Qe(n)?r[o]=e({},n):$e(n)?r[o]=n.slice():r[o]=n};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&nt(arguments[i],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(nt(t,((t,n)=>{r&&Je(t)?e[n]=Ue(t,r):e[n]=t}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let i,o,s;const a={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],n&&!n(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==r&&Fe(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:Be,kindOfTest:He,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if($e(e))return e;let t=e.length;if(!Ge(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:lt,hasOwnProperty:ut,hasOwnProp:ut,reduceDescriptors:ht,freezeMethods:e=>{ht(e,((t,r)=>{if(Je(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];Je(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return $e(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:it,global:ot,isContextDefined:st,ALPHABET:mt,generateString:(e=16,t=mt.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&Je(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(Ye(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const i=$e(e)?[]:{};return nt(e,((e,t)=>{const o=r(e,n+1);!qe(o)&&(i[t]=o)})),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:gt,isThenable:e=>e&&(Ye(e)||Je(e))&&Je(e.then)&&Je(e.catch)};function vt(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}_t.inherits(vt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:_t.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const yt=vt.prototype,wt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{wt[e]={value:e}})),Object.defineProperties(vt,wt),Object.defineProperty(yt,"isAxiosError",{value:!0}),vt.from=(e,t,r,n,i,o)=>{const s=Object.create(yt);return _t.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),vt.call(s,e.message,t,r,n,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};function bt(e){return _t.isPlainObject(e)||_t.isArray(e)}function Et(e){return _t.endsWith(e,"[]")?e.slice(0,-2):e}function kt(e,t,r){return e?e.concat(t).map((function(e,t){return e=Et(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const It=_t.toFlatObject(_t,{},null,(function(e){return/^is[A-Z]/.test(e)}));function Tt(e,t,r){if(!_t.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=_t.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!_t.isUndefined(t[e])}))).metaTokens,i=r.visitor||l,o=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&_t.isSpecCompliantForm(t);if(!_t.isFunction(i))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(_t.isDate(e))return e.toISOString();if(!a&&_t.isBlob(e))throw new vt("Blob is not supported. Use a Buffer instead.");return _t.isArrayBuffer(e)||_t.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,r,i){let a=e;if(e&&!i&&"object"==typeof e)if(_t.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(_t.isArray(e)&&function(e){return _t.isArray(e)&&!e.some(bt)}(e)||(_t.isFileList(e)||_t.endsWith(r,"[]"))&&(a=_t.toArray(e)))return r=Et(r),a.forEach((function(e,n){!_t.isUndefined(e)&&null!==e&&t.append(!0===s?kt([r],n,o):null===s?r:r+"[]",c(e))})),!1;return!!bt(e)||(t.append(kt(i,r,o),c(e)),!1)}const u=[],d=Object.assign(It,{defaultVisitor:l,convertValue:c,isVisitable:bt});if(!_t.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!_t.isUndefined(r)){if(-1!==u.indexOf(r))throw Error("Circular reference detected in "+n.join("."));u.push(r),_t.forEach(r,(function(r,o){!0===(!(_t.isUndefined(r)||null===r)&&i.call(t,r,_t.isString(o)?o.trim():o,n,d))&&e(r,n?n.concat(o):[o])})),u.pop()}}(e),t}function Ct(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function St(e,t){this._pairs=[],e&&Tt(e,this,t)}const Rt=St.prototype;function Ot(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function At(e,t,r){if(!t)return e;const n=r&&r.encode||Ot,i=r&&r.serialize;let o;if(o=i?i(t,r):_t.isURLSearchParams(t)?t.toString():new St(t,r).toString(n),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}Rt.append=function(e,t){this._pairs.push([e,t])},Rt.toString=function(e){const t=e?function(t){return e.call(this,t,Ct)}:Ct;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const Pt=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){_t.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Nt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},xt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:St,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&("undefined"!=typeof window&&"undefined"!=typeof document)})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};function Lt(e){function t(e,r,n,i){let o=e[i++];const s=Number.isFinite(+o),a=i>=e.length;if(o=!o&&_t.isArray(n)?n.length:o,a)return _t.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!s;n[o]&&_t.isObject(n[o])||(n[o]=[]);return t(e,r,n[o],i)&&_t.isArray(n[o])&&(n[o]=function(e){const t={},r=Object.keys(e);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],t[o]=e[o];return t}(n[o])),!s}if(_t.isFormData(e)&&_t.isFunction(e.entries)){const r={};return _t.forEachEntry(e,((e,n)=>{t(function(e){return _t.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const Dt={transitional:Nt,adapter:["xhr","http"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,i=_t.isObject(e);i&&_t.isHTMLForm(e)&&(e=new FormData(e));if(_t.isFormData(e))return n&&n?JSON.stringify(Lt(e)):e;if(_t.isArrayBuffer(e)||_t.isBuffer(e)||_t.isStream(e)||_t.isFile(e)||_t.isBlob(e))return e;if(_t.isArrayBufferView(e))return e.buffer;if(_t.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Tt(e,new xt.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return xt.isNode&&_t.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=_t.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Tt(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||n?(t.setContentType("application/json",!1),function(e,t,r){if(_t.isString(e))try{return(t||JSON.parse)(e),_t.trim(e)}catch(Md){if("SyntaxError"!==Md.name)throw Md}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Dt.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&_t.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(Md){if(r){if("SyntaxError"===Md.name)throw vt.from(Md,vt.ERR_BAD_RESPONSE,this,null,this.response);throw Md}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xt.classes.FormData,Blob:xt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_t.forEach(["delete","get","head","post","put","patch"],(e=>{Dt.headers[e]={}}));const Mt=Dt,Ut=_t.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),jt=Symbol("internals");function Ft(e){return e&&String(e).trim().toLowerCase()}function Bt(e){return!1===e||null==e?e:_t.isArray(e)?e.map(Bt):String(e)}function zt(e,t,r,n,i){return _t.isFunction(n)?n.call(this,t,r):(i&&(t=r),_t.isString(t)?_t.isString(n)?-1!==t.indexOf(n):_t.isRegExp(n)?n.test(t):void 0:void 0)}class Ht{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function i(e,t,r){const i=Ft(t);if(!i)throw new Error("header name must be a non-empty string");const o=_t.findKey(n,i);(!o||void 0===n[o]||!0===r||void 0===r&&!1!==n[o])&&(n[o||t]=Bt(e))}const o=(e,t)=>_t.forEach(e,((e,r)=>i(e,r,t)));return _t.isPlainObject(e)||e instanceof this.constructor?o(e,t):_t.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?o((e=>{const t={};let r,n,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim(),!r||t[r]&&Ut[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t):null!=e&&i(t,e,r),this}get(e,t){if(e=Ft(e)){const r=_t.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(_t.isFunction(t))return t.call(this,e,r);if(_t.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ft(e)){const r=_t.findKey(this,e);return!(!r||void 0===this[r]||t&&!zt(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function i(e){if(e=Ft(e)){const i=_t.findKey(r,e);!i||t&&!zt(0,r[i],i,t)||(delete r[i],n=!0)}}return _t.isArray(e)?e.forEach(i):i(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const i=t[r];e&&!zt(0,this[i],i,e,!0)||(delete this[i],n=!0)}return n}normalize(e){const t=this,r={};return _t.forEach(this,((n,i)=>{const o=_t.findKey(r,i);if(o)return t[o]=Bt(n),void delete t[i];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(i):String(i).trim();s!==i&&delete t[i],t[s]=Bt(n),r[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return _t.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&_t.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[jt]=this[jt]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=Ft(e);t[n]||(!function(e,t){const r=_t.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})}))}(r,e),t[n]=!0)}return _t.isArray(e)?e.forEach(n):n(e),this}}Ht.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),_t.reduceDescriptors(Ht.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),_t.freezeMethods(Ht);const Vt=Ht;function $t(e,t){const r=this||Mt,n=t||r,i=Vt.from(n.headers);let o=n.data;return _t.forEach(e,(function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function qt(e){return!(!e||!e.__CANCEL__)}function Wt(e,t,r){vt.call(this,null==e?"canceled":e,vt.ERR_CANCELED,t,r),this.name="CanceledError"}_t.inherits(Wt,vt,{__CANCEL__:!0});const Kt=xt.isStandardBrowserEnv?{write:function(e,t,r,n,i,o){const s=[];s.push(e+"="+encodeURIComponent(t)),_t.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),_t.isString(n)&&s.push("path="+n),_t.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function Jt(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Gt=xt.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function n(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=n(window.location.href),function(e){const t=_t.isString(e)?n(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return!0};function Yt(e,t){let r=0;const n=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i,o=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=n[s];i||(i=c),r[o]=a,n[o]=c;let u=s,d=0;for(;u!==o;)d+=r[u++],u%=e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),c-i<t)return;const h=l&&c-l;return h?Math.round(1e3*d/h):void 0}}(50,250);return i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-r,c=n(a);r=o;const l={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&o<=s?(s-o)/c:void 0,event:i};l[t?"download":"upload"]=!0,e(l)}}const Qt={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){let n=e.data;const i=Vt.from(e.headers).normalize(),o=e.responseType;let s,a;function c(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}_t.isFormData(n)&&(xt.isStandardBrowserEnv||xt.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.getContentType(/^\s*multipart\/form-data/)?_t.isString(a=i.getContentType())&&i.setContentType(a.replace(/^\s*(multipart\/form-data);+/,"$1")):i.setContentType("multipart/form-data"));let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(t+":"+r))}const u=Jt(e.baseURL,e.url);function d(){if(!l)return;const n=Vt.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new vt("Request failed with status code "+r.status,[vt.ERR_BAD_REQUEST,vt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}((function(e){t(e),c()}),(function(e){r(e),c()}),{data:o&&"text"!==o&&"json"!==o?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:n,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),At(u,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(d)},l.onabort=function(){l&&(r(new vt("Request aborted",vt.ECONNABORTED,e,l)),l=null)},l.onerror=function(){r(new vt("Network Error",vt.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||Nt;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new vt(t,n.clarifyTimeoutError?vt.ETIMEDOUT:vt.ECONNABORTED,e,l)),l=null},xt.isStandardBrowserEnv){const t=Gt(u)&&e.xsrfCookieName&&Kt.read(e.xsrfCookieName);t&&i.set(e.xsrfHeaderName,t)}void 0===n&&i.setContentType(null),"setRequestHeader"in l&&_t.forEach(i.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),_t.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),o&&"json"!==o&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",Yt(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",Yt(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=t=>{l&&(r(!t||t.type?new Wt(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const h=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(u);h&&-1===xt.protocols.indexOf(h)?r(new vt("Unsupported protocol "+h+":",vt.ERR_BAD_REQUEST,e)):l.send(n||null)}))}};_t.forEach(Qt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(Md){}Object.defineProperty(e,"adapterName",{value:t})}}));const Xt=e=>`- ${e}`,Zt=e=>_t.isFunction(e)||null===e||!1===e,er=e=>{e=_t.isArray(e)?e:[e];const{length:t}=e;let r,n;const i={};for(let o=0;o<t;o++){let t;if(r=e[o],n=r,!Zt(r)&&(n=Qt[(t=String(r)).toLowerCase()],void 0===n))throw new vt(`Unknown adapter '${t}'`);if(n)break;i[t||"#"+o]=n}if(!n){const e=Object.entries(i).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new vt("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Xt).join("\n"):" "+Xt(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function tr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Wt(null,e)}function rr(e){tr(e),e.headers=Vt.from(e.headers),e.data=$t.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return er(e.adapter||Mt.adapter)(e).then((function(t){return tr(e),t.data=$t.call(e,e.transformResponse,t),t.headers=Vt.from(t.headers),t}),(function(t){return qt(t)||(tr(e),t&&t.response&&(t.response.data=$t.call(e,e.transformResponse,t.response),t.response.headers=Vt.from(t.response.headers))),Promise.reject(t)}))}const nr=e=>e instanceof Vt?e.toJSON():e;function ir(e,t){t=t||{};const r={};function n(e,t,r){return _t.isPlainObject(e)&&_t.isPlainObject(t)?_t.merge.call({caseless:r},e,t):_t.isPlainObject(t)?_t.merge({},t):_t.isArray(t)?t.slice():t}function i(e,t,r){return _t.isUndefined(t)?_t.isUndefined(e)?void 0:n(void 0,e,r):n(e,t,r)}function o(e,t){if(!_t.isUndefined(t))return n(void 0,t)}function s(e,t){return _t.isUndefined(t)?_t.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,i,o){return o in t?n(r,i):o in e?n(void 0,r):void 0}const c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>i(nr(e),nr(t),!0)};return _t.forEach(Object.keys(Object.assign({},e,t)),(function(n){const o=c[n]||i,s=o(e[n],t[n],n);_t.isUndefined(s)&&o!==a||(r[n]=s)})),r}const or="1.6.0",sr={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{sr[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const ar={};sr.transitional=function(e,t,r){function n(e,t){return"[Axios v1.6.0] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,o)=>{if(!1===e)throw new vt(n(i," has been removed"+(t?" in "+t:"")),vt.ERR_DEPRECATED);return t&&!ar[i]&&(ar[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,o)}};const cr={assertOptions:function(e,t,r){if("object"!=typeof e)throw new vt("options must be an object",vt.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const o=n[i],s=t[o];if(s){const t=e[o],r=void 0===t||s(t,o,e);if(!0!==r)throw new vt("option "+o+" must be "+r,vt.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new vt("Unknown option "+o,vt.ERR_BAD_OPTION)}},validators:sr},lr=cr.validators;class ur{constructor(e){this.defaults=e,this.interceptors={request:new Pt,response:new Pt}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=ir(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:i}=t;void 0!==r&&cr.assertOptions(r,{silentJSONParsing:lr.transitional(lr.boolean),forcedJSONParsing:lr.transitional(lr.boolean),clarifyTimeoutError:lr.transitional(lr.boolean)},!1),null!=n&&(_t.isFunction(n)?t.paramsSerializer={serialize:n}:cr.assertOptions(n,{encode:lr.function,serialize:lr.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&_t.merge(i.common,i[t.method]);i&&_t.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=Vt.concat(o,i);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let u,d=0;if(!a){const e=[rr.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,c),u=e.length,l=Promise.resolve(t);d<u;)l=l.then(e[d++],e[d++]);return l}u=s.length;let h=t;for(d=0;d<u;){const e=s[d++],t=s[d++];try{h=e(h)}catch(p){t.call(this,p);break}}try{l=rr.call(this,h)}catch(p){return Promise.reject(p)}for(d=0,u=c.length;d<u;)l=l.then(c[d++],c[d++]);return l}getUri(e){return At(Jt((e=ir(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}_t.forEach(["delete","get","head","options"],(function(e){ur.prototype[e]=function(t,r){return this.request(ir(r||{},{method:e,url:t,data:(r||{}).data}))}})),_t.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,i){return this.request(ir(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}ur.prototype[e]=t(),ur.prototype[e+"Form"]=t(!0)}));const dr=ur;class hr{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,i){r.reason||(r.reason=new Wt(e,n,i),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new hr((function(t){e=t})),cancel:e}}}const pr=hr;const fr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(fr).forEach((([e,t])=>{fr[t]=e}));const mr=fr;const gr=function e(t){const r=new dr(t),n=Ue(dr.prototype.request,r);return _t.extend(n,dr.prototype,r,{allOwnKeys:!0}),_t.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(ir(t,r))},n}(Mt);gr.Axios=dr,gr.CanceledError=Wt,gr.CancelToken=pr,gr.isCancel=qt,gr.VERSION=or,gr.toFormData=Tt,gr.AxiosError=vt,gr.Cancel=gr.CanceledError,gr.all=function(e){return Promise.all(e)},gr.spread=function(e){return function(t){return e.apply(null,t)}},gr.isAxiosError=function(e){return _t.isObject(e)&&!0===e.isAxiosError},gr.mergeConfig=ir,gr.AxiosHeaders=Vt,gr.formToJSON=e=>Lt(_t.isHTMLForm(e)?new FormData(e):e),gr.getAdapter=er,gr.HttpStatusCode=mr,gr.default=gr;const _r=gr,vr=(e,t,r)=>{ve((()=>{const t=_r.CancelToken.source();return e(t),()=>{r&&r(),t.cancel()}}),t)},yr=({request:e})=>console.error("[API] Request error:",e),wr=({response:e})=>{if(e){const{status:t,request:r,data:n}=e;console.error("[API] Response error:",t,r.responseURL,JSON.stringify(n))}};let br;const Er=(e,t)=>({headers:{Authorization:`Bearer ${e}`},cancelToken:t.token}),kr=async(e,t)=>{if(!br)throw new Error("Api has not been initialized");return br.post("customer-profile/backend/v1.0/workplace-link",{},Er(e,t)).then((e=>204==e.status?{isEstablished:!0}:{isEstablished:!1,linkRequest:null==e?void 0:e.data}))},Ir=(e,t,r,n)=>{if(!br)throw new Error("Api has not been initialized");const i={linkRequestId:t,profileId:r};return br.post("customer-profile/customer-backend/v1.0/workplace-link",i,Er(e,n))};for(var Tr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Cr={},Sr={},Rr={byteLength:function(e){var t=Lr(e),r=t[0],n=t[1];return 3*(r+n)/4-n},toByteArray:function(e){var t,r,n=Lr(e),i=n[0],o=n[1],s=new Pr(function(e,t,r){return 3*(t+r)/4-r}(0,i,o)),a=0,c=o>0?i-4:i;for(r=0;r<c;r+=4)t=Ar[e.charCodeAt(r)]<<18|Ar[e.charCodeAt(r+1)]<<12|Ar[e.charCodeAt(r+2)]<<6|Ar[e.charCodeAt(r+3)],s[a++]=t>>16&255,s[a++]=t>>8&255,s[a++]=255&t;2===o&&(t=Ar[e.charCodeAt(r)]<<2|Ar[e.charCodeAt(r+1)]>>4,s[a++]=255&t);1===o&&(t=Ar[e.charCodeAt(r)]<<10|Ar[e.charCodeAt(r+1)]<<4|Ar[e.charCodeAt(r+2)]>>2,s[a++]=t>>8&255,s[a++]=255&t);return s},fromByteArray:function(e){for(var t,r=e.length,n=r%3,i=[],o=16383,s=0,a=r-n;s<a;s+=o)i.push(Dr(e,s,s+o>a?a:s+o));1===n?(t=e[r-1],i.push(Or[t>>2]+Or[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],i.push(Or[t>>10]+Or[t>>4&63]+Or[t<<2&63]+"="));return i.join("")}},Or=[],Ar=[],Pr="undefined"!=typeof Uint8Array?Uint8Array:Array,Nr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xr=0;xr<64;++xr)Or[xr]=Nr[xr],Ar[Nr.charCodeAt(xr)]=xr;function Lr(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function Dr(e,t,r){for(var n,i,o=[],s=t;s<r;s+=3)n=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(Or[(i=n)>>18&63]+Or[i>>12&63]+Or[i>>6&63]+Or[63&i]);return o.join("")}Ar["-".charCodeAt(0)]=62,Ar["_".charCodeAt(0)]=63;var Mr={};Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.AppAuthError=void 0;var Ur=function(e,t){this.message=e,this.extras=t};Mr.AppAuthError=Ur,Object.defineProperty(Sr,"__esModule",{value:!0});var jr=Sr.DefaultCrypto=Sr.textEncodeLite=Sr.urlSafe=Sr.bufferToString=void 0,Fr=Rr,Br=Mr,zr="undefined"!=typeof window&&!!window.crypto,Hr=zr&&!!window.crypto.subtle,Vr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function $r(e){for(var t=[],r=0;r<e.byteLength;r+=1){var n=e[r]%62;t.push(Vr[n])}return t.join("")}function qr(e){return Fr.fromByteArray(new Uint8Array(e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Wr(e){for(var t=new ArrayBuffer(e.length),r=new Uint8Array(t),n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}Sr.bufferToString=$r,Sr.urlSafe=qr,Sr.textEncodeLite=Wr;var Kr=function(){function e(){}return e.prototype.generateRandom=function(e){var t=new Uint8Array(e);if(zr)window.crypto.getRandomValues(t);else for(var r=0;r<e;r+=1)t[r]=62*Math.random()|0;return $r(t)},e.prototype.deriveChallenge=function(e){return e.length<43||e.length>128?Promise.reject(new Br.AppAuthError("Invalid code length.")):Hr?new Promise((function(t,r){crypto.subtle.digest("SHA-256",Wr(e)).then((function(e){return t(qr(new Uint8Array(e)))}),(function(e){return r(e)}))})):Promise.reject(new Br.AppAuthError("window.crypto.subtle is unavailable."))},e}();jr=Sr.DefaultCrypto=Kr;var Jr={},Gr={};Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.IS_PROFILE=Gr.IS_LOG=void 0,Gr.IS_LOG=!0,Gr.IS_PROFILE=!1;var Yr=Tr&&Tr.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.profile=Jr.log=void 0;var Qr=Gr;function Xr(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];Qr.IS_LOG&&((t?t.length:0)>0?console.log.apply(console,Yr([e],t)):console.log(e))}Jr.log=Xr;var Zr="undefined"!=typeof window&&!!window.performance&&!!console.profile;Jr.profile=function(e,t,r){return Qr.IS_PROFILE?function(e,t,r){var n=r.value,i=n.name;i||(i="anonymous function");r.value=Zr?function(e){console.profile(i);var t=window.performance.now(),r=n.call.apply(n,Yr([this||window],e)),o=window.performance.now()-t;return console.log(i+" took "+o+" ms"),console.profileEnd(),r}:function(e){Xr("Profile start "+i);var t=Date.now(),r=n.call.apply(n,Yr([this||window],e)),o=Date.now()-t;return Xr("Profile end "+i+" took "+o+" ms."),r};return r}(0,0,r):r},Object.defineProperty(Cr,"__esModule",{value:!0});var en=Cr.AuthorizationRequest=void 0,tn=Sr,rn=Jr,nn=function(){function e(t,r,n){void 0===r&&(r=new tn.DefaultCrypto),void 0===n&&(n=!0),this.crypto=r,this.usePkce=n,this.clientId=t.client_id,this.redirectUri=t.redirect_uri,this.scope=t.scope,this.responseType=t.response_type||e.RESPONSE_TYPE_CODE,this.state=t.state||function(e){return e.generateRandom(10)}(r),this.extras=t.extras,this.internal=t.internal}return e.prototype.setupCodeVerifier=function(){var e=this;if(this.usePkce){var t=this.crypto.generateRandom(128);return this.crypto.deriveChallenge(t).catch((function(e){rn.log("Unable to generate PKCE challenge. Not using PKCE",e)})).then((function(r){r&&(e.internal=e.internal||{},e.internal.code_verifier=t,e.extras=e.extras||{},e.extras.code_challenge=r,e.extras.code_challenge_method="S256")}))}return Promise.resolve()},e.prototype.toJson=function(){var e=this;return this.setupCodeVerifier().then((function(){return{response_type:e.responseType,client_id:e.clientId,redirect_uri:e.redirectUri,scope:e.scope,state:e.state,extras:e.extras,internal:e.internal}}))},e.RESPONSE_TYPE_TOKEN="token",e.RESPONSE_TYPE_CODE="code",e}();en=Cr.AuthorizationRequest=nn;var on={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthorizationRequestHandler=e.BUILT_IN_PARAMETERS=e.AuthorizationNotifier=void 0;var t=Jr,r=function(){function e(){this.listener=null}return e.prototype.setAuthorizationListener=function(e){this.listener=e},e.prototype.onAuthorizationComplete=function(e,t,r){this.listener&&this.listener(e,t,r)},e}();e.AuthorizationNotifier=r,e.BUILT_IN_PARAMETERS=["redirect_uri","client_id","response_type","state","scope"];var n=function(){function r(e,t){this.utils=e,this.crypto=t,this.notifier=null}return r.prototype.buildRequestUrl=function(t,r){var n={redirect_uri:r.redirectUri,client_id:r.clientId,response_type:r.responseType,state:r.state,scope:r.scope};if(r.extras)for(var i in r.extras)r.extras.hasOwnProperty(i)&&e.BUILT_IN_PARAMETERS.indexOf(i)<0&&(n[i]=r.extras[i]);var o=this.utils.stringify(n);return t.authorizationEndpoint+"?"+o},r.prototype.completeAuthorizationRequestIfPossible=function(){var e=this;return t.log("Checking to see if there is an authorization response to be delivered."),this.notifier||t.log("Notifier is not present on AuthorizationRequest handler.\n No delivery of result will be possible"),this.completeAuthorizationRequest().then((function(r){r||t.log("No result is available yet."),r&&e.notifier&&e.notifier.onAuthorizationComplete(r.request,r.response,r.error)}))},r.prototype.setAuthorizationNotifier=function(e){return this.notifier=e,this},r}();e.AuthorizationRequestHandler=n}(on);var sn={},an={};Object.defineProperty(an,"__esModule",{value:!0}),an.AuthorizationError=an.AuthorizationResponse=void 0;var cn=function(){function e(e){this.code=e.code,this.state=e.state}return e.prototype.toJson=function(){return{code:this.code,state:this.state}},e}();an.AuthorizationResponse=cn;var ln=function(){function e(e){this.error=e.error,this.errorDescription=e.error_description,this.errorUri=e.error_uri,this.state=e.state}return e.prototype.toJson=function(){return{error:this.error,error_description:this.errorDescription,error_uri:this.errorUri,state:this.state}},e}();an.AuthorizationError=ln;var un={};Object.defineProperty(un,"__esModule",{value:!0}),un.BasicQueryStringUtils=void 0;var dn=function(){function e(){}return e.prototype.parse=function(e,t){return t?this.parseQueryString(e.hash):this.parseQueryString(e.search)},e.prototype.parseQueryString=function(e){for(var t={},r=(e=e.trim().replace(/^(\?|#|&)/,"")).split("&"),n=0;n<r.length;n+=1){var i=r[n].split("=");if(i.length>=2){var o=decodeURIComponent(i.shift()),s=i.length>0?i.join("="):null;s&&(t[o]=decodeURIComponent(s))}}return t},e.prototype.stringify=function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&e[r]&&t.push(encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t.join("&")},e}();un.BasicQueryStringUtils=dn;var hn,pn={},fn=Tr&&Tr.__extends||(hn=function(e,t){return(hn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}hn(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(pn,"__esModule",{value:!0}),pn.LocalStorageBackend=pn.StorageBackend=void 0;var mn=function(){};pn.StorageBackend=mn;var gn=function(e){function t(t){var r=e.call(this)||this;return r.storage=t||window.localStorage,r}return fn(t,e),t.prototype.getItem=function(e){var t=this;return new Promise((function(r,n){var i=t.storage.getItem(e);r(i||null)}))},t.prototype.removeItem=function(e){var t=this;return new Promise((function(r,n){t.storage.removeItem(e),r()}))},t.prototype.clear=function(){var e=this;return new Promise((function(t,r){e.storage.clear(),t()}))},t.prototype.setItem=function(e,t){var r=this;return new Promise((function(n,i){r.storage.setItem(e,t),n()}))},t}(mn);pn.LocalStorageBackend=gn;var _n=Tr&&Tr.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(sn,"__esModule",{value:!0});var vn=sn.RedirectRequestHandler=void 0,yn=Cr,wn=an,bn=Sr,En=Jr,kn=un,In=pn,Tn=function(e){return e+"_appauth_authorization_request"},Cn=function(e){return e+"_appauth_authorization_service_configuration"},Sn="appauth_current_authorization_request",Rn=function(e){function t(t,r,n,i){void 0===t&&(t=new In.LocalStorageBackend),void 0===r&&(r=new kn.BasicQueryStringUtils),void 0===n&&(n=window.location),void 0===i&&(i=new bn.DefaultCrypto);var o=e.call(this,r,i)||this;return o.storageBackend=t,o.locationLike=n,o}return _n(t,e),t.prototype.performAuthorizationRequest=function(e,t){var r=this,n=this.crypto.generateRandom(10);Promise.all([this.storageBackend.setItem(Sn,n),t.toJson().then((function(e){return r.storageBackend.setItem(Tn(n),JSON.stringify(e))})),this.storageBackend.setItem(Cn(n),JSON.stringify(e.toJson()))]).then((function(){var n=r.buildRequestUrl(e,t);En.log("Making a request to ",t,n),r.locationLike.assign(n)}))},t.prototype.completeAuthorizationRequest=function(){var e=this;return this.storageBackend.getItem(Sn).then((function(t){return t?e.storageBackend.getItem(Tn(t)).then((function(e){return JSON.parse(e)})).then((function(e){return new yn.AuthorizationRequest(e)})).then((function(r){var n=""+e.locationLike.origin+e.locationLike.pathname,i=e.utils.parse(e.locationLike,!0),o=i.state,s=i.code,a=i.error;En.log("Potential authorization request ",n,i,o,s,a);var c=o===r.state,l=null,u=null;if(c){if(a){var d=i.error_uri,h=i.error_description;u=new wn.AuthorizationError({error:a,error_description:h,error_uri:d,state:o})}else l=new wn.AuthorizationResponse({code:s,state:o});return Promise.all([e.storageBackend.removeItem(Sn),e.storageBackend.removeItem(Tn(t)),e.storageBackend.removeItem(Cn(t))]).then((function(){return En.log("Delivering authorization response"),{request:r,response:l,error:u}}))}return En.log("Mismatched request (state and request_uri) dont match."),Promise.resolve(null)})):null}))},t}(on.AuthorizationRequestHandler);vn=sn.RedirectRequestHandler=Rn;var On={},An={},Pn=Tr&&Tr.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(An,"__esModule",{value:!0}),An.TestRequestor=Mn=An.FetchRequestor=An.JQueryRequestor=An.Requestor=void 0;var Nn=Mr,xn=function(){};An.Requestor=xn;var Ln=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Pn(t,e),t.prototype.xhr=function(e){var t=$.ajax(e);return new Promise((function(e,r){t.then((function(t,r,n){e(t)}),(function(e,t,n){r(new Nn.AppAuthError(n))}))}))},t}(xn);An.JQueryRequestor=Ln;var Dn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Pn(t,e),t.prototype.xhr=function(e){if(!e.url)return Promise.reject(new Nn.AppAuthError("A URL must be provided."));var t=new URL(e.url),r={};(r.method=e.method,r.mode="cors",e.data)&&(e.method&&"POST"===e.method.toUpperCase()?r.body=e.data:new URLSearchParams(e.data).forEach((function(e,r){t.searchParams.append(r,e)})));if(r.headers={},e.headers)for(var n in e.headers)e.headers.hasOwnProperty(n)&&(r.headers[n]=e.headers[n]);var i=e.dataType&&"json"===e.dataType.toLowerCase();return i&&(r.headers.Accept="application/json, text/javascript, */*; q=0.01"),fetch(t.toString(),r).then((function(e){if(e.status>=200&&e.status<300){var t=e.headers.get("content-type");return i||t&&-1!==t.indexOf("application/json")?e.json():e.text()}return Promise.reject(new Nn.AppAuthError(e.status.toString(),e.statusText))}))},t}(xn),Mn=An.FetchRequestor=Dn,Un=function(e){function t(t){var r=e.call(this)||this;return r.promise=t,r}return Pn(t,e),t.prototype.xhr=function(e){return this.promise},t}(xn);An.TestRequestor=Un,Object.defineProperty(On,"__esModule",{value:!0});var jn=On.AuthorizationServiceConfiguration=void 0,Fn=An,Bn=function(){function e(e){this.authorizationEndpoint=e.authorization_endpoint,this.tokenEndpoint=e.token_endpoint,this.revocationEndpoint=e.revocation_endpoint,this.userInfoEndpoint=e.userinfo_endpoint,this.endSessionEndpoint=e.end_session_endpoint}return e.prototype.toJson=function(){return{authorization_endpoint:this.authorizationEndpoint,token_endpoint:this.tokenEndpoint,revocation_endpoint:this.revocationEndpoint,end_session_endpoint:this.endSessionEndpoint,userinfo_endpoint:this.userInfoEndpoint}},e.fetchFromIssuer=function(t,r){var n=t+"/.well-known/openid-configuration";return(r||new Fn.JQueryRequestor).xhr({url:n,dataType:"json",method:"GET"}).then((function(t){return new e(t)}))},e}();jn=On.AuthorizationServiceConfiguration=Bn;var zn={};Object.defineProperty(zn,"__esModule",{value:!0});var Hn=zn.TokenRequest=zn.GRANT_TYPE_REFRESH_TOKEN=zn.GRANT_TYPE_AUTHORIZATION_CODE=void 0,Vn=zn.GRANT_TYPE_AUTHORIZATION_CODE="authorization_code";zn.GRANT_TYPE_REFRESH_TOKEN="refresh_token";var $n=function(){function e(e){this.clientId=e.client_id,this.redirectUri=e.redirect_uri,this.grantType=e.grant_type,this.code=e.code,this.refreshToken=e.refresh_token,this.extras=e.extras}return e.prototype.toJson=function(){return{grant_type:this.grantType,code:this.code,refresh_token:this.refreshToken,redirect_uri:this.redirectUri,client_id:this.clientId,extras:this.extras}},e.prototype.toStringMap=function(){var e={grant_type:this.grantType,client_id:this.clientId,redirect_uri:this.redirectUri};if(this.code&&(e.code=this.code),this.refreshToken&&(e.refresh_token=this.refreshToken),this.extras)for(var t in this.extras)this.extras.hasOwnProperty(t)&&!e.hasOwnProperty(t)&&(e[t]=this.extras[t]);return e},e}();Hn=zn.TokenRequest=$n;var qn={},Wn={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TokenError=e.TokenResponse=e.nowInSeconds=void 0;e.nowInSeconds=function(){return Math.round((new Date).getTime()/1e3)};var t=function(){function t(t){this.accessToken=t.access_token,this.tokenType=t.token_type||"bearer",t.expires_in&&(this.expiresIn=parseInt(t.expires_in,10)),this.refreshToken=t.refresh_token,this.scope=t.scope,this.idToken=t.id_token,this.issuedAt=t.issued_at||e.nowInSeconds()}return t.prototype.toJson=function(){var e;return{access_token:this.accessToken,id_token:this.idToken,refresh_token:this.refreshToken,scope:this.scope,token_type:this.tokenType,issued_at:this.issuedAt,expires_in:null===(e=this.expiresIn)||void 0===e?void 0:e.toString()}},t.prototype.isValid=function(t){return void 0===t&&(t=-600),!this.expiresIn||e.nowInSeconds()<this.issuedAt+this.expiresIn+t},t}();e.TokenResponse=t;var r=function(){function e(e){this.error=e.error,this.errorDescription=e.error_description,this.errorUri=e.error_uri}return e.prototype.toJson=function(){return{error:this.error,error_description:this.errorDescription,error_uri:this.errorUri}},e}();e.TokenError=r}(Wn),Object.defineProperty(qn,"__esModule",{value:!0});var Kn=qn.BaseTokenRequestHandler=void 0,Jn=Mr,Gn=un,Yn=Wn,Qn=An,Xn=function(){function e(e,t){void 0===e&&(e=new Qn.JQueryRequestor),void 0===t&&(t=new Gn.BasicQueryStringUtils),this.requestor=e,this.utils=t}return e.prototype.isTokenResponse=function(e){return void 0===e.error},e.prototype.performRevokeTokenRequest=function(e,t){return this.requestor.xhr({url:e.revocationEndpoint,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},data:this.utils.stringify(t.toStringMap())}).then((function(e){return!0}))},e.prototype.performTokenRequest=function(e,t){var r=this;return this.requestor.xhr({url:e.tokenEndpoint,method:"POST",dataType:"json",headers:{"Content-Type":"application/x-www-form-urlencoded"},data:this.utils.stringify(t.toStringMap())}).then((function(e){return r.isTokenResponse(e)?new Yn.TokenResponse(e):Promise.reject(new Jn.AppAuthError(e.error,new Yn.TokenError(e)))}))},e}();Kn=qn.BaseTokenRequestHandler=Xn;let Zn;const ei=async(e,t)=>{const r=await jn.fetchFromIssuer(e,t);return Zn=r,r},ti=async(e,t,r,n,i)=>{const o={};t&&(o.code_verifier=t);const s=new Hn({client_id:n.clientId,redirect_uri:n.redirectUri,grant_type:Vn,code:e,refresh_token:void 0,extras:o});return await r.performTokenRequest(i,s)},ri=e=>{if(e&&e.isValid())return e.accessToken},ni=async e=>{try{const t=await e.storageBackend.getItem("appauth_current_authorization_request"),r=t&&await e.storageBackend.getItem((e=>`${e}_appauth_authorization_service_configuration`)(t));if(r){const e=JSON.parse(r);Zn=new jn(e)}return!0}catch{return!1}};p.bind({g:1});const ii=f("span")([{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"}]),oi=(function(){const e=f.call({g:1},"div").apply(null,arguments);return function(t){return e(t),null}})`
1
+ let e,t,r,n={data:""},i=e=>"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||n,o=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,s=/\/\*[^]*?\*\/| +/g,a=/\n+/g,c=(e,t)=>{let r="",n="",i="";for(let o in e){let s=e[o];"@"==o[0]?"i"==o[1]?r=o+" "+s+";":n+="f"==o[1]?c(s,o):o+"{"+c(s,"k"==o[1]?"":t)+"}":"object"==typeof s?n+=c(s,t?t.replace(/([^,])+/g,(e=>o.replace(/(^:.*)|([^,])+/g,(t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)))):o):null!=s&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=c.p?c.p(o,s):o+":"+s+";")}return r+(t&&i?t+"{"+i+"}":i)+n},l={},u=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+u(e[r]);return t}return e},d=(e,t,r,n,i)=>{let d=u(e),h=l[d]||(l[d]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return"go"+r})(d));if(!l[h]){let t=d!==e?e:(e=>{let t,r,n=[{}];for(;t=o.exec(e.replace(s,""));)t[4]?n.shift():t[3]?(r=t[3].replace(a," ").trim(),n.unshift(n[0][r]=n[0][r]||{})):n[0][t[1]]=t[2].replace(a," ").trim();return n[0]})(e);l[h]=c(i?{["@keyframes "+h]:t}:t,r?"":"."+h)}let p=r&&l.g?l.g:null;return r&&(l.g=l[h]),f=l[h],m=t,g=n,(_=p)?m.data=m.data.replace(_,f):-1===m.data.indexOf(f)&&(m.data=g?f+m.data:m.data+f),h;var f,m,g,_},h=(e,t,r)=>e.reduce(((e,n,i)=>{let o=t[i];if(o&&o.call){let e=o(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":c(e,""):!1===e?"":e}return e+n+(null==o?"":o)}),"");function p(e){let t=this||{},r=e.call?e(t.p):e;return d(r.unshift?r.raw?h(r,[].slice.call(arguments,1),t.p):r.reduce(((e,r)=>Object.assign(e,r&&r.call?r(t.p):r)),{}):r,i(t.target),t.g,t.o,t.k)}function f(n,i){let o=this||{};return function(){let s=arguments;function a(c,l){let u=Object.assign({},c),d=u.className||a.className;o.p=Object.assign({theme:t&&t()},u),o.o=/ *go\d+/.test(d),u.className=p.apply(o,s)+(d?" "+d:""),i&&(u.ref=l);let h=n;return n[0]&&(h=u.as||n,delete u.as),r&&h[0]&&r(u),e(h,u)}return i?i(a):a}}p.bind({g:1}),p.bind({k:1});var m,g,_,v,y,w,b,E,k={},I=[],T=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,S=Array.isArray;function C(e,t){for(var r in t)e[r]=t[r];return e}function R(e){var t=e.parentNode;t&&t.removeChild(e)}function O(e,t,r){var n,i,o,s={};for(o in t)"key"==o?n=t[o]:"ref"==o?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?m.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return A(e,s,n,i,null)}function A(e,t,r,n,i){var o={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++_:i};return null==i&&null!=g.vnode&&g.vnode(o),o}function P(){return{current:null}}function N(e){return e.children}function x(e,t){this.props=e,this.context=t}function L(e,t){if(null==t)return e.__?L(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e)return r.__d||r.__e;return"function"==typeof e.type?L(e):null}function D(e){var t,r;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e){e.__e=e.__c.base=r.__e;break}return D(e)}}function M(e){(!e.__d&&(e.__d=!0)&&v.push(e)&&!U.__r++||y!==g.debounceRendering)&&((y=g.debounceRendering)||w)(U)}function U(){var e,t,r,n,i,o,s,a,c;for(v.sort(b);e=v.shift();)e.__d&&(t=v.length,n=void 0,i=void 0,o=void 0,a=(s=(r=e).__v).__e,(c=r.__P)&&(n=[],i=[],(o=C({},s)).__v=s.__v+1,J(c,s,o,r.__n,void 0!==c.ownerSVGElement,null!=s.__h?[a]:null,n,null==a?L(s):a,s.__h,i),G(n,s,i),s.__e!=a&&D(s)),v.length>t&&v.sort(b));U.__r=0}function j(e,t,r,n,i,o,s,a,c,l,u){var d,h,p,f,m,g,_,v,y,w=0,b=n&&n.__k||I,E=b.length,T=E,C=t.length;for(r.__k=[],d=0;d<C;d++)null!=(f=r.__k[d]=null==(f=t[d])||"boolean"==typeof f||"function"==typeof f?null:"string"==typeof f||"number"==typeof f||"bigint"==typeof f?A(null,f,null,null,f):S(f)?A(N,{children:f},null,null,null):f.__b>0?A(f.type,f.props,f.key,f.ref?f.ref:null,f.__v):f)?(f.__=r,f.__b=r.__b+1,-1===(v=H(f,b,_=d+w,T))?p=k:(p=b[v]||k,b[v]=void 0,T--),J(e,f,p,i,o,s,a,c,l,u),m=f.__e,(h=f.ref)&&p.ref!=h&&(p.ref&&Y(p.ref,null,f),u.push(h,f.__c||m,f)),null!=m&&(null==g&&(g=m),(y=p===k||null===p.__v)?-1==v&&w--:v!==_&&(v===_+1?w++:v>_?T>C-_?w+=v-_:w--:w=v<_&&v==_-1?v-_:0),_=d+w,"function"!=typeof f.type||v===_&&p.__k!==f.__k?"function"==typeof f.type||v===_&&!y?void 0!==f.__d?(c=f.__d,f.__d=void 0):c=m.nextSibling:c=z(e,m,c):c=F(f,c,e),"function"==typeof r.type&&(r.__d=c))):(p=b[d])&&null==p.key&&p.__e&&(p.__e==c&&(p.__=n,c=L(p)),Q(p,p,!1),b[d]=null);for(r.__e=g,d=E;d--;)null!=b[d]&&("function"==typeof r.type&&null!=b[d].__e&&b[d].__e==r.__d&&(r.__d=b[d].__e.nextSibling),Q(b[d],b[d]))}function F(e,t,r){for(var n,i=e.__k,o=0;i&&o<i.length;o++)(n=i[o])&&(n.__=e,t="function"==typeof n.type?F(n,t,r):z(r,n.__e,t));return t}function B(e,t){return t=t||[],null==e||"boolean"==typeof e||(S(e)?e.some((function(e){B(e,t)})):t.push(e)),t}function z(e,t,r){return null==r||r.parentNode!==e?e.insertBefore(t,null):t==r&&null!=t.parentNode||e.insertBefore(t,r),t.nextSibling}function H(e,t,r,n){var i=e.key,o=e.type,s=r-1,a=r+1,c=t[r];if(null===c||c&&i==c.key&&o===c.type)return r;if(n>(null!=c?1:0))for(;s>=0||a<t.length;){if(s>=0){if((c=t[s])&&i==c.key&&o===c.type)return s;s--}if(a<t.length){if((c=t[a])&&i==c.key&&o===c.type)return a;a++}}return-1}function V(e,t,r){"-"===t[0]?e.setProperty(t,null==r?"":r):e[t]=null==r?"":"number"!=typeof r||T.test(t)?r:r+"px"}function q(e,t,r,n,i){var o;e:if("style"===t)if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||V(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||V(e.style,t,r[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=r,r?n?r.u=n.u:(r.u=Date.now(),e.addEventListener(t,o?K:W,o)):e.removeEventListener(t,o?K:W,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&"role"!==t&&t in e)try{e[t]=null==r?"":r;break e}catch(s){}"function"==typeof r||(null==r||!1===r&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,r))}}function W(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(g.event?g.event(e):e)}function K(e){return this.l[e.type+!0](g.event?g.event(e):e)}function J(e,t,r,n,i,o,s,a,c,l){var u,d,h,p,f,_,v,y,w,b,E,I,T,O,A,P=t.type;if(void 0!==t.constructor)return null;null!=r.__h&&(c=r.__h,a=t.__e=r.__e,t.__h=null,o=[a]),(u=g.__b)&&u(t);e:if("function"==typeof P)try{if(y=t.props,w=(u=P.contextType)&&n[u.__c],b=u?w?w.props.value:u.__:n,r.__c?v=(d=t.__c=r.__c).__=d.__E:("prototype"in P&&P.prototype.render?t.__c=d=new P(y,b):(t.__c=d=new x(y,b),d.constructor=P,d.render=X),w&&w.sub(d),d.props=y,d.state||(d.state={}),d.context=b,d.__n=n,h=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=P.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=C({},d.__s)),C(d.__s,P.getDerivedStateFromProps(y,d.__s))),p=d.props,f=d.state,d.__v=t,h)null==P.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==P.getDerivedStateFromProps&&y!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(y,b),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(y,d.__s,b)||t.__v===r.__v)){for(t.__v!==r.__v&&(d.props=y,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach((function(e){e&&(e.__=t)})),E=0;E<d._sb.length;E++)d.__h.push(d._sb[E]);d._sb=[],d.__h.length&&s.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(y,d.__s,b),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,f,_)}))}if(d.context=b,d.props=y,d.__P=e,d.__e=!1,I=g.__r,T=0,"prototype"in P&&P.prototype.render){for(d.state=d.__s,d.__d=!1,I&&I(t),u=d.render(d.props,d.state,d.context),O=0;O<d._sb.length;O++)d.__h.push(d._sb[O]);d._sb=[]}else do{d.__d=!1,I&&I(t),u=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++T<25);d.state=d.__s,null!=d.getChildContext&&(n=C(C({},n),d.getChildContext())),h||null==d.getSnapshotBeforeUpdate||(_=d.getSnapshotBeforeUpdate(p,f)),j(e,S(A=null!=u&&u.type===N&&null==u.key?u.props.children:u)?A:[A],t,r,n,i,o,s,a,c,l),d.base=t.__e,t.__h=null,d.__h.length&&s.push(d),v&&(d.__E=d.__=null)}catch(D){t.__v=null,(c||null!=o)&&(t.__e=a,t.__h=!!c,o[o.indexOf(a)]=null),g.__e(D,t,r)}else null==o&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=function(e,t,r,n,i,o,s,a,c){var l,u,d,h=r.props,p=t.props,f=t.type,g=0;if("svg"===f&&(i=!0),null!=o)for(;g<o.length;g++)if((l=o[g])&&"setAttribute"in l==!!f&&(f?l.localName===f:3===l.nodeType)){e=l,o[g]=null;break}if(null==e){if(null===f)return document.createTextNode(p);e=i?document.createElementNS("http://www.w3.org/2000/svg",f):document.createElement(f,p.is&&p),o=null,a=!1}if(null===f)h===p||a&&e.data===p||(e.data=p);else{if(o=o&&m.call(e.childNodes),u=(h=r.props||k).dangerouslySetInnerHTML,d=p.dangerouslySetInnerHTML,!a){if(null!=o)for(h={},g=0;g<e.attributes.length;g++)h[e.attributes[g].name]=e.attributes[g].value;(d||u)&&(d&&(u&&d.__html==u.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(function(e,t,r,n,i){var o;for(o in r)"children"===o||"key"===o||o in t||q(e,o,null,r[o],n);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||r[o]===t[o]||q(e,o,t[o],r[o],n)}(e,p,h,i,a),d)t.__k=[];else if(j(e,S(g=t.props.children)?g:[g],t,r,n,i&&"foreignObject"!==f,o,s,o?o[0]:r.__k&&L(r,0),a,c),null!=o)for(g=o.length;g--;)null!=o[g]&&R(o[g]);a||("value"in p&&void 0!==(g=p.value)&&(g!==e.value||"progress"===f&&!g||"option"===f&&g!==h.value)&&q(e,"value",g,h.value,!1),"checked"in p&&void 0!==(g=p.checked)&&g!==e.checked&&q(e,"checked",g,h.checked,!1))}return e}(r.__e,t,r,n,i,o,s,c,l);(u=g.diffed)&&u(t)}function G(e,t,r){for(var n=0;n<r.length;n++)Y(r[n],r[++n],r[++n]);g.__c&&g.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(r){g.__e(r,t.__v)}}))}function Y(e,t,r){try{"function"==typeof e?e(t):e.current=t}catch(n){g.__e(n,r)}}function Q(e,t,r){var n,i;if(g.unmount&&g.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||Y(n,null,t)),null!=(n=e.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(o){g.__e(o,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&Q(n[i],t,r||"function"!=typeof e.type);r||null==e.__e||R(e.__e),e.__=e.__e=e.__d=void 0}function X(e,t,r){return this.constructor(e,r)}function Z(e,t,r){var n,i,o,s;g.__&&g.__(e,t),i=(n="function"==typeof r)?null:r&&r.__k||t.__k,o=[],s=[],J(t,e=(!n&&r||t).__k=O(N,null,[e]),i||k,k,void 0!==t.ownerSVGElement,!n&&r?[r]:i?null:t.firstChild?m.call(t.childNodes):null,o,!n&&r?r:i?i.__e:t.firstChild,n,s),G(o,e,s)}function ee(e,t){Z(e,t,ee)}function te(e,t,r){var n,i,o,s,a=C({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)"key"==o?n=t[o]:"ref"==o?i=t[o]:a[o]=void 0===t[o]&&void 0!==s?s[o]:t[o];return arguments.length>2&&(a.children=arguments.length>3?m.call(arguments,2):r),A(e.type,a,n||e.key,i||e.ref,null)}function re(e,t){var r={__c:t="__cC"+E++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,n;return this.getChildContext||(r=[],(n={})[t]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&r.some((function(e){e.__e=!0,M(e)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return r.Provider.__=r.Consumer.contextType=r}m=I.slice,g={__e:function(e,t,r,n){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,n||{}),s=i.__d),s)return i.__E=i}catch(a){e=a}throw e}},_=0,x.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=C({},this.state),"function"==typeof e&&(e=e(C({},r),this.props)),e&&C(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),M(this))},x.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),M(this))},x.prototype.render=N,v=[],w="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,b=function(e,t){return e.__v.__b-t.__v.__b},U.__r=0,E=0;var ne,ie,oe,se,ae=0,ce=[],le=[],ue=g.__b,de=g.__r,he=g.diffed,pe=g.__c,fe=g.unmount;function me(e,t){g.__h&&g.__h(ie,e,ae||t),ae=0;var r=ie.__H||(ie.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:le}),r.__[e]}function ge(e){return ae=1,_e(xe,e)}function _e(e,t,r){var n=me(ne++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):xe(void 0,t),function(e){var t=n.__N?n.__N[0]:n.__[0],r=n.t(t,e);t!==r&&(n.__N=[r,n.__[1]],n.__c.setState({}))}],n.__c=ie,!ie.u)){var i=function(e,t,r){if(!n.__c.__H)return!0;var i=n.__c.__H.__.filter((function(e){return e.__c}));if(i.every((function(e){return!e.__N})))return!o||o.call(this,e,t,r);var s=!1;return i.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),!(!s&&n.__c.props===e)&&(!o||o.call(this,e,t,r))};ie.u=!0;var o=ie.shouldComponentUpdate,s=ie.componentWillUpdate;ie.componentWillUpdate=function(e,t,r){if(this.__e){var n=o;o=void 0,i(e,t,r),o=n}s&&s.call(this,e,t,r)},ie.shouldComponentUpdate=i}return n.__N||n.__}function ve(e,t){var r=me(ne++,3);!g.__s&&Ne(r.__H,t)&&(r.__=e,r.i=t,ie.__H.__h.push(r))}function ye(e,t){var r=me(ne++,4);!g.__s&&Ne(r.__H,t)&&(r.__=e,r.i=t,ie.__h.push(r))}function we(e){return ae=5,Ee((function(){return{current:e}}),[])}function be(e,t,r){ae=6,ye((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==r?r:r.concat(e))}function Ee(e,t){var r=me(ne++,7);return Ne(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function ke(e,t){return ae=8,Ee((function(){return e}),t)}function Ie(e){var t=ie.context[e.__c],r=me(ne++,9);return r.c=e,t?(null==r.__&&(r.__=!0,t.sub(ie)),t.props.value):e.__}function Te(e,t){g.useDebugValue&&g.useDebugValue(t?t(e):e)}function Se(){var e=me(ne++,11);if(!e.__){for(var t=ie.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function Ce(){for(var e;e=ce.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ae),e.__H.__h.forEach(Pe),e.__H.__h=[]}catch(Mh){e.__H.__h=[],g.__e(Mh,e.__v)}}g.__b=function(e){ie=null,ue&&ue(e)},g.__r=function(e){de&&de(e),ne=0;var t=(ie=e.__c).__H;t&&(oe===ie?(t.__h=[],ie.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=le,e.__N=e.i=void 0}))):(t.__h.forEach(Ae),t.__h.forEach(Pe),t.__h=[],ne=0)),oe=ie},g.diffed=function(e){he&&he(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==ce.push(t)&&se===g.requestAnimationFrame||((se=g.requestAnimationFrame)||Oe)(Ce)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==le&&(e.__=e.__V),e.i=void 0,e.__V=le}))),oe=ie=null},g.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Ae),e.__h=e.__h.filter((function(e){return!e.__||Pe(e)}))}catch(r){t.some((function(e){e.__h&&(e.__h=[])})),t=[],g.__e(r,e.__v)}})),pe&&pe(e,t)},g.unmount=function(e){fe&&fe(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{Ae(e)}catch(r){t=r}})),r.__H=void 0,t&&g.__e(t,r.__v))};var Re="function"==typeof requestAnimationFrame;function Oe(e){var t,r=function(){clearTimeout(n),Re&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);Re&&(t=requestAnimationFrame(r))}function Ae(e){var t=ie,r=e.__c;"function"==typeof r&&(e.__c=void 0,r()),ie=t}function Pe(e){var t=ie;e.__c=e.__(),ie=t}function Ne(e,t){return!e||e.length!==t.length||t.some((function(t,r){return t!==e[r]}))}function xe(e,t){return"function"==typeof t?t(e):t}class Le extends Error{}function De(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return function(e){return decodeURIComponent(atob(e).replace(/(.)/g,((e,t)=>{let r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r})))}(t)}catch(r){return atob(t)}}function Me(e,t){if("string"!=typeof e)throw new Le("Invalid token specified: must be a string");t||(t={});const r=!0===t.header?0:1,n=e.split(".")[r];if("string"!=typeof n)throw new Le(`Invalid token specified: missing part #${r+1}`);let i;try{i=De(n)}catch(gh){throw new Le(`Invalid token specified: invalid base64 for part #${r+1} (${gh.message})`)}try{return JSON.parse(i)}catch(gh){throw new Le(`Invalid token specified: invalid json for part #${r+1} (${gh.message})`)}}function Ue(e,t){return function(){return e.apply(t,arguments)}}Le.prototype.name="InvalidTokenError";const{toString:je}=Object.prototype,{getPrototypeOf:Fe}=Object,Be=(ze=Object.create(null),e=>{const t=je.call(e);return ze[t]||(ze[t]=t.slice(8,-1).toLowerCase())});var ze;const He=e=>(e=e.toLowerCase(),t=>Be(t)===e),Ve=e=>t=>typeof t===e,{isArray:$e}=Array,qe=Ve("undefined");const We=He("ArrayBuffer");const Ke=Ve("string"),Je=Ve("function"),Ge=Ve("number"),Ye=e=>null!==e&&"object"==typeof e,Qe=e=>{if("object"!==Be(e))return!1;const t=Fe(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Xe=He("Date"),Ze=He("File"),et=He("Blob"),tt=He("FileList"),rt=He("URLSearchParams"),[nt,it,ot,st]=["ReadableStream","Request","Response","Headers"].map(He);function at(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,i;if("object"!=typeof e&&(e=[e]),$e(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let s;for(n=0;n<o;n++)s=i[n],t.call(null,e[s],s,e)}}function ct(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,i=r.length;for(;i-- >0;)if(n=r[i],t===n.toLowerCase())return n;return null}const lt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,ut=e=>!qe(e)&&e!==lt;const dt=(ht="undefined"!=typeof Uint8Array&&Fe(Uint8Array),e=>ht&&e instanceof ht);var ht;const pt=He("HTMLFormElement"),ft=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),mt=He("RegExp"),gt=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};at(r,((r,i)=>{let o;!1!==(o=t(r,i,e))&&(n[i]=o||r)})),Object.defineProperties(e,n)},_t="abcdefghijklmnopqrstuvwxyz",vt="0123456789",yt={DIGIT:vt,ALPHA:_t,ALPHA_DIGIT:_t+_t.toUpperCase()+vt};const wt=He("AsyncFunction"),bt=(Et="function"==typeof setImmediate,kt=Je(lt.postMessage),Et?setImmediate:kt?(It=`axios@${Math.random()}`,Tt=[],lt.addEventListener("message",(({source:e,data:t})=>{e===lt&&t===It&&Tt.length&&Tt.shift()()}),!1),e=>{Tt.push(e),lt.postMessage(It,"*")}):e=>setTimeout(e));var Et,kt,It,Tt;const St="undefined"!=typeof queueMicrotask?queueMicrotask.bind(lt):"undefined"!=typeof process&&process.nextTick||bt,Ct={isArray:$e,isArrayBuffer:We,isBuffer:function(e){return null!==e&&!qe(e)&&null!==e.constructor&&!qe(e.constructor)&&Je(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Je(e.append)&&("formdata"===(t=Be(e))||"object"===t&&Je(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&We(e.buffer),t},isString:Ke,isNumber:Ge,isBoolean:e=>!0===e||!1===e,isObject:Ye,isPlainObject:Qe,isReadableStream:nt,isRequest:it,isResponse:ot,isHeaders:st,isUndefined:qe,isDate:Xe,isFile:Ze,isBlob:et,isRegExp:mt,isFunction:Je,isStream:e=>Ye(e)&&Je(e.pipe),isURLSearchParams:rt,isTypedArray:dt,isFileList:tt,forEach:at,merge:function e(){const{caseless:t}=ut(this)&&this||{},r={},n=(n,i)=>{const o=t&&ct(r,i)||i;Qe(r[o])&&Qe(n)?r[o]=e(r[o],n):Qe(n)?r[o]=e({},n):$e(n)?r[o]=n.slice():r[o]=n};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&at(arguments[i],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(at(t,((t,n)=>{r&&Je(t)?e[n]=Ue(t,r):e[n]=t}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let i,o,s;const a={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],n&&!n(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==r&&Fe(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:Be,kindOfTest:He,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if($e(e))return e;let t=e.length;if(!Ge(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:pt,hasOwnProperty:ft,hasOwnProp:ft,reduceDescriptors:gt,freezeMethods:e=>{gt(e,((t,r)=>{if(Je(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];Je(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return $e(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:ct,global:lt,isContextDefined:ut,ALPHABET:yt,generateString:(e=16,t=yt.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&Je(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(Ye(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const i=$e(e)?[]:{};return at(e,((e,t)=>{const o=r(e,n+1);!qe(o)&&(i[t]=o)})),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:wt,isThenable:e=>e&&(Ye(e)||Je(e))&&Je(e.then)&&Je(e.catch),setImmediate:bt,asap:St};function Rt(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}Ct.inherits(Rt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ct.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Ot=Rt.prototype,At={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{At[e]={value:e}})),Object.defineProperties(Rt,At),Object.defineProperty(Ot,"isAxiosError",{value:!0}),Rt.from=(e,t,r,n,i,o)=>{const s=Object.create(Ot);return Ct.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Rt.call(s,e.message,t,r,n,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};function Pt(e){return Ct.isPlainObject(e)||Ct.isArray(e)}function Nt(e){return Ct.endsWith(e,"[]")?e.slice(0,-2):e}function xt(e,t,r){return e?e.concat(t).map((function(e,t){return e=Nt(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const Lt=Ct.toFlatObject(Ct,{},null,(function(e){return/^is[A-Z]/.test(e)}));function Dt(e,t,r){if(!Ct.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=Ct.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Ct.isUndefined(t[e])}))).metaTokens,i=r.visitor||l,o=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&Ct.isSpecCompliantForm(t);if(!Ct.isFunction(i))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Ct.isDate(e))return e.toISOString();if(!a&&Ct.isBlob(e))throw new Rt("Blob is not supported. Use a Buffer instead.");return Ct.isArrayBuffer(e)||Ct.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,r,i){let a=e;if(e&&!i&&"object"==typeof e)if(Ct.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(Ct.isArray(e)&&function(e){return Ct.isArray(e)&&!e.some(Pt)}(e)||(Ct.isFileList(e)||Ct.endsWith(r,"[]"))&&(a=Ct.toArray(e)))return r=Nt(r),a.forEach((function(e,n){!Ct.isUndefined(e)&&null!==e&&t.append(!0===s?xt([r],n,o):null===s?r:r+"[]",c(e))})),!1;return!!Pt(e)||(t.append(xt(i,r,o),c(e)),!1)}const u=[],d=Object.assign(Lt,{defaultVisitor:l,convertValue:c,isVisitable:Pt});if(!Ct.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!Ct.isUndefined(r)){if(-1!==u.indexOf(r))throw Error("Circular reference detected in "+n.join("."));u.push(r),Ct.forEach(r,(function(r,o){!0===(!(Ct.isUndefined(r)||null===r)&&i.call(t,r,Ct.isString(o)?o.trim():o,n,d))&&e(r,n?n.concat(o):[o])})),u.pop()}}(e),t}function Mt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Ut(e,t){this._pairs=[],e&&Dt(e,this,t)}const jt=Ut.prototype;function Ft(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Bt(e,t,r){if(!t)return e;const n=r&&r.encode||Ft,i=r&&r.serialize;let o;if(o=i?i(t,r):Ct.isURLSearchParams(t)?t.toString():new Ut(t,r).toString(n),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}jt.append=function(e,t){this._pairs.push([e,t])},jt.toString=function(e){const t=e?function(t){return e.call(this,t,Mt)}:Mt;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const zt=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Ct.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Ht={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Vt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Ut,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},$t="undefined"!=typeof window&&"undefined"!=typeof document,qt=(Wt="undefined"!=typeof navigator&&navigator.product,$t&&["ReactNative","NativeScript","NS"].indexOf(Wt)<0);var Wt;const Kt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Jt=$t&&window.location.href||"http://localhost",Gt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:$t,hasStandardBrowserEnv:qt,hasStandardBrowserWebWorkerEnv:Kt,origin:Jt},Symbol.toStringTag,{value:"Module"})),...Vt};function Yt(e){function t(e,r,n,i){let o=e[i++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),a=i>=e.length;if(o=!o&&Ct.isArray(n)?n.length:o,a)return Ct.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!s;n[o]&&Ct.isObject(n[o])||(n[o]=[]);return t(e,r,n[o],i)&&Ct.isArray(n[o])&&(n[o]=function(e){const t={},r=Object.keys(e);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],t[o]=e[o];return t}(n[o])),!s}if(Ct.isFormData(e)&&Ct.isFunction(e.entries)){const r={};return Ct.forEachEntry(e,((e,n)=>{t(function(e){return Ct.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const Qt={transitional:Ht,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,i=Ct.isObject(e);i&&Ct.isHTMLForm(e)&&(e=new FormData(e));if(Ct.isFormData(e))return n?JSON.stringify(Yt(e)):e;if(Ct.isArrayBuffer(e)||Ct.isBuffer(e)||Ct.isStream(e)||Ct.isFile(e)||Ct.isBlob(e)||Ct.isReadableStream(e))return e;if(Ct.isArrayBufferView(e))return e.buffer;if(Ct.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Dt(e,new Gt.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return Gt.isNode&&Ct.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=Ct.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Dt(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||n?(t.setContentType("application/json",!1),function(e,t,r){if(Ct.isString(e))try{return(t||JSON.parse)(e),Ct.trim(e)}catch(gh){if("SyntaxError"!==gh.name)throw gh}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Qt.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(Ct.isResponse(e)||Ct.isReadableStream(e))return e;if(e&&Ct.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(gh){if(r){if("SyntaxError"===gh.name)throw Rt.from(gh,Rt.ERR_BAD_RESPONSE,this,null,this.response);throw gh}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Gt.classes.FormData,Blob:Gt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ct.forEach(["delete","get","head","post","put","patch"],(e=>{Qt.headers[e]={}}));const Xt=Qt,Zt=Ct.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),er=Symbol("internals");function tr(e){return e&&String(e).trim().toLowerCase()}function rr(e){return!1===e||null==e?e:Ct.isArray(e)?e.map(rr):String(e)}function nr(e,t,r,n,i){return Ct.isFunction(n)?n.call(this,t,r):(i&&(t=r),Ct.isString(t)?Ct.isString(n)?-1!==t.indexOf(n):Ct.isRegExp(n)?n.test(t):void 0:void 0)}class ir{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function i(e,t,r){const i=tr(t);if(!i)throw new Error("header name must be a non-empty string");const o=Ct.findKey(n,i);(!o||void 0===n[o]||!0===r||void 0===r&&!1!==n[o])&&(n[o||t]=rr(e))}const o=(e,t)=>Ct.forEach(e,((e,r)=>i(e,r,t)));if(Ct.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(Ct.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let r,n,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim(),!r||t[r]&&Zt[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t);else if(Ct.isHeaders(e))for(const[s,a]of e.entries())i(a,s,r);else null!=e&&i(t,e,r);return this}get(e,t){if(e=tr(e)){const r=Ct.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(Ct.isFunction(t))return t.call(this,e,r);if(Ct.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=tr(e)){const r=Ct.findKey(this,e);return!(!r||void 0===this[r]||t&&!nr(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function i(e){if(e=tr(e)){const i=Ct.findKey(r,e);!i||t&&!nr(0,r[i],i,t)||(delete r[i],n=!0)}}return Ct.isArray(e)?e.forEach(i):i(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const i=t[r];e&&!nr(0,this[i],i,e,!0)||(delete this[i],n=!0)}return n}normalize(e){const t=this,r={};return Ct.forEach(this,((n,i)=>{const o=Ct.findKey(r,i);if(o)return t[o]=rr(n),void delete t[i];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(i):String(i).trim();s!==i&&delete t[i],t[s]=rr(n),r[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Ct.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&Ct.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[er]=this[er]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=tr(e);t[n]||(!function(e,t){const r=Ct.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})}))}(r,e),t[n]=!0)}return Ct.isArray(e)?e.forEach(n):n(e),this}}ir.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ct.reduceDescriptors(ir.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),Ct.freezeMethods(ir);const or=ir;function sr(e,t){const r=this||Xt,n=t||r,i=or.from(n.headers);let o=n.data;return Ct.forEach(e,(function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function ar(e){return!(!e||!e.__CANCEL__)}function cr(e,t,r){Rt.call(this,null==e?"canceled":e,Rt.ERR_CANCELED,t,r),this.name="CanceledError"}function lr(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Rt("Request failed with status code "+r.status,[Rt.ERR_BAD_REQUEST,Rt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}Ct.inherits(cr,Rt,{__CANCEL__:!0});const ur=(e,t,r=3)=>{let n=0;const i=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i,o=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=n[s];i||(i=c),r[o]=a,n[o]=c;let u=s,d=0;for(;u!==o;)d+=r[u++],u%=e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),c-i<t)return;const h=l&&c-l;return h?Math.round(1e3*d/h):void 0}}(50,250);return function(e,t){let r,n,i=0,o=1e3/t;const s=(t,o=Date.now())=>{i=o,r=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-i;a>=o?s(e,t):(r=e,n||(n=setTimeout((()=>{n=null,s(r)}),o-a)))},()=>r&&s(r)]}((r=>{const o=r.loaded,s=r.lengthComputable?r.total:void 0,a=o-n,c=i(a);n=o;e({loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&o<=s?(s-o)/c:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})}),r)},dr=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},hr=e=>(...t)=>Ct.asap((()=>e(...t))),pr=Gt.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function n(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=n(window.location.href),function(e){const t=Ct.isString(e)?n(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return!0},fr=Gt.hasStandardBrowserEnv?{write(e,t,r,n,i,o){const s=[e+"="+encodeURIComponent(t)];Ct.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),Ct.isString(n)&&s.push("path="+n),Ct.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function mr(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const gr=e=>e instanceof or?{...e}:e;function _r(e,t){t=t||{};const r={};function n(e,t,r){return Ct.isPlainObject(e)&&Ct.isPlainObject(t)?Ct.merge.call({caseless:r},e,t):Ct.isPlainObject(t)?Ct.merge({},t):Ct.isArray(t)?t.slice():t}function i(e,t,r){return Ct.isUndefined(t)?Ct.isUndefined(e)?void 0:n(void 0,e,r):n(e,t,r)}function o(e,t){if(!Ct.isUndefined(t))return n(void 0,t)}function s(e,t){return Ct.isUndefined(t)?Ct.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,i,o){return o in t?n(r,i):o in e?n(void 0,r):void 0}const c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>i(gr(e),gr(t),!0)};return Ct.forEach(Object.keys(Object.assign({},e,t)),(function(n){const o=c[n]||i,s=o(e[n],t[n],n);Ct.isUndefined(s)&&o!==a||(r[n]=s)})),r}const vr=e=>{const t=_r({},e);let r,{data:n,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:c}=t;if(t.headers=a=or.from(a),t.url=Bt(mr(t.baseURL,t.url),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),Ct.isFormData(n))if(Gt.hasStandardBrowserEnv||Gt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(r=a.getContentType())){const[e,...t]=r?r.split(";").map((e=>e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(Gt.hasStandardBrowserEnv&&(i&&Ct.isFunction(i)&&(i=i(t)),i||!1!==i&&pr(t.url))){const e=o&&s&&fr.read(s);e&&a.set(o,e)}return t},yr="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){const n=vr(e);let i=n.data;const o=or.from(n.headers).normalize();let s,a,c,l,u,{responseType:d,onUploadProgress:h,onDownloadProgress:p}=n;function f(){l&&l(),u&&u(),n.cancelToken&&n.cancelToken.unsubscribe(s),n.signal&&n.signal.removeEventListener("abort",s)}let m=new XMLHttpRequest;function g(){if(!m)return;const n=or.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());lr((function(e){t(e),f()}),(function(e){r(e),f()}),{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:n,config:e,request:m}),m=null}m.open(n.method.toUpperCase(),n.url,!0),m.timeout=n.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(r(new Rt("Request aborted",Rt.ECONNABORTED,e,m)),m=null)},m.onerror=function(){r(new Rt("Network Error",Rt.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const i=n.transitional||Ht;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new Rt(t,i.clarifyTimeoutError?Rt.ETIMEDOUT:Rt.ECONNABORTED,e,m)),m=null},void 0===i&&o.setContentType(null),"setRequestHeader"in m&&Ct.forEach(o.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),Ct.isUndefined(n.withCredentials)||(m.withCredentials=!!n.withCredentials),d&&"json"!==d&&(m.responseType=n.responseType),p&&([c,u]=ur(p,!0),m.addEventListener("progress",c)),h&&m.upload&&([a,l]=ur(h),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",l)),(n.cancelToken||n.signal)&&(s=t=>{m&&(r(!t||t.type?new cr(null,e,m):t),m.abort(),m=null)},n.cancelToken&&n.cancelToken.subscribe(s),n.signal&&(n.signal.aborted?s():n.signal.addEventListener("abort",s)));const _=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);_&&-1===Gt.protocols.indexOf(_)?r(new Rt("Unsupported protocol "+_+":",Rt.ERR_BAD_REQUEST,e)):m.send(i||null)}))},wr=(e,t)=>{let r,n=new AbortController;const i=function(e){if(!r){r=!0,s();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Rt?t:new cr(t instanceof Error?t.message:t))}};let o=t&&setTimeout((()=>{i(new Rt(`timeout ${t} of ms exceeded`,Rt.ETIMEDOUT))}),t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach((e=>{e&&(e.removeEventListener?e.removeEventListener("abort",i):e.unsubscribe(i))})),e=null)};e.forEach((e=>e&&e.addEventListener&&e.addEventListener("abort",i)));const{signal:a}=n;return a.unsubscribe=s,[a,()=>{o&&clearTimeout(o),o=null}]},br=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,i=0;for(;i<r;)n=i+t,yield e.slice(i,n),i=n},Er=(e,t,r,n,i)=>{const o=async function*(e,t,r){for await(const n of e)yield*br(ArrayBuffer.isView(n)?n:await r(String(n)),t)}(e,t,i);let s,a=0,c=e=>{s||(s=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return c(),void e.close();let i=n.byteLength;if(r){let e=a+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(t){throw c(t),t}},cancel:e=>(c(e),o.return())},{highWaterMark:2})},kr="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Ir=kr&&"function"==typeof ReadableStream,Tr=kr&&("function"==typeof TextEncoder?(Sr=new TextEncoder,e=>Sr.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Sr;const Cr=(e,...t)=>{try{return!!e(...t)}catch(gh){return!1}},Rr=Ir&&Cr((()=>{let e=!1;const t=new Request(Gt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Or=Ir&&Cr((()=>Ct.isReadableStream(new Response("").body))),Ar={stream:Or&&(e=>e.body)};var Pr;kr&&(Pr=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Ar[e]&&(Ar[e]=Ct.isFunction(Pr[e])?t=>t[e]():(t,r)=>{throw new Rt(`Response type '${e}' is not supported`,Rt.ERR_NOT_SUPPORT,r)})})));const Nr=async(e,t)=>{const r=Ct.toFiniteNumber(e.getContentLength());return null==r?(async e=>null==e?0:Ct.isBlob(e)?e.size:Ct.isSpecCompliantForm(e)?(await new Request(e).arrayBuffer()).byteLength:Ct.isArrayBufferView(e)||Ct.isArrayBuffer(e)?e.byteLength:(Ct.isURLSearchParams(e)&&(e+=""),Ct.isString(e)?(await Tr(e)).byteLength:void 0))(t):r},xr={http:null,xhr:yr,fetch:kr&&(async e=>{let{url:t,method:r,data:n,signal:i,cancelToken:o,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:l,headers:u,withCredentials:d="same-origin",fetchOptions:h}=vr(e);l=l?(l+"").toLowerCase():"text";let p,f,[m,g]=i||o||s?wr([i,o],s):[];const _=()=>{!p&&setTimeout((()=>{m&&m.unsubscribe()})),p=!0};let v;try{if(c&&Rr&&"get"!==r&&"head"!==r&&0!==(v=await Nr(u,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(Ct.isFormData(n)&&(e=r.headers.get("content-type"))&&u.setContentType(e),r.body){const[e,t]=dr(v,ur(hr(c)));n=Er(r.body,65536,e,t,Tr)}}Ct.isString(d)||(d=d?"include":"omit"),f=new Request(t,{...h,signal:m,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:d});let i=await fetch(f);const o=Or&&("stream"===l||"response"===l);if(Or&&(a||o)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=Ct.toFiniteNumber(i.headers.get("content-length")),[r,n]=a&&dr(t,ur(hr(a),!0))||[];i=new Response(Er(i.body,65536,r,(()=>{n&&n(),o&&_()}),Tr),e)}l=l||"text";let s=await Ar[Ct.findKey(Ar,l)||"text"](i,e);return!o&&_(),g&&g(),await new Promise(((t,r)=>{lr(t,r,{data:s,headers:or.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:f})}))}catch(y){if(_(),y&&"TypeError"===y.name&&/fetch/i.test(y.message))throw Object.assign(new Rt("Network Error",Rt.ERR_NETWORK,e,f),{cause:y.cause||y});throw Rt.from(y,y&&y.code,e,f)}})};Ct.forEach(xr,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(gh){}Object.defineProperty(e,"adapterName",{value:t})}}));const Lr=e=>`- ${e}`,Dr=e=>Ct.isFunction(e)||null===e||!1===e,Mr=e=>{e=Ct.isArray(e)?e:[e];const{length:t}=e;let r,n;const i={};for(let o=0;o<t;o++){let t;if(r=e[o],n=r,!Dr(r)&&(n=xr[(t=String(r)).toLowerCase()],void 0===n))throw new Rt(`Unknown adapter '${t}'`);if(n)break;i[t||"#"+o]=n}if(!n){const e=Object.entries(i).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new Rt("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Lr).join("\n"):" "+Lr(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function Ur(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new cr(null,e)}function jr(e){Ur(e),e.headers=or.from(e.headers),e.data=sr.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Mr(e.adapter||Xt.adapter)(e).then((function(t){return Ur(e),t.data=sr.call(e,e.transformResponse,t),t.headers=or.from(t.headers),t}),(function(t){return ar(t)||(Ur(e),t&&t.response&&(t.response.data=sr.call(e,e.transformResponse,t.response),t.response.headers=or.from(t.response.headers))),Promise.reject(t)}))}const Fr="1.7.4",Br={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Br[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const zr={};Br.transitional=function(e,t,r){function n(e,t){return"[Axios v1.7.4] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,o)=>{if(!1===e)throw new Rt(n(i," has been removed"+(t?" in "+t:"")),Rt.ERR_DEPRECATED);return t&&!zr[i]&&(zr[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,o)}};const Hr={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Rt("options must be an object",Rt.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const o=n[i],s=t[o];if(s){const t=e[o],r=void 0===t||s(t,o,e);if(!0!==r)throw new Rt("option "+o+" must be "+r,Rt.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new Rt("Unknown option "+o,Rt.ERR_BAD_OPTION)}},validators:Br},Vr=Hr.validators;class $r{constructor(e){this.defaults=e,this.interceptors={request:new zt,response:new zt}}async request(e,t){try{return await this._request(e,t)}catch(r){if(r instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{r.stack?t&&!String(r.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(r.stack+="\n"+t):r.stack=t}catch(gh){}}throw r}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=_r(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:i}=t;void 0!==r&&Hr.assertOptions(r,{silentJSONParsing:Vr.transitional(Vr.boolean),forcedJSONParsing:Vr.transitional(Vr.boolean),clarifyTimeoutError:Vr.transitional(Vr.boolean)},!1),null!=n&&(Ct.isFunction(n)?t.paramsSerializer={serialize:n}:Hr.assertOptions(n,{encode:Vr.function,serialize:Vr.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&Ct.merge(i.common,i[t.method]);i&&Ct.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=or.concat(o,i);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let u,d=0;if(!a){const e=[jr.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,c),u=e.length,l=Promise.resolve(t);d<u;)l=l.then(e[d++],e[d++]);return l}u=s.length;let h=t;for(d=0;d<u;){const e=s[d++],t=s[d++];try{h=e(h)}catch(p){t.call(this,p);break}}try{l=jr.call(this,h)}catch(p){return Promise.reject(p)}for(d=0,u=c.length;d<u;)l=l.then(c[d++],c[d++]);return l}getUri(e){return Bt(mr((e=_r(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}Ct.forEach(["delete","get","head","options"],(function(e){$r.prototype[e]=function(t,r){return this.request(_r(r||{},{method:e,url:t,data:(r||{}).data}))}})),Ct.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,i){return this.request(_r(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}$r.prototype[e]=t(),$r.prototype[e+"Form"]=t(!0)}));const qr=$r;class Wr{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,i){r.reason||(r.reason=new cr(e,n,i),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Wr((function(t){e=t})),cancel:e}}}const Kr=Wr;const Jr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Jr).forEach((([e,t])=>{Jr[t]=e}));const Gr=Jr;const Yr=function e(t){const r=new qr(t),n=Ue(qr.prototype.request,r);return Ct.extend(n,qr.prototype,r,{allOwnKeys:!0}),Ct.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(_r(t,r))},n}(Xt);Yr.Axios=qr,Yr.CanceledError=cr,Yr.CancelToken=Kr,Yr.isCancel=ar,Yr.VERSION=Fr,Yr.toFormData=Dt,Yr.AxiosError=Rt,Yr.Cancel=Yr.CanceledError,Yr.all=function(e){return Promise.all(e)},Yr.spread=function(e){return function(t){return e.apply(null,t)}},Yr.isAxiosError=function(e){return Ct.isObject(e)&&!0===e.isAxiosError},Yr.mergeConfig=_r,Yr.AxiosHeaders=or,Yr.formToJSON=e=>Yt(Ct.isHTMLForm(e)?new FormData(e):e),Yr.getAdapter=Mr,Yr.HttpStatusCode=Gr,Yr.default=Yr;const Qr=Yr,Xr=(e,t,r)=>{ve((()=>{const t=Qr.CancelToken.source();return e(t),()=>{r&&r(),t.cancel()}}),t)},Zr=({request:e})=>console.error("[API] Request error:",e),en=({response:e})=>{if(e){const{status:t,request:r,data:n}=e;console.error("[API] Response error:",t,r.responseURL,JSON.stringify(n))}};let tn;const rn=(e,t)=>({headers:{Authorization:`Bearer ${e}`},cancelToken:t.token}),nn=async(e,t)=>{if(!tn)throw new Error("Api has not been initialized");return tn.post("customer-profile/backend/v1.0/workplace-link",{},rn(e,t)).then((e=>204==e.status?{isEstablished:!0}:{isEstablished:!1,linkRequest:null==e?void 0:e.data}))},on=(e,t,r,n)=>{if(!tn)throw new Error("Api has not been initialized");const i={linkRequestId:t,profileId:r};return tn.post("customer-profile/customer-backend/v1.0/workplace-link",i,rn(e,n))};for(var sn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},an={},cn={},ln={byteLength:function(e){var t=mn(e),r=t[0],n=t[1];return 3*(r+n)/4-n},toByteArray:function(e){var t,r,n=mn(e),i=n[0],o=n[1],s=new hn(function(e,t,r){return 3*(t+r)/4-r}(0,i,o)),a=0,c=o>0?i-4:i;for(r=0;r<c;r+=4)t=dn[e.charCodeAt(r)]<<18|dn[e.charCodeAt(r+1)]<<12|dn[e.charCodeAt(r+2)]<<6|dn[e.charCodeAt(r+3)],s[a++]=t>>16&255,s[a++]=t>>8&255,s[a++]=255&t;2===o&&(t=dn[e.charCodeAt(r)]<<2|dn[e.charCodeAt(r+1)]>>4,s[a++]=255&t);1===o&&(t=dn[e.charCodeAt(r)]<<10|dn[e.charCodeAt(r+1)]<<4|dn[e.charCodeAt(r+2)]>>2,s[a++]=t>>8&255,s[a++]=255&t);return s},fromByteArray:function(e){for(var t,r=e.length,n=r%3,i=[],o=16383,s=0,a=r-n;s<a;s+=o)i.push(gn(e,s,s+o>a?a:s+o));1===n?(t=e[r-1],i.push(un[t>>2]+un[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],i.push(un[t>>10]+un[t>>4&63]+un[t<<2&63]+"="));return i.join("")}},un=[],dn=[],hn="undefined"!=typeof Uint8Array?Uint8Array:Array,pn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fn=0;fn<64;++fn)un[fn]=pn[fn],dn[pn.charCodeAt(fn)]=fn;function mn(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function gn(e,t,r){for(var n,i,o=[],s=t;s<r;s+=3)n=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(un[(i=n)>>18&63]+un[i>>12&63]+un[i>>6&63]+un[63&i]);return o.join("")}dn["-".charCodeAt(0)]=62,dn["_".charCodeAt(0)]=63;var _n={};Object.defineProperty(_n,"__esModule",{value:!0}),_n.AppAuthError=void 0;var vn=function(e,t){this.message=e,this.extras=t};_n.AppAuthError=vn,Object.defineProperty(cn,"__esModule",{value:!0});var yn=cn.DefaultCrypto=cn.textEncodeLite=cn.urlSafe=cn.bufferToString=void 0,wn=ln,bn=_n,En="undefined"!=typeof window&&!!window.crypto,kn=En&&!!window.crypto.subtle,In="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function Tn(e){for(var t=[],r=0;r<e.byteLength;r+=1){var n=e[r]%62;t.push(In[n])}return t.join("")}function Sn(e){return wn.fromByteArray(new Uint8Array(e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Cn(e){for(var t=new ArrayBuffer(e.length),r=new Uint8Array(t),n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}cn.bufferToString=Tn,cn.urlSafe=Sn,cn.textEncodeLite=Cn;var Rn=function(){function e(){}return e.prototype.generateRandom=function(e){var t=new Uint8Array(e);if(En)window.crypto.getRandomValues(t);else for(var r=0;r<e;r+=1)t[r]=62*Math.random()|0;return Tn(t)},e.prototype.deriveChallenge=function(e){return e.length<43||e.length>128?Promise.reject(new bn.AppAuthError("Invalid code length.")):kn?new Promise((function(t,r){crypto.subtle.digest("SHA-256",Cn(e)).then((function(e){return t(Sn(new Uint8Array(e)))}),(function(e){return r(e)}))})):Promise.reject(new bn.AppAuthError("window.crypto.subtle is unavailable."))},e}();yn=cn.DefaultCrypto=Rn;var On={},An={};Object.defineProperty(An,"__esModule",{value:!0}),An.IS_PROFILE=An.IS_LOG=void 0,An.IS_LOG=!0,An.IS_PROFILE=!1;var Pn=sn&&sn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(On,"__esModule",{value:!0}),On.profile=On.log=void 0;var Nn=An;function xn(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];Nn.IS_LOG&&((t?t.length:0)>0?console.log.apply(console,Pn([e],t)):console.log(e))}On.log=xn;var Ln="undefined"!=typeof window&&!!window.performance&&!!console.profile;On.profile=function(e,t,r){return Nn.IS_PROFILE?function(e,t,r){var n=r.value,i=n.name;i||(i="anonymous function");r.value=Ln?function(e){console.profile(i);var t=window.performance.now(),r=n.call.apply(n,Pn([this||window],e)),o=window.performance.now()-t;return console.log(i+" took "+o+" ms"),console.profileEnd(),r}:function(e){xn("Profile start "+i);var t=Date.now(),r=n.call.apply(n,Pn([this||window],e)),o=Date.now()-t;return xn("Profile end "+i+" took "+o+" ms."),r};return r}(0,0,r):r},Object.defineProperty(an,"__esModule",{value:!0});var Dn=an.AuthorizationRequest=void 0,Mn=cn,Un=On,jn=function(){function e(t,r,n){void 0===r&&(r=new Mn.DefaultCrypto),void 0===n&&(n=!0),this.crypto=r,this.usePkce=n,this.clientId=t.client_id,this.redirectUri=t.redirect_uri,this.scope=t.scope,this.responseType=t.response_type||e.RESPONSE_TYPE_CODE,this.state=t.state||function(e){return e.generateRandom(10)}(r),this.extras=t.extras,this.internal=t.internal}return e.prototype.setupCodeVerifier=function(){var e=this;if(this.usePkce){var t=this.crypto.generateRandom(128);return this.crypto.deriveChallenge(t).catch((function(e){Un.log("Unable to generate PKCE challenge. Not using PKCE",e)})).then((function(r){r&&(e.internal=e.internal||{},e.internal.code_verifier=t,e.extras=e.extras||{},e.extras.code_challenge=r,e.extras.code_challenge_method="S256")}))}return Promise.resolve()},e.prototype.toJson=function(){var e=this;return this.setupCodeVerifier().then((function(){return{response_type:e.responseType,client_id:e.clientId,redirect_uri:e.redirectUri,scope:e.scope,state:e.state,extras:e.extras,internal:e.internal}}))},e.RESPONSE_TYPE_TOKEN="token",e.RESPONSE_TYPE_CODE="code",e}();Dn=an.AuthorizationRequest=jn;var Fn={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthorizationRequestHandler=e.BUILT_IN_PARAMETERS=e.AuthorizationNotifier=void 0;var t=On,r=function(){function e(){this.listener=null}return e.prototype.setAuthorizationListener=function(e){this.listener=e},e.prototype.onAuthorizationComplete=function(e,t,r){this.listener&&this.listener(e,t,r)},e}();e.AuthorizationNotifier=r,e.BUILT_IN_PARAMETERS=["redirect_uri","client_id","response_type","state","scope"];var n=function(){function r(e,t){this.utils=e,this.crypto=t,this.notifier=null}return r.prototype.buildRequestUrl=function(t,r){var n={redirect_uri:r.redirectUri,client_id:r.clientId,response_type:r.responseType,state:r.state,scope:r.scope};if(r.extras)for(var i in r.extras)r.extras.hasOwnProperty(i)&&e.BUILT_IN_PARAMETERS.indexOf(i)<0&&(n[i]=r.extras[i]);var o=this.utils.stringify(n);return t.authorizationEndpoint+"?"+o},r.prototype.completeAuthorizationRequestIfPossible=function(){var e=this;return t.log("Checking to see if there is an authorization response to be delivered."),this.notifier||t.log("Notifier is not present on AuthorizationRequest handler.\n No delivery of result will be possible"),this.completeAuthorizationRequest().then((function(r){r||t.log("No result is available yet."),r&&e.notifier&&e.notifier.onAuthorizationComplete(r.request,r.response,r.error)}))},r.prototype.setAuthorizationNotifier=function(e){return this.notifier=e,this},r}();e.AuthorizationRequestHandler=n}(Fn);var Bn={},zn={};Object.defineProperty(zn,"__esModule",{value:!0}),zn.AuthorizationError=zn.AuthorizationResponse=void 0;var Hn=function(){function e(e){this.code=e.code,this.state=e.state}return e.prototype.toJson=function(){return{code:this.code,state:this.state}},e}();zn.AuthorizationResponse=Hn;var Vn=function(){function e(e){this.error=e.error,this.errorDescription=e.error_description,this.errorUri=e.error_uri,this.state=e.state}return e.prototype.toJson=function(){return{error:this.error,error_description:this.errorDescription,error_uri:this.errorUri,state:this.state}},e}();zn.AuthorizationError=Vn;var $n={};Object.defineProperty($n,"__esModule",{value:!0}),$n.BasicQueryStringUtils=void 0;var qn=function(){function e(){}return e.prototype.parse=function(e,t){return t?this.parseQueryString(e.hash):this.parseQueryString(e.search)},e.prototype.parseQueryString=function(e){for(var t={},r=(e=e.trim().replace(/^(\?|#|&)/,"")).split("&"),n=0;n<r.length;n+=1){var i=r[n].split("=");if(i.length>=2){var o=decodeURIComponent(i.shift()),s=i.length>0?i.join("="):null;s&&(t[o]=decodeURIComponent(s))}}return t},e.prototype.stringify=function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&e[r]&&t.push(encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t.join("&")},e}();$n.BasicQueryStringUtils=qn;var Wn,Kn={},Jn=sn&&sn.__extends||(Wn=function(e,t){return(Wn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Wn(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.LocalStorageBackend=Kn.StorageBackend=void 0;var Gn=function(){};Kn.StorageBackend=Gn;var Yn=function(e){function t(t){var r=e.call(this)||this;return r.storage=t||window.localStorage,r}return Jn(t,e),t.prototype.getItem=function(e){var t=this;return new Promise((function(r,n){var i=t.storage.getItem(e);r(i||null)}))},t.prototype.removeItem=function(e){var t=this;return new Promise((function(r,n){t.storage.removeItem(e),r()}))},t.prototype.clear=function(){var e=this;return new Promise((function(t,r){e.storage.clear(),t()}))},t.prototype.setItem=function(e,t){var r=this;return new Promise((function(n,i){r.storage.setItem(e,t),n()}))},t}(Gn);Kn.LocalStorageBackend=Yn;var Qn=sn&&sn.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Bn,"__esModule",{value:!0});var Xn=Bn.RedirectRequestHandler=void 0,Zn=an,ei=zn,ti=cn,ri=On,ni=$n,ii=Kn,oi=function(e){return e+"_appauth_authorization_request"},si=function(e){return e+"_appauth_authorization_service_configuration"},ai="appauth_current_authorization_request",ci=function(e){function t(t,r,n,i){void 0===t&&(t=new ii.LocalStorageBackend),void 0===r&&(r=new ni.BasicQueryStringUtils),void 0===n&&(n=window.location),void 0===i&&(i=new ti.DefaultCrypto);var o=e.call(this,r,i)||this;return o.storageBackend=t,o.locationLike=n,o}return Qn(t,e),t.prototype.performAuthorizationRequest=function(e,t){var r=this,n=this.crypto.generateRandom(10);Promise.all([this.storageBackend.setItem(ai,n),t.toJson().then((function(e){return r.storageBackend.setItem(oi(n),JSON.stringify(e))})),this.storageBackend.setItem(si(n),JSON.stringify(e.toJson()))]).then((function(){var n=r.buildRequestUrl(e,t);ri.log("Making a request to ",t,n),r.locationLike.assign(n)}))},t.prototype.completeAuthorizationRequest=function(){var e=this;return this.storageBackend.getItem(ai).then((function(t){return t?e.storageBackend.getItem(oi(t)).then((function(e){return JSON.parse(e)})).then((function(e){return new Zn.AuthorizationRequest(e)})).then((function(r){var n=""+e.locationLike.origin+e.locationLike.pathname,i=e.utils.parse(e.locationLike,!0),o=i.state,s=i.code,a=i.error;ri.log("Potential authorization request ",n,i,o,s,a);var c=o===r.state,l=null,u=null;if(c){if(a){var d=i.error_uri,h=i.error_description;u=new ei.AuthorizationError({error:a,error_description:h,error_uri:d,state:o})}else l=new ei.AuthorizationResponse({code:s,state:o});return Promise.all([e.storageBackend.removeItem(ai),e.storageBackend.removeItem(oi(t)),e.storageBackend.removeItem(si(t))]).then((function(){return ri.log("Delivering authorization response"),{request:r,response:l,error:u}}))}return ri.log("Mismatched request (state and request_uri) dont match."),Promise.resolve(null)})):null}))},t}(Fn.AuthorizationRequestHandler);Xn=Bn.RedirectRequestHandler=ci;var li={},ui={},di=sn&&sn.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ui,"__esModule",{value:!0}),ui.TestRequestor=gi=ui.FetchRequestor=ui.JQueryRequestor=ui.Requestor=void 0;var hi=_n,pi=function(){};ui.Requestor=pi;var fi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return di(t,e),t.prototype.xhr=function(e){var t=$.ajax(e);return new Promise((function(e,r){t.then((function(t,r,n){e(t)}),(function(e,t,n){r(new hi.AppAuthError(n))}))}))},t}(pi);ui.JQueryRequestor=fi;var mi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return di(t,e),t.prototype.xhr=function(e){if(!e.url)return Promise.reject(new hi.AppAuthError("A URL must be provided."));var t=new URL(e.url),r={};(r.method=e.method,r.mode="cors",e.data)&&(e.method&&"POST"===e.method.toUpperCase()?r.body=e.data:new URLSearchParams(e.data).forEach((function(e,r){t.searchParams.append(r,e)})));if(r.headers={},e.headers)for(var n in e.headers)e.headers.hasOwnProperty(n)&&(r.headers[n]=e.headers[n]);var i=e.dataType&&"json"===e.dataType.toLowerCase();return i&&(r.headers.Accept="application/json, text/javascript, */*; q=0.01"),fetch(t.toString(),r).then((function(e){if(e.status>=200&&e.status<300){var t=e.headers.get("content-type");return i||t&&-1!==t.indexOf("application/json")?e.json():e.text()}return Promise.reject(new hi.AppAuthError(e.status.toString(),e.statusText))}))},t}(pi),gi=ui.FetchRequestor=mi,_i=function(e){function t(t){var r=e.call(this)||this;return r.promise=t,r}return di(t,e),t.prototype.xhr=function(e){return this.promise},t}(pi);ui.TestRequestor=_i,Object.defineProperty(li,"__esModule",{value:!0});var vi=li.AuthorizationServiceConfiguration=void 0,yi=ui,wi=function(){function e(e){this.authorizationEndpoint=e.authorization_endpoint,this.tokenEndpoint=e.token_endpoint,this.revocationEndpoint=e.revocation_endpoint,this.userInfoEndpoint=e.userinfo_endpoint,this.endSessionEndpoint=e.end_session_endpoint}return e.prototype.toJson=function(){return{authorization_endpoint:this.authorizationEndpoint,token_endpoint:this.tokenEndpoint,revocation_endpoint:this.revocationEndpoint,end_session_endpoint:this.endSessionEndpoint,userinfo_endpoint:this.userInfoEndpoint}},e.fetchFromIssuer=function(t,r){var n=t+"/.well-known/openid-configuration";return(r||new yi.JQueryRequestor).xhr({url:n,dataType:"json",method:"GET"}).then((function(t){return new e(t)}))},e}();vi=li.AuthorizationServiceConfiguration=wi;var bi={};Object.defineProperty(bi,"__esModule",{value:!0});var Ei=bi.TokenRequest=bi.GRANT_TYPE_REFRESH_TOKEN=bi.GRANT_TYPE_AUTHORIZATION_CODE=void 0,ki=bi.GRANT_TYPE_AUTHORIZATION_CODE="authorization_code";bi.GRANT_TYPE_REFRESH_TOKEN="refresh_token";var Ii=function(){function e(e){this.clientId=e.client_id,this.redirectUri=e.redirect_uri,this.grantType=e.grant_type,this.code=e.code,this.refreshToken=e.refresh_token,this.extras=e.extras}return e.prototype.toJson=function(){return{grant_type:this.grantType,code:this.code,refresh_token:this.refreshToken,redirect_uri:this.redirectUri,client_id:this.clientId,extras:this.extras}},e.prototype.toStringMap=function(){var e={grant_type:this.grantType,client_id:this.clientId,redirect_uri:this.redirectUri};if(this.code&&(e.code=this.code),this.refreshToken&&(e.refresh_token=this.refreshToken),this.extras)for(var t in this.extras)this.extras.hasOwnProperty(t)&&!e.hasOwnProperty(t)&&(e[t]=this.extras[t]);return e},e}();Ei=bi.TokenRequest=Ii;var Ti={},Si={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TokenError=e.TokenResponse=e.nowInSeconds=void 0;e.nowInSeconds=function(){return Math.round((new Date).getTime()/1e3)};var t=function(){function t(t){this.accessToken=t.access_token,this.tokenType=t.token_type||"bearer",t.expires_in&&(this.expiresIn=parseInt(t.expires_in,10)),this.refreshToken=t.refresh_token,this.scope=t.scope,this.idToken=t.id_token,this.issuedAt=t.issued_at||e.nowInSeconds()}return t.prototype.toJson=function(){var e;return{access_token:this.accessToken,id_token:this.idToken,refresh_token:this.refreshToken,scope:this.scope,token_type:this.tokenType,issued_at:this.issuedAt,expires_in:null===(e=this.expiresIn)||void 0===e?void 0:e.toString()}},t.prototype.isValid=function(t){return void 0===t&&(t=-600),!this.expiresIn||e.nowInSeconds()<this.issuedAt+this.expiresIn+t},t}();e.TokenResponse=t;var r=function(){function e(e){this.error=e.error,this.errorDescription=e.error_description,this.errorUri=e.error_uri}return e.prototype.toJson=function(){return{error:this.error,error_description:this.errorDescription,error_uri:this.errorUri}},e}();e.TokenError=r}(Si),Object.defineProperty(Ti,"__esModule",{value:!0});var Ci=Ti.BaseTokenRequestHandler=void 0,Ri=_n,Oi=$n,Ai=Si,Pi=ui,Ni=function(){function e(e,t){void 0===e&&(e=new Pi.JQueryRequestor),void 0===t&&(t=new Oi.BasicQueryStringUtils),this.requestor=e,this.utils=t}return e.prototype.isTokenResponse=function(e){return void 0===e.error},e.prototype.performRevokeTokenRequest=function(e,t){return this.requestor.xhr({url:e.revocationEndpoint,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},data:this.utils.stringify(t.toStringMap())}).then((function(e){return!0}))},e.prototype.performTokenRequest=function(e,t){var r=this;return this.requestor.xhr({url:e.tokenEndpoint,method:"POST",dataType:"json",headers:{"Content-Type":"application/x-www-form-urlencoded"},data:this.utils.stringify(t.toStringMap())}).then((function(e){return r.isTokenResponse(e)?new Ai.TokenResponse(e):Promise.reject(new Ri.AppAuthError(e.error,new Ai.TokenError(e)))}))},e}();Ci=Ti.BaseTokenRequestHandler=Ni;let xi;const Li=async(e,t)=>{const r=await vi.fetchFromIssuer(e,t);return xi=r,r},Di=async(e,t,r,n,i)=>{const o={};t&&(o.code_verifier=t);const s=new Ei({client_id:n.clientId,redirect_uri:n.redirectUri,grant_type:ki,code:e,refresh_token:void 0,extras:o});return await r.performTokenRequest(i,s)},Mi=e=>{if(e&&e.isValid())return e.accessToken},Ui=async e=>{try{const t=await e.storageBackend.getItem("appauth_current_authorization_request"),r=t&&await e.storageBackend.getItem((e=>`${e}_appauth_authorization_service_configuration`)(t));if(r){const e=JSON.parse(r);xi=new vi(e)}return!0}catch{return!1}};p.bind({g:1});const ji=f("span")([{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"}]),Fi=(function(){const e=f.call({g:1},"div").apply(null,arguments);return function(t){return e(t),null}})`
2
2
  @import url('//fonts.googleapis.com/css?family=Poppins');
3
3
 
4
4
  workplace-link {
5
5
  font-family: 'Poppins', sans-serif;
6
6
  }
7
- `,si=f("div")([{marginLeft:"1rem",marginRight:"1rem",display:"flex",gridTemplateColumns:"repeat(1, minmax(0, 1fr))",flexDirection:"column",alignItems:"center",justifyContent:"center",borderRadius:"0.25rem","@media (min-width: 768px)":{margin:"auto"}},{minHeight:"25rem"}]),ai=f("div")([{position:"relative",height:"0.5rem",width:"12rem"}]),ci=f("div")`
7
+ `,Bi=f("div")([{marginLeft:"1rem",marginRight:"1rem",display:"flex",gridTemplateColumns:"repeat(1, minmax(0, 1fr))",flexDirection:"column",alignItems:"center",justifyContent:"center",borderRadius:"0.25rem","@media (min-width: 768px)":{margin:"auto"}},{minHeight:"25rem"}]),zi=f("div")([{position:"relative",height:"0.5rem",width:"12rem"}]),Hi=f("div")`
8
8
  box-sizing: border-box;
9
9
  overflow: hidden;
10
10
  position: absolute;
@@ -57,7 +57,7 @@ let e,t,r,n={data:""},i=e=>"object"==typeof window?((e?e.querySelector("#_goober
57
57
  left: calc(50% - -6rem);
58
58
  }
59
59
  }
60
- `;var li=0;function ui(e,t,r,n,i,o){var s,a,c={};for(a in t)"ref"==a?s=t[a]:c[a]=t[a];var l={type:e,props:c,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--li,__source:i,__self:o};if("function"==typeof e&&(s=e.defaultProps))for(a in s)void 0===c[a]&&(c[a]=s[a]);return g.vnode&&g.vnode(l),l}const di=({isActive:e,className:t})=>ui(si,{children:ui(ai,{className:t,children:[e&&ui(ii,{role:"alert",children:"Loading..."}),ui(ci,{className:e?"is-active":"","aria-hidden":!0})]})}),hi=f("div")`
60
+ `;var Vi=0;function $i(e,t,r,n,i,o){var s,a,c={};for(a in t)"ref"==a?s=t[a]:c[a]=t[a];var l={type:e,props:c,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--Vi,__source:i,__self:o};if("function"==typeof e&&(s=e.defaultProps))for(a in s)void 0===c[a]&&(c[a]=s[a]);return g.vnode&&g.vnode(l),l}const qi=({isActive:e,className:t})=>$i(Bi,{children:$i(zi,{className:t,children:[e&&$i(ji,{role:"alert",children:"Loading..."}),$i(Hi,{className:e?"is-active":"","aria-hidden":!0})]})}),Wi=f("div")`
61
61
  ${()=>({margin:"2rem",display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center"})}
62
62
 
63
63
  font-family: 'Poppins', sans-serif;
@@ -78,24 +78,24 @@ let e,t,r,n={data:""},i=e=>"object"==typeof window?((e?e.querySelector("#_goober
78
78
  p {
79
79
  ${()=>({marginTop:"0px",marginBottom:"0px",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400"})}
80
80
  }
81
- `,pi=f("div")`
81
+ `,Ki=f("div")`
82
82
  ${()=>({marginTop:"2.5rem",marginBottom:"2.5rem"})}
83
- `,fi=f("div")`
83
+ `,Ji=f("div")`
84
84
  ${()=>({gridTemplateColumns:"repeat(2, minmax(0, 1fr))"})}
85
- `,mi=f("img")`
85
+ `,Gi=f("img")`
86
86
  ${()=>({margin:"0.5rem",display:"inline-block",height:"2rem"})}
87
- `,gi=f("img")`
87
+ `,Yi=f("img")`
88
88
  ${()=>({margin:"0.5rem",display:"inline-block",height:"3rem"})}
89
- `,_i=f("a")``,vi=f("img")`
89
+ `,Qi=f("a")``,Xi=f("img")`
90
90
  ${()=>({marginTop:"0.5rem",marginBottom:"0.5rem",height:"6rem"})}
91
- `;function yi(e,t){for(var r in t)e[r]=t[r];return e}function wi(e,t){for(var r in e)if("__source"!==r&&!(r in t))return!0;for(var n in t)if("__source"!==n&&e[n]!==t[n])return!0;return!1}function bi(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function Ei(e){this.props=e}function ki(e,t){function r(e){var r=this.props.ref,n=r==e.ref;return!n&&r&&(r.call?r(null):r.current=null),t?!t(this.props,e)||!n:wi(this.props,e)}function n(t){return this.shouldComponentUpdate=r,O(e,t)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(Ei.prototype=new x).isPureReactComponent=!0,Ei.prototype.shouldComponentUpdate=function(e,t){return wi(this.props,e)||wi(this.state,t)};var Ii=g.__b;g.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ii&&Ii(e)};var Ti="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ci(e){function t(t){var r=yi({},t);return delete r.ref,e(r,t.ref||null)}return t.$$typeof=Ti,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Si=function(e,t){return null==e?null:B(B(e).map(t))},Ri={map:Si,forEach:Si,count:function(e){return e?B(e).length:0},only:function(e){var t=B(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:B},Oi=g.__e;g.__e=function(e,t,r,n){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=r.__e,t.__k=r.__k),i.__c(e,t);Oi(e,t,r,n)};var Ai=g.unmount;function Pi(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=yi({},e)).__c&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Pi(e,t,r)}))),e}function Ni(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Ni(e,t,r)})),e.__c&&e.__c.__P===t&&(e.__e&&r.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=r)),e}function xi(){this.__u=0,this.t=null,this.__b=null}function Li(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Di(e){var t,r,n;function i(i){if(t||(t=e()).then((function(e){r=e.default||e}),(function(e){n=e})),n)throw n;if(!r)throw t;return O(r,i)}return i.displayName="Lazy",i.__f=!0,i}function Mi(){this.u=null,this.o=null}g.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Ai&&Ai(e)},(xi.prototype=new x).__c=function(e,t){var r=t.__c,n=this;null==n.t&&(n.t=[]),n.t.push(r);var i=Li(n.__v),o=!1,s=function(){o||(o=!0,r.__R=null,i?i(a):a())};r.__R=s;var a=function(){if(! --n.__u){if(n.state.__a){var e=n.state.__a;n.__v.__k[0]=Ni(e,e.__c.__P,e.__c.__O)}var t;for(n.setState({__a:n.__b=null});t=n.t.pop();)t.forceUpdate()}},c=!0===t.__h;n.__u++||c||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(s,s)},xi.prototype.componentWillUnmount=function(){this.t=[]},xi.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=Pi(this.__b,r,n.__O=n.__P)}this.__b=null}var i=t.__a&&O(N,null,e.fallback);return i&&(i.__h=null),[O(N,null,t.__a?null:e.children),i]};var Ui=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function ji(e){return this.getChildContext=function(){return e.context},e.children}function Fi(e){var t=this,r=e.i;t.componentWillUnmount=function(){Z(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,r){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),Z(O(ji,{context:t.context},e.__v),t.l)}function Bi(e,t){var r=O(Fi,{__v:e,i:t});return r.containerInfo=t,r}(Mi.prototype=new x).__a=function(e){var t=this,r=Li(t.__v),n=t.o.get(e);return n[0]++,function(i){var o=function(){t.props.revealOrder?(n.push(i),Ui(t,e,n)):i()};r?r(o):o()}},Mi.prototype.render=function(e){this.u=null,this.o=new Map;var t=B(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},Mi.prototype.componentDidUpdate=Mi.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,r){Ui(e,r,t)}))};var zi="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Hi=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Vi=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,$i=/[A-Z0-9]/g,qi="undefined"!=typeof document,Wi=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function Ki(e,t,r){return null==t.__k&&(t.textContent=""),Z(e,t),"function"==typeof r&&r(),e?e.__c:null}function Ji(e,t,r){return ee(e,t),"function"==typeof r&&r(),e?e.__c:null}x.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(x.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Gi=g.event;function Yi(){}function Qi(){return this.cancelBubble}function Xi(){return this.defaultPrevented}g.event=function(e){return Gi&&(e=Gi(e)),e.persist=Yi,e.isPropagationStopped=Qi,e.isDefaultPrevented=Xi,e.nativeEvent=e};var Zi,eo={enumerable:!1,configurable:!0,get:function(){return this.class}},to=g.vnode;g.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,r=e.type,n={};for(var i in t){var o=t[i];if(!("value"===i&&"defaultValue"in t&&null==o||qi&&"children"===i&&"noscript"===r||"class"===i||"className"===i)){var s=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===o?o="":"ondoubleclick"===s?i="ondblclick":"onchange"!==s||"input"!==r&&"textarea"!==r||Wi(t.type)?"onfocus"===s?i="onfocusin":"onblur"===s?i="onfocusout":Vi.test(i)?i=s:-1===r.indexOf("-")&&Hi.test(i)?i=i.replace($i,"-$&").toLowerCase():null===o&&(o=void 0):s=i="oninput","oninput"===s&&n[i=s]&&(i="oninputCapture"),n[i]=o}}"select"==r&&n.multiple&&Array.isArray(n.value)&&(n.value=B(t.children).forEach((function(e){e.props.selected=-1!=n.value.indexOf(e.props.value)}))),"select"==r&&null!=n.defaultValue&&(n.value=B(t.children).forEach((function(e){e.props.selected=n.multiple?-1!=n.defaultValue.indexOf(e.props.value):n.defaultValue==e.props.value}))),t.class&&!t.className?(n.class=t.class,Object.defineProperty(n,"className",eo)):(t.className&&!t.class||t.class&&t.className)&&(n.class=n.className=t.className),e.props=n}(e),e.$$typeof=zi,to&&to(e)};var ro=g.__r;g.__r=function(e){ro&&ro(e),Zi=e.__c};var no=g.diffed;g.diffed=function(e){no&&no(e);var t=e.props,r=e.__e;null!=r&&"textarea"===e.type&&"value"in t&&t.value!==r.value&&(r.value=null==t.value?"":t.value),Zi=null};var io={ReactCurrentDispatcher:{current:{readContext:function(e){return Zi.__n[e.__c].props.value}}}};function oo(e){return O.bind(null,e)}function so(e){return!!e&&e.$$typeof===zi}function ao(e){return so(e)&&e.type===N}function co(e){return so(e)?te.apply(null,arguments):e}function lo(e){return!!e.__k&&(Z(null,e),!0)}function uo(e){return e&&(e.base||1===e.nodeType&&e)||null}var ho=function(e,t){return e(t)},po=function(e,t){return e(t)},fo=N;function mo(e){e()}function go(e){return e}function _o(){return[!1,mo]}var vo=ye,yo=so;function wo(e,t){var r=t(),n=ge({h:{__:r,v:t}}),i=n[0].h,o=n[1];return ye((function(){i.__=r,i.v=t,bi(i.__,t())||o({h:i})}),[e,r,t]),ve((function(){return bi(i.__,i.v())||o({h:i}),e((function(){bi(i.__,i.v())||o({h:i})}))}),[e]),r}var bo={useState:ge,useId:Ce,useReducer:_e,useEffect:ve,useLayoutEffect:ye,useInsertionEffect:vo,useTransition:_o,useDeferredValue:go,useSyncExternalStore:wo,startTransition:mo,useRef:we,useImperativeHandle:be,useMemo:Ee,useCallback:ke,useContext:Ie,useDebugValue:Te,version:"17.0.2",Children:Ri,render:Ki,hydrate:Ji,unmountComponentAtNode:lo,createPortal:Bi,createElement:O,createContext:re,createFactory:oo,cloneElement:co,createRef:P,Fragment:N,isValidElement:so,isElement:yo,isFragment:ao,findDOMNode:uo,Component:x,PureComponent:Ei,memo:ki,forwardRef:Ci,flushSync:po,unstable_batchedUpdates:ho,StrictMode:fo,Suspense:xi,SuspenseList:Mi,lazy:Di,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:io};const Eo=Object.freeze(Object.defineProperty({__proto__:null,Children:Ri,Component:x,Fragment:N,PureComponent:Ei,StrictMode:fo,Suspense:xi,SuspenseList:Mi,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:io,cloneElement:co,createContext:re,createElement:O,createFactory:oo,createPortal:Bi,createRef:P,default:bo,findDOMNode:uo,flushSync:po,forwardRef:Ci,hydrate:Ji,isElement:yo,isFragment:ao,isValidElement:so,lazy:Di,memo:ki,render:Ki,startTransition:mo,unmountComponentAtNode:lo,unstable_batchedUpdates:ho,useCallback:ke,useContext:Ie,useDebugValue:Te,useDeferredValue:go,useEffect:ve,useErrorBoundary:function(e){var t=me(ne++,10),r=ge();return t.__=e,ie.componentDidCatch||(ie.componentDidCatch=function(e,n){t.__&&t.__(e,n),r[1](e)}),[r[0],function(){r[1](void 0)}]},useId:Ce,useImperativeHandle:be,useInsertionEffect:vo,useLayoutEffect:ye,useMemo:Ee,useReducer:_e,useRef:we,useState:ge,useSyncExternalStore:wo,useTransition:_o,version:"17.0.2"},Symbol.toStringTag,{value:"Module"}));var ko,Io,To=Object.defineProperty,Co=Object.getOwnPropertySymbols,So=Object.prototype.hasOwnProperty,Ro=Object.prototype.propertyIsEnumerable,Oo=(e,t,r)=>t in e?To(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ao=(e,t)=>{for(var r in t||(t={}))So.call(t,r)&&Oo(e,r,t[r]);if(Co)for(var r of Co(t))Ro.call(t,r)&&Oo(e,r,t[r]);return e},Po=(e,t)=>{var r={};for(var n in e)So.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&Co)for(var n of Co(e))t.indexOf(n)<0&&Ro.call(e,n)&&(r[n]=e[n]);return r};(e=>{const t=class{constructor(e,r,n,i){if(this.version=e,this.errorCorrectionLevel=r,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(i<-1||i>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let s=[];for(let t=0;t<this.size;t++)s.push(!1);for(let t=0;t<this.size;t++)this.modules.push(s.slice()),this.isFunction.push(s.slice());this.drawFunctionPatterns();const a=this.addEccAndInterleave(n);if(this.drawCodewords(a),-1==i){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const r=this.getPenaltyScore();r<e&&(i=t,e=r),this.applyMask(t)}}o(0<=i&&i<=7),this.mask=i,this.applyMask(i),this.drawFormatBits(i),this.isFunction=[]}static encodeText(r,n){const i=e.QrSegment.makeSegments(r);return t.encodeSegments(i,n)}static encodeBinary(r,n){const i=e.QrSegment.makeBytes(r);return t.encodeSegments([i],n)}static encodeSegments(e,r,i=1,s=40,c=-1,l=!0){if(!(t.MIN_VERSION<=i&&i<=s&&s<=t.MAX_VERSION)||c<-1||c>7)throw new RangeError("Invalid value");let u,d;for(u=i;;u++){const n=8*t.getNumDataCodewords(u,r),i=a.getTotalBits(e,u);if(i<=n){d=i;break}if(u>=s)throw new RangeError("Data too long")}for(const n of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])l&&d<=8*t.getNumDataCodewords(u,n)&&(r=n);let h=[];for(const t of e){n(t.mode.modeBits,4,h),n(t.numChars,t.mode.numCharCountBits(u),h);for(const e of t.getData())h.push(e)}o(h.length==d);const p=8*t.getNumDataCodewords(u,r);o(h.length<=p),n(0,Math.min(4,p-h.length),h),n(0,(8-h.length%8)%8,h),o(h.length%8==0);for(let t=236;h.length<p;t^=253)n(t,8,h);let f=[];for(;8*f.length<h.length;)f.push(0);return h.forEach(((e,t)=>f[t>>>3]|=e<<7-(7&t))),new t(u,r,f,c)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let r=0;r<this.size;r++)this.setFunctionModule(6,r,r%2==0),this.setFunctionModule(r,6,r%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let r=0;r<t;r++)for(let n=0;n<t;n++)0==r&&0==n||0==r&&n==t-1||r==t-1&&0==n||this.drawAlignmentPattern(e[r],e[n]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let r=t;for(let i=0;i<10;i++)r=r<<1^1335*(r>>>9);const n=21522^(t<<10|r);o(n>>>15==0);for(let o=0;o<=5;o++)this.setFunctionModule(8,o,i(n,o));this.setFunctionModule(8,7,i(n,6)),this.setFunctionModule(8,8,i(n,7)),this.setFunctionModule(7,8,i(n,8));for(let o=9;o<15;o++)this.setFunctionModule(14-o,8,i(n,o));for(let o=0;o<8;o++)this.setFunctionModule(this.size-1-o,8,i(n,o));for(let o=8;o<15;o++)this.setFunctionModule(8,this.size-15+o,i(n,o));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let r=0;r<12;r++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;o(t>>>18==0);for(let r=0;r<18;r++){const e=i(t,r),n=this.size-11+r%3,o=Math.floor(r/3);this.setFunctionModule(n,o,e),this.setFunctionModule(o,n,e)}}drawFinderPattern(e,t){for(let r=-4;r<=4;r++)for(let n=-4;n<=4;n++){const i=Math.max(Math.abs(n),Math.abs(r)),o=e+n,s=t+r;0<=o&&o<this.size&&0<=s&&s<this.size&&this.setFunctionModule(o,s,2!=i&&4!=i)}}drawAlignmentPattern(e,t){for(let r=-2;r<=2;r++)for(let n=-2;n<=2;n++)this.setFunctionModule(e+n,t+r,1!=Math.max(Math.abs(n),Math.abs(r)))}setFunctionModule(e,t,r){this.modules[t][e]=r,this.isFunction[t][e]=!0}addEccAndInterleave(e){const r=this.version,n=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(r,n))throw new RangeError("Invalid argument");const i=t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][r],s=t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][r],a=Math.floor(t.getNumRawDataModules(r)/8),c=i-a%i,l=Math.floor(a/i);let u=[];const d=t.reedSolomonComputeDivisor(s);for(let o=0,p=0;o<i;o++){let r=e.slice(p,p+l-s+(o<c?0:1));p+=r.length;const n=t.reedSolomonComputeRemainder(r,d);o<c&&r.push(0),u.push(r.concat(n))}let h=[];for(let t=0;t<u[0].length;t++)u.forEach(((e,r)=>{(t!=l-s||r>=c)&&h.push(e[t])}));return o(h.length==a),h}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let r=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let n=0;n<this.size;n++)for(let o=0;o<2;o++){const s=t-o,a=0==(t+1&2)?this.size-1-n:n;!this.isFunction[a][s]&&r<8*e.length&&(this.modules[a][s]=i(e[r>>>3],7-(7&r)),r++)}}o(r==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let r=0;r<this.size;r++){let n;switch(e){case 0:n=(r+t)%2==0;break;case 1:n=t%2==0;break;case 2:n=r%3==0;break;case 3:n=(r+t)%3==0;break;case 4:n=(Math.floor(r/3)+Math.floor(t/2))%2==0;break;case 5:n=r*t%2+r*t%3==0;break;case 6:n=(r*t%2+r*t%3)%2==0;break;case 7:n=((r+t)%2+r*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][r]&&n&&(this.modules[t][r]=!this.modules[t][r])}}getPenaltyScore(){let e=0;for(let o=0;o<this.size;o++){let r=!1,n=0,i=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[o][s]==r?(n++,5==n?e+=t.PENALTY_N1:n>5&&e++):(this.finderPenaltyAddHistory(n,i),r||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),r=this.modules[o][s],n=1);e+=this.finderPenaltyTerminateAndCount(r,n,i)*t.PENALTY_N3}for(let o=0;o<this.size;o++){let r=!1,n=0,i=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[s][o]==r?(n++,5==n?e+=t.PENALTY_N1:n>5&&e++):(this.finderPenaltyAddHistory(n,i),r||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),r=this.modules[s][o],n=1);e+=this.finderPenaltyTerminateAndCount(r,n,i)*t.PENALTY_N3}for(let o=0;o<this.size-1;o++)for(let r=0;r<this.size-1;r++){const n=this.modules[o][r];n==this.modules[o][r+1]&&n==this.modules[o+1][r]&&n==this.modules[o+1][r+1]&&(e+=t.PENALTY_N2)}let r=0;for(const t of this.modules)r=t.reduce(((e,t)=>e+(t?1:0)),r);const n=this.size*this.size,i=Math.ceil(Math.abs(20*r-10*n)/n)-1;return o(0<=i&&i<=9),e+=i*t.PENALTY_N4,o(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2));let r=[6];for(let n=this.size-7;r.length<e;n-=t)r.splice(1,0,n);return r}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let r=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;r-=(25*t-10)*t-55,e>=7&&(r-=36)}return o(208<=r&&r<=29648),r}static getNumDataCodewords(e,r){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let r=[];for(let t=0;t<e-1;t++)r.push(0);r.push(1);let n=1;for(let i=0;i<e;i++){for(let e=0;e<r.length;e++)r[e]=t.reedSolomonMultiply(r[e],n),e+1<r.length&&(r[e]^=r[e+1]);n=t.reedSolomonMultiply(n,2)}return r}static reedSolomonComputeRemainder(e,r){let n=r.map((e=>0));for(const i of e){const e=i^n.shift();n.push(0),r.forEach(((r,i)=>n[i]^=t.reedSolomonMultiply(r,e)))}return n}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw new RangeError("Byte out of range");let r=0;for(let n=7;n>=0;n--)r=r<<1^285*(r>>>7),r^=(t>>>n&1)*e;return o(r>>>8==0),r}finderPenaltyCountPatterns(e){const t=e[1];o(t<=3*this.size);const r=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(r&&e[0]>=4*t&&e[6]>=t?1:0)+(r&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,r){return e&&(this.finderPenaltyAddHistory(t,r),t=0),t+=this.size,this.finderPenaltyAddHistory(t,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};let r=t;function n(e,t,r){if(t<0||t>31||e>>>t!=0)throw new RangeError("Value out of range");for(let n=t-1;n>=0;n--)r.push(e>>>n&1)}function i(e,t){return 0!=(e>>>t&1)}function o(e){if(!e)throw new Error("Assertion error")}r.MIN_VERSION=1,r.MAX_VERSION=40,r.PENALTY_N1=3,r.PENALTY_N2=3,r.PENALTY_N3=40,r.PENALTY_N4=10,r.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],r.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=r;const s=class{constructor(e,t,r){if(this.mode=e,this.numChars=t,this.bitData=r,t<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}static makeBytes(e){let t=[];for(const r of e)n(r,8,t);return new s(s.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!s.isNumeric(e))throw new RangeError("String contains non-numeric characters");let t=[];for(let r=0;r<e.length;){const i=Math.min(e.length-r,3);n(parseInt(e.substr(r,i),10),3*i+1,t),r+=i}return new s(s.Mode.NUMERIC,e.length,t)}static makeAlphanumeric(e){if(!s.isAlphanumeric(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let t,r=[];for(t=0;t+2<=e.length;t+=2){let i=45*s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t));i+=s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t+1)),n(i,11,r)}return t<e.length&&n(s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t)),6,r),new s(s.Mode.ALPHANUMERIC,e.length,r)}static makeSegments(e){return""==e?[]:s.isNumeric(e)?[s.makeNumeric(e)]:s.isAlphanumeric(e)?[s.makeAlphanumeric(e)]:[s.makeBytes(s.toUtf8ByteArray(e))]}static makeEci(e){let t=[];if(e<0)throw new RangeError("ECI assignment value out of range");if(e<128)n(e,8,t);else if(e<16384)n(2,2,t),n(e,14,t);else{if(!(e<1e6))throw new RangeError("ECI assignment value out of range");n(6,3,t),n(e,21,t)}return new s(s.Mode.ECI,0,t)}static isNumeric(e){return s.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return s.ALPHANUMERIC_REGEX.test(e)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let r=0;for(const n of e){const e=n.mode.numCharCountBits(t);if(n.numChars>=1<<e)return 1/0;r+=4+e+n.bitData.length}return r}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let r=0;r<e.length;r++)"%"!=e.charAt(r)?t.push(e.charCodeAt(r)):(t.push(parseInt(e.substr(r+1,2),16)),r+=2);return t}};let a=s;a.NUMERIC_REGEX=/^[0-9]*$/,a.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,a.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",e.QrSegment=a})(ko||(ko={})),(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};let r=t;r.LOW=new t(0,1),r.MEDIUM=new t(1,0),r.QUARTILE=new t(2,3),r.HIGH=new t(3,2),e.Ecc=r})((Io=ko||(ko={})).QrCode||(Io.QrCode={})),(e=>{(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};let r=t;r.NUMERIC=new t(1,[10,12,14]),r.ALPHANUMERIC=new t(2,[9,11,13]),r.BYTE=new t(4,[8,16,16]),r.KANJI=new t(8,[8,10,12]),r.ECI=new t(7,[0,0,0]),e.Mode=r})(e.QrSegment||(e.QrSegment={}))})(ko||(ko={}));var No=ko,xo={L:No.QrCode.Ecc.LOW,M:No.QrCode.Ecc.MEDIUM,Q:No.QrCode.Ecc.QUARTILE,H:No.QrCode.Ecc.HIGH},Lo=128,Do="L",Mo="#FFFFFF",Uo="#000000",jo=!1,Fo=4,Bo=.1;
91
+ `;function Zi(e,t){for(var r in t)e[r]=t[r];return e}function eo(e,t){for(var r in e)if("__source"!==r&&!(r in t))return!0;for(var n in t)if("__source"!==n&&e[n]!==t[n])return!0;return!1}function to(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function ro(e){this.props=e}function no(e,t){function r(e){var r=this.props.ref,n=r==e.ref;return!n&&r&&(r.call?r(null):r.current=null),t?!t(this.props,e)||!n:eo(this.props,e)}function n(t){return this.shouldComponentUpdate=r,O(e,t)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(ro.prototype=new x).isPureReactComponent=!0,ro.prototype.shouldComponentUpdate=function(e,t){return eo(this.props,e)||eo(this.state,t)};var io=g.__b;g.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),io&&io(e)};var oo="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function so(e){function t(t){var r=Zi({},t);return delete r.ref,e(r,t.ref||null)}return t.$$typeof=oo,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var ao=function(e,t){return null==e?null:B(B(e).map(t))},co={map:ao,forEach:ao,count:function(e){return e?B(e).length:0},only:function(e){var t=B(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:B},lo=g.__e;g.__e=function(e,t,r,n){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=r.__e,t.__k=r.__k),i.__c(e,t);lo(e,t,r,n)};var uo=g.unmount;function ho(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=Zi({},e)).__c&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return ho(e,t,r)}))),e}function po(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return po(e,t,r)})),e.__c&&e.__c.__P===t&&(e.__e&&r.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=r)),e}function fo(){this.__u=0,this.t=null,this.__b=null}function mo(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function go(e){var t,r,n;function i(i){if(t||(t=e()).then((function(e){r=e.default||e}),(function(e){n=e})),n)throw n;if(!r)throw t;return O(r,i)}return i.displayName="Lazy",i.__f=!0,i}function _o(){this.u=null,this.o=null}g.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),uo&&uo(e)},(fo.prototype=new x).__c=function(e,t){var r=t.__c,n=this;null==n.t&&(n.t=[]),n.t.push(r);var i=mo(n.__v),o=!1,s=function(){o||(o=!0,r.__R=null,i?i(a):a())};r.__R=s;var a=function(){if(! --n.__u){if(n.state.__a){var e=n.state.__a;n.__v.__k[0]=po(e,e.__c.__P,e.__c.__O)}var t;for(n.setState({__a:n.__b=null});t=n.t.pop();)t.forceUpdate()}},c=!0===t.__h;n.__u++||c||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(s,s)},fo.prototype.componentWillUnmount=function(){this.t=[]},fo.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=ho(this.__b,r,n.__O=n.__P)}this.__b=null}var i=t.__a&&O(N,null,e.fallback);return i&&(i.__h=null),[O(N,null,t.__a?null:e.children),i]};var vo=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function yo(e){return this.getChildContext=function(){return e.context},e.children}function wo(e){var t=this,r=e.i;t.componentWillUnmount=function(){Z(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,r){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),Z(O(yo,{context:t.context},e.__v),t.l)}function bo(e,t){var r=O(wo,{__v:e,i:t});return r.containerInfo=t,r}(_o.prototype=new x).__a=function(e){var t=this,r=mo(t.__v),n=t.o.get(e);return n[0]++,function(i){var o=function(){t.props.revealOrder?(n.push(i),vo(t,e,n)):i()};r?r(o):o()}},_o.prototype.render=function(e){this.u=null,this.o=new Map;var t=B(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},_o.prototype.componentDidUpdate=_o.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,r){vo(e,r,t)}))};var Eo="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ko=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Io=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,To=/[A-Z0-9]/g,So="undefined"!=typeof document,Co=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function Ro(e,t,r){return null==t.__k&&(t.textContent=""),Z(e,t),"function"==typeof r&&r(),e?e.__c:null}function Oo(e,t,r){return ee(e,t),"function"==typeof r&&r(),e?e.__c:null}x.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(x.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Ao=g.event;function Po(){}function No(){return this.cancelBubble}function xo(){return this.defaultPrevented}g.event=function(e){return Ao&&(e=Ao(e)),e.persist=Po,e.isPropagationStopped=No,e.isDefaultPrevented=xo,e.nativeEvent=e};var Lo,Do={enumerable:!1,configurable:!0,get:function(){return this.class}},Mo=g.vnode;g.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,r=e.type,n={};for(var i in t){var o=t[i];if(!("value"===i&&"defaultValue"in t&&null==o||So&&"children"===i&&"noscript"===r||"class"===i||"className"===i)){var s=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===o?o="":"ondoubleclick"===s?i="ondblclick":"onchange"!==s||"input"!==r&&"textarea"!==r||Co(t.type)?"onfocus"===s?i="onfocusin":"onblur"===s?i="onfocusout":Io.test(i)?i=s:-1===r.indexOf("-")&&ko.test(i)?i=i.replace(To,"-$&").toLowerCase():null===o&&(o=void 0):s=i="oninput","oninput"===s&&n[i=s]&&(i="oninputCapture"),n[i]=o}}"select"==r&&n.multiple&&Array.isArray(n.value)&&(n.value=B(t.children).forEach((function(e){e.props.selected=-1!=n.value.indexOf(e.props.value)}))),"select"==r&&null!=n.defaultValue&&(n.value=B(t.children).forEach((function(e){e.props.selected=n.multiple?-1!=n.defaultValue.indexOf(e.props.value):n.defaultValue==e.props.value}))),t.class&&!t.className?(n.class=t.class,Object.defineProperty(n,"className",Do)):(t.className&&!t.class||t.class&&t.className)&&(n.class=n.className=t.className),e.props=n}(e),e.$$typeof=Eo,Mo&&Mo(e)};var Uo=g.__r;g.__r=function(e){Uo&&Uo(e),Lo=e.__c};var jo=g.diffed;g.diffed=function(e){jo&&jo(e);var t=e.props,r=e.__e;null!=r&&"textarea"===e.type&&"value"in t&&t.value!==r.value&&(r.value=null==t.value?"":t.value),Lo=null};var Fo={ReactCurrentDispatcher:{current:{readContext:function(e){return Lo.__n[e.__c].props.value}}}};function Bo(e){return O.bind(null,e)}function zo(e){return!!e&&e.$$typeof===Eo}function Ho(e){return zo(e)&&e.type===N}function Vo(e){return zo(e)?te.apply(null,arguments):e}function $o(e){return!!e.__k&&(Z(null,e),!0)}function qo(e){return e&&(e.base||1===e.nodeType&&e)||null}var Wo=function(e,t){return e(t)},Ko=function(e,t){return e(t)},Jo=N;function Go(e){e()}function Yo(e){return e}function Qo(){return[!1,Go]}var Xo=ye,Zo=zo;function es(e,t){var r=t(),n=ge({h:{__:r,v:t}}),i=n[0].h,o=n[1];return ye((function(){i.__=r,i.v=t,to(i.__,t())||o({h:i})}),[e,r,t]),ve((function(){return to(i.__,i.v())||o({h:i}),e((function(){to(i.__,i.v())||o({h:i})}))}),[e]),r}var ts={useState:ge,useId:Se,useReducer:_e,useEffect:ve,useLayoutEffect:ye,useInsertionEffect:Xo,useTransition:Qo,useDeferredValue:Yo,useSyncExternalStore:es,startTransition:Go,useRef:we,useImperativeHandle:be,useMemo:Ee,useCallback:ke,useContext:Ie,useDebugValue:Te,version:"17.0.2",Children:co,render:Ro,hydrate:Oo,unmountComponentAtNode:$o,createPortal:bo,createElement:O,createContext:re,createFactory:Bo,cloneElement:Vo,createRef:P,Fragment:N,isValidElement:zo,isElement:Zo,isFragment:Ho,findDOMNode:qo,Component:x,PureComponent:ro,memo:no,forwardRef:so,flushSync:Ko,unstable_batchedUpdates:Wo,StrictMode:Jo,Suspense:fo,SuspenseList:_o,lazy:go,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Fo};const rs=Object.freeze(Object.defineProperty({__proto__:null,Children:co,Component:x,Fragment:N,PureComponent:ro,StrictMode:Jo,Suspense:fo,SuspenseList:_o,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Fo,cloneElement:Vo,createContext:re,createElement:O,createFactory:Bo,createPortal:bo,createRef:P,default:ts,findDOMNode:qo,flushSync:Ko,forwardRef:so,hydrate:Oo,isElement:Zo,isFragment:Ho,isValidElement:zo,lazy:go,memo:no,render:Ro,startTransition:Go,unmountComponentAtNode:$o,unstable_batchedUpdates:Wo,useCallback:ke,useContext:Ie,useDebugValue:Te,useDeferredValue:Yo,useEffect:ve,useErrorBoundary:function(e){var t=me(ne++,10),r=ge();return t.__=e,ie.componentDidCatch||(ie.componentDidCatch=function(e,n){t.__&&t.__(e,n),r[1](e)}),[r[0],function(){r[1](void 0)}]},useId:Se,useImperativeHandle:be,useInsertionEffect:Xo,useLayoutEffect:ye,useMemo:Ee,useReducer:_e,useRef:we,useState:ge,useSyncExternalStore:es,useTransition:Qo,version:"17.0.2"},Symbol.toStringTag,{value:"Module"}));var ns,is,os=Object.defineProperty,ss=Object.getOwnPropertySymbols,as=Object.prototype.hasOwnProperty,cs=Object.prototype.propertyIsEnumerable,ls=(e,t,r)=>t in e?os(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,us=(e,t)=>{for(var r in t||(t={}))as.call(t,r)&&ls(e,r,t[r]);if(ss)for(var r of ss(t))cs.call(t,r)&&ls(e,r,t[r]);return e},ds=(e,t)=>{var r={};for(var n in e)as.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&ss)for(var n of ss(e))t.indexOf(n)<0&&cs.call(e,n)&&(r[n]=e[n]);return r};(e=>{const t=class{constructor(e,r,n,i){if(this.version=e,this.errorCorrectionLevel=r,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(i<-1||i>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let s=[];for(let t=0;t<this.size;t++)s.push(!1);for(let t=0;t<this.size;t++)this.modules.push(s.slice()),this.isFunction.push(s.slice());this.drawFunctionPatterns();const a=this.addEccAndInterleave(n);if(this.drawCodewords(a),-1==i){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const r=this.getPenaltyScore();r<e&&(i=t,e=r),this.applyMask(t)}}o(0<=i&&i<=7),this.mask=i,this.applyMask(i),this.drawFormatBits(i),this.isFunction=[]}static encodeText(r,n){const i=e.QrSegment.makeSegments(r);return t.encodeSegments(i,n)}static encodeBinary(r,n){const i=e.QrSegment.makeBytes(r);return t.encodeSegments([i],n)}static encodeSegments(e,r,i=1,s=40,c=-1,l=!0){if(!(t.MIN_VERSION<=i&&i<=s&&s<=t.MAX_VERSION)||c<-1||c>7)throw new RangeError("Invalid value");let u,d;for(u=i;;u++){const n=8*t.getNumDataCodewords(u,r),i=a.getTotalBits(e,u);if(i<=n){d=i;break}if(u>=s)throw new RangeError("Data too long")}for(const n of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])l&&d<=8*t.getNumDataCodewords(u,n)&&(r=n);let h=[];for(const t of e){n(t.mode.modeBits,4,h),n(t.numChars,t.mode.numCharCountBits(u),h);for(const e of t.getData())h.push(e)}o(h.length==d);const p=8*t.getNumDataCodewords(u,r);o(h.length<=p),n(0,Math.min(4,p-h.length),h),n(0,(8-h.length%8)%8,h),o(h.length%8==0);for(let t=236;h.length<p;t^=253)n(t,8,h);let f=[];for(;8*f.length<h.length;)f.push(0);return h.forEach(((e,t)=>f[t>>>3]|=e<<7-(7&t))),new t(u,r,f,c)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let r=0;r<this.size;r++)this.setFunctionModule(6,r,r%2==0),this.setFunctionModule(r,6,r%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let r=0;r<t;r++)for(let n=0;n<t;n++)0==r&&0==n||0==r&&n==t-1||r==t-1&&0==n||this.drawAlignmentPattern(e[r],e[n]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let r=t;for(let i=0;i<10;i++)r=r<<1^1335*(r>>>9);const n=21522^(t<<10|r);o(n>>>15==0);for(let o=0;o<=5;o++)this.setFunctionModule(8,o,i(n,o));this.setFunctionModule(8,7,i(n,6)),this.setFunctionModule(8,8,i(n,7)),this.setFunctionModule(7,8,i(n,8));for(let o=9;o<15;o++)this.setFunctionModule(14-o,8,i(n,o));for(let o=0;o<8;o++)this.setFunctionModule(this.size-1-o,8,i(n,o));for(let o=8;o<15;o++)this.setFunctionModule(8,this.size-15+o,i(n,o));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let r=0;r<12;r++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;o(t>>>18==0);for(let r=0;r<18;r++){const e=i(t,r),n=this.size-11+r%3,o=Math.floor(r/3);this.setFunctionModule(n,o,e),this.setFunctionModule(o,n,e)}}drawFinderPattern(e,t){for(let r=-4;r<=4;r++)for(let n=-4;n<=4;n++){const i=Math.max(Math.abs(n),Math.abs(r)),o=e+n,s=t+r;0<=o&&o<this.size&&0<=s&&s<this.size&&this.setFunctionModule(o,s,2!=i&&4!=i)}}drawAlignmentPattern(e,t){for(let r=-2;r<=2;r++)for(let n=-2;n<=2;n++)this.setFunctionModule(e+n,t+r,1!=Math.max(Math.abs(n),Math.abs(r)))}setFunctionModule(e,t,r){this.modules[t][e]=r,this.isFunction[t][e]=!0}addEccAndInterleave(e){const r=this.version,n=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(r,n))throw new RangeError("Invalid argument");const i=t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][r],s=t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][r],a=Math.floor(t.getNumRawDataModules(r)/8),c=i-a%i,l=Math.floor(a/i);let u=[];const d=t.reedSolomonComputeDivisor(s);for(let o=0,p=0;o<i;o++){let r=e.slice(p,p+l-s+(o<c?0:1));p+=r.length;const n=t.reedSolomonComputeRemainder(r,d);o<c&&r.push(0),u.push(r.concat(n))}let h=[];for(let t=0;t<u[0].length;t++)u.forEach(((e,r)=>{(t!=l-s||r>=c)&&h.push(e[t])}));return o(h.length==a),h}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let r=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let n=0;n<this.size;n++)for(let o=0;o<2;o++){const s=t-o,a=0==(t+1&2)?this.size-1-n:n;!this.isFunction[a][s]&&r<8*e.length&&(this.modules[a][s]=i(e[r>>>3],7-(7&r)),r++)}}o(r==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let r=0;r<this.size;r++){let n;switch(e){case 0:n=(r+t)%2==0;break;case 1:n=t%2==0;break;case 2:n=r%3==0;break;case 3:n=(r+t)%3==0;break;case 4:n=(Math.floor(r/3)+Math.floor(t/2))%2==0;break;case 5:n=r*t%2+r*t%3==0;break;case 6:n=(r*t%2+r*t%3)%2==0;break;case 7:n=((r+t)%2+r*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][r]&&n&&(this.modules[t][r]=!this.modules[t][r])}}getPenaltyScore(){let e=0;for(let o=0;o<this.size;o++){let r=!1,n=0,i=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[o][s]==r?(n++,5==n?e+=t.PENALTY_N1:n>5&&e++):(this.finderPenaltyAddHistory(n,i),r||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),r=this.modules[o][s],n=1);e+=this.finderPenaltyTerminateAndCount(r,n,i)*t.PENALTY_N3}for(let o=0;o<this.size;o++){let r=!1,n=0,i=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[s][o]==r?(n++,5==n?e+=t.PENALTY_N1:n>5&&e++):(this.finderPenaltyAddHistory(n,i),r||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),r=this.modules[s][o],n=1);e+=this.finderPenaltyTerminateAndCount(r,n,i)*t.PENALTY_N3}for(let o=0;o<this.size-1;o++)for(let r=0;r<this.size-1;r++){const n=this.modules[o][r];n==this.modules[o][r+1]&&n==this.modules[o+1][r]&&n==this.modules[o+1][r+1]&&(e+=t.PENALTY_N2)}let r=0;for(const t of this.modules)r=t.reduce(((e,t)=>e+(t?1:0)),r);const n=this.size*this.size,i=Math.ceil(Math.abs(20*r-10*n)/n)-1;return o(0<=i&&i<=9),e+=i*t.PENALTY_N4,o(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2));let r=[6];for(let n=this.size-7;r.length<e;n-=t)r.splice(1,0,n);return r}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let r=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;r-=(25*t-10)*t-55,e>=7&&(r-=36)}return o(208<=r&&r<=29648),r}static getNumDataCodewords(e,r){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let r=[];for(let t=0;t<e-1;t++)r.push(0);r.push(1);let n=1;for(let i=0;i<e;i++){for(let e=0;e<r.length;e++)r[e]=t.reedSolomonMultiply(r[e],n),e+1<r.length&&(r[e]^=r[e+1]);n=t.reedSolomonMultiply(n,2)}return r}static reedSolomonComputeRemainder(e,r){let n=r.map((e=>0));for(const i of e){const e=i^n.shift();n.push(0),r.forEach(((r,i)=>n[i]^=t.reedSolomonMultiply(r,e)))}return n}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw new RangeError("Byte out of range");let r=0;for(let n=7;n>=0;n--)r=r<<1^285*(r>>>7),r^=(t>>>n&1)*e;return o(r>>>8==0),r}finderPenaltyCountPatterns(e){const t=e[1];o(t<=3*this.size);const r=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(r&&e[0]>=4*t&&e[6]>=t?1:0)+(r&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,r){return e&&(this.finderPenaltyAddHistory(t,r),t=0),t+=this.size,this.finderPenaltyAddHistory(t,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};let r=t;function n(e,t,r){if(t<0||t>31||e>>>t!=0)throw new RangeError("Value out of range");for(let n=t-1;n>=0;n--)r.push(e>>>n&1)}function i(e,t){return 0!=(e>>>t&1)}function o(e){if(!e)throw new Error("Assertion error")}r.MIN_VERSION=1,r.MAX_VERSION=40,r.PENALTY_N1=3,r.PENALTY_N2=3,r.PENALTY_N3=40,r.PENALTY_N4=10,r.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],r.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=r;const s=class{constructor(e,t,r){if(this.mode=e,this.numChars=t,this.bitData=r,t<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}static makeBytes(e){let t=[];for(const r of e)n(r,8,t);return new s(s.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!s.isNumeric(e))throw new RangeError("String contains non-numeric characters");let t=[];for(let r=0;r<e.length;){const i=Math.min(e.length-r,3);n(parseInt(e.substr(r,i),10),3*i+1,t),r+=i}return new s(s.Mode.NUMERIC,e.length,t)}static makeAlphanumeric(e){if(!s.isAlphanumeric(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let t,r=[];for(t=0;t+2<=e.length;t+=2){let i=45*s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t));i+=s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t+1)),n(i,11,r)}return t<e.length&&n(s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t)),6,r),new s(s.Mode.ALPHANUMERIC,e.length,r)}static makeSegments(e){return""==e?[]:s.isNumeric(e)?[s.makeNumeric(e)]:s.isAlphanumeric(e)?[s.makeAlphanumeric(e)]:[s.makeBytes(s.toUtf8ByteArray(e))]}static makeEci(e){let t=[];if(e<0)throw new RangeError("ECI assignment value out of range");if(e<128)n(e,8,t);else if(e<16384)n(2,2,t),n(e,14,t);else{if(!(e<1e6))throw new RangeError("ECI assignment value out of range");n(6,3,t),n(e,21,t)}return new s(s.Mode.ECI,0,t)}static isNumeric(e){return s.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return s.ALPHANUMERIC_REGEX.test(e)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let r=0;for(const n of e){const e=n.mode.numCharCountBits(t);if(n.numChars>=1<<e)return 1/0;r+=4+e+n.bitData.length}return r}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let r=0;r<e.length;r++)"%"!=e.charAt(r)?t.push(e.charCodeAt(r)):(t.push(parseInt(e.substr(r+1,2),16)),r+=2);return t}};let a=s;a.NUMERIC_REGEX=/^[0-9]*$/,a.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,a.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",e.QrSegment=a})(ns||(ns={})),(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};let r=t;r.LOW=new t(0,1),r.MEDIUM=new t(1,0),r.QUARTILE=new t(2,3),r.HIGH=new t(3,2),e.Ecc=r})((is=ns||(ns={})).QrCode||(is.QrCode={})),(e=>{(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};let r=t;r.NUMERIC=new t(1,[10,12,14]),r.ALPHANUMERIC=new t(2,[9,11,13]),r.BYTE=new t(4,[8,16,16]),r.KANJI=new t(8,[8,10,12]),r.ECI=new t(7,[0,0,0]),e.Mode=r})(e.QrSegment||(e.QrSegment={}))})(ns||(ns={}));var hs=ns,ps={L:hs.QrCode.Ecc.LOW,M:hs.QrCode.Ecc.MEDIUM,Q:hs.QrCode.Ecc.QUARTILE,H:hs.QrCode.Ecc.HIGH},fs=128,ms="L",gs="#FFFFFF",_s="#000000",vs=!1,ys=4,ws=.1;
92
92
  /**
93
93
  * @license qrcode.react
94
94
  * Copyright (c) Paul O'Shannessy
95
95
  * SPDX-License-Identifier: ISC
96
- */function zo(e,t=0){const r=[];return e.forEach((function(e,n){let i=null;e.forEach((function(o,s){if(!o&&null!==i)return r.push(`M${i+t} ${n+t}h${s-i}v1H${i+t}z`),void(i=null);if(s!==e.length-1)o&&null===i&&(i=s);else{if(!o)return;null===i?r.push(`M${s+t},${n+t} h1v1H${s+t}z`):r.push(`M${i+t},${n+t} h${s+1-i}v1H${i+t}z`)}}))})),r.join("")}function Ho(e,t){return e.slice().map(((e,r)=>r<t.y||r>=t.y+t.h?e:e.map(((e,r)=>(r<t.x||r>=t.x+t.w)&&e))))}function Vo(e,t,r,n){if(null==n)return null;const i=r?Fo:0,o=e.length+2*i,s=Math.floor(t*Bo),a=o/t,c=(n.width||s)*a,l=(n.height||s)*a,u=null==n.x?e.length/2-c/2:n.x*a,d=null==n.y?e.length/2-l/2:n.y*a;let h=null;if(n.excavate){let e=Math.floor(u),t=Math.floor(d);h={x:e,y:t,w:Math.ceil(c+u-e),h:Math.ceil(l+d-t)}}return{x:u,y:d,h:l,w:c,excavation:h}}var $o=function(){try{(new Path2D).addPath(new Path2D)}catch(Md){return!1}return!0}();function qo(e){const t=e,{value:r,size:n=Lo,level:i=Do,bgColor:o=Mo,fgColor:s=Uo,includeMargin:a=jo,style:c,imageSettings:l}=t,u=Po(t,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),d=null==l?void 0:l.src,h=we(null),p=we(null),[f,m]=ge(!1);ve((()=>{if(null!=h.current){const e=h.current,t=e.getContext("2d");if(!t)return;let c=No.QrCode.encodeText(r,xo[i]).getModules();const u=a?Fo:0,d=c.length+2*u,f=Vo(c,n,a,l),m=p.current,g=null!=f&&null!==m&&m.complete&&0!==m.naturalHeight&&0!==m.naturalWidth;g&&null!=f.excavation&&(c=Ho(c,f.excavation));const _=window.devicePixelRatio||1;e.height=e.width=n*_;const v=n/d*_;t.scale(v,v),t.fillStyle=o,t.fillRect(0,0,d,d),t.fillStyle=s,$o?t.fill(new Path2D(zo(c,u))):c.forEach((function(e,r){e.forEach((function(e,n){e&&t.fillRect(n+u,r+u,1,1)}))})),g&&t.drawImage(m,f.x+u,f.y+u,f.w,f.h)}})),ve((()=>{m(!1)}),[d]);const g=Ao({height:n,width:n},c);let _=null;return null!=d&&(_=bo.createElement("img",{src:d,key:d,style:{display:"none"},onLoad:()=>{m(!0)},ref:p})),bo.createElement(bo.Fragment,null,bo.createElement("canvas",Ao({style:g,height:n,width:n,ref:h},u)),_)}function Wo(e){const t=e,{value:r,size:n=Lo,level:i=Do,bgColor:o=Mo,fgColor:s=Uo,includeMargin:a=jo,imageSettings:c}=t,l=Po(t,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let u=No.QrCode.encodeText(r,xo[i]).getModules();const d=a?Fo:0,h=u.length+2*d,p=Vo(u,n,a,c);let f=null;null!=c&&null!=p&&(null!=p.excavation&&(u=Ho(u,p.excavation)),f=bo.createElement("image",{xlinkHref:c.src,height:p.h,width:p.w,x:p.x+d,y:p.y+d,preserveAspectRatio:"none"}));const m=zo(u,d);return bo.createElement("svg",Ao({height:n,width:n,viewBox:`0 0 ${h} ${h}`},l),bo.createElement("path",{fill:o,d:`M0,0 h${h}v${h}H0z`,shapeRendering:"crispEdges"}),bo.createElement("path",{fill:s,d:m,shapeRendering:"crispEdges"}),f)}var Ko=e=>{const t=e,{renderAs:r}=t,n=Po(t,["renderAs"]);return"svg"===r?bo.createElement(Wo,Ao({},n)):bo.createElement(qo,Ao({},n))};const Jo=""+new URL("assets/google-play-badge-f72611e2.png",import.meta.url).href,Go=""+new URL("assets/apple-store-badge-a26fc5b3.svg",import.meta.url).href,Yo=""+new URL("assets/fireworks-ab74a101.png",import.meta.url).href,Qo=()=>ui(si,{children:ui(hi,{children:[ui(vi,{src:Yo}),ui("h1",{children:"You’re registered!"}),ui("h2",{children:"To start accessing your benefits, download the Flare app and sign in!"}),ui(pi,{children:ui(Ko,{value:"https://esjpe.app.link"})}),ui("h3",{children:"Download the Flare App"}),ui("p",{children:"Available on iOS and Android"}),ui(fi,{children:[ui(_i,{href:"https://apps.apple.com/au/app/flare/id1587276031",children:ui(mi,{src:Go})}),ui(_i,{href:"https://play.google.com/store/apps/details?id=com.flarehr.payandbenefits",children:ui(gi,{src:Jo})})]})]})}),Xo=e=>O("svg",{xmlns:"http://www.w3.org/2000/svg",width:125,height:125,fill:"none","xmlns:v":"https://vecta.io/nano",...e},O("g",{clipPath:"url(#A)"},O("path",{d:"M62.499 119.932c31.719 0 57.432-25.713 57.432-57.432S94.218 5.068 62.499 5.068 5.066 30.781 5.066 62.5s25.713 57.432 57.432 57.432z",fill:"#eeefee"}),O("path",{d:"M73.142 6.068a57.43 57.43 0 0 1 32.806 26.793c7.122 12.785 9.095 27.806 5.516 41.996s-12.44 26.479-24.774 34.357-27.209 10.749-41.589 8.029c7.466 2.369 15.338 3.185 23.131 2.399a57.43 57.43 0 0 0 22.186-6.97 57.44 57.44 0 0 0 17.604-15.196c4.77-6.213 8.219-13.336 10.134-20.93s2.258-15.502 1.005-23.233-4.075-15.126-8.291-21.727-9.738-12.27-16.226-16.658a57.43 57.43 0 0 0-21.502-8.859z",fill:"#dbd8dd"}),O("path",{d:"M72.773 62.5l18.233 18.233-10.272 10.272-18.233-18.233-18.233 18.233-10.272-10.272L52.229 62.5 33.996 44.267l10.272-10.272 18.233 18.233 18.233-18.233 10.272 10.272L72.773 62.5z",fill:"silver"}),O("g",{fill:"#323c6b"},O("path",{d:"M80.732 91.85a.86.86 0 0 1-.324-.064c-.103-.042-.196-.105-.274-.183L62.499 73.966 44.864 91.603c-.158.158-.373.247-.597.247s-.439-.089-.597-.247L33.397 81.331c-.158-.158-.247-.373-.247-.597s.089-.439.247-.597L51.033 62.5 33.396 44.865c-.158-.158-.247-.373-.247-.597s.089-.439.247-.597l10.272-10.272c.158-.158.373-.247.597-.247s.439.089.597.247l17.637 17.635 17.635-17.635c.158-.158.373-.247.597-.247s.439.089.597.247L91.6 43.671c.158.158.247.373.247.597s-.089.439-.247.597L73.965 62.5 91.6 80.135c.158.158.247.373.247.597s-.089.439-.247.597L81.328 91.601a.84.84 0 0 1-.596.248zM62.499 71.927a.83.83 0 0 1 .323.064c.102.043.196.104.274.183l17.635 17.635 9.078-9.078-17.635-17.635c-.158-.158-.247-.373-.247-.597s.089-.439.247-.597L89.81 44.267l-9.078-9.078-17.635 17.635c-.158.158-.373.247-.597.247s-.439-.089-.597-.247L44.267 35.189l-9.078 9.078 17.635 17.635c.158.158.247.373.247.597s-.089.439-.247.597L35.19 80.731l9.078 9.078 17.635-17.635c.158-.158.373-.247.596-.247zm.001 48.85A58.28 58.28 0 0 1 5.342 51.131c2.248-11.304 7.799-21.689 15.949-29.839S39.826 7.591 51.13 5.343a58.28 58.28 0 0 1 33.671 3.316 58.27 58.27 0 0 1 26.154 21.464c6.403 9.584 9.822 20.851 9.822 32.377-.018 15.451-6.163 30.264-17.088 41.189S77.95 120.76 62.5 120.777zm0-114.865a56.59 56.59 0 0 0-40.013 96.602A56.59 56.59 0 0 0 119.089 62.5c-.017-15.003-5.985-29.386-16.593-39.995A56.65 56.65 0 0 0 62.5 5.912z"}))),O("defs",null,O("clipPath",{id:"A"},O("path",{fill:"#fff",d:"M0 0h125v125H0z"})))),Zo=f("img")`
96
+ */function bs(e,t=0){const r=[];return e.forEach((function(e,n){let i=null;e.forEach((function(o,s){if(!o&&null!==i)return r.push(`M${i+t} ${n+t}h${s-i}v1H${i+t}z`),void(i=null);if(s!==e.length-1)o&&null===i&&(i=s);else{if(!o)return;null===i?r.push(`M${s+t},${n+t} h1v1H${s+t}z`):r.push(`M${i+t},${n+t} h${s+1-i}v1H${i+t}z`)}}))})),r.join("")}function Es(e,t){return e.slice().map(((e,r)=>r<t.y||r>=t.y+t.h?e:e.map(((e,r)=>(r<t.x||r>=t.x+t.w)&&e))))}function ks(e,t,r,n){if(null==n)return null;const i=r?ys:0,o=e.length+2*i,s=Math.floor(t*ws),a=o/t,c=(n.width||s)*a,l=(n.height||s)*a,u=null==n.x?e.length/2-c/2:n.x*a,d=null==n.y?e.length/2-l/2:n.y*a;let h=null;if(n.excavate){let e=Math.floor(u),t=Math.floor(d);h={x:e,y:t,w:Math.ceil(c+u-e),h:Math.ceil(l+d-t)}}return{x:u,y:d,h:l,w:c,excavation:h}}var Is=function(){try{(new Path2D).addPath(new Path2D)}catch(gh){return!1}return!0}();function Ts(e){const t=e,{value:r,size:n=fs,level:i=ms,bgColor:o=gs,fgColor:s=_s,includeMargin:a=vs,style:c,imageSettings:l}=t,u=ds(t,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),d=null==l?void 0:l.src,h=we(null),p=we(null),[f,m]=ge(!1);ve((()=>{if(null!=h.current){const e=h.current,t=e.getContext("2d");if(!t)return;let c=hs.QrCode.encodeText(r,ps[i]).getModules();const u=a?ys:0,d=c.length+2*u,f=ks(c,n,a,l),m=p.current,g=null!=f&&null!==m&&m.complete&&0!==m.naturalHeight&&0!==m.naturalWidth;g&&null!=f.excavation&&(c=Es(c,f.excavation));const _=window.devicePixelRatio||1;e.height=e.width=n*_;const v=n/d*_;t.scale(v,v),t.fillStyle=o,t.fillRect(0,0,d,d),t.fillStyle=s,Is?t.fill(new Path2D(bs(c,u))):c.forEach((function(e,r){e.forEach((function(e,n){e&&t.fillRect(n+u,r+u,1,1)}))})),g&&t.drawImage(m,f.x+u,f.y+u,f.w,f.h)}})),ve((()=>{m(!1)}),[d]);const g=us({height:n,width:n},c);let _=null;return null!=d&&(_=ts.createElement("img",{src:d,key:d,style:{display:"none"},onLoad:()=>{m(!0)},ref:p})),ts.createElement(ts.Fragment,null,ts.createElement("canvas",us({style:g,height:n,width:n,ref:h},u)),_)}function Ss(e){const t=e,{value:r,size:n=fs,level:i=ms,bgColor:o=gs,fgColor:s=_s,includeMargin:a=vs,imageSettings:c}=t,l=ds(t,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let u=hs.QrCode.encodeText(r,ps[i]).getModules();const d=a?ys:0,h=u.length+2*d,p=ks(u,n,a,c);let f=null;null!=c&&null!=p&&(null!=p.excavation&&(u=Es(u,p.excavation)),f=ts.createElement("image",{xlinkHref:c.src,height:p.h,width:p.w,x:p.x+d,y:p.y+d,preserveAspectRatio:"none"}));const m=bs(u,d);return ts.createElement("svg",us({height:n,width:n,viewBox:`0 0 ${h} ${h}`},l),ts.createElement("path",{fill:o,d:`M0,0 h${h}v${h}H0z`,shapeRendering:"crispEdges"}),ts.createElement("path",{fill:s,d:m,shapeRendering:"crispEdges"}),f)}var Cs=e=>{const t=e,{renderAs:r}=t,n=ds(t,["renderAs"]);return"svg"===r?ts.createElement(Ss,us({},n)):ts.createElement(Ts,us({},n))};const Rs=""+new URL("assets/google-play-badge-f72611e2.png",import.meta.url).href,Os=""+new URL("assets/apple-store-badge-a26fc5b3.svg",import.meta.url).href,As=""+new URL("assets/fireworks-ab74a101.png",import.meta.url).href,Ps=()=>$i(Bi,{children:$i(Wi,{children:[$i(Xi,{src:As}),$i("h1",{children:"You’re registered!"}),$i("h2",{children:"To start accessing your benefits, download the Flare app and sign in!"}),$i(Ki,{children:$i(Cs,{value:"https://esjpe.app.link"})}),$i("h3",{children:"Download the Flare App"}),$i("p",{children:"Available on iOS and Android"}),$i(Ji,{children:[$i(Qi,{href:"https://apps.apple.com/au/app/flare/id1587276031",children:$i(Gi,{src:Os})}),$i(Qi,{href:"https://play.google.com/store/apps/details?id=com.flarehr.payandbenefits",children:$i(Yi,{src:Rs})})]})]})}),Ns=e=>O("svg",{xmlns:"http://www.w3.org/2000/svg",width:125,height:125,fill:"none","xmlns:v":"https://vecta.io/nano",...e},O("g",{clipPath:"url(#A)"},O("path",{d:"M62.499 119.932c31.719 0 57.432-25.713 57.432-57.432S94.218 5.068 62.499 5.068 5.066 30.781 5.066 62.5s25.713 57.432 57.432 57.432z",fill:"#eeefee"}),O("path",{d:"M73.142 6.068a57.43 57.43 0 0 1 32.806 26.793c7.122 12.785 9.095 27.806 5.516 41.996s-12.44 26.479-24.774 34.357-27.209 10.749-41.589 8.029c7.466 2.369 15.338 3.185 23.131 2.399a57.43 57.43 0 0 0 22.186-6.97 57.44 57.44 0 0 0 17.604-15.196c4.77-6.213 8.219-13.336 10.134-20.93s2.258-15.502 1.005-23.233-4.075-15.126-8.291-21.727-9.738-12.27-16.226-16.658a57.43 57.43 0 0 0-21.502-8.859z",fill:"#dbd8dd"}),O("path",{d:"M72.773 62.5l18.233 18.233-10.272 10.272-18.233-18.233-18.233 18.233-10.272-10.272L52.229 62.5 33.996 44.267l10.272-10.272 18.233 18.233 18.233-18.233 10.272 10.272L72.773 62.5z",fill:"silver"}),O("g",{fill:"#323c6b"},O("path",{d:"M80.732 91.85a.86.86 0 0 1-.324-.064c-.103-.042-.196-.105-.274-.183L62.499 73.966 44.864 91.603c-.158.158-.373.247-.597.247s-.439-.089-.597-.247L33.397 81.331c-.158-.158-.247-.373-.247-.597s.089-.439.247-.597L51.033 62.5 33.396 44.865c-.158-.158-.247-.373-.247-.597s.089-.439.247-.597l10.272-10.272c.158-.158.373-.247.597-.247s.439.089.597.247l17.637 17.635 17.635-17.635c.158-.158.373-.247.597-.247s.439.089.597.247L91.6 43.671c.158.158.247.373.247.597s-.089.439-.247.597L73.965 62.5 91.6 80.135c.158.158.247.373.247.597s-.089.439-.247.597L81.328 91.601a.84.84 0 0 1-.596.248zM62.499 71.927a.83.83 0 0 1 .323.064c.102.043.196.104.274.183l17.635 17.635 9.078-9.078-17.635-17.635c-.158-.158-.247-.373-.247-.597s.089-.439.247-.597L89.81 44.267l-9.078-9.078-17.635 17.635c-.158.158-.373.247-.597.247s-.439-.089-.597-.247L44.267 35.189l-9.078 9.078 17.635 17.635c.158.158.247.373.247.597s-.089.439-.247.597L35.19 80.731l9.078 9.078 17.635-17.635c.158-.158.373-.247.596-.247zm.001 48.85A58.28 58.28 0 0 1 5.342 51.131c2.248-11.304 7.799-21.689 15.949-29.839S39.826 7.591 51.13 5.343a58.28 58.28 0 0 1 33.671 3.316 58.27 58.27 0 0 1 26.154 21.464c6.403 9.584 9.822 20.851 9.822 32.377-.018 15.451-6.163 30.264-17.088 41.189S77.95 120.76 62.5 120.777zm0-114.865a56.59 56.59 0 0 0-40.013 96.602A56.59 56.59 0 0 0 119.089 62.5c-.017-15.003-5.985-29.386-16.593-39.995A56.65 56.65 0 0 0 62.5 5.912z"}))),O("defs",null,O("clipPath",{id:"A"},O("path",{fill:"#fff",d:"M0 0h125v125H0z"})))),xs=f("img")`
97
97
  ${()=>({marginBottom:"2.5rem",height:"7rem"})}
98
- `,es=f("div")`
98
+ `,Ls=f("div")`
99
99
  ${()=>({marginTop:"6rem",marginBottom:"6rem",display:"flex",width:"100%",flexDirection:"column",alignItems:"center",textAlign:"center"})}
100
100
 
101
101
  h1 {
@@ -105,7 +105,7 @@ let e,t,r,n={data:""},i=e=>"object"==typeof window?((e?e.querySelector("#_goober
105
105
  p {
106
106
  ${()=>({marginTop:"0px",marginBottom:"0px",fontSize:"1rem",lineHeight:"1.5rem",fontWeight:"400"})}
107
107
  }
108
- `,ts=()=>ui(es,{children:[ui(Zo,{src:Xo}),ui("h1",{children:"Something went wrong!"}),ui("p",{children:"We’re having some difficulties."}),ui("p",{children:"Please try again shortly."})]}),rs=()=>{const e=(()=>{const e=document.getElementsByTagName("workplace-link");return e.length>0?e[0]:void 0})();e&&e.dispatchEvent(new CustomEvent("step-completion",{detail:"app-workplace-linking",bubbles:!0}))},ns=({apolloAccessToken:e})=>{const[t,r]=ge(0),[n,i]=ge(!1),[o,s]=ge(),a=e=>{console.error(`[Link Workplace]: ${e}`)};vr((async t=>{const n=e=>{a(e),r(3)},i=await(async(e,t,r)=>{const n=new on.AuthorizationNotifier,i=new vn,o=new Mn,s=new Kn(o);return i.setAuthorizationNotifier(n),n.setAuthorizationListener((async(n,i,o)=>{if(e(),await new Promise((e=>setTimeout(e,1e3))),o)return r(`[AuthListener]: Auth response error received: ${o.errorDescription}`);if(!i)return await t();let a;if(n.internal&&n.internal.code_verifier&&(a=n.internal.code_verifier),!Zn)return r("[AuthListener]: OIDC configuration not found");try{const e=await ti(i.code,a,s,n,Zn),o=ri(e);return o&&i.state?await t(o,i.state):r("[AuthListener]: Could not resolve access token or state")}catch(Md){return r(`[AuthListener]: Token code exchange failed: ${Md}`)}})),{authorizationHandler:i,tokenHandler:s,requestor:o}})((()=>r(2)),(async(i,o)=>{if(!i||!o)return r(1);try{const n=Me(e);await Ir(i,o,n.sub,t),r(4)}catch(Md){n(`Error when trying to establish workplace link: ${Md}`)}}),n);s(i)}),[]),vr((async()=>{o&&(await(async e=>{await ni(e),await e.completeAuthorizationRequestIfPossible()})(o.authorizationHandler),await new Promise((e=>setTimeout(e,1e3))),i(!0))}),[o]),ve((()=>{o&&0===t&&n&&r(1)}),[o,t,n]),vr((async n=>{if(o&&1===t)try{const t=await kr(e,n);if(t.isEstablished)return r(4);if(t.linkRequest){const e={openIdConnectUrl:t.linkRequest.openIdConnectUrl,clientId:t.linkRequest.clientId,redirectUri:`${window.location.protocol}//${window.location.host}${window.location.pathname}`,scope:`${t.linkRequest.clientId} openid`,state:t.linkRequest.linkRequestId};await(async(e,t,r)=>{const n=await ei(r.openIdConnectUrl,e),i=new en({client_id:r.clientId,redirect_uri:r.redirectUri,scope:r.scope,response_type:en.RESPONSE_TYPE_CODE,state:r.state,extras:{response_mode:"fragment",prompt:"login",option:"signup"}},new jr,!0);t.performAuthorizationRequest(n,i)})(o.requestor,null==o?void 0:o.authorizationHandler,e)}else a("Invalid response when requesting a workplace link"),r(3)}catch(Md){a(`Could not redirect to OIDC provider: ${Md}`),r(3)}}),[o,t]),ve((()=>{4===t&&rs()}),[t]);const c=0==t||1==t||2==t;return ui(N,{children:[c&&ui(di,{isActive:c}),3==t&&ui(ts,{}),4==t&&ui(Qo,{})]})},is=function(e){const t=[];let r=0;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);i<128?t[r++]=i:i<2048?(t[r++]=i>>6|192,t[r++]=63&i|128):55296==(64512&i)&&n+1<e.length&&56320==(64512&e.charCodeAt(n+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++n)),t[r++]=i>>18|240,t[r++]=i>>12&63|128,t[r++]=i>>6&63|128,t[r++]=63&i|128):(t[r++]=i>>12|224,t[r++]=i>>6&63|128,t[r++]=63&i|128)}return t},os={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const r=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[];for(let i=0;i<e.length;i+=3){const t=e[i],o=i+1<e.length,s=o?e[i+1]:0,a=i+2<e.length,c=a?e[i+2]:0,l=t>>2,u=(3&t)<<4|s>>4;let d=(15&s)<<2|c>>6,h=63&c;a||(h=64,o||(d=64)),n.push(r[l],r[u],r[d],r[h])}return n.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(is(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){const t=[];let r=0,n=0;for(;r<e.length;){const i=e[r++];if(i<128)t[n++]=String.fromCharCode(i);else if(i>191&&i<224){const o=e[r++];t[n++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){const o=((7&i)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++])-65536;t[n++]=String.fromCharCode(55296+(o>>10)),t[n++]=String.fromCharCode(56320+(1023&o))}else{const o=e[r++],s=e[r++];t[n++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const r=t?this.charToByteMapWebSafe_:this.charToByteMap_,n=[];for(let i=0;i<e.length;){const t=r[e.charAt(i++)],o=i<e.length?r[e.charAt(i)]:0;++i;const s=i<e.length?r[e.charAt(i)]:64;++i;const a=i<e.length?r[e.charAt(i)]:64;if(++i,null==t||null==o||null==s||null==a)throw new ss;const c=t<<2|o>>4;if(n.push(c),64!==s){const e=o<<4&240|s>>2;if(n.push(e),64!==a){const e=s<<6&192|a;n.push(e)}}}return n},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 ss extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const as=function(e){return function(e){const t=is(e);return os.encodeByteArray(t,!0)}(e).replace(/\./g,"")},cs=function(e){try{return os.decodeString(e,!0)}catch(Md){console.error("base64Decode failed: ",Md)}return null};
108
+ `,Ds=()=>$i(Ls,{children:[$i(xs,{src:Ns}),$i("h1",{children:"Something went wrong!"}),$i("p",{children:"We’re having some difficulties."}),$i("p",{children:"Please try again shortly."})]}),Ms=()=>{const e=(()=>{const e=document.getElementsByTagName("workplace-link");return e.length>0?e[0]:void 0})();e&&e.dispatchEvent(new CustomEvent("step-completion",{detail:"app-workplace-linking",bubbles:!0}))},Us=({apolloAccessToken:e})=>{const[t,r]=ge(0),[n,i]=ge(!1),[o,s]=ge(),a=e=>{console.error(`[Link Workplace]: ${e}`)};Xr((async t=>{const n=e=>{a(e),r(3)},i=await(async(e,t,r)=>{const n=new Fn.AuthorizationNotifier,i=new Xn,o=new gi,s=new Ci(o);return i.setAuthorizationNotifier(n),n.setAuthorizationListener((async(n,i,o)=>{if(e(),await new Promise((e=>setTimeout(e,1e3))),o)return r(`[AuthListener]: Auth response error received: ${o.errorDescription}`);if(!i)return await t();let a;if(n.internal&&n.internal.code_verifier&&(a=n.internal.code_verifier),!xi)return r("[AuthListener]: OIDC configuration not found");try{const e=await Di(i.code,a,s,n,xi),o=Mi(e);return o&&i.state?await t(o,i.state):r("[AuthListener]: Could not resolve access token or state")}catch(gh){return r(`[AuthListener]: Token code exchange failed: ${gh}`)}})),{authorizationHandler:i,tokenHandler:s,requestor:o}})((()=>r(2)),(async(i,o)=>{if(!i||!o)return r(1);try{const n=Me(e);await on(i,o,n.sub,t),r(4)}catch(gh){n(`Error when trying to establish workplace link: ${gh}`)}}),n);s(i)}),[]),Xr((async()=>{o&&(await(async e=>{await Ui(e),await e.completeAuthorizationRequestIfPossible()})(o.authorizationHandler),await new Promise((e=>setTimeout(e,1e3))),i(!0))}),[o]),ve((()=>{o&&0===t&&n&&r(1)}),[o,t,n]),Xr((async n=>{if(o&&1===t)try{const t=await nn(e,n);if(t.isEstablished)return r(4);if(t.linkRequest){const e={openIdConnectUrl:t.linkRequest.openIdConnectUrl,clientId:t.linkRequest.clientId,redirectUri:`${window.location.protocol}//${window.location.host}${window.location.pathname}`,scope:`${t.linkRequest.clientId} openid`,state:t.linkRequest.linkRequestId};await(async(e,t,r)=>{const n=await Li(r.openIdConnectUrl,e),i=new Dn({client_id:r.clientId,redirect_uri:r.redirectUri,scope:r.scope,response_type:Dn.RESPONSE_TYPE_CODE,state:r.state,extras:{response_mode:"fragment",prompt:"login",option:"signup"}},new yn,!0);t.performAuthorizationRequest(n,i)})(o.requestor,null==o?void 0:o.authorizationHandler,e)}else a("Invalid response when requesting a workplace link"),r(3)}catch(gh){a(`Could not redirect to OIDC provider: ${gh}`),r(3)}}),[o,t]),ve((()=>{4===t&&Ms()}),[t]);const c=0==t||1==t||2==t;return $i(N,{children:[c&&$i(qi,{isActive:c}),3==t&&$i(Ds,{}),4==t&&$i(Ps,{})]})},js=function(e){const t=[];let r=0;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);i<128?t[r++]=i:i<2048?(t[r++]=i>>6|192,t[r++]=63&i|128):55296==(64512&i)&&n+1<e.length&&56320==(64512&e.charCodeAt(n+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++n)),t[r++]=i>>18|240,t[r++]=i>>12&63|128,t[r++]=i>>6&63|128,t[r++]=63&i|128):(t[r++]=i>>12|224,t[r++]=i>>6&63|128,t[r++]=63&i|128)}return t},Fs={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const r=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[];for(let i=0;i<e.length;i+=3){const t=e[i],o=i+1<e.length,s=o?e[i+1]:0,a=i+2<e.length,c=a?e[i+2]:0,l=t>>2,u=(3&t)<<4|s>>4;let d=(15&s)<<2|c>>6,h=63&c;a||(h=64,o||(d=64)),n.push(r[l],r[u],r[d],r[h])}return n.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(js(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){const t=[];let r=0,n=0;for(;r<e.length;){const i=e[r++];if(i<128)t[n++]=String.fromCharCode(i);else if(i>191&&i<224){const o=e[r++];t[n++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){const o=((7&i)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++])-65536;t[n++]=String.fromCharCode(55296+(o>>10)),t[n++]=String.fromCharCode(56320+(1023&o))}else{const o=e[r++],s=e[r++];t[n++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const r=t?this.charToByteMapWebSafe_:this.charToByteMap_,n=[];for(let i=0;i<e.length;){const t=r[e.charAt(i++)],o=i<e.length?r[e.charAt(i)]:0;++i;const s=i<e.length?r[e.charAt(i)]:64;++i;const a=i<e.length?r[e.charAt(i)]:64;if(++i,null==t||null==o||null==s||null==a)throw new Bs;const c=t<<2|o>>4;if(n.push(c),64!==s){const e=o<<4&240|s>>2;if(n.push(e),64!==a){const e=s<<6&192|a;n.push(e)}}}return n},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 Bs extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const zs=function(e){return function(e){const t=js(e);return Fs.encodeByteArray(t,!0)}(e).replace(/\./g,"")},Hs=function(e){try{return Fs.decodeString(e,!0)}catch(gh){console.error("base64Decode failed: ",gh)}return null};
109
109
  /**
110
110
  * @license
111
111
  * Copyright 2022 Google LLC
@@ -122,7 +122,7 @@ let e,t,r,n={data:""},i=e=>"object"==typeof window?((e?e.querySelector("#_goober
122
122
  * See the License for the specific language governing permissions and
123
123
  * limitations under the License.
124
124
  */
125
- const ls=()=>
125
+ const Vs=()=>
126
126
  /**
127
127
  * @license
128
128
  * Copyright 2022 Google LLC
@@ -139,7 +139,7 @@ const ls=()=>
139
139
  * See the License for the specific language governing permissions and
140
140
  * limitations under the License.
141
141
  */
142
- function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__,us=()=>{try{return ls()||(()=>{if("undefined"==typeof process||void 0===process.env)return;const e={}.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0})()||(()=>{if("undefined"==typeof document)return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(Md){return}const t=e&&cs(e[1]);return t&&JSON.parse(t)})()}catch(Md){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${Md}`)}},ds=()=>{var e;return null===(e=us())||void 0===e?void 0:e.config},hs=e=>{var t;return null===(t=us())||void 0===t?void 0:t[`_${e}`]};
142
+ function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__,$s=()=>{try{return Vs()||(()=>{if("undefined"==typeof process||void 0===process.env)return;const e={}.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0})()||(()=>{if("undefined"==typeof document)return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(gh){return}const t=e&&Hs(e[1]);return t&&JSON.parse(t)})()}catch(gh){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${gh}`)}},qs=()=>{var e;return null===(e=$s())||void 0===e?void 0:e.config},Ws=e=>{var t;return null===(t=$s())||void 0===t?void 0:t[`_${e}`]};
143
143
  /**
144
144
  * @license
145
145
  * Copyright 2017 Google LLC
@@ -156,7 +156,7 @@ function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window
156
156
  * See the License for the specific language governing permissions and
157
157
  * limitations under the License.
158
158
  */
159
- class ps{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}wrapCallback(e){return(t,r)=>{t?this.reject(t):this.resolve(r),"function"==typeof e&&(this.promise.catch((()=>{})),1===e.length?e(t):e(t,r))}}}
159
+ class Ks{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}wrapCallback(e){return(t,r)=>{t?this.reject(t):this.resolve(r),"function"==typeof e&&(this.promise.catch((()=>{})),1===e.length?e(t):e(t,r))}}}
160
160
  /**
161
161
  * @license
162
162
  * Copyright 2017 Google LLC
@@ -172,7 +172,7 @@ class ps{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new P
172
172
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
173
173
  * See the License for the specific language governing permissions and
174
174
  * limitations under the License.
175
- */function fs(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}class ms extends Error{constructor(e,t,r){super(t),this.code=e,this.customData=r,this.name="FirebaseError",Object.setPrototypeOf(this,ms.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,gs.prototype.create)}}class gs{constructor(e,t,r){this.service=e,this.serviceName=t,this.errors=r}create(e,...t){const r=t[0]||{},n=`${this.service}/${e}`,i=this.errors[e],o=i?function(e,t){return e.replace(_s,((e,r)=>{const n=t[r];return null!=n?String(n):`<${r}?>`}))}(i,r):"Error",s=`${this.serviceName}: ${o} (${n}).`;return new ms(n,s,r)}}const _s=/\{\$([^}]+)}/g;function vs(e,t){if(e===t)return!0;const r=Object.keys(e),n=Object.keys(t);for(const i of r){if(!n.includes(i))return!1;const r=e[i],o=t[i];if(ys(r)&&ys(o)){if(!vs(r,o))return!1}else if(r!==o)return!1}for(const i of n)if(!r.includes(i))return!1;return!0}function ys(e){return null!==e&&"object"==typeof e}
175
+ */function Js(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}class Gs extends Error{constructor(e,t,r){super(t),this.code=e,this.customData=r,this.name="FirebaseError",Object.setPrototypeOf(this,Gs.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Ys.prototype.create)}}class Ys{constructor(e,t,r){this.service=e,this.serviceName=t,this.errors=r}create(e,...t){const r=t[0]||{},n=`${this.service}/${e}`,i=this.errors[e],o=i?function(e,t){return e.replace(Qs,((e,r)=>{const n=t[r];return null!=n?String(n):`<${r}?>`}))}(i,r):"Error",s=`${this.serviceName}: ${o} (${n}).`;return new Gs(n,s,r)}}const Qs=/\{\$([^}]+)}/g;function Xs(e,t){if(e===t)return!0;const r=Object.keys(e),n=Object.keys(t);for(const i of r){if(!n.includes(i))return!1;const r=e[i],o=t[i];if(Zs(r)&&Zs(o)){if(!Xs(r,o))return!1}else if(r!==o)return!1}for(const i of n)if(!r.includes(i))return!1;return!0}function Zs(e){return null!==e&&"object"==typeof e}
176
176
  /**
177
177
  * @license
178
178
  * Copyright 2017 Google LLC
@@ -188,7 +188,7 @@ class ps{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new P
188
188
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
189
  * See the License for the specific language governing permissions and
190
190
  * limitations under the License.
191
- */function ws(e){const t=[];for(const[r,n]of Object.entries(e))Array.isArray(n)?n.forEach((e=>{t.push(encodeURIComponent(r)+"="+encodeURIComponent(e))})):t.push(encodeURIComponent(r)+"="+encodeURIComponent(n));return t.length?"&"+t.join("&"):""}class bs{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,r){let n;if(void 0===e&&void 0===t&&void 0===r)throw new Error("Missing Observer.");n=function(e,t){if("object"!=typeof e||null===e)return!1;for(const r of t)if(r in e&&"function"==typeof e[r])return!0;return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:r},void 0===n.next&&(n.next=Es),void 0===n.error&&(n.error=Es),void 0===n.complete&&(n.complete=Es);const i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((()=>{try{this.finalError?n.error(this.finalError):n.complete()}catch(Md){}})),this.observers.push(n),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(Md){"undefined"!=typeof console&&console.error&&console.error(Md)}}))}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 Es(){}
191
+ */function ea(e){const t=[];for(const[r,n]of Object.entries(e))Array.isArray(n)?n.forEach((e=>{t.push(encodeURIComponent(r)+"="+encodeURIComponent(e))})):t.push(encodeURIComponent(r)+"="+encodeURIComponent(n));return t.length?"&"+t.join("&"):""}class ta{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,r){let n;if(void 0===e&&void 0===t&&void 0===r)throw new Error("Missing Observer.");n=function(e,t){if("object"!=typeof e||null===e)return!1;for(const r of t)if(r in e&&"function"==typeof e[r])return!0;return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:r},void 0===n.next&&(n.next=ra),void 0===n.error&&(n.error=ra),void 0===n.complete&&(n.complete=ra);const i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((()=>{try{this.finalError?n.error(this.finalError):n.complete()}catch(gh){}})),this.observers.push(n),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(gh){"undefined"!=typeof console&&console.error&&console.error(gh)}}))}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 ra(){}
192
192
  /**
193
193
  * @license
194
194
  * Copyright 2021 Google LLC
@@ -204,7 +204,7 @@ class ps{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new P
204
204
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
205
205
  * See the License for the specific language governing permissions and
206
206
  * limitations under the License.
207
- */function ks(e){return e&&e._delegate?e._delegate:e}class Is{constructor(e,t,r){this.name=e,this.instanceFactory=t,this.type=r,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}}
207
+ */function na(e){return e&&e._delegate?e._delegate:e}class ia{constructor(e,t,r){this.name=e,this.instanceFactory=t,this.type=r,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}}
208
208
  /**
209
209
  * @license
210
210
  * Copyright 2019 Google LLC
@@ -220,7 +220,7 @@ class ps{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new P
220
220
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
221
221
  * See the License for the specific language governing permissions and
222
222
  * limitations under the License.
223
- */const Ts="[DEFAULT]";
223
+ */const oa="[DEFAULT]";
224
224
  /**
225
225
  * @license
226
226
  * Copyright 2019 Google LLC
@@ -236,7 +236,7 @@ class ps{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new P
236
236
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
237
237
  * See the License for the specific language governing permissions and
238
238
  * limitations under the License.
239
- */class Cs{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const e=new ps;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{const r=this.getOrInitializeService({instanceIdentifier:t});r&&e.resolve(r)}catch(Md){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;const r=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),n=null!==(t=null==e?void 0:e.optional)&&void 0!==t&&t;if(!this.isInitialized(r)&&!this.shouldAutoInitialize()){if(n)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:r})}catch(Md){if(n)return null;throw Md}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,this.shouldAutoInitialize()){if(function(e){return"EAGER"===e.instantiationMode}
239
+ */class sa{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const e=new Ks;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{const r=this.getOrInitializeService({instanceIdentifier:t});r&&e.resolve(r)}catch(gh){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;const r=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),n=null!==(t=null==e?void 0:e.optional)&&void 0!==t&&t;if(!this.isInitialized(r)&&!this.shouldAutoInitialize()){if(n)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:r})}catch(gh){if(n)return null;throw gh}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,this.shouldAutoInitialize()){if(function(e){return"EAGER"===e.instantiationMode}
240
240
  /**
241
241
  * @license
242
242
  * Copyright 2019 Google LLC
@@ -252,7 +252,7 @@ class ps{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new P
252
252
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
253
253
  * See the License for the specific language governing permissions and
254
254
  * limitations under the License.
255
- */(e))try{this.getOrInitializeService({instanceIdentifier:Ts})}catch(Md){}for(const[e,t]of this.instancesDeferred.entries()){const r=this.normalizeInstanceIdentifier(e);try{const e=this.getOrInitializeService({instanceIdentifier:r});t.resolve(e)}catch(Md){}}}}clearInstance(e=Ts){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter((e=>"INTERNAL"in e)).map((e=>e.INTERNAL.delete())),...e.filter((e=>"_delete"in e)).map((e=>e._delete()))])}isComponentSet(){return null!=this.component}isInitialized(e=Ts){return this.instances.has(e)}getOptions(e=Ts){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:t={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const n=this.getOrInitializeService({instanceIdentifier:r,options:t});for(const[i,o]of this.instancesDeferred.entries()){r===this.normalizeInstanceIdentifier(i)&&o.resolve(n)}return n}onInit(e,t){var r;const n=this.normalizeInstanceIdentifier(t),i=null!==(r=this.onInitCallbacks.get(n))&&void 0!==r?r:new Set;i.add(e),this.onInitCallbacks.set(n,i);const o=this.instances.get(n);return o&&e(o,n),()=>{i.delete(e)}}invokeOnInitCallbacks(e,t){const r=this.onInitCallbacks.get(t);if(r)for(const i of r)try{i(e,t)}catch(n){}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:(n=e,n===Ts?void 0:n),options:t}),this.instances.set(e,r),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch(i){}var n;return r||null}normalizeInstanceIdentifier(e=Ts){return this.component?this.component.multipleInstances?e:Ts:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class Ss{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const t=new Cs(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}
255
+ */(e))try{this.getOrInitializeService({instanceIdentifier:oa})}catch(gh){}for(const[e,t]of this.instancesDeferred.entries()){const r=this.normalizeInstanceIdentifier(e);try{const e=this.getOrInitializeService({instanceIdentifier:r});t.resolve(e)}catch(gh){}}}}clearInstance(e=oa){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter((e=>"INTERNAL"in e)).map((e=>e.INTERNAL.delete())),...e.filter((e=>"_delete"in e)).map((e=>e._delete()))])}isComponentSet(){return null!=this.component}isInitialized(e=oa){return this.instances.has(e)}getOptions(e=oa){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:t={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const n=this.getOrInitializeService({instanceIdentifier:r,options:t});for(const[i,o]of this.instancesDeferred.entries()){r===this.normalizeInstanceIdentifier(i)&&o.resolve(n)}return n}onInit(e,t){var r;const n=this.normalizeInstanceIdentifier(t),i=null!==(r=this.onInitCallbacks.get(n))&&void 0!==r?r:new Set;i.add(e),this.onInitCallbacks.set(n,i);const o=this.instances.get(n);return o&&e(o,n),()=>{i.delete(e)}}invokeOnInitCallbacks(e,t){const r=this.onInitCallbacks.get(t);if(r)for(const i of r)try{i(e,t)}catch(n){}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:(n=e,n===oa?void 0:n),options:t}),this.instances.set(e,r),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch(i){}var n;return r||null}normalizeInstanceIdentifier(e=oa){return this.component?this.component.multipleInstances?e:oa:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class aa{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const t=new sa(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}
256
256
  /**
257
257
  * @license
258
258
  * Copyright 2017 Google LLC
@@ -268,7 +268,7 @@ class ps{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new P
268
268
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
269
269
  * See the License for the specific language governing permissions and
270
270
  * limitations under the License.
271
- */var Rs,Os;(Os=Rs||(Rs={}))[Os.DEBUG=0]="DEBUG",Os[Os.VERBOSE=1]="VERBOSE",Os[Os.INFO=2]="INFO",Os[Os.WARN=3]="WARN",Os[Os.ERROR=4]="ERROR",Os[Os.SILENT=5]="SILENT";const As={debug:Rs.DEBUG,verbose:Rs.VERBOSE,info:Rs.INFO,warn:Rs.WARN,error:Rs.ERROR,silent:Rs.SILENT},Ps=Rs.INFO,Ns={[Rs.DEBUG]:"log",[Rs.VERBOSE]:"log",[Rs.INFO]:"info",[Rs.WARN]:"warn",[Rs.ERROR]:"error"},xs=(e,t,...r)=>{if(t<e.logLevel)return;const n=(new Date).toISOString(),i=Ns[t];if(!i)throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`);console[i](`[${n}] ${e.name}:`,...r)};class Ls{constructor(e){this.name=e,this._logLevel=Ps,this._logHandler=xs,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in Rs))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?As[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw new 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,Rs.DEBUG,...e),this._logHandler(this,Rs.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,Rs.VERBOSE,...e),this._logHandler(this,Rs.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,Rs.INFO,...e),this._logHandler(this,Rs.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,Rs.WARN,...e),this._logHandler(this,Rs.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,Rs.ERROR,...e),this._logHandler(this,Rs.ERROR,...e)}}const Ds=(e,t)=>t.some((t=>e instanceof t));let Ms,Us;const js=new WeakMap,Fs=new WeakMap,Bs=new WeakMap,zs=new WeakMap,Hs=new WeakMap;let Vs={get(e,t,r){if(e instanceof IDBTransaction){if("done"===t)return Fs.get(e);if("objectStoreNames"===t)return e.objectStoreNames||Bs.get(e);if("store"===t)return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Ws(e[t])},set:(e,t,r)=>(e[t]=r,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function $s(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(Us||(Us=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(Ks(this),t),Ws(js.get(this))}:function(...t){return Ws(e.apply(Ks(this),t))}:function(t,...r){const n=e.call(Ks(this),t,...r);return Bs.set(n,t.sort?t.sort():[t]),Ws(n)}}function qs(e){return"function"==typeof e?$s(e):(e instanceof IDBTransaction&&function(e){if(Fs.has(e))return;const t=new Promise(((t,r)=>{const n=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",o),e.removeEventListener("abort",o)},i=()=>{t(),n()},o=()=>{r(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",i),e.addEventListener("error",o),e.addEventListener("abort",o)}));Fs.set(e,t)}(e),Ds(e,Ms||(Ms=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,Vs):e)}function Ws(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,r)=>{const n=()=>{e.removeEventListener("success",i),e.removeEventListener("error",o)},i=()=>{t(Ws(e.result)),n()},o=()=>{r(e.error),n()};e.addEventListener("success",i),e.addEventListener("error",o)}));return t.then((t=>{t instanceof IDBCursor&&js.set(t,e)})).catch((()=>{})),Hs.set(t,e),t}(e);if(zs.has(e))return zs.get(e);const t=qs(e);return t!==e&&(zs.set(e,t),Hs.set(t,e)),t}const Ks=e=>Hs.get(e);const Js=["get","getKey","getAll","getAllKeys","count"],Gs=["put","add","delete","clear"],Ys=new Map;function Qs(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(Ys.get(t))return Ys.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,i=Gs.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!i&&!Js.includes(r))return;const o=async function(e,...t){const o=this.transaction(e,i?"readwrite":"readonly");let s=o.store;return n&&(s=s.index(t.shift())),(await Promise.all([s[r](...t),i&&o.done]))[0]};return Ys.set(t,o),o}Vs=(e=>({...e,get:(t,r,n)=>Qs(t,r)||e.get(t,r,n),has:(t,r)=>!!Qs(t,r)||e.has(t,r)}))(Vs);
271
+ */var ca,la;(la=ca||(ca={}))[la.DEBUG=0]="DEBUG",la[la.VERBOSE=1]="VERBOSE",la[la.INFO=2]="INFO",la[la.WARN=3]="WARN",la[la.ERROR=4]="ERROR",la[la.SILENT=5]="SILENT";const ua={debug:ca.DEBUG,verbose:ca.VERBOSE,info:ca.INFO,warn:ca.WARN,error:ca.ERROR,silent:ca.SILENT},da=ca.INFO,ha={[ca.DEBUG]:"log",[ca.VERBOSE]:"log",[ca.INFO]:"info",[ca.WARN]:"warn",[ca.ERROR]:"error"},pa=(e,t,...r)=>{if(t<e.logLevel)return;const n=(new Date).toISOString(),i=ha[t];if(!i)throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`);console[i](`[${n}] ${e.name}:`,...r)};class fa{constructor(e){this.name=e,this._logLevel=da,this._logHandler=pa,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in ca))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?ua[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw new 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,ca.DEBUG,...e),this._logHandler(this,ca.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,ca.VERBOSE,...e),this._logHandler(this,ca.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,ca.INFO,...e),this._logHandler(this,ca.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,ca.WARN,...e),this._logHandler(this,ca.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,ca.ERROR,...e),this._logHandler(this,ca.ERROR,...e)}}const ma=(e,t)=>t.some((t=>e instanceof t));let ga,_a;const va=new WeakMap,ya=new WeakMap,wa=new WeakMap,ba=new WeakMap,Ea=new WeakMap;let ka={get(e,t,r){if(e instanceof IDBTransaction){if("done"===t)return ya.get(e);if("objectStoreNames"===t)return e.objectStoreNames||wa.get(e);if("store"===t)return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Sa(e[t])},set:(e,t,r)=>(e[t]=r,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function Ia(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(_a||(_a=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(Ca(this),t),Sa(va.get(this))}:function(...t){return Sa(e.apply(Ca(this),t))}:function(t,...r){const n=e.call(Ca(this),t,...r);return wa.set(n,t.sort?t.sort():[t]),Sa(n)}}function Ta(e){return"function"==typeof e?Ia(e):(e instanceof IDBTransaction&&function(e){if(ya.has(e))return;const t=new Promise(((t,r)=>{const n=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",o),e.removeEventListener("abort",o)},i=()=>{t(),n()},o=()=>{r(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",i),e.addEventListener("error",o),e.addEventListener("abort",o)}));ya.set(e,t)}(e),ma(e,ga||(ga=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,ka):e)}function Sa(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,r)=>{const n=()=>{e.removeEventListener("success",i),e.removeEventListener("error",o)},i=()=>{t(Sa(e.result)),n()},o=()=>{r(e.error),n()};e.addEventListener("success",i),e.addEventListener("error",o)}));return t.then((t=>{t instanceof IDBCursor&&va.set(t,e)})).catch((()=>{})),Ea.set(t,e),t}(e);if(ba.has(e))return ba.get(e);const t=Ta(e);return t!==e&&(ba.set(e,t),Ea.set(t,e)),t}const Ca=e=>Ea.get(e);const Ra=["get","getKey","getAll","getAllKeys","count"],Oa=["put","add","delete","clear"],Aa=new Map;function Pa(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(Aa.get(t))return Aa.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,i=Oa.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!i&&!Ra.includes(r))return;const o=async function(e,...t){const o=this.transaction(e,i?"readwrite":"readonly");let s=o.store;return n&&(s=s.index(t.shift())),(await Promise.all([s[r](...t),i&&o.done]))[0]};return Aa.set(t,o),o}ka=(e=>({...e,get:(t,r,n)=>Pa(t,r)||e.get(t,r,n),has:(t,r)=>!!Pa(t,r)||e.has(t,r)}))(ka);
272
272
  /**
273
273
  * @license
274
274
  * Copyright 2019 Google LLC
@@ -285,7 +285,7 @@ class ps{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new P
285
285
  * See the License for the specific language governing permissions and
286
286
  * limitations under the License.
287
287
  */
288
- class Xs{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map((e=>{if(function(e){const t=e.getComponent();return"VERSION"===(null==t?void 0:t.type)}(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}return null})).filter((e=>e)).join(" ")}}const Zs="@firebase/app",ea="0.9.22",ta=new Ls("@firebase/app"),ra="[DEFAULT]",na={[Zs]:"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"},ia=new Map,oa=new Map;function sa(e,t){try{e.container.addComponent(t)}catch(Md){ta.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,Md)}}function aa(e){const t=e.name;if(oa.has(t))return ta.debug(`There were multiple attempts to register component ${t}.`),!1;oa.set(t,e);for(const r of ia.values())sa(r,e);return!0}function ca(e,t){const r=e.container.getProvider("heartbeat").getImmediate({optional:!0});return r&&r.triggerHeartbeat(),e.container.getProvider(t)}
288
+ class Na{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map((e=>{if(function(e){const t=e.getComponent();return"VERSION"===(null==t?void 0:t.type)}(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}return null})).filter((e=>e)).join(" ")}}const xa="@firebase/app",La="0.9.22",Da=new fa("@firebase/app"),Ma="[DEFAULT]",Ua={[xa]:"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"},ja=new Map,Fa=new Map;function Ba(e,t){try{e.container.addComponent(t)}catch(gh){Da.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,gh)}}function za(e){const t=e.name;if(Fa.has(t))return Da.debug(`There were multiple attempts to register component ${t}.`),!1;Fa.set(t,e);for(const r of ja.values())Ba(r,e);return!0}function Ha(e,t){const r=e.container.getProvider("heartbeat").getImmediate({optional:!0});return r&&r.triggerHeartbeat(),e.container.getProvider(t)}
289
289
  /**
290
290
  * @license
291
291
  * Copyright 2019 Google LLC
@@ -301,7 +301,7 @@ class Xs{constructor(e){this.container=e}getPlatformInfoString(){return this.con
301
301
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
302
302
  * See the License for the specific language governing permissions and
303
303
  * limitations under the License.
304
- */const la=new gs("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.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."});
304
+ */const Va=new Ys("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.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."});
305
305
  /**
306
306
  * @license
307
307
  * Copyright 2019 Google LLC
@@ -318,7 +318,7 @@ class Xs{constructor(e){this.container=e}getPlatformInfoString(){return this.con
318
318
  * See the License for the specific language governing permissions and
319
319
  * limitations under the License.
320
320
  */
321
- class ua{constructor(e,t,r){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new Is("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 la.create("app-deleted",{appName:this._name})}}
321
+ class $a{constructor(e,t,r){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new ia("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 Va.create("app-deleted",{appName:this._name})}}
322
322
  /**
323
323
  * @license
324
324
  * Copyright 2019 Google LLC
@@ -334,7 +334,7 @@ class ua{constructor(e,t,r){this._isDeleted=!1,this._options=Object.assign({},e)
334
334
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
335
335
  * See the License for the specific language governing permissions and
336
336
  * limitations under the License.
337
- */const da="10.5.2";function ha(e,t={}){let r=e;if("object"!=typeof t){t={name:t}}const n=Object.assign({name:ra,automaticDataCollectionEnabled:!1},t),i=n.name;if("string"!=typeof i||!i)throw la.create("bad-app-name",{appName:String(i)});if(r||(r=ds()),!r)throw la.create("no-options");const o=ia.get(i);if(o){if(vs(r,o.options)&&vs(n,o.config))return o;throw la.create("duplicate-app",{appName:i})}const s=new Ss(i);for(const c of oa.values())s.addComponent(c);const a=new ua(r,n,s);return ia.set(i,a),a}function pa(e,t,r){var n;let i=null!==(n=na[e])&&void 0!==n?n:e;r&&(i+=`-${r}`);const o=i.match(/\s|\//),s=t.match(/\s|\//);if(o||s){const e=[`Unable to register library "${i}" with version "${t}":`];return o&&e.push(`library name "${i}" contains illegal characters (whitespace or "/")`),o&&s&&e.push("and"),s&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void ta.warn(e.join(" "))}aa(new Is(`${i}-version`,(()=>({library:i,version:t})),"VERSION"))}
337
+ */const qa="10.5.2";function Wa(e,t={}){let r=e;if("object"!=typeof t){t={name:t}}const n=Object.assign({name:Ma,automaticDataCollectionEnabled:!1},t),i=n.name;if("string"!=typeof i||!i)throw Va.create("bad-app-name",{appName:String(i)});if(r||(r=qs()),!r)throw Va.create("no-options");const o=ja.get(i);if(o){if(Xs(r,o.options)&&Xs(n,o.config))return o;throw Va.create("duplicate-app",{appName:i})}const s=new aa(i);for(const c of Fa.values())s.addComponent(c);const a=new $a(r,n,s);return ja.set(i,a),a}function Ka(e,t,r){var n;let i=null!==(n=Ua[e])&&void 0!==n?n:e;r&&(i+=`-${r}`);const o=i.match(/\s|\//),s=t.match(/\s|\//);if(o||s){const e=[`Unable to register library "${i}" with version "${t}":`];return o&&e.push(`library name "${i}" contains illegal characters (whitespace or "/")`),o&&s&&e.push("and"),s&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void Da.warn(e.join(" "))}za(new ia(`${i}-version`,(()=>({library:i,version:t})),"VERSION"))}
338
338
  /**
339
339
  * @license
340
340
  * Copyright 2021 Google LLC
@@ -350,7 +350,7 @@ class ua{constructor(e,t,r){this._isDeleted=!1,this._options=Object.assign({},e)
350
350
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
351
351
  * See the License for the specific language governing permissions and
352
352
  * limitations under the License.
353
- */const fa="firebase-heartbeat-database",ma=1,ga="firebase-heartbeat-store";let _a=null;function va(){return _a||(_a=function(e,t,{blocked:r,upgrade:n,blocking:i,terminated:o}={}){const s=indexedDB.open(e,t),a=Ws(s);return n&&s.addEventListener("upgradeneeded",(e=>{n(Ws(s.result),e.oldVersion,e.newVersion,Ws(s.transaction),e)})),r&&s.addEventListener("blocked",(e=>r(e.oldVersion,e.newVersion,e))),a.then((e=>{o&&e.addEventListener("close",(()=>o())),i&&e.addEventListener("versionchange",(e=>i(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),a}(fa,ma,{upgrade:(e,t)=>{if(0===t)e.createObjectStore(ga)}}).catch((e=>{throw la.create("idb-open",{originalErrorMessage:e.message})}))),_a}async function ya(e,t){try{const r=(await va()).transaction(ga,"readwrite"),n=r.objectStore(ga);await n.put(t,wa(e)),await r.done}catch(Md){if(Md instanceof ms)ta.warn(Md.message);else{const t=la.create("idb-set",{originalErrorMessage:null==Md?void 0:Md.message});ta.warn(t.message)}}}function wa(e){return`${e.name}!${e.options.appId}`}
353
+ */const Ja="firebase-heartbeat-database",Ga=1,Ya="firebase-heartbeat-store";let Qa=null;function Xa(){return Qa||(Qa=function(e,t,{blocked:r,upgrade:n,blocking:i,terminated:o}={}){const s=indexedDB.open(e,t),a=Sa(s);return n&&s.addEventListener("upgradeneeded",(e=>{n(Sa(s.result),e.oldVersion,e.newVersion,Sa(s.transaction),e)})),r&&s.addEventListener("blocked",(e=>r(e.oldVersion,e.newVersion,e))),a.then((e=>{o&&e.addEventListener("close",(()=>o())),i&&e.addEventListener("versionchange",(e=>i(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),a}(Ja,Ga,{upgrade:(e,t)=>{if(0===t)e.createObjectStore(Ya)}}).catch((e=>{throw Va.create("idb-open",{originalErrorMessage:e.message})}))),Qa}async function Za(e,t){try{const r=(await Xa()).transaction(Ya,"readwrite"),n=r.objectStore(Ya);await n.put(t,ec(e)),await r.done}catch(gh){if(gh instanceof Gs)Da.warn(gh.message);else{const t=Va.create("idb-set",{originalErrorMessage:null==gh?void 0:gh.message});Da.warn(t.message)}}}function ec(e){return`${e.name}!${e.options.appId}`}
354
354
  /**
355
355
  * @license
356
356
  * Copyright 2021 Google LLC
@@ -366,7 +366,7 @@ class ua{constructor(e,t,r){this._isDeleted=!1,this._options=Object.assign({},e)
366
366
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
367
367
  * See the License for the specific language governing permissions and
368
368
  * limitations under the License.
369
- */class ba{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new ka(t),this._heartbeatsCachePromise=this._storage.read().then((e=>(this._heartbeatsCache=e,e)))}async triggerHeartbeat(){const e=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),t=Ea();if(null===this._heartbeatsCache&&(this._heartbeatsCache=await this._heartbeatsCachePromise),this._heartbeatsCache.lastSentHeartbeatDate!==t&&!this._heartbeatsCache.heartbeats.some((e=>e.date===t)))return this._heartbeatsCache.heartbeats.push({date:t,agent:e}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter((e=>{const t=new Date(e.date).valueOf();return Date.now()-t<=2592e6})),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,null===this._heartbeatsCache||0===this._heartbeatsCache.heartbeats.length)return"";const e=Ea(),{heartbeatsToSend:t,unsentEntries:r}=function(e,t=1024){const r=[];let n=e.slice();for(const i of e){const e=r.find((e=>e.agent===i.agent));if(e){if(e.dates.push(i.date),Ia(r)>t){e.dates.pop();break}}else if(r.push({agent:i.agent,dates:[i.date]}),Ia(r)>t){r.pop();break}n=n.slice(1)}return{heartbeatsToSend:r,unsentEntries:n}}(this._heartbeatsCache.heartbeats),n=as(JSON.stringify({version:2,heartbeats:t}));return this._heartbeatsCache.lastSentHeartbeatDate=e,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),n}}function Ea(){return(new Date).toISOString().substring(0,10)}class ka{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!function(){try{return"object"==typeof indexedDB}catch(Md){return!1}}()&&new Promise(((e,t)=>{try{let r=!0;const n="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(n);i.onsuccess=()=>{i.result.close(),r||self.indexedDB.deleteDatabase(n),e(!0)},i.onupgradeneeded=()=>{r=!1},i.onerror=()=>{var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(r){t(r)}})).then((()=>!0)).catch((()=>!1))}async read(){if(await this._canUseIndexedDBPromise){return await async function(e){try{const t=await va();return await t.transaction(ga).objectStore(ga).get(wa(e))}catch(Md){if(Md instanceof ms)ta.warn(Md.message);else{const t=la.create("idb-get",{originalErrorMessage:null==Md?void 0:Md.message});ta.warn(t.message)}}}(this.app)||{heartbeats:[]}}return{heartbeats:[]}}async overwrite(e){var t;if(await this._canUseIndexedDBPromise){const r=await this.read();return ya(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:r.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){var t;if(await this._canUseIndexedDBPromise){const r=await this.read();return ya(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...e.heartbeats]})}}}function Ia(e){return as(JSON.stringify({version:2,heartbeats:e})).length}
369
+ */class tc{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new nc(t),this._heartbeatsCachePromise=this._storage.read().then((e=>(this._heartbeatsCache=e,e)))}async triggerHeartbeat(){const e=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),t=rc();if(null===this._heartbeatsCache&&(this._heartbeatsCache=await this._heartbeatsCachePromise),this._heartbeatsCache.lastSentHeartbeatDate!==t&&!this._heartbeatsCache.heartbeats.some((e=>e.date===t)))return this._heartbeatsCache.heartbeats.push({date:t,agent:e}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter((e=>{const t=new Date(e.date).valueOf();return Date.now()-t<=2592e6})),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,null===this._heartbeatsCache||0===this._heartbeatsCache.heartbeats.length)return"";const e=rc(),{heartbeatsToSend:t,unsentEntries:r}=function(e,t=1024){const r=[];let n=e.slice();for(const i of e){const e=r.find((e=>e.agent===i.agent));if(e){if(e.dates.push(i.date),ic(r)>t){e.dates.pop();break}}else if(r.push({agent:i.agent,dates:[i.date]}),ic(r)>t){r.pop();break}n=n.slice(1)}return{heartbeatsToSend:r,unsentEntries:n}}(this._heartbeatsCache.heartbeats),n=zs(JSON.stringify({version:2,heartbeats:t}));return this._heartbeatsCache.lastSentHeartbeatDate=e,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),n}}function rc(){return(new Date).toISOString().substring(0,10)}class nc{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!function(){try{return"object"==typeof indexedDB}catch(gh){return!1}}()&&new Promise(((e,t)=>{try{let r=!0;const n="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(n);i.onsuccess=()=>{i.result.close(),r||self.indexedDB.deleteDatabase(n),e(!0)},i.onupgradeneeded=()=>{r=!1},i.onerror=()=>{var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(r){t(r)}})).then((()=>!0)).catch((()=>!1))}async read(){if(await this._canUseIndexedDBPromise){return await async function(e){try{const t=await Xa();return await t.transaction(Ya).objectStore(Ya).get(ec(e))}catch(gh){if(gh instanceof Gs)Da.warn(gh.message);else{const t=Va.create("idb-get",{originalErrorMessage:null==gh?void 0:gh.message});Da.warn(t.message)}}}(this.app)||{heartbeats:[]}}return{heartbeats:[]}}async overwrite(e){var t;if(await this._canUseIndexedDBPromise){const r=await this.read();return Za(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:r.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){var t;if(await this._canUseIndexedDBPromise){const r=await this.read();return Za(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...e.heartbeats]})}}}function ic(e){return zs(JSON.stringify({version:2,heartbeats:e})).length}
370
370
  /**
371
371
  * @license
372
372
  * Copyright 2019 Google LLC
@@ -382,7 +382,7 @@ class ua{constructor(e,t,r){this._isDeleted=!1,this._options=Object.assign({},e)
382
382
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
383
383
  * See the License for the specific language governing permissions and
384
384
  * limitations under the License.
385
- */var Ta;function Ca(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function Sa(){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."}}Ta="",aa(new Is("platform-logger",(e=>new Xs(e)),"PRIVATE")),aa(new Is("heartbeat",(e=>new ba(e)),"PRIVATE")),pa(Zs,ea,Ta),pa(Zs,ea,"esm2017"),pa("fire-js",""),"function"==typeof SuppressedError&&SuppressedError;const Ra=Sa,Oa=new gs("auth","Firebase",{"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."}),Aa="auth/captcha-check-failed",Pa="auth/invalid-verification-code",Na="auth/invalid-credential",xa="auth/invalid-phone-number",La="auth/invalid-verification-id",Da="auth/missing-phone-number",Ma="auth/user-disabled",Ua=new Ls("@firebase/auth");function ja(e,...t){Ua.logLevel<=Rs.ERROR&&Ua.error(`Auth (${da}): ${e}`,...t)}
385
+ */var oc;function sc(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function ac(){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."}}oc="",za(new ia("platform-logger",(e=>new Na(e)),"PRIVATE")),za(new ia("heartbeat",(e=>new tc(e)),"PRIVATE")),Ka(xa,La,oc),Ka(xa,La,"esm2017"),Ka("fire-js",""),"function"==typeof SuppressedError&&SuppressedError;const cc=ac,lc=new Ys("auth","Firebase",{"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."}),uc="auth/captcha-check-failed",dc="auth/invalid-verification-code",hc="auth/invalid-credential",pc="auth/invalid-phone-number",fc="auth/invalid-verification-id",mc="auth/missing-phone-number",gc="auth/user-disabled",_c=new fa("@firebase/auth");function vc(e,...t){_c.logLevel<=ca.ERROR&&_c.error(`Auth (${qa}): ${e}`,...t)}
386
386
  /**
387
387
  * @license
388
388
  * Copyright 2020 Google LLC
@@ -398,7 +398,7 @@ class ua{constructor(e,t,r){this._isDeleted=!1,this._options=Object.assign({},e)
398
398
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
399
399
  * See the License for the specific language governing permissions and
400
400
  * limitations under the License.
401
- */function Fa(e,...t){throw za(e,...t)}function Ba(e,...t){return za(e,...t)}function za(e,...t){if("string"!=typeof e){const r=t[0],n=[...t.slice(1)];return n[0]&&(n[0].appName=e.name),e._errorFactory.create(r,...n)}return Oa.create(e,...t)}function Ha(e,t,...r){if(!e)throw za(t,...r)}function Va(e){const t="INTERNAL ASSERTION FAILED: "+e;throw ja(t),new Error(t)}function $a(e,t){e||Va(t)}
401
+ */function yc(e,...t){throw bc(e,...t)}function wc(e,...t){return bc(e,...t)}function bc(e,...t){if("string"!=typeof e){const r=t[0],n=[...t.slice(1)];return n[0]&&(n[0].appName=e.name),e._errorFactory.create(r,...n)}return lc.create(e,...t)}function Ec(e,t,...r){if(!e)throw bc(t,...r)}function kc(e){const t="INTERNAL ASSERTION FAILED: "+e;throw vc(t),new Error(t)}function Ic(e,t){e||kc(t)}
402
402
  /**
403
403
  * @license
404
404
  * Copyright 2020 Google LLC
@@ -414,7 +414,7 @@ class ua{constructor(e,t,r){this._isDeleted=!1,this._options=Object.assign({},e)
414
414
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
415
415
  * See the License for the specific language governing permissions and
416
416
  * limitations under the License.
417
- */function qa(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.href)||""}function Wa(){return"http:"===Ka()||"https:"===Ka()}function Ka(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.protocol)||null}
417
+ */function Tc(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.href)||""}function Sc(){return"http:"===Cc()||"https:"===Cc()}function Cc(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.protocol)||null}
418
418
  /**
419
419
  * @license
420
420
  * Copyright 2020 Google LLC
@@ -430,7 +430,7 @@ class ua{constructor(e,t,r){this._isDeleted=!1,this._options=Object.assign({},e)
430
430
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
431
431
  * See the License for the specific language governing permissions and
432
432
  * limitations under the License.
433
- */function Ja(){return!("undefined"!=typeof navigator&&navigator&&"onLine"in navigator&&"boolean"==typeof navigator.onLine&&(Wa()||function(){const e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id}()||"connection"in navigator))||navigator.onLine}
433
+ */function Rc(){return!("undefined"!=typeof navigator&&navigator&&"onLine"in navigator&&"boolean"==typeof navigator.onLine&&(Sc()||function(){const e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id}()||"connection"in navigator))||navigator.onLine}
434
434
  /**
435
435
  * @license
436
436
  * Copyright 2020 Google LLC
@@ -447,7 +447,7 @@ class ua{constructor(e,t,r){this._isDeleted=!1,this._options=Object.assign({},e)
447
447
  * See the License for the specific language governing permissions and
448
448
  * limitations under the License.
449
449
  */
450
- class Ga{constructor(e,t){this.shortDelay=e,this.longDelay=t,$a(t>e,"Short delay should be less than long delay!"),this.isMobile="undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(fs())||"object"==typeof navigator&&"ReactNative"===navigator.product}get(){return Ja()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}
450
+ class Oc{constructor(e,t){this.shortDelay=e,this.longDelay=t,Ic(t>e,"Short delay should be less than long delay!"),this.isMobile="undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(Js())||"object"==typeof navigator&&"ReactNative"===navigator.product}get(){return Rc()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}
451
451
  /**
452
452
  * @license
453
453
  * Copyright 2020 Google LLC
@@ -463,7 +463,7 @@ class Ga{constructor(e,t){this.shortDelay=e,this.longDelay=t,$a(t>e,"Short delay
463
463
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
464
464
  * See the License for the specific language governing permissions and
465
465
  * limitations under the License.
466
- */function Ya(e,t){$a(e.emulator,"Emulator should always be set here");const{url:r}=e.emulator;return t?`${r}${t.startsWith("/")?t.slice(1):t}`:r}
466
+ */function Ac(e,t){Ic(e.emulator,"Emulator should always be set here");const{url:r}=e.emulator;return t?`${r}${t.startsWith("/")?t.slice(1):t}`:r}
467
467
  /**
468
468
  * @license
469
469
  * Copyright 2020 Google LLC
@@ -479,7 +479,7 @@ class Ga{constructor(e,t){this.shortDelay=e,this.longDelay=t,$a(t>e,"Short delay
479
479
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
480
480
  * See the License for the specific language governing permissions and
481
481
  * limitations under the License.
482
- */class Qa{static initialize(e,t,r){this.fetchImpl=e,t&&(this.headersImpl=t),r&&(this.responseImpl=r)}static fetch(){return this.fetchImpl?this.fetchImpl:"undefined"!=typeof self&&"fetch"in self?self.fetch:"undefined"!=typeof globalThis&&globalThis.fetch?globalThis.fetch:"undefined"!=typeof fetch?fetch:void Va("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){return this.headersImpl?this.headersImpl:"undefined"!=typeof self&&"Headers"in self?self.Headers:"undefined"!=typeof globalThis&&globalThis.Headers?globalThis.Headers:"undefined"!=typeof Headers?Headers:void Va("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){return this.responseImpl?this.responseImpl:"undefined"!=typeof self&&"Response"in self?self.Response:"undefined"!=typeof globalThis&&globalThis.Response?globalThis.Response:"undefined"!=typeof Response?Response:void Va("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}
482
+ */class Pc{static initialize(e,t,r){this.fetchImpl=e,t&&(this.headersImpl=t),r&&(this.responseImpl=r)}static fetch(){return this.fetchImpl?this.fetchImpl:"undefined"!=typeof self&&"fetch"in self?self.fetch:"undefined"!=typeof globalThis&&globalThis.fetch?globalThis.fetch:"undefined"!=typeof fetch?fetch:void kc("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){return this.headersImpl?this.headersImpl:"undefined"!=typeof self&&"Headers"in self?self.Headers:"undefined"!=typeof globalThis&&globalThis.Headers?globalThis.Headers:"undefined"!=typeof Headers?Headers:void kc("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){return this.responseImpl?this.responseImpl:"undefined"!=typeof self&&"Response"in self?self.Response:"undefined"!=typeof globalThis&&globalThis.Response?globalThis.Response:"undefined"!=typeof Response?Response:void kc("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}
483
483
  /**
484
484
  * @license
485
485
  * Copyright 2020 Google LLC
@@ -495,7 +495,7 @@ class Ga{constructor(e,t){this.shortDelay=e,this.longDelay=t,$a(t>e,"Short delay
495
495
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
496
496
  * See the License for the specific language governing permissions and
497
497
  * limitations under the License.
498
- */const Xa={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",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"},Za=new Ga(3e4,6e4);
498
+ */const Nc={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",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"},xc=new Oc(3e4,6e4);
499
499
  /**
500
500
  * @license
501
501
  * Copyright 2020 Google LLC
@@ -511,7 +511,7 @@ class Ga{constructor(e,t){this.shortDelay=e,this.longDelay=t,$a(t>e,"Short delay
511
511
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
512
512
  * See the License for the specific language governing permissions and
513
513
  * limitations under the License.
514
- */function ec(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}async function tc(e,t,r,n,i={}){return rc(e,i,(async()=>{let i={},o={};n&&("GET"===t?o=n:i={body:JSON.stringify(n)});const s=ws(Object.assign({key:e.config.apiKey},o)).slice(1),a=await e._getAdditionalHeaders();return a["Content-Type"]="application/json",e.languageCode&&(a["X-Firebase-Locale"]=e.languageCode),Qa.fetch()(ic(e,e.config.apiHost,r,s),Object.assign({method:t,headers:a,referrerPolicy:"no-referrer"},i))}))}async function rc(e,t,r){e._canInitEmulator=!1;const n=Object.assign(Object.assign({},Xa),t);try{const t=new oc(e),i=await Promise.race([r(),t.promise]);t.clearNetworkTimeout();const o=await i.json();if("needConfirmation"in o)throw sc(e,"account-exists-with-different-credential",o);if(i.ok&&!("errorMessage"in o))return o;{const t=i.ok?o.errorMessage:o.error.message,[r,s]=t.split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===r)throw sc(e,"credential-already-in-use",o);if("EMAIL_EXISTS"===r)throw sc(e,"email-already-in-use",o);if("USER_DISABLED"===r)throw sc(e,"user-disabled",o);const a=n[r]||r.toLowerCase().replace(/[_\s]+/g,"-");if(s)throw function(e,t,r){const n=Object.assign(Object.assign({},Ra()),{[t]:r});return new gs("auth","Firebase",n).create(t,{appName:e.name})}(e,a,s);Fa(e,a)}}catch(Md){if(Md instanceof ms)throw Md;Fa(e,"network-request-failed",{message:String(Md)})}}async function nc(e,t,r,n,i={}){const o=await tc(e,t,r,n,i);return"mfaPendingCredential"in o&&Fa(e,"multi-factor-auth-required",{_serverResponse:o}),o}function ic(e,t,r,n){const i=`${t}${r}?${n}`;return e.config.emulator?Ya(e.config,i):`${e.config.apiScheme}://${i}`}class oc{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise(((e,t)=>{this.timer=setTimeout((()=>t(Ba(this.auth,"network-request-failed"))),Za.get())}))}clearNetworkTimeout(){clearTimeout(this.timer)}}function sc(e,t,r){const n={appName:e.name};r.email&&(n.email=r.email),r.phoneNumber&&(n.phoneNumber=r.phoneNumber);const i=Ba(e,t,n);return i.customData._tokenResponse=r,i}
514
+ */function Lc(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}async function Dc(e,t,r,n,i={}){return Mc(e,i,(async()=>{let i={},o={};n&&("GET"===t?o=n:i={body:JSON.stringify(n)});const s=ea(Object.assign({key:e.config.apiKey},o)).slice(1),a=await e._getAdditionalHeaders();return a["Content-Type"]="application/json",e.languageCode&&(a["X-Firebase-Locale"]=e.languageCode),Pc.fetch()(jc(e,e.config.apiHost,r,s),Object.assign({method:t,headers:a,referrerPolicy:"no-referrer"},i))}))}async function Mc(e,t,r){e._canInitEmulator=!1;const n=Object.assign(Object.assign({},Nc),t);try{const t=new Fc(e),i=await Promise.race([r(),t.promise]);t.clearNetworkTimeout();const o=await i.json();if("needConfirmation"in o)throw Bc(e,"account-exists-with-different-credential",o);if(i.ok&&!("errorMessage"in o))return o;{const t=i.ok?o.errorMessage:o.error.message,[r,s]=t.split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===r)throw Bc(e,"credential-already-in-use",o);if("EMAIL_EXISTS"===r)throw Bc(e,"email-already-in-use",o);if("USER_DISABLED"===r)throw Bc(e,"user-disabled",o);const a=n[r]||r.toLowerCase().replace(/[_\s]+/g,"-");if(s)throw function(e,t,r){const n=Object.assign(Object.assign({},cc()),{[t]:r});return new Ys("auth","Firebase",n).create(t,{appName:e.name})}(e,a,s);yc(e,a)}}catch(gh){if(gh instanceof Gs)throw gh;yc(e,"network-request-failed",{message:String(gh)})}}async function Uc(e,t,r,n,i={}){const o=await Dc(e,t,r,n,i);return"mfaPendingCredential"in o&&yc(e,"multi-factor-auth-required",{_serverResponse:o}),o}function jc(e,t,r,n){const i=`${t}${r}?${n}`;return e.config.emulator?Ac(e.config,i):`${e.config.apiScheme}://${i}`}class Fc{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise(((e,t)=>{this.timer=setTimeout((()=>t(wc(this.auth,"network-request-failed"))),xc.get())}))}clearNetworkTimeout(){clearTimeout(this.timer)}}function Bc(e,t,r){const n={appName:e.name};r.email&&(n.email=r.email),r.phoneNumber&&(n.phoneNumber=r.phoneNumber);const i=wc(e,t,n);return i.customData._tokenResponse=r,i}
515
515
  /**
516
516
  * @license
517
517
  * Copyright 2020 Google LLC
@@ -527,7 +527,7 @@ class Ga{constructor(e,t){this.shortDelay=e,this.longDelay=t,$a(t>e,"Short delay
527
527
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
528
528
  * See the License for the specific language governing permissions and
529
529
  * limitations under the License.
530
- */function ac(e){return void 0!==e&&void 0!==e.getResponse}
530
+ */function zc(e){return void 0!==e&&void 0!==e.getResponse}
531
531
  /**
532
532
  * @license
533
533
  * Copyright 2020 Google LLC
@@ -560,7 +560,7 @@ class Ga{constructor(e,t){this.shortDelay=e,this.longDelay=t,$a(t>e,"Short delay
560
560
  * See the License for the specific language governing permissions and
561
561
  * limitations under the License.
562
562
  */
563
- function cc(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(Md){}}function lc(e){return 1e3*Number(e)}function uc(e){const[t,r,n]=e.split(".");if(void 0===t||void 0===r||void 0===n)return ja("JWT malformed, contained fewer than 3 sections"),null;try{const e=cs(r);return e?JSON.parse(e):(ja("Failed to decode base64 JWT payload"),null)}catch(Md){return ja("Caught error parsing JWT payload as JSON",null==Md?void 0:Md.toString()),null}}
563
+ function Hc(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(gh){}}function Vc(e){return 1e3*Number(e)}function $c(e){const[t,r,n]=e.split(".");if(void 0===t||void 0===r||void 0===n)return vc("JWT malformed, contained fewer than 3 sections"),null;try{const e=Hs(r);return e?JSON.parse(e):(vc("Failed to decode base64 JWT payload"),null)}catch(gh){return vc("Caught error parsing JWT payload as JSON",null==gh?void 0:gh.toString()),null}}
564
564
  /**
565
565
  * @license
566
566
  * Copyright 2020 Google LLC
@@ -577,7 +577,7 @@ function cc(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))retur
577
577
  * See the License for the specific language governing permissions and
578
578
  * limitations under the License.
579
579
  */
580
- async function dc(e,t,r=!1){if(r)return t;try{return await t}catch(Md){throw Md instanceof ms&&function({code:e}){return"auth/user-disabled"===e||"auth/user-token-expired"===e}
580
+ async function qc(e,t,r=!1){if(r)return t;try{return await t}catch(gh){throw gh instanceof Gs&&function({code:e}){return"auth/user-disabled"===e||"auth/user-token-expired"===e}
581
581
  /**
582
582
  * @license
583
583
  * Copyright 2020 Google LLC
@@ -593,7 +593,7 @@ async function dc(e,t,r=!1){if(r)return t;try{return await t}catch(Md){throw Md
593
593
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
594
594
  * See the License for the specific language governing permissions and
595
595
  * limitations under the License.
596
- */(Md)&&e.auth.currentUser===e&&await e.auth.signOut(),Md}}class hc{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}getInterval(e){var t;if(e){const e=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),e}{this.errorBackoff=3e4;const e=(null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t:0)-Date.now()-3e5;return Math.max(0,e)}}schedule(e=!1){if(!this.isRunning)return;const t=this.getInterval(e);this.timerId=setTimeout((async()=>{await this.iteration()}),t)}async iteration(){try{await this.user.getIdToken(!0)}catch(Md){return void("auth/network-request-failed"===(null==Md?void 0:Md.code)&&this.schedule(!0))}this.schedule()}}
596
+ */(gh)&&e.auth.currentUser===e&&await e.auth.signOut(),gh}}class Wc{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}getInterval(e){var t;if(e){const e=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),e}{this.errorBackoff=3e4;const e=(null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t:0)-Date.now()-3e5;return Math.max(0,e)}}schedule(e=!1){if(!this.isRunning)return;const t=this.getInterval(e);this.timerId=setTimeout((async()=>{await this.iteration()}),t)}async iteration(){try{await this.user.getIdToken(!0)}catch(gh){return void("auth/network-request-failed"===(null==gh?void 0:gh.code)&&this.schedule(!0))}this.schedule()}}
597
597
  /**
598
598
  * @license
599
599
  * Copyright 2020 Google LLC
@@ -609,7 +609,7 @@ async function dc(e,t,r=!1){if(r)return t;try{return await t}catch(Md){throw Md
609
609
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
610
610
  * See the License for the specific language governing permissions and
611
611
  * limitations under the License.
612
- */class pc{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=cc(this.lastLoginAt),this.creationTime=cc(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}
612
+ */class Kc{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=Hc(this.lastLoginAt),this.creationTime=Hc(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}
613
613
  /**
614
614
  * @license
615
615
  * Copyright 2019 Google LLC
@@ -625,7 +625,7 @@ async function dc(e,t,r=!1){if(r)return t;try{return await t}catch(Md){throw Md
625
625
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
626
626
  * See the License for the specific language governing permissions and
627
627
  * limitations under the License.
628
- */async function fc(e){var t;const r=e.auth,n=await e.getIdToken(),i=await dc(e,async function(e,t){return tc(e,"POST","/v1/accounts:lookup",t)}(r,{idToken:n}));Ha(null==i?void 0:i.users.length,r,"internal-error");const o=i.users[0];e._notifyReloadListener(o);const s=(null===(t=o.providerUserInfo)||void 0===t?void 0:t.length)?o.providerUserInfo.map((e=>{var{providerId:t}=e,r=Ca(e,["providerId"]);return{providerId:t,uid:r.rawId||"",displayName:r.displayName||null,email:r.email||null,phoneNumber:r.phoneNumber||null,photoURL:r.photoUrl||null}})):[];const a=(c=e.providerData,l=s,[...c.filter((e=>!l.some((t=>t.providerId===e.providerId)))),...l]);var c,l;const u=e.isAnonymous,d=!(e.email&&o.passwordHash||(null==a?void 0:a.length)),h=!!u&&d,p={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:a,metadata:new pc(o.createdAt,o.lastLoginAt),isAnonymous:h};Object.assign(e,p)}
628
+ */async function Jc(e){var t;const r=e.auth,n=await e.getIdToken(),i=await qc(e,async function(e,t){return Dc(e,"POST","/v1/accounts:lookup",t)}(r,{idToken:n}));Ec(null==i?void 0:i.users.length,r,"internal-error");const o=i.users[0];e._notifyReloadListener(o);const s=(null===(t=o.providerUserInfo)||void 0===t?void 0:t.length)?o.providerUserInfo.map((e=>{var{providerId:t}=e,r=sc(e,["providerId"]);return{providerId:t,uid:r.rawId||"",displayName:r.displayName||null,email:r.email||null,phoneNumber:r.phoneNumber||null,photoURL:r.photoUrl||null}})):[];const a=(c=e.providerData,l=s,[...c.filter((e=>!l.some((t=>t.providerId===e.providerId)))),...l]);var c,l;const u=e.isAnonymous,d=!(e.email&&o.passwordHash||(null==a?void 0:a.length)),h=!!u&&d,p={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:a,metadata:new Kc(o.createdAt,o.lastLoginAt),isAnonymous:h};Object.assign(e,p)}
629
629
  /**
630
630
  * @license
631
631
  * Copyright 2020 Google LLC
@@ -642,7 +642,7 @@ async function dc(e,t,r=!1){if(r)return t;try{return await t}catch(Md){throw Md
642
642
  * See the License for the specific language governing permissions and
643
643
  * limitations under the License.
644
644
  */
645
- class mc{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){Ha(e.idToken,"internal-error"),Ha(void 0!==e.idToken,"internal-error"),Ha(void 0!==e.refreshToken,"internal-error");const t="expiresIn"in e&&void 0!==e.expiresIn?Number(e.expiresIn):function(e){const t=uc(e);return Ha(t,"internal-error"),Ha(void 0!==t.exp,"internal-error"),Ha(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 Ha(!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}async refresh(e,t){const{accessToken:r,refreshToken:n,expiresIn:i}=
645
+ class Gc{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){Ec(e.idToken,"internal-error"),Ec(void 0!==e.idToken,"internal-error"),Ec(void 0!==e.refreshToken,"internal-error");const t="expiresIn"in e&&void 0!==e.expiresIn?Number(e.expiresIn):function(e){const t=$c(e);return Ec(t,"internal-error"),Ec(void 0!==t.exp,"internal-error"),Ec(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 Ec(!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}async refresh(e,t){const{accessToken:r,refreshToken:n,expiresIn:i}=
646
646
  /**
647
647
  * @license
648
648
  * Copyright 2020 Google LLC
@@ -658,7 +658,7 @@ class mc{constructor(){this.refreshToken=null,this.accessToken=null,this.expirat
658
658
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
659
659
  * See the License for the specific language governing permissions and
660
660
  * limitations under the License.
661
- */await async function(e,t){const r=await rc(e,{},(async()=>{const r=ws({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:n,apiKey:i}=e.config,o=ic(e,n,"/v1/token",`key=${i}`),s=await e._getAdditionalHeaders();return s["Content-Type"]="application/x-www-form-urlencoded",Qa.fetch()(o,{method:"POST",headers:s,body:r})}));return{accessToken:r.access_token,expiresIn:r.expires_in,refreshToken:r.refresh_token}}(e,t);this.updateTokensAndExpiration(r,n,Number(i))}updateTokensAndExpiration(e,t,r){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*r}static fromJSON(e,t){const{refreshToken:r,accessToken:n,expirationTime:i}=t,o=new mc;return r&&(Ha("string"==typeof r,"internal-error",{appName:e}),o.refreshToken=r),n&&(Ha("string"==typeof n,"internal-error",{appName:e}),o.accessToken=n),i&&(Ha("number"==typeof i,"internal-error",{appName:e}),o.expirationTime=i),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new mc,this.toJSON())}_performRefresh(){return Va("not implemented")}}
661
+ */await async function(e,t){const r=await Mc(e,{},(async()=>{const r=ea({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:n,apiKey:i}=e.config,o=jc(e,n,"/v1/token",`key=${i}`),s=await e._getAdditionalHeaders();return s["Content-Type"]="application/x-www-form-urlencoded",Pc.fetch()(o,{method:"POST",headers:s,body:r})}));return{accessToken:r.access_token,expiresIn:r.expires_in,refreshToken:r.refresh_token}}(e,t);this.updateTokensAndExpiration(r,n,Number(i))}updateTokensAndExpiration(e,t,r){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*r}static fromJSON(e,t){const{refreshToken:r,accessToken:n,expirationTime:i}=t,o=new Gc;return r&&(Ec("string"==typeof r,"internal-error",{appName:e}),o.refreshToken=r),n&&(Ec("string"==typeof n,"internal-error",{appName:e}),o.accessToken=n),i&&(Ec("number"==typeof i,"internal-error",{appName:e}),o.expirationTime=i),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new Gc,this.toJSON())}_performRefresh(){return kc("not implemented")}}
662
662
  /**
663
663
  * @license
664
664
  * Copyright 2020 Google LLC
@@ -674,7 +674,7 @@ class mc{constructor(){this.refreshToken=null,this.accessToken=null,this.expirat
674
674
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
675
675
  * See the License for the specific language governing permissions and
676
676
  * limitations under the License.
677
- */function gc(e,t){Ha("string"==typeof e||void 0===e,"internal-error",{appName:t})}class _c{constructor(e){var{uid:t,auth:r,stsTokenManager:n}=e,i=Ca(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new hc(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=r,this.stsTokenManager=n,this.accessToken=n.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 pc(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(e){const t=await dc(this,this.stsTokenManager.getToken(this.auth,e));return Ha(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return async function(e,t=!1){const r=ks(e),n=await r.getIdToken(t),i=uc(n);Ha(i&&i.exp&&i.auth_time&&i.iat,r.auth,"internal-error");const o="object"==typeof i.firebase?i.firebase:void 0,s=null==o?void 0:o.sign_in_provider;return{claims:i,token:n,authTime:cc(lc(i.auth_time)),issuedAtTime:cc(lc(i.iat)),expirationTime:cc(lc(i.exp)),signInProvider:s||null,signInSecondFactor:(null==o?void 0:o.sign_in_second_factor)||null}}(this,e)}reload(){return async function(e){const t=ks(e);await fc(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}(this)}_assign(e){this!==e&&(Ha(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map((e=>Object.assign({},e))),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){const t=new _c(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return t.metadata._copy(this.metadata),t}_onReload(e){Ha(!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 r=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),r=!0),t&&await fc(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){const e=await this.getIdToken();return await dc(this,
677
+ */function Yc(e,t){Ec("string"==typeof e||void 0===e,"internal-error",{appName:t})}class Qc{constructor(e){var{uid:t,auth:r,stsTokenManager:n}=e,i=sc(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new Wc(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=r,this.stsTokenManager=n,this.accessToken=n.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 Kc(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(e){const t=await qc(this,this.stsTokenManager.getToken(this.auth,e));return Ec(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return async function(e,t=!1){const r=na(e),n=await r.getIdToken(t),i=$c(n);Ec(i&&i.exp&&i.auth_time&&i.iat,r.auth,"internal-error");const o="object"==typeof i.firebase?i.firebase:void 0,s=null==o?void 0:o.sign_in_provider;return{claims:i,token:n,authTime:Hc(Vc(i.auth_time)),issuedAtTime:Hc(Vc(i.iat)),expirationTime:Hc(Vc(i.exp)),signInProvider:s||null,signInSecondFactor:(null==o?void 0:o.sign_in_second_factor)||null}}(this,e)}reload(){return async function(e){const t=na(e);await Jc(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}(this)}_assign(e){this!==e&&(Ec(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map((e=>Object.assign({},e))),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){const t=new Qc(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return t.metadata._copy(this.metadata),t}_onReload(e){Ec(!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 r=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),r=!0),t&&await Jc(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){const e=await this.getIdToken();return await qc(this,
678
678
  /**
679
679
  * @license
680
680
  * Copyright 2020 Google LLC
@@ -691,7 +691,7 @@ class mc{constructor(){this.refreshToken=null,this.accessToken=null,this.expirat
691
691
  * See the License for the specific language governing permissions and
692
692
  * limitations under the License.
693
693
  */
694
- async function(e,t){return tc(e,"POST","/v1/accounts:delete",t)}(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map((e=>Object.assign({},e))),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,t){var r,n,i,o,s,a,c,l;const u=null!==(r=t.displayName)&&void 0!==r?r:void 0,d=null!==(n=t.email)&&void 0!==n?n:void 0,h=null!==(i=t.phoneNumber)&&void 0!==i?i:void 0,p=null!==(o=t.photoURL)&&void 0!==o?o:void 0,f=null!==(s=t.tenantId)&&void 0!==s?s:void 0,m=null!==(a=t._redirectEventId)&&void 0!==a?a:void 0,g=null!==(c=t.createdAt)&&void 0!==c?c:void 0,_=null!==(l=t.lastLoginAt)&&void 0!==l?l:void 0,{uid:v,emailVerified:y,isAnonymous:w,providerData:b,stsTokenManager:E}=t;Ha(v&&E,e,"internal-error");const k=mc.fromJSON(this.name,E);Ha("string"==typeof v,e,"internal-error"),gc(u,e.name),gc(d,e.name),Ha("boolean"==typeof y,e,"internal-error"),Ha("boolean"==typeof w,e,"internal-error"),gc(h,e.name),gc(p,e.name),gc(f,e.name),gc(m,e.name),gc(g,e.name),gc(_,e.name);const I=new _c({uid:v,auth:e,email:d,emailVerified:y,displayName:u,isAnonymous:w,photoURL:p,phoneNumber:h,tenantId:f,stsTokenManager:k,createdAt:g,lastLoginAt:_});return b&&Array.isArray(b)&&(I.providerData=b.map((e=>Object.assign({},e)))),m&&(I._redirectEventId=m),I}static async _fromIdTokenResponse(e,t,r=!1){const n=new mc;n.updateFromServerResponse(t);const i=new _c({uid:t.localId,auth:e,stsTokenManager:n,isAnonymous:r});return await fc(i),i}}
694
+ async function(e,t){return Dc(e,"POST","/v1/accounts:delete",t)}(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map((e=>Object.assign({},e))),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,t){var r,n,i,o,s,a,c,l;const u=null!==(r=t.displayName)&&void 0!==r?r:void 0,d=null!==(n=t.email)&&void 0!==n?n:void 0,h=null!==(i=t.phoneNumber)&&void 0!==i?i:void 0,p=null!==(o=t.photoURL)&&void 0!==o?o:void 0,f=null!==(s=t.tenantId)&&void 0!==s?s:void 0,m=null!==(a=t._redirectEventId)&&void 0!==a?a:void 0,g=null!==(c=t.createdAt)&&void 0!==c?c:void 0,_=null!==(l=t.lastLoginAt)&&void 0!==l?l:void 0,{uid:v,emailVerified:y,isAnonymous:w,providerData:b,stsTokenManager:E}=t;Ec(v&&E,e,"internal-error");const k=Gc.fromJSON(this.name,E);Ec("string"==typeof v,e,"internal-error"),Yc(u,e.name),Yc(d,e.name),Ec("boolean"==typeof y,e,"internal-error"),Ec("boolean"==typeof w,e,"internal-error"),Yc(h,e.name),Yc(p,e.name),Yc(f,e.name),Yc(m,e.name),Yc(g,e.name),Yc(_,e.name);const I=new Qc({uid:v,auth:e,email:d,emailVerified:y,displayName:u,isAnonymous:w,photoURL:p,phoneNumber:h,tenantId:f,stsTokenManager:k,createdAt:g,lastLoginAt:_});return b&&Array.isArray(b)&&(I.providerData=b.map((e=>Object.assign({},e)))),m&&(I._redirectEventId=m),I}static async _fromIdTokenResponse(e,t,r=!1){const n=new Gc;n.updateFromServerResponse(t);const i=new Qc({uid:t.localId,auth:e,stsTokenManager:n,isAnonymous:r});return await Jc(i),i}}
695
695
  /**
696
696
  * @license
697
697
  * Copyright 2020 Google LLC
@@ -707,7 +707,7 @@ async function(e,t){return tc(e,"POST","/v1/accounts:delete",t)}(this.auth,{idTo
707
707
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
708
708
  * See the License for the specific language governing permissions and
709
709
  * limitations under the License.
710
- */const vc=new Map;function yc(e){$a(e instanceof Function,"Expected a class definition");let t=vc.get(e);return t?($a(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,vc.set(e,t),t)}
710
+ */const Xc=new Map;function Zc(e){Ic(e instanceof Function,"Expected a class definition");let t=Xc.get(e);return t?(Ic(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,Xc.set(e,t),t)}
711
711
  /**
712
712
  * @license
713
713
  * Copyright 2019 Google LLC
@@ -723,7 +723,7 @@ async function(e,t){return tc(e,"POST","/v1/accounts:delete",t)}(this.auth,{idTo
723
723
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
724
724
  * See the License for the specific language governing permissions and
725
725
  * limitations under the License.
726
- */class wc{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){const t=this.storage[e];return void 0===t?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}}wc.type="NONE";const bc=wc;
726
+ */class el{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){const t=this.storage[e];return void 0===t?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}}el.type="NONE";const tl=el;
727
727
  /**
728
728
  * @license
729
729
  * Copyright 2019 Google LLC
@@ -739,7 +739,7 @@ async function(e,t){return tc(e,"POST","/v1/accounts:delete",t)}(this.auth,{idTo
739
739
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
740
740
  * See the License for the specific language governing permissions and
741
741
  * limitations under the License.
742
- */function Ec(e,t,r){return`firebase:${e}:${t}:${r}`}class kc{constructor(e,t,r){this.persistence=e,this.auth=t,this.userKey=r;const{config:n,name:i}=this.auth;this.fullUserKey=Ec(this.userKey,n.apiKey,i),this.fullPersistenceKey=Ec("persistence",n.apiKey,i),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){const e=await this.persistence._get(this.fullUserKey);return e?_c._fromJSON(this.auth,e):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;const t=await this.getCurrentUser();return await this.removeCurrentUser(),this.persistence=e,t?this.setCurrentUser(t):void 0}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,t,r="authUser"){if(!t.length)return new kc(yc(bc),e,r);const n=(await Promise.all(t.map((async e=>{if(await e._isAvailable())return e})))).filter((e=>e));let i=n[0]||yc(bc);const o=Ec(r,e.config.apiKey,e.name);let s=null;for(const l of t)try{const t=await l._get(o);if(t){const r=_c._fromJSON(e,t);l!==i&&(s=r),i=l;break}}catch(c){}const a=n.filter((e=>e._shouldAllowMigration));return i._shouldAllowMigration&&a.length?(i=a[0],s&&await i._set(o,s.toJSON()),await Promise.all(t.map((async e=>{if(e!==i)try{await e._remove(o)}catch(c){}}))),new kc(i,e,r)):new kc(i,e,r)}}
742
+ */function rl(e,t,r){return`firebase:${e}:${t}:${r}`}class nl{constructor(e,t,r){this.persistence=e,this.auth=t,this.userKey=r;const{config:n,name:i}=this.auth;this.fullUserKey=rl(this.userKey,n.apiKey,i),this.fullPersistenceKey=rl("persistence",n.apiKey,i),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){const e=await this.persistence._get(this.fullUserKey);return e?Qc._fromJSON(this.auth,e):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;const t=await this.getCurrentUser();return await this.removeCurrentUser(),this.persistence=e,t?this.setCurrentUser(t):void 0}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,t,r="authUser"){if(!t.length)return new nl(Zc(tl),e,r);const n=(await Promise.all(t.map((async e=>{if(await e._isAvailable())return e})))).filter((e=>e));let i=n[0]||Zc(tl);const o=rl(r,e.config.apiKey,e.name);let s=null;for(const l of t)try{const t=await l._get(o);if(t){const r=Qc._fromJSON(e,t);l!==i&&(s=r),i=l;break}}catch(c){}const a=n.filter((e=>e._shouldAllowMigration));return i._shouldAllowMigration&&a.length?(i=a[0],s&&await i._set(o,s.toJSON()),await Promise.all(t.map((async e=>{if(e!==i)try{await e._remove(o)}catch(c){}}))),new nl(i,e,r)):new nl(i,e,r)}}
743
743
  /**
744
744
  * @license
745
745
  * Copyright 2020 Google LLC
@@ -755,7 +755,7 @@ async function(e,t){return tc(e,"POST","/v1/accounts:delete",t)}(this.auth,{idTo
755
755
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
756
756
  * See the License for the specific language governing permissions and
757
757
  * limitations under the License.
758
- */function Ic(e){const t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(Rc(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(Tc(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(Ac(t))return"Blackberry";if(Pc(t))return"Webos";if(Cc(t))return"Safari";if((t.includes("chrome/")||Sc(t))&&!t.includes("edge/"))return"Chrome";if(Oc(t))return"Android";{const t=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,r=e.match(t);if(2===(null==r?void 0:r.length))return r[1]}return"Other"}function Tc(e=fs()){return/firefox\//i.test(e)}function Cc(e=fs()){const t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function Sc(e=fs()){return/crios\//i.test(e)}function Rc(e=fs()){return/iemobile/i.test(e)}function Oc(e=fs()){return/android/i.test(e)}function Ac(e=fs()){return/blackberry/i.test(e)}function Pc(e=fs()){return/webos/i.test(e)}function Nc(e=fs()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function xc(){return function(){const e=fs();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}()&&10===document.documentMode}function Lc(e=fs()){return Nc(e)||Oc(e)||Pc(e)||Ac(e)||/windows phone/i.test(e)||Rc(e)}
758
+ */function il(e){const t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(cl(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(ol(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(ul(t))return"Blackberry";if(dl(t))return"Webos";if(sl(t))return"Safari";if((t.includes("chrome/")||al(t))&&!t.includes("edge/"))return"Chrome";if(ll(t))return"Android";{const t=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,r=e.match(t);if(2===(null==r?void 0:r.length))return r[1]}return"Other"}function ol(e=Js()){return/firefox\//i.test(e)}function sl(e=Js()){const t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function al(e=Js()){return/crios\//i.test(e)}function cl(e=Js()){return/iemobile/i.test(e)}function ll(e=Js()){return/android/i.test(e)}function ul(e=Js()){return/blackberry/i.test(e)}function dl(e=Js()){return/webos/i.test(e)}function hl(e=Js()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function pl(){return function(){const e=Js();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}()&&10===document.documentMode}function fl(e=Js()){return hl(e)||ll(e)||dl(e)||ul(e)||/windows phone/i.test(e)||cl(e)}
759
759
  /**
760
760
  * @license
761
761
  * Copyright 2020 Google LLC
@@ -772,7 +772,7 @@ async function(e,t){return tc(e,"POST","/v1/accounts:delete",t)}(this.auth,{idTo
772
772
  * See the License for the specific language governing permissions and
773
773
  * limitations under the License.
774
774
  */
775
- function Dc(e,t=[]){let r;switch(e){case"Browser":r=Ic(fs());break;case"Worker":r=`${Ic(fs())}-${e}`;break;default:r=e}const n=t.length?t.join(","):"FirebaseCore-web";return`${r}/JsCore/${da}/${n}`}
775
+ function ml(e,t=[]){let r;switch(e){case"Browser":r=il(Js());break;case"Worker":r=`${il(Js())}-${e}`;break;default:r=e}const n=t.length?t.join(","):"FirebaseCore-web";return`${r}/JsCore/${qa}/${n}`}
776
776
  /**
777
777
  * @license
778
778
  * Copyright 2022 Google LLC
@@ -788,7 +788,7 @@ function Dc(e,t=[]){let r;switch(e){case"Browser":r=Ic(fs());break;case"Worker":
788
788
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
789
789
  * See the License for the specific language governing permissions and
790
790
  * limitations under the License.
791
- */class Mc{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){const r=t=>new Promise(((r,n)=>{try{r(e(t))}catch(Md){n(Md)}}));r.onAbort=t,this.queue.push(r);const n=this.queue.length-1;return()=>{this.queue[n]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;const t=[];try{for(const r of this.queue)await r(e),r.onAbort&&t.push(r.onAbort)}catch(Md){t.reverse();for(const n of t)try{n()}catch(r){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null==Md?void 0:Md.message})}}}
791
+ */class gl{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){const r=t=>new Promise(((r,n)=>{try{r(e(t))}catch(gh){n(gh)}}));r.onAbort=t,this.queue.push(r);const n=this.queue.length-1;return()=>{this.queue[n]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;const t=[];try{for(const r of this.queue)await r(e),r.onAbort&&t.push(r.onAbort)}catch(gh){t.reverse();for(const n of t)try{n()}catch(r){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null==gh?void 0:gh.message})}}}
792
792
  /**
793
793
  * @license
794
794
  * Copyright 2023 Google LLC
@@ -804,7 +804,7 @@ function Dc(e,t=[]){let r;switch(e){case"Browser":r=Ic(fs());break;case"Worker":
804
804
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
805
805
  * See the License for the specific language governing permissions and
806
806
  * limitations under the License.
807
- */class Uc{constructor(e){var t,r,n,i;const o=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=null!==(t=o.minPasswordLength)&&void 0!==t?t:6,o.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=o.maxPasswordLength),void 0!==o.containsLowercaseCharacter&&(this.customStrengthOptions.containsLowercaseLetter=o.containsLowercaseCharacter),void 0!==o.containsUppercaseCharacter&&(this.customStrengthOptions.containsUppercaseLetter=o.containsUppercaseCharacter),void 0!==o.containsNumericCharacter&&(this.customStrengthOptions.containsNumericCharacter=o.containsNumericCharacter),void 0!==o.containsNonAlphanumericCharacter&&(this.customStrengthOptions.containsNonAlphanumericCharacter=o.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,"ENFORCEMENT_STATE_UNSPECIFIED"===this.enforcementState&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=null!==(n=null===(r=e.allowedNonAlphanumericCharacters)||void 0===r?void 0:r.join(""))&&void 0!==n?n:"",this.forceUpgradeOnSignin=null!==(i=e.forceUpgradeOnSignin)&&void 0!==i&&i,this.schemaVersion=e.schemaVersion}validatePassword(e){var t,r,n,i,o,s;const a={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,a),this.validatePasswordCharacterOptions(e,a),a.isValid&&(a.isValid=null===(t=a.meetsMinPasswordLength)||void 0===t||t),a.isValid&&(a.isValid=null===(r=a.meetsMaxPasswordLength)||void 0===r||r),a.isValid&&(a.isValid=null===(n=a.containsLowercaseLetter)||void 0===n||n),a.isValid&&(a.isValid=null===(i=a.containsUppercaseLetter)||void 0===i||i),a.isValid&&(a.isValid=null===(o=a.containsNumericCharacter)||void 0===o||o),a.isValid&&(a.isValid=null===(s=a.containsNonAlphanumericCharacter)||void 0===s||s),a}validatePasswordLengthOptions(e,t){const r=this.customStrengthOptions.minPasswordLength,n=this.customStrengthOptions.maxPasswordLength;r&&(t.meetsMinPasswordLength=e.length>=r),n&&(t.meetsMaxPasswordLength=e.length<=n)}validatePasswordCharacterOptions(e,t){let r;this.updatePasswordCharacterOptionsStatuses(t,!1,!1,!1,!1);for(let n=0;n<e.length;n++)r=e.charAt(n),this.updatePasswordCharacterOptionsStatuses(t,r>="a"&&r<="z",r>="A"&&r<="Z",r>="0"&&r<="9",this.allowedNonAlphanumericCharacters.includes(r))}updatePasswordCharacterOptionsStatuses(e,t,r,n,i){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=t)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=r)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=n)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=i))}}
807
+ */class _l{constructor(e){var t,r,n,i;const o=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=null!==(t=o.minPasswordLength)&&void 0!==t?t:6,o.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=o.maxPasswordLength),void 0!==o.containsLowercaseCharacter&&(this.customStrengthOptions.containsLowercaseLetter=o.containsLowercaseCharacter),void 0!==o.containsUppercaseCharacter&&(this.customStrengthOptions.containsUppercaseLetter=o.containsUppercaseCharacter),void 0!==o.containsNumericCharacter&&(this.customStrengthOptions.containsNumericCharacter=o.containsNumericCharacter),void 0!==o.containsNonAlphanumericCharacter&&(this.customStrengthOptions.containsNonAlphanumericCharacter=o.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,"ENFORCEMENT_STATE_UNSPECIFIED"===this.enforcementState&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=null!==(n=null===(r=e.allowedNonAlphanumericCharacters)||void 0===r?void 0:r.join(""))&&void 0!==n?n:"",this.forceUpgradeOnSignin=null!==(i=e.forceUpgradeOnSignin)&&void 0!==i&&i,this.schemaVersion=e.schemaVersion}validatePassword(e){var t,r,n,i,o,s;const a={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,a),this.validatePasswordCharacterOptions(e,a),a.isValid&&(a.isValid=null===(t=a.meetsMinPasswordLength)||void 0===t||t),a.isValid&&(a.isValid=null===(r=a.meetsMaxPasswordLength)||void 0===r||r),a.isValid&&(a.isValid=null===(n=a.containsLowercaseLetter)||void 0===n||n),a.isValid&&(a.isValid=null===(i=a.containsUppercaseLetter)||void 0===i||i),a.isValid&&(a.isValid=null===(o=a.containsNumericCharacter)||void 0===o||o),a.isValid&&(a.isValid=null===(s=a.containsNonAlphanumericCharacter)||void 0===s||s),a}validatePasswordLengthOptions(e,t){const r=this.customStrengthOptions.minPasswordLength,n=this.customStrengthOptions.maxPasswordLength;r&&(t.meetsMinPasswordLength=e.length>=r),n&&(t.meetsMaxPasswordLength=e.length<=n)}validatePasswordCharacterOptions(e,t){let r;this.updatePasswordCharacterOptionsStatuses(t,!1,!1,!1,!1);for(let n=0;n<e.length;n++)r=e.charAt(n),this.updatePasswordCharacterOptionsStatuses(t,r>="a"&&r<="z",r>="A"&&r<="Z",r>="0"&&r<="9",this.allowedNonAlphanumericCharacters.includes(r))}updatePasswordCharacterOptionsStatuses(e,t,r,n,i){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=t)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=r)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=n)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=i))}}
808
808
  /**
809
809
  * @license
810
810
  * Copyright 2020 Google LLC
@@ -820,7 +820,7 @@ function Dc(e,t=[]){let r;switch(e){case"Browser":r=Ic(fs());break;case"Worker":
820
820
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
821
821
  * See the License for the specific language governing permissions and
822
822
  * limitations under the License.
823
- */class jc{constructor(e,t,r,n){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=r,this.config=n,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Bc(this),this.idTokenSubscription=new Bc(this),this.beforeStateQueue=new Mc(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=Oa,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=n.sdkClientVersion}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=yc(t)),this._initializationPromise=this.queue((async()=>{var r,n;if(!this._deleted&&(this.persistenceManager=await kc.create(this,e),!this._deleted)){if(null===(r=this._popupRedirectResolver)||void 0===r?void 0:r._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch(Md){}await this.initializeCurrentUser(t),this.lastNotifiedUid=(null===(n=this.currentUser)||void 0===n?void 0:n.uid)||null,this._deleted||(this._isInitialized=!0)}})),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const e=await this.assertedPersistence.getCurrentUser();return this.currentUser||e?this.currentUser&&e&&this.currentUser.uid===e.uid?(this._currentUser._assign(e),void(await this.currentUser.getIdToken())):void(await this._updateCurrentUser(e,!0)):void 0}async initializeCurrentUser(e){var t;const r=await this.assertedPersistence.getCurrentUser();let n=r,i=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const r=null===(t=this.redirectUser)||void 0===t?void 0:t._redirectEventId,o=null==n?void 0:n._redirectEventId,s=await this.tryRedirectSignIn(e);r&&r!==o||!(null==s?void 0:s.user)||(n=s.user,i=!0)}if(!n)return this.directlySetCurrentUser(null);if(!n._redirectEventId){if(i)try{await this.beforeStateQueue.runMiddleware(n)}catch(Md){n=r,this._popupRedirectResolver._overrideRedirectResult(this,(()=>Promise.reject(Md)))}return n?this.reloadAndSetCurrentUserOrClear(n):this.directlySetCurrentUser(null)}return Ha(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===n._redirectEventId?this.directlySetCurrentUser(n):this.reloadAndSetCurrentUserOrClear(n)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch(Md){await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await fc(e)}catch(Md){if("auth/network-request-failed"!==(null==Md?void 0:Md.code))return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=function(){if("undefined"==typeof navigator)return null;const e=navigator;return e.languages&&e.languages[0]||e.language||null}()}async _delete(){this._deleted=!0}async updateCurrentUser(e){const t=e?ks(e):null;return t&&Ha(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&&Ha(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(yc(e))}))}_getRecaptchaConfig(){return null==this.tenantId?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();const t=this._getPasswordPolicyInternal();return t.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):t.validatePassword(e)}_getPasswordPolicyInternal(){return null===this.tenantId?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const e=await async function(e,t={}){return tc(e,"GET","/v2/passwordPolicy",ec(e,t))}
823
+ */class vl{constructor(e,t,r,n){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=r,this.config=n,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new wl(this),this.idTokenSubscription=new wl(this),this.beforeStateQueue=new gl(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=lc,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=n.sdkClientVersion}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=Zc(t)),this._initializationPromise=this.queue((async()=>{var r,n;if(!this._deleted&&(this.persistenceManager=await nl.create(this,e),!this._deleted)){if(null===(r=this._popupRedirectResolver)||void 0===r?void 0:r._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch(gh){}await this.initializeCurrentUser(t),this.lastNotifiedUid=(null===(n=this.currentUser)||void 0===n?void 0:n.uid)||null,this._deleted||(this._isInitialized=!0)}})),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const e=await this.assertedPersistence.getCurrentUser();return this.currentUser||e?this.currentUser&&e&&this.currentUser.uid===e.uid?(this._currentUser._assign(e),void(await this.currentUser.getIdToken())):void(await this._updateCurrentUser(e,!0)):void 0}async initializeCurrentUser(e){var t;const r=await this.assertedPersistence.getCurrentUser();let n=r,i=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const r=null===(t=this.redirectUser)||void 0===t?void 0:t._redirectEventId,o=null==n?void 0:n._redirectEventId,s=await this.tryRedirectSignIn(e);r&&r!==o||!(null==s?void 0:s.user)||(n=s.user,i=!0)}if(!n)return this.directlySetCurrentUser(null);if(!n._redirectEventId){if(i)try{await this.beforeStateQueue.runMiddleware(n)}catch(gh){n=r,this._popupRedirectResolver._overrideRedirectResult(this,(()=>Promise.reject(gh)))}return n?this.reloadAndSetCurrentUserOrClear(n):this.directlySetCurrentUser(null)}return Ec(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===n._redirectEventId?this.directlySetCurrentUser(n):this.reloadAndSetCurrentUserOrClear(n)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch(gh){await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await Jc(e)}catch(gh){if("auth/network-request-failed"!==(null==gh?void 0:gh.code))return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=function(){if("undefined"==typeof navigator)return null;const e=navigator;return e.languages&&e.languages[0]||e.language||null}()}async _delete(){this._deleted=!0}async updateCurrentUser(e){const t=e?na(e):null;return t&&Ec(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&&Ec(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(Zc(e))}))}_getRecaptchaConfig(){return null==this.tenantId?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();const t=this._getPasswordPolicyInternal();return t.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):t.validatePassword(e)}_getPasswordPolicyInternal(){return null===this.tenantId?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const e=await async function(e,t={}){return Dc(e,"GET","/v2/passwordPolicy",Lc(e,t))}
824
824
  /**
825
825
  * @license
826
826
  * Copyright 2023 Google LLC
@@ -836,7 +836,7 @@ function Dc(e,t=[]){let r;switch(e){case"Browser":r=Ic(fs());break;case"Worker":
836
836
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
837
837
  * See the License for the specific language governing permissions and
838
838
  * limitations under the License.
839
- */(this),t=new Uc(e);null===this.tenantId?this._projectPasswordPolicy=t:this._tenantPasswordPolicies[this.tenantId]=t}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new gs("auth","Firebase",e())}onAuthStateChanged(e,t,r){return this.registerStateListener(this.authStateSubscription,e,t,r)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,r){return this.registerStateListener(this.idTokenSubscription,e,t,r)}authStateReady(){return new Promise(((e,t)=>{if(this.currentUser)e();else{const r=this.onAuthStateChanged((()=>{r(),e()}),t)}}))}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:null===(e=this._currentUser)||void 0===e?void 0:e.toJSON()}}async _setRedirectUser(e,t){const r=await this.getOrInitRedirectPersistenceManager(t);return null===e?r.removeCurrentUser():r.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){const t=e&&yc(e)||this._popupRedirectResolver;Ha(t,this,"argument-error"),this.redirectPersistenceManager=await kc.create(this,[yc(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var t,r;return this._isInitialized&&await this.queue((async()=>{})),(null===(t=this._currentUser)||void 0===t?void 0:t._redirectEventId)===e?this._currentUser:(null===(r=this.redirectUser)||void 0===r?void 0:r._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue((async()=>this.directlySetCurrentUser(e)))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,t;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const r=null!==(t=null===(e=this.currentUser)||void 0===e?void 0:e.uid)&&void 0!==t?t:null;this.lastNotifiedUid!==r&&(this.lastNotifiedUid=r,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,r,n){if(this._deleted)return()=>{};const i="function"==typeof t?t:t.next.bind(t);let o=!1;const s=this._isInitialized?Promise.resolve():this._initializationPromise;if(Ha(s,this,"internal-error"),s.then((()=>{o||i(this.currentUser)})),"function"==typeof t){const i=e.addObserver(t,r,n);return()=>{o=!0,i()}}{const r=e.addObserver(t);return()=>{o=!0,r()}}}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 Ha(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){e&&!this.frameworks.includes(e)&&(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=Dc(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var e;const t={"X-Client-Version":this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);const r=await(null===(e=this.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getHeartbeatsHeader());r&&(t["X-Firebase-Client"]=r);const n=await this._getAppCheckToken();return n&&(t["X-Firebase-AppCheck"]=n),t}async _getAppCheckToken(){var e;const t=await(null===(e=this.appCheckServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getToken());return(null==t?void 0:t.error)&&function(e,...t){Ua.logLevel<=Rs.WARN&&Ua.warn(`Auth (${da}): ${e}`,...t)}(`Error while retrieving App Check token: ${t.error}`),null==t?void 0:t.token}}function Fc(e){return ks(e)}class Bc{constructor(e){this.auth=e,this.observer=null,this.addObserver=function(e,t){const r=new bs(e,t);return r.subscribe.bind(r)}((e=>this.observer=e))}get next(){return Ha(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}
839
+ */(this),t=new _l(e);null===this.tenantId?this._projectPasswordPolicy=t:this._tenantPasswordPolicies[this.tenantId]=t}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new Ys("auth","Firebase",e())}onAuthStateChanged(e,t,r){return this.registerStateListener(this.authStateSubscription,e,t,r)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,r){return this.registerStateListener(this.idTokenSubscription,e,t,r)}authStateReady(){return new Promise(((e,t)=>{if(this.currentUser)e();else{const r=this.onAuthStateChanged((()=>{r(),e()}),t)}}))}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:null===(e=this._currentUser)||void 0===e?void 0:e.toJSON()}}async _setRedirectUser(e,t){const r=await this.getOrInitRedirectPersistenceManager(t);return null===e?r.removeCurrentUser():r.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){const t=e&&Zc(e)||this._popupRedirectResolver;Ec(t,this,"argument-error"),this.redirectPersistenceManager=await nl.create(this,[Zc(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var t,r;return this._isInitialized&&await this.queue((async()=>{})),(null===(t=this._currentUser)||void 0===t?void 0:t._redirectEventId)===e?this._currentUser:(null===(r=this.redirectUser)||void 0===r?void 0:r._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue((async()=>this.directlySetCurrentUser(e)))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,t;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const r=null!==(t=null===(e=this.currentUser)||void 0===e?void 0:e.uid)&&void 0!==t?t:null;this.lastNotifiedUid!==r&&(this.lastNotifiedUid=r,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,r,n){if(this._deleted)return()=>{};const i="function"==typeof t?t:t.next.bind(t);let o=!1;const s=this._isInitialized?Promise.resolve():this._initializationPromise;if(Ec(s,this,"internal-error"),s.then((()=>{o||i(this.currentUser)})),"function"==typeof t){const i=e.addObserver(t,r,n);return()=>{o=!0,i()}}{const r=e.addObserver(t);return()=>{o=!0,r()}}}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 Ec(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){e&&!this.frameworks.includes(e)&&(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=ml(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var e;const t={"X-Client-Version":this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);const r=await(null===(e=this.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getHeartbeatsHeader());r&&(t["X-Firebase-Client"]=r);const n=await this._getAppCheckToken();return n&&(t["X-Firebase-AppCheck"]=n),t}async _getAppCheckToken(){var e;const t=await(null===(e=this.appCheckServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getToken());return(null==t?void 0:t.error)&&function(e,...t){_c.logLevel<=ca.WARN&&_c.warn(`Auth (${qa}): ${e}`,...t)}(`Error while retrieving App Check token: ${t.error}`),null==t?void 0:t.token}}function yl(e){return na(e)}class wl{constructor(e){this.auth=e,this.observer=null,this.addObserver=function(e,t){const r=new ta(e,t);return r.subscribe.bind(r)}((e=>this.observer=e))}get next(){return Ec(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}
840
840
  /**
841
841
  * @license
842
842
  * Copyright 2020 Google LLC
@@ -852,7 +852,7 @@ function Dc(e,t=[]){let r;switch(e){case"Browser":r=Ic(fs());break;case"Worker":
852
852
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
853
853
  * See the License for the specific language governing permissions and
854
854
  * limitations under the License.
855
- */function zc(e){return new Promise(((t,r)=>{const n=document.createElement("script");var i,o;n.setAttribute("src",e),n.onload=t,n.onerror=e=>{const t=Ba("internal-error");t.customData=e,r(t)},n.type="text/javascript",n.charset="UTF-8",(null!==(o=null===(i=document.getElementsByTagName("head"))||void 0===i?void 0:i[0])&&void 0!==o?o:document).appendChild(n)}))}function Hc(e){return`__${e}${Math.floor(1e6*Math.random())}`}
855
+ */function bl(e){return new Promise(((t,r)=>{const n=document.createElement("script");var i,o;n.setAttribute("src",e),n.onload=t,n.onerror=e=>{const t=wc("internal-error");t.customData=e,r(t)},n.type="text/javascript",n.charset="UTF-8",(null!==(o=null===(i=document.getElementsByTagName("head"))||void 0===i?void 0:i[0])&&void 0!==o?o:document).appendChild(n)}))}function El(e){return`__${e}${Math.floor(1e6*Math.random())}`}
856
856
  /**
857
857
  * @license
858
858
  * Copyright 2020 Google LLC
@@ -868,7 +868,7 @@ function Dc(e,t=[]){let r;switch(e){case"Browser":r=Ic(fs());break;case"Worker":
868
868
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
869
869
  * See the License for the specific language governing permissions and
870
870
  * limitations under the License.
871
- */function Vc(e,t,r){const n=Fc(e);Ha(n._canInitEmulator,n,"emulator-config-failed"),Ha(/^https?:\/\//.test(t),n,"invalid-emulator-scheme");const i=!!(null==r?void 0:r.disableWarnings),o=$c(t),{host:s,port:a}=function(e){const t=$c(e),r=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!r)return{host:"",port:null};const n=r[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(n);if(i){const e=i[1];return{host:e,port:qc(n.substr(e.length+1))}}{const[e,t]=n.split(":");return{host:e,port:qc(t)}}}(t),c=null===a?"":`:${a}`;n.config.emulator={url:`${o}//${s}${c}/`},n.settings.appVerificationDisabledForTesting=!0,n.emulatorConfig=Object.freeze({host:s,port:a,protocol:o.replace(":",""),options:Object.freeze({disableWarnings:i})}),i||function(){function e(){const e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}"undefined"!=typeof console&&"function"==typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials.");"undefined"!=typeof window&&"undefined"!=typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}
871
+ */function kl(e,t,r){const n=yl(e);Ec(n._canInitEmulator,n,"emulator-config-failed"),Ec(/^https?:\/\//.test(t),n,"invalid-emulator-scheme");const i=!!(null==r?void 0:r.disableWarnings),o=Il(t),{host:s,port:a}=function(e){const t=Il(e),r=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!r)return{host:"",port:null};const n=r[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(n);if(i){const e=i[1];return{host:e,port:Tl(n.substr(e.length+1))}}{const[e,t]=n.split(":");return{host:e,port:Tl(t)}}}(t),c=null===a?"":`:${a}`;n.config.emulator={url:`${o}//${s}${c}/`},n.settings.appVerificationDisabledForTesting=!0,n.emulatorConfig=Object.freeze({host:s,port:a,protocol:o.replace(":",""),options:Object.freeze({disableWarnings:i})}),i||function(){function e(){const e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}"undefined"!=typeof console&&"function"==typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials.");"undefined"!=typeof window&&"undefined"!=typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}
872
872
  /**
873
873
  * @license
874
874
  * Copyright 2020 Google LLC
@@ -884,7 +884,7 @@ function Dc(e,t=[]){let r;switch(e){case"Browser":r=Ic(fs());break;case"Worker":
884
884
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
885
885
  * See the License for the specific language governing permissions and
886
886
  * limitations under the License.
887
- */()}function $c(e){const t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function qc(e){if(!e)return null;const t=Number(e);return isNaN(t)?null:t}class Wc{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return Va("not implemented")}_getIdTokenResponse(e){return Va("not implemented")}_linkToIdToken(e,t){return Va("not implemented")}_getReauthenticationResolver(e){return Va("not implemented")}}
887
+ */()}function Il(e){const t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function Tl(e){if(!e)return null;const t=Number(e);return isNaN(t)?null:t}class Sl{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return kc("not implemented")}_getIdTokenResponse(e){return kc("not implemented")}_linkToIdToken(e,t){return kc("not implemented")}_getReauthenticationResolver(e){return kc("not implemented")}}
888
888
  /**
889
889
  * @license
890
890
  * Copyright 2020 Google LLC
@@ -900,7 +900,7 @@ function Dc(e,t=[]){let r;switch(e){case"Browser":r=Ic(fs());break;case"Worker":
900
900
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
901
901
  * See the License for the specific language governing permissions and
902
902
  * limitations under the License.
903
- */async function Kc(e,t){return nc(e,"POST","/v1/accounts:signInWithIdp",ec(e,t))}
903
+ */async function Cl(e,t){return Uc(e,"POST","/v1/accounts:signInWithIdp",Lc(e,t))}
904
904
  /**
905
905
  * @license
906
906
  * Copyright 2020 Google LLC
@@ -916,7 +916,7 @@ function Dc(e,t=[]){let r;switch(e){case"Browser":r=Ic(fs());break;case"Worker":
916
916
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
917
917
  * See the License for the specific language governing permissions and
918
918
  * limitations under the License.
919
- */class Jc extends Wc{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const t=new Jc(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):Fa("argument-error"),t}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){const t="string"==typeof e?JSON.parse(e):e,{providerId:r,signInMethod:n}=t,i=Ca(t,["providerId","signInMethod"]);if(!r||!n)return null;const o=new Jc(r,n);return o.idToken=i.idToken||void 0,o.accessToken=i.accessToken||void 0,o.secret=i.secret,o.nonce=i.nonce,o.pendingToken=i.pendingToken||null,o}_getIdTokenResponse(e){return Kc(e,this.buildRequest())}_linkToIdToken(e,t){const r=this.buildRequest();return r.idToken=t,Kc(e,r)}_getReauthenticationResolver(e){const t=this.buildRequest();return t.autoCreate=!1,Kc(e,t)}buildRequest(){const e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{const t={};this.idToken&&(t.id_token=this.idToken),this.accessToken&&(t.access_token=this.accessToken),this.secret&&(t.oauth_token_secret=this.secret),t.providerId=this.providerId,this.nonce&&!this.pendingToken&&(t.nonce=this.nonce),e.postBody=ws(t)}return e}}
919
+ */class Rl extends Sl{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const t=new Rl(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):yc("argument-error"),t}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){const t="string"==typeof e?JSON.parse(e):e,{providerId:r,signInMethod:n}=t,i=sc(t,["providerId","signInMethod"]);if(!r||!n)return null;const o=new Rl(r,n);return o.idToken=i.idToken||void 0,o.accessToken=i.accessToken||void 0,o.secret=i.secret,o.nonce=i.nonce,o.pendingToken=i.pendingToken||null,o}_getIdTokenResponse(e){return Cl(e,this.buildRequest())}_linkToIdToken(e,t){const r=this.buildRequest();return r.idToken=t,Cl(e,r)}_getReauthenticationResolver(e){const t=this.buildRequest();return t.autoCreate=!1,Cl(e,t)}buildRequest(){const e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{const t={};this.idToken&&(t.id_token=this.idToken),this.accessToken&&(t.access_token=this.accessToken),this.secret&&(t.oauth_token_secret=this.secret),t.providerId=this.providerId,this.nonce&&!this.pendingToken&&(t.nonce=this.nonce),e.postBody=ea(t)}return e}}
920
920
  /**
921
921
  * @license
922
922
  * Copyright 2020 Google LLC
@@ -932,7 +932,7 @@ function Dc(e,t=[]){let r;switch(e){case"Browser":r=Ic(fs());break;case"Worker":
932
932
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
933
933
  * See the License for the specific language governing permissions and
934
934
  * limitations under the License.
935
- */const Gc={USER_NOT_FOUND:"user-not-found"};
935
+ */const Ol={USER_NOT_FOUND:"user-not-found"};
936
936
  /**
937
937
  * @license
938
938
  * Copyright 2020 Google LLC
@@ -949,7 +949,7 @@ function Dc(e,t=[]){let r;switch(e){case"Browser":r=Ic(fs());break;case"Worker":
949
949
  * See the License for the specific language governing permissions and
950
950
  * limitations under the License.
951
951
  */
952
- class Yc extends Wc{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new Yc({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new Yc({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return async function(e,t){return nc(e,"POST","/v1/accounts:signInWithPhoneNumber",ec(e,t))}(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return async function(e,t){const r=await nc(e,"POST","/v1/accounts:signInWithPhoneNumber",ec(e,t));if(r.temporaryProof)throw sc(e,"account-exists-with-different-credential",r);return r}(e,Object.assign({idToken:t},this._makeVerificationRequest()))}_getReauthenticationResolver(e){return async function(e,t){return nc(e,"POST","/v1/accounts:signInWithPhoneNumber",ec(e,Object.assign(Object.assign({},t),{operation:"REAUTH"})),Gc)}(e,this._makeVerificationRequest())}_makeVerificationRequest(){const{temporaryProof:e,phoneNumber:t,verificationId:r,verificationCode:n}=this.params;return e&&t?{temporaryProof:e,phoneNumber:t}:{sessionInfo:r,code:n}}toJSON(){const e={providerId:this.providerId};return this.params.phoneNumber&&(e.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&(e.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&(e.verificationCode=this.params.verificationCode),this.params.verificationId&&(e.verificationId=this.params.verificationId),e}static fromJSON(e){"string"==typeof e&&(e=JSON.parse(e));const{verificationId:t,verificationCode:r,phoneNumber:n,temporaryProof:i}=e;return r||t||n||i?new Yc({verificationId:t,verificationCode:r,phoneNumber:n,temporaryProof:i}):null}}
952
+ class Al extends Sl{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new Al({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new Al({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return async function(e,t){return Uc(e,"POST","/v1/accounts:signInWithPhoneNumber",Lc(e,t))}(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return async function(e,t){const r=await Uc(e,"POST","/v1/accounts:signInWithPhoneNumber",Lc(e,t));if(r.temporaryProof)throw Bc(e,"account-exists-with-different-credential",r);return r}(e,Object.assign({idToken:t},this._makeVerificationRequest()))}_getReauthenticationResolver(e){return async function(e,t){return Uc(e,"POST","/v1/accounts:signInWithPhoneNumber",Lc(e,Object.assign(Object.assign({},t),{operation:"REAUTH"})),Ol)}(e,this._makeVerificationRequest())}_makeVerificationRequest(){const{temporaryProof:e,phoneNumber:t,verificationId:r,verificationCode:n}=this.params;return e&&t?{temporaryProof:e,phoneNumber:t}:{sessionInfo:r,code:n}}toJSON(){const e={providerId:this.providerId};return this.params.phoneNumber&&(e.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&(e.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&(e.verificationCode=this.params.verificationCode),this.params.verificationId&&(e.verificationId=this.params.verificationId),e}static fromJSON(e){"string"==typeof e&&(e=JSON.parse(e));const{verificationId:t,verificationCode:r,phoneNumber:n,temporaryProof:i}=e;return r||t||n||i?new Al({verificationId:t,verificationCode:r,phoneNumber:n,temporaryProof:i}):null}}
953
953
  /**
954
954
  * @license
955
955
  * Copyright 2020 Google LLC
@@ -965,7 +965,7 @@ class Yc extends Wc{constructor(e){super("phone","phone"),this.params=e}static _
965
965
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
966
966
  * See the License for the specific language governing permissions and
967
967
  * limitations under the License.
968
- */class Qc{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}}
968
+ */class Pl{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}}
969
969
  /**
970
970
  * @license
971
971
  * Copyright 2019 Google LLC
@@ -981,7 +981,7 @@ class Yc extends Wc{constructor(e){super("phone","phone"),this.params=e}static _
981
981
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
982
982
  * See the License for the specific language governing permissions and
983
983
  * limitations under the License.
984
- */class Xc extends Qc{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}
984
+ */class Nl extends Pl{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}
985
985
  /**
986
986
  * @license
987
987
  * Copyright 2020 Google LLC
@@ -997,7 +997,7 @@ class Yc extends Wc{constructor(e){super("phone","phone"),this.params=e}static _
997
997
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
998
998
  * See the License for the specific language governing permissions and
999
999
  * limitations under the License.
1000
- */class Zc extends Xc{constructor(){super("facebook.com")}static credential(e){return Jc._fromParams({providerId:Zc.PROVIDER_ID,signInMethod:Zc.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Zc.credentialFromTaggedObject(e)}static credentialFromError(e){return Zc.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e))return null;if(!e.oauthAccessToken)return null;try{return Zc.credential(e.oauthAccessToken)}catch(t){return null}}}Zc.FACEBOOK_SIGN_IN_METHOD="facebook.com",Zc.PROVIDER_ID="facebook.com";
1000
+ */class xl extends Nl{constructor(){super("facebook.com")}static credential(e){return Rl._fromParams({providerId:xl.PROVIDER_ID,signInMethod:xl.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return xl.credentialFromTaggedObject(e)}static credentialFromError(e){return xl.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e))return null;if(!e.oauthAccessToken)return null;try{return xl.credential(e.oauthAccessToken)}catch(t){return null}}}xl.FACEBOOK_SIGN_IN_METHOD="facebook.com",xl.PROVIDER_ID="facebook.com";
1001
1001
  /**
1002
1002
  * @license
1003
1003
  * Copyright 2020 Google LLC
@@ -1014,7 +1014,7 @@ class Yc extends Wc{constructor(e){super("phone","phone"),this.params=e}static _
1014
1014
  * See the License for the specific language governing permissions and
1015
1015
  * limitations under the License.
1016
1016
  */
1017
- class el extends Xc{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return Jc._fromParams({providerId:el.PROVIDER_ID,signInMethod:el.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return el.credentialFromTaggedObject(e)}static credentialFromError(e){return el.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:t,oauthAccessToken:r}=e;if(!t&&!r)return null;try{return el.credential(t,r)}catch(n){return null}}}el.GOOGLE_SIGN_IN_METHOD="google.com",el.PROVIDER_ID="google.com";
1017
+ class Ll extends Nl{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return Rl._fromParams({providerId:Ll.PROVIDER_ID,signInMethod:Ll.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return Ll.credentialFromTaggedObject(e)}static credentialFromError(e){return Ll.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:t,oauthAccessToken:r}=e;if(!t&&!r)return null;try{return Ll.credential(t,r)}catch(n){return null}}}Ll.GOOGLE_SIGN_IN_METHOD="google.com",Ll.PROVIDER_ID="google.com";
1018
1018
  /**
1019
1019
  * @license
1020
1020
  * Copyright 2020 Google LLC
@@ -1031,7 +1031,7 @@ class el extends Xc{constructor(){super("google.com"),this.addScope("profile")}s
1031
1031
  * See the License for the specific language governing permissions and
1032
1032
  * limitations under the License.
1033
1033
  */
1034
- class tl extends Xc{constructor(){super("github.com")}static credential(e){return Jc._fromParams({providerId:tl.PROVIDER_ID,signInMethod:tl.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return tl.credentialFromTaggedObject(e)}static credentialFromError(e){return tl.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e))return null;if(!e.oauthAccessToken)return null;try{return tl.credential(e.oauthAccessToken)}catch(t){return null}}}tl.GITHUB_SIGN_IN_METHOD="github.com",tl.PROVIDER_ID="github.com";
1034
+ class Dl extends Nl{constructor(){super("github.com")}static credential(e){return Rl._fromParams({providerId:Dl.PROVIDER_ID,signInMethod:Dl.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Dl.credentialFromTaggedObject(e)}static credentialFromError(e){return Dl.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e))return null;if(!e.oauthAccessToken)return null;try{return Dl.credential(e.oauthAccessToken)}catch(t){return null}}}Dl.GITHUB_SIGN_IN_METHOD="github.com",Dl.PROVIDER_ID="github.com";
1035
1035
  /**
1036
1036
  * @license
1037
1037
  * Copyright 2020 Google LLC
@@ -1048,7 +1048,7 @@ class tl extends Xc{constructor(){super("github.com")}static credential(e){retur
1048
1048
  * See the License for the specific language governing permissions and
1049
1049
  * limitations under the License.
1050
1050
  */
1051
- class rl extends Xc{constructor(){super("twitter.com")}static credential(e,t){return Jc._fromParams({providerId:rl.PROVIDER_ID,signInMethod:rl.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return rl.credentialFromTaggedObject(e)}static credentialFromError(e){return rl.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthAccessToken:t,oauthTokenSecret:r}=e;if(!t||!r)return null;try{return rl.credential(t,r)}catch(n){return null}}}rl.TWITTER_SIGN_IN_METHOD="twitter.com",rl.PROVIDER_ID="twitter.com";
1051
+ class Ml extends Nl{constructor(){super("twitter.com")}static credential(e,t){return Rl._fromParams({providerId:Ml.PROVIDER_ID,signInMethod:Ml.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return Ml.credentialFromTaggedObject(e)}static credentialFromError(e){return Ml.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthAccessToken:t,oauthTokenSecret:r}=e;if(!t||!r)return null;try{return Ml.credential(t,r)}catch(n){return null}}}Ml.TWITTER_SIGN_IN_METHOD="twitter.com",Ml.PROVIDER_ID="twitter.com";
1052
1052
  /**
1053
1053
  * @license
1054
1054
  * Copyright 2020 Google LLC
@@ -1065,7 +1065,7 @@ class rl extends Xc{constructor(){super("twitter.com")}static credential(e,t){re
1065
1065
  * See the License for the specific language governing permissions and
1066
1066
  * limitations under the License.
1067
1067
  */
1068
- class nl{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,r,n=!1){const i=await _c._fromIdTokenResponse(e,r,n),o=il(r);return new nl({user:i,providerId:o,_tokenResponse:r,operationType:t})}static async _forOperation(e,t,r){await e._updateTokensIfNecessary(r,!0);const n=il(r);return new nl({user:e,providerId:n,_tokenResponse:r,operationType:t})}}function il(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}
1068
+ class Ul{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,r,n=!1){const i=await Qc._fromIdTokenResponse(e,r,n),o=jl(r);return new Ul({user:i,providerId:o,_tokenResponse:r,operationType:t})}static async _forOperation(e,t,r){await e._updateTokensIfNecessary(r,!0);const n=jl(r);return new Ul({user:e,providerId:n,_tokenResponse:r,operationType:t})}}function jl(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}
1069
1069
  /**
1070
1070
  * @license
1071
1071
  * Copyright 2020 Google LLC
@@ -1081,7 +1081,7 @@ class nl{constructor(e){this.user=e.user,this.providerId=e.providerId,this._toke
1081
1081
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1082
1082
  * See the License for the specific language governing permissions and
1083
1083
  * limitations under the License.
1084
- */class ol extends ms{constructor(e,t,r,n){var i;super(t.code,t.message),this.operationType=r,this.user=n,Object.setPrototypeOf(this,ol.prototype),this.customData={appName:e.name,tenantId:null!==(i=e.tenantId)&&void 0!==i?i:void 0,_serverResponse:t.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(e,t,r,n){return new ol(e,t,r,n)}}function sl(e,t,r,n){return("reauthenticate"===t?r._getReauthenticationResolver(e):r._getIdTokenResponse(e)).catch((r=>{if("auth/multi-factor-auth-required"===r.code)throw ol._fromErrorAndOperation(e,r,t,n);throw r}))}
1084
+ */class Fl extends Gs{constructor(e,t,r,n){var i;super(t.code,t.message),this.operationType=r,this.user=n,Object.setPrototypeOf(this,Fl.prototype),this.customData={appName:e.name,tenantId:null!==(i=e.tenantId)&&void 0!==i?i:void 0,_serverResponse:t.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(e,t,r,n){return new Fl(e,t,r,n)}}function Bl(e,t,r,n){return("reauthenticate"===t?r._getReauthenticationResolver(e):r._getIdTokenResponse(e)).catch((r=>{if("auth/multi-factor-auth-required"===r.code)throw Fl._fromErrorAndOperation(e,r,t,n);throw r}))}
1085
1085
  /**
1086
1086
  * @license
1087
1087
  * Copyright 2020 Google LLC
@@ -1098,7 +1098,7 @@ class nl{constructor(e){this.user=e.user,this.providerId=e.providerId,this._toke
1098
1098
  * See the License for the specific language governing permissions and
1099
1099
  * limitations under the License.
1100
1100
  */
1101
- async function al(e,t,r=!1){const n="signIn",i=await sl(e,n,t),o=await nl._fromIdTokenResponse(e,n,i);return r||await e._updateCurrentUser(o.user),o}const cl="__sak";
1101
+ async function zl(e,t,r=!1){const n="signIn",i=await Bl(e,n,t),o=await Ul._fromIdTokenResponse(e,n,i);return r||await e._updateCurrentUser(o.user),o}const Hl="__sak";
1102
1102
  /**
1103
1103
  * @license
1104
1104
  * Copyright 2019 Google LLC
@@ -1114,7 +1114,7 @@ async function al(e,t,r=!1){const n="signIn",i=await sl(e,n,t),o=await nl._fromI
1114
1114
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1115
1115
  * See the License for the specific language governing permissions and
1116
1116
  * limitations under the License.
1117
- */class ll{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{return this.storage?(this.storage.setItem(cl,"1"),this.storage.removeItem(cl),Promise.resolve(!0)):Promise.resolve(!1)}catch(e){return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){const t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}
1117
+ */class Vl{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{return this.storage?(this.storage.setItem(Hl,"1"),this.storage.removeItem(Hl),Promise.resolve(!0)):Promise.resolve(!1)}catch(e){return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){const t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}
1118
1118
  /**
1119
1119
  * @license
1120
1120
  * Copyright 2020 Google LLC
@@ -1130,7 +1130,7 @@ async function al(e,t,r=!1){const n="signIn",i=await sl(e,n,t),o=await nl._fromI
1130
1130
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1131
1131
  * See the License for the specific language governing permissions and
1132
1132
  * limitations under the License.
1133
- */class ul extends ll{constructor(){super((()=>window.localStorage),"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=function(){const e=fs();return Cc(e)||Nc(e)}()&&function(){try{return!(!window||window===window.top)}catch(Md){return!1}}(),this.fallbackToPolling=Lc(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const t of Object.keys(this.listeners)){const r=this.storage.getItem(t),n=this.localCache[t];r!==n&&e(t,n,r)}}onStorageEvent(e,t=!1){if(!e.key)return void this.forAllChangedKeys(((e,t,r)=>{this.notifyListeners(e,r)}));const r=e.key;if(t?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){const n=this.storage.getItem(r);if(e.newValue!==n)null!==e.newValue?this.storage.setItem(r,e.newValue):this.storage.removeItem(r);else if(this.localCache[r]===e.newValue&&!t)return}const n=()=>{const e=this.storage.getItem(r);(t||this.localCache[r]!==e)&&this.notifyListeners(r,e)},i=this.storage.getItem(r);xc()&&i!==e.newValue&&e.newValue!==e.oldValue?setTimeout(n,10):n()}notifyListeners(e,t){this.localCache[e]=t;const r=this.listeners[e];if(r)for(const n of Array.from(r))n(t?JSON.parse(t):t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval((()=>{this.forAllChangedKeys(((e,t,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:r}),!0)}))}),1e3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,t){0===Object.keys(this.listeners).length&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&(this.detachListener(),this.stopPolling())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){const t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}ul.type="LOCAL";const dl=ul;
1133
+ */class $l extends Vl{constructor(){super((()=>window.localStorage),"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=function(){const e=Js();return sl(e)||hl(e)}()&&function(){try{return!(!window||window===window.top)}catch(gh){return!1}}(),this.fallbackToPolling=fl(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const t of Object.keys(this.listeners)){const r=this.storage.getItem(t),n=this.localCache[t];r!==n&&e(t,n,r)}}onStorageEvent(e,t=!1){if(!e.key)return void this.forAllChangedKeys(((e,t,r)=>{this.notifyListeners(e,r)}));const r=e.key;if(t?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){const n=this.storage.getItem(r);if(e.newValue!==n)null!==e.newValue?this.storage.setItem(r,e.newValue):this.storage.removeItem(r);else if(this.localCache[r]===e.newValue&&!t)return}const n=()=>{const e=this.storage.getItem(r);(t||this.localCache[r]!==e)&&this.notifyListeners(r,e)},i=this.storage.getItem(r);pl()&&i!==e.newValue&&e.newValue!==e.oldValue?setTimeout(n,10):n()}notifyListeners(e,t){this.localCache[e]=t;const r=this.listeners[e];if(r)for(const n of Array.from(r))n(t?JSON.parse(t):t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval((()=>{this.forAllChangedKeys(((e,t,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:r}),!0)}))}),1e3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,t){0===Object.keys(this.listeners).length&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&(this.detachListener(),this.stopPolling())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){const t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}$l.type="LOCAL";const ql=$l;
1134
1134
  /**
1135
1135
  * @license
1136
1136
  * Copyright 2020 Google LLC
@@ -1146,7 +1146,7 @@ async function al(e,t,r=!1){const n="signIn",i=await sl(e,n,t),o=await nl._fromI
1146
1146
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1147
1147
  * See the License for the specific language governing permissions and
1148
1148
  * limitations under the License.
1149
- */class hl extends ll{constructor(){super((()=>window.sessionStorage),"SESSION")}_addListener(e,t){}_removeListener(e,t){}}hl.type="SESSION";const pl=hl;
1149
+ */class Wl extends Vl{constructor(){super((()=>window.sessionStorage),"SESSION")}_addListener(e,t){}_removeListener(e,t){}}Wl.type="SESSION";const Kl=Wl;
1150
1150
  /**
1151
1151
  * @license
1152
1152
  * Copyright 2019 Google LLC
@@ -1179,7 +1179,7 @@ async function al(e,t,r=!1){const n="signIn",i=await sl(e,n,t),o=await nl._fromI
1179
1179
  * See the License for the specific language governing permissions and
1180
1180
  * limitations under the License.
1181
1181
  */
1182
- class fl{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){const t=this.receivers.find((t=>t.isListeningto(e)));if(t)return t;const r=new fl(e);return this.receivers.push(r),r}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const t=e,{eventId:r,eventType:n,data:i}=t.data,o=this.handlersMap[n];if(!(null==o?void 0:o.size))return;t.ports[0].postMessage({status:"ack",eventId:r,eventType:n});const s=Array.from(o).map((async e=>e(t.origin,i))),a=await function(e){return Promise.all(e.map((async e=>{try{return{fulfilled:!0,value:await e}}catch(t){return{fulfilled:!1,reason:t}}})))}(s);t.ports[0].postMessage({status:"done",eventId:r,eventType:n,response:a})}_subscribe(e,t){0===Object.keys(this.handlersMap).length&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(t)}_unsubscribe(e,t){this.handlersMap[e]&&t&&this.handlersMap[e].delete(t),t&&0!==this.handlersMap[e].size||delete this.handlersMap[e],0===Object.keys(this.handlersMap).length&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}
1182
+ class Jl{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){const t=this.receivers.find((t=>t.isListeningto(e)));if(t)return t;const r=new Jl(e);return this.receivers.push(r),r}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const t=e,{eventId:r,eventType:n,data:i}=t.data,o=this.handlersMap[n];if(!(null==o?void 0:o.size))return;t.ports[0].postMessage({status:"ack",eventId:r,eventType:n});const s=Array.from(o).map((async e=>e(t.origin,i))),a=await function(e){return Promise.all(e.map((async e=>{try{return{fulfilled:!0,value:await e}}catch(t){return{fulfilled:!1,reason:t}}})))}(s);t.ports[0].postMessage({status:"done",eventId:r,eventType:n,response:a})}_subscribe(e,t){0===Object.keys(this.handlersMap).length&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(t)}_unsubscribe(e,t){this.handlersMap[e]&&t&&this.handlersMap[e].delete(t),t&&0!==this.handlersMap[e].size||delete this.handlersMap[e],0===Object.keys(this.handlersMap).length&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}
1183
1183
  /**
1184
1184
  * @license
1185
1185
  * Copyright 2020 Google LLC
@@ -1196,7 +1196,7 @@ class fl{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHa
1196
1196
  * See the License for the specific language governing permissions and
1197
1197
  * limitations under the License.
1198
1198
  */
1199
- function ml(e="",t=10){let r="";for(let n=0;n<t;n++)r+=Math.floor(10*Math.random());return e+r}
1199
+ function Gl(e="",t=10){let r="";for(let n=0;n<t;n++)r+=Math.floor(10*Math.random());return e+r}
1200
1200
  /**
1201
1201
  * @license
1202
1202
  * Copyright 2019 Google LLC
@@ -1212,7 +1212,7 @@ function ml(e="",t=10){let r="";for(let n=0;n<t;n++)r+=Math.floor(10*Math.random
1212
1212
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1213
1213
  * See the License for the specific language governing permissions and
1214
1214
  * limitations under the License.
1215
- */fl.receivers=[];class gl{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,r=50){const n="undefined"!=typeof MessageChannel?new MessageChannel:null;if(!n)throw new Error("connection_unavailable");let i,o;return new Promise(((s,a)=>{const c=ml("",20);n.port1.start();const l=setTimeout((()=>{a(new Error("unsupported_event"))}),r);o={messageChannel:n,onMessage(e){const t=e;if(t.data.eventId===c)switch(t.data.status){case"ack":clearTimeout(l),i=setTimeout((()=>{a(new Error("timeout"))}),3e3);break;case"done":clearTimeout(i),s(t.data.response);break;default:clearTimeout(l),clearTimeout(i),a(new Error("invalid_response"))}}},this.handlers.add(o),n.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:e,eventId:c,data:t},[n.port2])})).finally((()=>{o&&this.removeMessageHandler(o)}))}}
1215
+ */Jl.receivers=[];class Yl{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,r=50){const n="undefined"!=typeof MessageChannel?new MessageChannel:null;if(!n)throw new Error("connection_unavailable");let i,o;return new Promise(((s,a)=>{const c=Gl("",20);n.port1.start();const l=setTimeout((()=>{a(new Error("unsupported_event"))}),r);o={messageChannel:n,onMessage(e){const t=e;if(t.data.eventId===c)switch(t.data.status){case"ack":clearTimeout(l),i=setTimeout((()=>{a(new Error("timeout"))}),3e3);break;case"done":clearTimeout(i),s(t.data.response);break;default:clearTimeout(l),clearTimeout(i),a(new Error("invalid_response"))}}},this.handlers.add(o),n.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:e,eventId:c,data:t},[n.port2])})).finally((()=>{o&&this.removeMessageHandler(o)}))}}
1216
1216
  /**
1217
1217
  * @license
1218
1218
  * Copyright 2020 Google LLC
@@ -1228,7 +1228,7 @@ function ml(e="",t=10){let r="";for(let n=0;n<t;n++)r+=Math.floor(10*Math.random
1228
1228
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1229
1229
  * See the License for the specific language governing permissions and
1230
1230
  * limitations under the License.
1231
- */function _l(){return window}
1231
+ */function Ql(){return window}
1232
1232
  /**
1233
1233
  * @license
1234
1234
  * Copyright 2020 Google LLC.
@@ -1245,7 +1245,7 @@ function ml(e="",t=10){let r="";for(let n=0;n<t;n++)r+=Math.floor(10*Math.random
1245
1245
  * See the License for the specific language governing permissions and
1246
1246
  * limitations under the License.
1247
1247
  */
1248
- function vl(){return void 0!==_l().WorkerGlobalScope&&"function"==typeof _l().importScripts}
1248
+ function Xl(){return void 0!==Ql().WorkerGlobalScope&&"function"==typeof Ql().importScripts}
1249
1249
  /**
1250
1250
  * @license
1251
1251
  * Copyright 2019 Google LLC
@@ -1262,7 +1262,7 @@ function vl(){return void 0!==_l().WorkerGlobalScope&&"function"==typeof _l().im
1262
1262
  * See the License for the specific language governing permissions and
1263
1263
  * limitations under the License.
1264
1264
  */
1265
- const yl="firebaseLocalStorageDb",wl="firebaseLocalStorage",bl="fbase_key";class El{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 kl(e,t){return e.transaction([wl],t?"readwrite":"readonly").objectStore(wl)}function Il(){const e=indexedDB.open(yl,1);return new Promise(((t,r)=>{e.addEventListener("error",(()=>{r(e.error)})),e.addEventListener("upgradeneeded",(()=>{const t=e.result;try{t.createObjectStore(wl,{keyPath:bl})}catch(Md){r(Md)}})),e.addEventListener("success",(async()=>{const r=e.result;r.objectStoreNames.contains(wl)?t(r):(r.close(),await function(){const e=indexedDB.deleteDatabase(yl);return new El(e).toPromise()}(),t(await Il()))}))}))}async function Tl(e,t,r){const n=kl(e,!0).put({[bl]:t,value:r});return new El(n).toPromise()}function Cl(e,t){const r=kl(e,!0).delete(t);return new El(r).toPromise()}class Sl{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 Il()),this.db}async _withRetries(e){let t=0;for(;;)try{const t=await this._openDb();return await e(t)}catch(Md){if(t++>3)throw Md;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return vl()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=fl._getInstance(vl()?self:null),this.receiver._subscribe("keyChanged",(async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)}))),this.receiver._subscribe("ping",(async(e,t)=>["keyChanged"]))}async initializeSender(){var e,t;if(this.activeServiceWorker=await async function(){if(!(null===navigator||void 0===navigator?void 0:navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch(e){return null}}(),!this.activeServiceWorker)return;this.sender=new gl(this.activeServiceWorker);const r=await this.sender._send("ping",{},800);r&&(null===(e=r[0])||void 0===e?void 0:e.fulfilled)&&(null===(t=r[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?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(t){}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await Il();return await Tl(e,cl,"1"),await Cl(e,cl),!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((r=>Tl(r,e,t))),this.localCache[e]=t,this.notifyServiceWorker(e))))}async _get(e){const t=await this._withRetries((t=>async function(e,t){const r=kl(e,!1).get(t),n=await new El(r).toPromise();return void 0===n?null:n.value}(t,e)));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite((async()=>(await this._withRetries((t=>Cl(t,e))),delete this.localCache[e],this.notifyServiceWorker(e))))}async _poll(){const e=await this._withRetries((e=>{const t=kl(e,!1).getAll();return new El(t).toPromise()}));if(!e)return[];if(0!==this.pendingWrites)return[];const t=[],r=new Set;for(const{fbase_key:n,value:i}of e)r.add(n),JSON.stringify(this.localCache[n])!==JSON.stringify(i)&&(this.notifyListeners(n,i),t.push(n));for(const n of Object.keys(this.localCache))this.localCache[n]&&!r.has(n)&&(this.notifyListeners(n,null),t.push(n));return t}notifyListeners(e,t){this.localCache[e]=t;const r=this.listeners[e];if(r)for(const n of Array.from(r))n(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()}}Sl.type="LOCAL";const Rl=Sl;
1265
+ const Zl="firebaseLocalStorageDb",eu="firebaseLocalStorage",tu="fbase_key";class ru{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 nu(e,t){return e.transaction([eu],t?"readwrite":"readonly").objectStore(eu)}function iu(){const e=indexedDB.open(Zl,1);return new Promise(((t,r)=>{e.addEventListener("error",(()=>{r(e.error)})),e.addEventListener("upgradeneeded",(()=>{const t=e.result;try{t.createObjectStore(eu,{keyPath:tu})}catch(gh){r(gh)}})),e.addEventListener("success",(async()=>{const r=e.result;r.objectStoreNames.contains(eu)?t(r):(r.close(),await function(){const e=indexedDB.deleteDatabase(Zl);return new ru(e).toPromise()}(),t(await iu()))}))}))}async function ou(e,t,r){const n=nu(e,!0).put({[tu]:t,value:r});return new ru(n).toPromise()}function su(e,t){const r=nu(e,!0).delete(t);return new ru(r).toPromise()}class au{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 iu()),this.db}async _withRetries(e){let t=0;for(;;)try{const t=await this._openDb();return await e(t)}catch(gh){if(t++>3)throw gh;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return Xl()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=Jl._getInstance(Xl()?self:null),this.receiver._subscribe("keyChanged",(async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)}))),this.receiver._subscribe("ping",(async(e,t)=>["keyChanged"]))}async initializeSender(){var e,t;if(this.activeServiceWorker=await async function(){if(!(null===navigator||void 0===navigator?void 0:navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch(e){return null}}(),!this.activeServiceWorker)return;this.sender=new Yl(this.activeServiceWorker);const r=await this.sender._send("ping",{},800);r&&(null===(e=r[0])||void 0===e?void 0:e.fulfilled)&&(null===(t=r[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?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(t){}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await iu();return await ou(e,Hl,"1"),await su(e,Hl),!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((r=>ou(r,e,t))),this.localCache[e]=t,this.notifyServiceWorker(e))))}async _get(e){const t=await this._withRetries((t=>async function(e,t){const r=nu(e,!1).get(t),n=await new ru(r).toPromise();return void 0===n?null:n.value}(t,e)));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite((async()=>(await this._withRetries((t=>su(t,e))),delete this.localCache[e],this.notifyServiceWorker(e))))}async _poll(){const e=await this._withRetries((e=>{const t=nu(e,!1).getAll();return new ru(t).toPromise()}));if(!e)return[];if(0!==this.pendingWrites)return[];const t=[],r=new Set;for(const{fbase_key:n,value:i}of e)r.add(n),JSON.stringify(this.localCache[n])!==JSON.stringify(i)&&(this.notifyListeners(n,i),t.push(n));for(const n of Object.keys(this.localCache))this.localCache[n]&&!r.has(n)&&(this.notifyListeners(n,null),t.push(n));return t}notifyListeners(e,t){this.localCache[e]=t;const r=this.listeners[e];if(r)for(const n of Array.from(r))n(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()}}au.type="LOCAL";const cu=au;
1266
1266
  /**
1267
1267
  * @license
1268
1268
  * Copyright 2020 Google LLC
@@ -1295,7 +1295,7 @@ const yl="firebaseLocalStorageDb",wl="firebaseLocalStorage",bl="fbase_key";class
1295
1295
  * See the License for the specific language governing permissions and
1296
1296
  * limitations under the License.
1297
1297
  */
1298
- const Ol=1e12;class Al{constructor(e){this.auth=e,this.counter=Ol,this._widgets=new Map}render(e,t){const r=this.counter;return this._widgets.set(r,new Pl(e,this.auth.name,t||{})),this.counter++,r}reset(e){var t;const r=e||Ol;null===(t=this._widgets.get(r))||void 0===t||t.delete(),this._widgets.delete(r)}getResponse(e){var t;const r=e||Ol;return(null===(t=this._widgets.get(r))||void 0===t?void 0:t.getResponse())||""}async execute(e){var t;const r=e||Ol;return null===(t=this._widgets.get(r))||void 0===t||t.execute(),""}}class Pl{constructor(e,t,r){this.params=r,this.timerId=null,this.deleted=!1,this.responseToken=null,this.clickHandler=()=>{this.execute()};const n="string"==typeof e?document.getElementById(e):e;Ha(n,"argument-error",{appName:t}),this.container=n,this.isVisible="invisible"!==this.params.size,this.isVisible?this.execute():this.container.addEventListener("click",this.clickHandler)}getResponse(){return this.checkIfDeleted(),this.responseToken}delete(){this.checkIfDeleted(),this.deleted=!0,this.timerId&&(clearTimeout(this.timerId),this.timerId=null),this.container.removeEventListener("click",this.clickHandler)}execute(){this.checkIfDeleted(),this.timerId||(this.timerId=window.setTimeout((()=>{this.responseToken=function(e){const t=[],r="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let n=0;n<e;n++)t.push(r.charAt(Math.floor(Math.random()*r.length)));return t.join("")}
1298
+ const lu=1e12;class uu{constructor(e){this.auth=e,this.counter=lu,this._widgets=new Map}render(e,t){const r=this.counter;return this._widgets.set(r,new du(e,this.auth.name,t||{})),this.counter++,r}reset(e){var t;const r=e||lu;null===(t=this._widgets.get(r))||void 0===t||t.delete(),this._widgets.delete(r)}getResponse(e){var t;const r=e||lu;return(null===(t=this._widgets.get(r))||void 0===t?void 0:t.getResponse())||""}async execute(e){var t;const r=e||lu;return null===(t=this._widgets.get(r))||void 0===t||t.execute(),""}}class du{constructor(e,t,r){this.params=r,this.timerId=null,this.deleted=!1,this.responseToken=null,this.clickHandler=()=>{this.execute()};const n="string"==typeof e?document.getElementById(e):e;Ec(n,"argument-error",{appName:t}),this.container=n,this.isVisible="invisible"!==this.params.size,this.isVisible?this.execute():this.container.addEventListener("click",this.clickHandler)}getResponse(){return this.checkIfDeleted(),this.responseToken}delete(){this.checkIfDeleted(),this.deleted=!0,this.timerId&&(clearTimeout(this.timerId),this.timerId=null),this.container.removeEventListener("click",this.clickHandler)}execute(){this.checkIfDeleted(),this.timerId||(this.timerId=window.setTimeout((()=>{this.responseToken=function(e){const t=[],r="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let n=0;n<e;n++)t.push(r.charAt(Math.floor(Math.random()*r.length)));return t.join("")}
1299
1299
  /**
1300
1300
  * @license
1301
1301
  * Copyright 2020 Google LLC
@@ -1311,7 +1311,7 @@ const Ol=1e12;class Al{constructor(e){this.auth=e,this.counter=Ol,this._widgets=
1311
1311
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1312
1312
  * See the License for the specific language governing permissions and
1313
1313
  * limitations under the License.
1314
- */(50);const{callback:e,"expired-callback":t}=this.params;if(e)try{e(this.responseToken)}catch(Md){}this.timerId=window.setTimeout((()=>{if(this.timerId=null,this.responseToken=null,t)try{t()}catch(Md){}this.isVisible&&this.execute()}),6e4)}),500))}checkIfDeleted(){if(this.deleted)throw new Error("reCAPTCHA mock was already deleted!")}}const Nl=Hc("rcb"),xl=new Ga(3e4,6e4);class Ll{constructor(){var e;this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!(null===(e=_l().grecaptcha)||void 0===e?void 0:e.render)}load(e,t=""){return Ha(function(e){return e.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(e)}(t),e,"argument-error"),this.shouldResolveImmediately(t)&&ac(_l().grecaptcha)?Promise.resolve(_l().grecaptcha):new Promise(((r,n)=>{const i=_l().setTimeout((()=>{n(Ba(e,"network-request-failed"))}),xl.get());_l()[Nl]=()=>{_l().clearTimeout(i),delete _l()[Nl];const o=_l().grecaptcha;if(!o||!ac(o))return void n(Ba(e,"internal-error"));const s=o.render;o.render=(e,t)=>{const r=s(e,t);return this.counter++,r},this.hostLanguage=t,r(o)};zc(`https://www.google.com/recaptcha/api.js??${ws({onload:Nl,render:"explicit",hl:t})}`).catch((()=>{clearTimeout(i),n(Ba(e,"internal-error"))}))}))}clearedOneInstance(){this.counter--}shouldResolveImmediately(e){var t;return!!(null===(t=_l().grecaptcha)||void 0===t?void 0:t.render)&&(e===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}class Dl{async load(e){return new Al(e)}clearedOneInstance(){}}
1314
+ */(50);const{callback:e,"expired-callback":t}=this.params;if(e)try{e(this.responseToken)}catch(gh){}this.timerId=window.setTimeout((()=>{if(this.timerId=null,this.responseToken=null,t)try{t()}catch(gh){}this.isVisible&&this.execute()}),6e4)}),500))}checkIfDeleted(){if(this.deleted)throw new Error("reCAPTCHA mock was already deleted!")}}const hu=El("rcb"),pu=new Oc(3e4,6e4);class fu{constructor(){var e;this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!(null===(e=Ql().grecaptcha)||void 0===e?void 0:e.render)}load(e,t=""){return Ec(function(e){return e.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(e)}(t),e,"argument-error"),this.shouldResolveImmediately(t)&&zc(Ql().grecaptcha)?Promise.resolve(Ql().grecaptcha):new Promise(((r,n)=>{const i=Ql().setTimeout((()=>{n(wc(e,"network-request-failed"))}),pu.get());Ql()[hu]=()=>{Ql().clearTimeout(i),delete Ql()[hu];const o=Ql().grecaptcha;if(!o||!zc(o))return void n(wc(e,"internal-error"));const s=o.render;o.render=(e,t)=>{const r=s(e,t);return this.counter++,r},this.hostLanguage=t,r(o)};bl(`https://www.google.com/recaptcha/api.js??${ea({onload:hu,render:"explicit",hl:t})}`).catch((()=>{clearTimeout(i),n(wc(e,"internal-error"))}))}))}clearedOneInstance(){this.counter--}shouldResolveImmediately(e){var t;return!!(null===(t=Ql().grecaptcha)||void 0===t?void 0:t.render)&&(e===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}class mu{async load(e){return new uu(e)}clearedOneInstance(){}}
1315
1315
  /**
1316
1316
  * @license
1317
1317
  * Copyright 2020 Google LLC
@@ -1327,7 +1327,7 @@ const Ol=1e12;class Al{constructor(e){this.auth=e,this.counter=Ol,this._widgets=
1327
1327
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1328
1328
  * See the License for the specific language governing permissions and
1329
1329
  * limitations under the License.
1330
- */const Ml="recaptcha",Ul={theme:"light",type:"image"};class jl{constructor(e,t,r=Object.assign({},Ul)){this.parameters=r,this.type=Ml,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=Fc(e),this.isInvisible="invisible"===this.parameters.size,Ha("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment");const n="string"==typeof t?document.getElementById(t):t;Ha(n,this.auth,"argument-error"),this.container=n,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new Dl:new Ll,this.validateStartingState()}async verify(){this.assertNotDestroyed();const e=await this.render(),t=this.getAssertedRecaptcha(),r=t.getResponse(e);return r||new Promise((r=>{const n=e=>{e&&(this.tokenChangeListeners.delete(n),r(e))};this.tokenChangeListeners.add(n),this.isInvisible&&t.execute(e)}))}render(){try{this.assertNotDestroyed()}catch(Md){return Promise.reject(Md)}return this.renderPromise||(this.renderPromise=this.makeRenderPromise().catch((e=>{throw this.renderPromise=null,e}))),this.renderPromise}_reset(){this.assertNotDestroyed(),null!==this.widgetId&&this.getAssertedRecaptcha().reset(this.widgetId)}clear(){this.assertNotDestroyed(),this.destroyed=!0,this._recaptchaLoader.clearedOneInstance(),this.isInvisible||this.container.childNodes.forEach((e=>{this.container.removeChild(e)}))}validateStartingState(){Ha(!this.parameters.sitekey,this.auth,"argument-error"),Ha(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),Ha("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment")}makeTokenCallback(e){return t=>{if(this.tokenChangeListeners.forEach((e=>e(t))),"function"==typeof e)e(t);else if("string"==typeof e){const r=_l()[e];"function"==typeof r&&r(t)}}}assertNotDestroyed(){Ha(!this.destroyed,this.auth,"internal-error")}async makeRenderPromise(){if(await this.init(),!this.widgetId){let e=this.container;if(!this.isInvisible){const t=document.createElement("div");e.appendChild(t),e=t}this.widgetId=this.getAssertedRecaptcha().render(e,this.parameters)}return this.widgetId}async init(){Ha(Wa()&&!vl(),this.auth,"internal-error"),await function(){let e=null;return new Promise((t=>{"complete"!==document.readyState?(e=()=>t(),window.addEventListener("load",e)):t()})).catch((t=>{throw e&&window.removeEventListener("load",e),t}))}(),this.recaptcha=await this._recaptchaLoader.load(this.auth,this.auth.languageCode||void 0);const e=await async function(e){return(await tc(e,"GET","/v1/recaptchaParams")).recaptchaSiteKey||""}(this.auth);Ha(e,this.auth,"internal-error"),this.parameters.sitekey=e}getAssertedRecaptcha(){return Ha(this.recaptcha,this.auth,"internal-error"),this.recaptcha}}async function Fl(e,t,r){var n;const i=await r.verify();try{let o;if(Ha("string"==typeof i,e,"argument-error"),Ha(r.type===Ml,e,"argument-error"),o="string"==typeof t?{phoneNumber:t}:t,"session"in o){const t=o.session;if("phoneNumber"in o){Ha("enroll"===t.type,e,"internal-error");const r=
1330
+ */const gu="recaptcha",_u={theme:"light",type:"image"};class vu{constructor(e,t,r=Object.assign({},_u)){this.parameters=r,this.type=gu,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=yl(e),this.isInvisible="invisible"===this.parameters.size,Ec("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment");const n="string"==typeof t?document.getElementById(t):t;Ec(n,this.auth,"argument-error"),this.container=n,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new mu:new fu,this.validateStartingState()}async verify(){this.assertNotDestroyed();const e=await this.render(),t=this.getAssertedRecaptcha(),r=t.getResponse(e);return r||new Promise((r=>{const n=e=>{e&&(this.tokenChangeListeners.delete(n),r(e))};this.tokenChangeListeners.add(n),this.isInvisible&&t.execute(e)}))}render(){try{this.assertNotDestroyed()}catch(gh){return Promise.reject(gh)}return this.renderPromise||(this.renderPromise=this.makeRenderPromise().catch((e=>{throw this.renderPromise=null,e}))),this.renderPromise}_reset(){this.assertNotDestroyed(),null!==this.widgetId&&this.getAssertedRecaptcha().reset(this.widgetId)}clear(){this.assertNotDestroyed(),this.destroyed=!0,this._recaptchaLoader.clearedOneInstance(),this.isInvisible||this.container.childNodes.forEach((e=>{this.container.removeChild(e)}))}validateStartingState(){Ec(!this.parameters.sitekey,this.auth,"argument-error"),Ec(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),Ec("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment")}makeTokenCallback(e){return t=>{if(this.tokenChangeListeners.forEach((e=>e(t))),"function"==typeof e)e(t);else if("string"==typeof e){const r=Ql()[e];"function"==typeof r&&r(t)}}}assertNotDestroyed(){Ec(!this.destroyed,this.auth,"internal-error")}async makeRenderPromise(){if(await this.init(),!this.widgetId){let e=this.container;if(!this.isInvisible){const t=document.createElement("div");e.appendChild(t),e=t}this.widgetId=this.getAssertedRecaptcha().render(e,this.parameters)}return this.widgetId}async init(){Ec(Sc()&&!Xl(),this.auth,"internal-error"),await function(){let e=null;return new Promise((t=>{"complete"!==document.readyState?(e=()=>t(),window.addEventListener("load",e)):t()})).catch((t=>{throw e&&window.removeEventListener("load",e),t}))}(),this.recaptcha=await this._recaptchaLoader.load(this.auth,this.auth.languageCode||void 0);const e=await async function(e){return(await Dc(e,"GET","/v1/recaptchaParams")).recaptchaSiteKey||""}(this.auth);Ec(e,this.auth,"internal-error"),this.parameters.sitekey=e}getAssertedRecaptcha(){return Ec(this.recaptcha,this.auth,"internal-error"),this.recaptcha}}async function yu(e,t,r){var n;const i=await r.verify();try{let o;if(Ec("string"==typeof i,e,"argument-error"),Ec(r.type===gu,e,"argument-error"),o="string"==typeof t?{phoneNumber:t}:t,"session"in o){const t=o.session;if("phoneNumber"in o){Ec("enroll"===t.type,e,"internal-error");const r=
1331
1331
  /**
1332
1332
  * @license
1333
1333
  * Copyright 2020 Google LLC
@@ -1343,7 +1343,7 @@ const Ol=1e12;class Al{constructor(e){this.auth=e,this.counter=Ol,this._widgets=
1343
1343
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1344
1344
  * See the License for the specific language governing permissions and
1345
1345
  * limitations under the License.
1346
- */await function(e,t){return tc(e,"POST","/v2/accounts/mfaEnrollment:start",ec(e,t))}(e,{idToken:t.credential,phoneEnrollmentInfo:{phoneNumber:o.phoneNumber,recaptchaToken:i}});return r.phoneSessionInfo.sessionInfo}{Ha("signin"===t.type,e,"internal-error");const r=(null===(n=o.multiFactorHint)||void 0===n?void 0:n.uid)||o.multiFactorUid;Ha(r,e,"missing-multi-factor-info");const s=await function(e,t){return tc(e,"POST","/v2/accounts/mfaSignIn:start",ec(e,t))}(e,{mfaPendingCredential:t.credential,mfaEnrollmentId:r,phoneSignInInfo:{recaptchaToken:i}});return s.phoneResponseInfo.sessionInfo}}{const{sessionInfo:t}=await async function(e,t){return tc(e,"POST","/v1/accounts:sendVerificationCode",ec(e,t))}(e,{phoneNumber:o.phoneNumber,recaptchaToken:i});return t}}finally{r._reset()}}
1346
+ */await function(e,t){return Dc(e,"POST","/v2/accounts/mfaEnrollment:start",Lc(e,t))}(e,{idToken:t.credential,phoneEnrollmentInfo:{phoneNumber:o.phoneNumber,recaptchaToken:i}});return r.phoneSessionInfo.sessionInfo}{Ec("signin"===t.type,e,"internal-error");const r=(null===(n=o.multiFactorHint)||void 0===n?void 0:n.uid)||o.multiFactorUid;Ec(r,e,"missing-multi-factor-info");const s=await function(e,t){return Dc(e,"POST","/v2/accounts/mfaSignIn:start",Lc(e,t))}(e,{mfaPendingCredential:t.credential,mfaEnrollmentId:r,phoneSignInInfo:{recaptchaToken:i}});return s.phoneResponseInfo.sessionInfo}}{const{sessionInfo:t}=await async function(e,t){return Dc(e,"POST","/v1/accounts:sendVerificationCode",Lc(e,t))}(e,{phoneNumber:o.phoneNumber,recaptchaToken:i});return t}}finally{r._reset()}}
1347
1347
  /**
1348
1348
  * @license
1349
1349
  * Copyright 2020 Google LLC
@@ -1359,7 +1359,7 @@ const Ol=1e12;class Al{constructor(e){this.auth=e,this.counter=Ol,this._widgets=
1359
1359
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1360
1360
  * See the License for the specific language governing permissions and
1361
1361
  * limitations under the License.
1362
- */class Bl{constructor(e){this.providerId=Bl.PROVIDER_ID,this.auth=Fc(e)}verifyPhoneNumber(e,t){return Fl(this.auth,e,ks(t))}static credential(e,t){return Yc._fromVerification(e,t)}static credentialFromResult(e){const t=e;return Bl.credentialFromTaggedObject(t)}static credentialFromError(e){return Bl.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{phoneNumber:t,temporaryProof:r}=e;return t&&r?Yc._fromTokenResponse(t,r):null}}Bl.PROVIDER_ID="phone",Bl.PHONE_SIGN_IN_METHOD="phone";
1362
+ */class wu{constructor(e){this.providerId=wu.PROVIDER_ID,this.auth=yl(e)}verifyPhoneNumber(e,t){return yu(this.auth,e,na(t))}static credential(e,t){return Al._fromVerification(e,t)}static credentialFromResult(e){const t=e;return wu.credentialFromTaggedObject(t)}static credentialFromError(e){return wu.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{phoneNumber:t,temporaryProof:r}=e;return t&&r?Al._fromTokenResponse(t,r):null}}wu.PROVIDER_ID="phone",wu.PHONE_SIGN_IN_METHOD="phone";
1363
1363
  /**
1364
1364
  * @license
1365
1365
  * Copyright 2019 Google LLC
@@ -1376,7 +1376,7 @@ const Ol=1e12;class Al{constructor(e){this.auth=e,this.counter=Ol,this._widgets=
1376
1376
  * See the License for the specific language governing permissions and
1377
1377
  * limitations under the License.
1378
1378
  */
1379
- class zl extends Wc{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return Kc(e,this._buildIdpRequest())}_linkToIdToken(e,t){return Kc(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return Kc(e,this._buildIdpRequest())}_buildIdpRequest(e){const t={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(t.idToken=e),t}}function Hl(e){return al(e.auth,new zl(e),e.bypassAuthState)}function Vl(e){const{auth:t,user:r}=e;return Ha(r,t,"internal-error"),
1379
+ class bu extends Sl{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return Cl(e,this._buildIdpRequest())}_linkToIdToken(e,t){return Cl(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return Cl(e,this._buildIdpRequest())}_buildIdpRequest(e){const t={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(t.idToken=e),t}}function Eu(e){return zl(e.auth,new bu(e),e.bypassAuthState)}function ku(e){const{auth:t,user:r}=e;return Ec(r,t,"internal-error"),
1380
1380
  /**
1381
1381
  * @license
1382
1382
  * Copyright 2019 Google LLC
@@ -1393,7 +1393,7 @@ class zl extends Wc{constructor(e){super("custom","custom"),this.params=e}_getId
1393
1393
  * See the License for the specific language governing permissions and
1394
1394
  * limitations under the License.
1395
1395
  */
1396
- async function(e,t,r=!1){const{auth:n}=e,i="reauthenticate";try{const o=await dc(e,sl(n,i,t,e),r);Ha(o.idToken,n,"internal-error");const s=uc(o.idToken);Ha(s,n,"internal-error");const{sub:a}=s;return Ha(e.uid===a,n,"user-mismatch"),nl._forOperation(e,i,o)}catch(Md){throw"auth/user-not-found"===(null==Md?void 0:Md.code)&&Fa(n,"user-mismatch"),Md}}(r,new zl(e),e.bypassAuthState)}async function $l(e){const{auth:t,user:r}=e;return Ha(r,t,"internal-error"),async function(e,t,r=!1){const n=await dc(e,t._linkToIdToken(e.auth,await e.getIdToken()),r);return nl._forOperation(e,"link",n)}(r,new zl(e),e.bypassAuthState)}
1396
+ async function(e,t,r=!1){const{auth:n}=e,i="reauthenticate";try{const o=await qc(e,Bl(n,i,t,e),r);Ec(o.idToken,n,"internal-error");const s=$c(o.idToken);Ec(s,n,"internal-error");const{sub:a}=s;return Ec(e.uid===a,n,"user-mismatch"),Ul._forOperation(e,i,o)}catch(gh){throw"auth/user-not-found"===(null==gh?void 0:gh.code)&&yc(n,"user-mismatch"),gh}}(r,new bu(e),e.bypassAuthState)}async function Iu(e){const{auth:t,user:r}=e;return Ec(r,t,"internal-error"),async function(e,t,r=!1){const n=await qc(e,t._linkToIdToken(e.auth,await e.getIdToken()),r);return Ul._forOperation(e,"link",n)}(r,new bu(e),e.bypassAuthState)}
1397
1397
  /**
1398
1398
  * @license
1399
1399
  * Copyright 2020 Google LLC
@@ -1409,7 +1409,7 @@ async function(e,t,r=!1){const{auth:n}=e,i="reauthenticate";try{const o=await dc
1409
1409
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1410
1410
  * See the License for the specific language governing permissions and
1411
1411
  * limitations under the License.
1412
- */class ql{constructor(e,t,r,n,i=!1){this.auth=e,this.resolver=r,this.user=n,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(Md){this.reject(Md)}}))}async onAuthEvent(e){const{urlResponse:t,sessionId:r,postBody:n,tenantId:i,error:o,type:s}=e;if(o)return void this.reject(o);const a={auth:this.auth,requestUri:t,sessionId:r,tenantId:i||void 0,postBody:n||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(s)(a))}catch(Md){this.reject(Md)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return Hl;case"linkViaPopup":case"linkViaRedirect":return $l;case"reauthViaPopup":case"reauthViaRedirect":return Vl;default:Fa(this.auth,"internal-error")}}resolve(e){$a(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){$a(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}
1412
+ */class Tu{constructor(e,t,r,n,i=!1){this.auth=e,this.resolver=r,this.user=n,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(gh){this.reject(gh)}}))}async onAuthEvent(e){const{urlResponse:t,sessionId:r,postBody:n,tenantId:i,error:o,type:s}=e;if(o)return void this.reject(o);const a={auth:this.auth,requestUri:t,sessionId:r,tenantId:i||void 0,postBody:n||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(s)(a))}catch(gh){this.reject(gh)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return Eu;case"linkViaPopup":case"linkViaRedirect":return Iu;case"reauthViaPopup":case"reauthViaRedirect":return ku;default:yc(this.auth,"internal-error")}}resolve(e){Ic(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){Ic(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}
1413
1413
  /**
1414
1414
  * @license
1415
1415
  * Copyright 2020 Google LLC
@@ -1425,7 +1425,7 @@ async function(e,t,r=!1){const{auth:n}=e,i="reauthenticate";try{const o=await dc
1425
1425
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1426
1426
  * See the License for the specific language governing permissions and
1427
1427
  * limitations under the License.
1428
- */const Wl=new Ga(2e3,1e4);class Kl extends ql{constructor(e,t,r,n,i){super(e,t,n,i),this.provider=r,this.authWindow=null,this.pollId=null,Kl.currentPopupAction&&Kl.currentPopupAction.cancel(),Kl.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return Ha(e,this.auth,"internal-error"),e}async onExecution(){$a(1===this.filter.length,"Popup operations only handle one event");const e=ml();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(Ba(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(Ba(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,Kl.currentPopupAction=null}pollUserCancellation(){const e=()=>{var t,r;(null===(r=null===(t=this.authWindow)||void 0===t?void 0:t.window)||void 0===r?void 0:r.closed)?this.pollId=window.setTimeout((()=>{this.pollId=null,this.reject(Ba(this.auth,"popup-closed-by-user"))}),8e3):this.pollId=window.setTimeout(e,Wl.get())};e()}}Kl.currentPopupAction=null;
1428
+ */const Su=new Oc(2e3,1e4);class Cu extends Tu{constructor(e,t,r,n,i){super(e,t,n,i),this.provider=r,this.authWindow=null,this.pollId=null,Cu.currentPopupAction&&Cu.currentPopupAction.cancel(),Cu.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return Ec(e,this.auth,"internal-error"),e}async onExecution(){Ic(1===this.filter.length,"Popup operations only handle one event");const e=Gl();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(wc(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(wc(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,Cu.currentPopupAction=null}pollUserCancellation(){const e=()=>{var t,r;(null===(r=null===(t=this.authWindow)||void 0===t?void 0:t.window)||void 0===r?void 0:r.closed)?this.pollId=window.setTimeout((()=>{this.pollId=null,this.reject(wc(this.auth,"popup-closed-by-user"))}),8e3):this.pollId=window.setTimeout(e,Su.get())};e()}}Cu.currentPopupAction=null;
1429
1429
  /**
1430
1430
  * @license
1431
1431
  * Copyright 2020 Google LLC
@@ -1442,7 +1442,7 @@ async function(e,t,r=!1){const{auth:n}=e,i="reauthenticate";try{const o=await dc
1442
1442
  * See the License for the specific language governing permissions and
1443
1443
  * limitations under the License.
1444
1444
  */
1445
- const Jl="pendingRedirect",Gl=new Map;class Yl extends ql{constructor(e,t,r=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,r),this.eventId=null}async execute(){let e=Gl.get(this.auth._key());if(!e){try{const t=await async function(e,t){const r=function(e){return Ec(Jl,e.config.apiKey,e.name)}(t),n=function(e){return yc(e._redirectPersistence)}(e);if(!(await n._isAvailable()))return!1;const i="true"===await n._get(r);return await n._remove(r),i}(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(t)}catch(Md){e=()=>Promise.reject(Md)}Gl.set(this.auth._key(),e)}return this.bypassAuthState||Gl.set(this.auth._key(),(()=>Promise.resolve(null))),e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);if("unknown"!==e.type){if(e.eventId){const t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}else this.resolve(null)}async onExecution(){}cleanUp(){}}function Ql(e,t){Gl.set(e._key(),t)}async function Xl(e,t,r=!1){const n=Fc(e),i=
1445
+ const Ru="pendingRedirect",Ou=new Map;class Au extends Tu{constructor(e,t,r=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,r),this.eventId=null}async execute(){let e=Ou.get(this.auth._key());if(!e){try{const t=await async function(e,t){const r=function(e){return rl(Ru,e.config.apiKey,e.name)}(t),n=function(e){return Zc(e._redirectPersistence)}(e);if(!(await n._isAvailable()))return!1;const i="true"===await n._get(r);return await n._remove(r),i}(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(t)}catch(gh){e=()=>Promise.reject(gh)}Ou.set(this.auth._key(),e)}return this.bypassAuthState||Ou.set(this.auth._key(),(()=>Promise.resolve(null))),e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);if("unknown"!==e.type){if(e.eventId){const t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}else this.resolve(null)}async onExecution(){}cleanUp(){}}function Pu(e,t){Ou.set(e._key(),t)}async function Nu(e,t,r=!1){const n=yl(e),i=
1446
1446
  /**
1447
1447
  * @license
1448
1448
  * Copyright 2021 Google LLC
@@ -1459,7 +1459,7 @@ const Jl="pendingRedirect",Gl=new Map;class Yl extends ql{constructor(e,t,r=!1){
1459
1459
  * See the License for the specific language governing permissions and
1460
1460
  * limitations under the License.
1461
1461
  */
1462
- function(e,t){return t?yc(t):(Ha(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}(n,t),o=new Yl(n,i,r),s=await o.execute();return s&&!r&&(delete s.user._redirectEventId,await n._persistUserIfCurrent(s.user),await n._setRedirectUser(null,t)),s}
1462
+ function(e,t){return t?Zc(t):(Ec(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}(n,t),o=new Au(n,i,r),s=await o.execute();return s&&!r&&(delete s.user._redirectEventId,await n._persistUserIfCurrent(s.user),await n._setRedirectUser(null,t)),s}
1463
1463
  /**
1464
1464
  * @license
1465
1465
  * Copyright 2020 Google LLC
@@ -1475,7 +1475,7 @@ function(e,t){return t?yc(t):(Ha(e._popupRedirectResolver,e,"argument-error"),e.
1475
1475
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1476
1476
  * See the License for the specific language governing permissions and
1477
1477
  * limitations under the License.
1478
- */class Zl{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((r=>{this.isEventForConsumer(e,r)&&(t=!0,this.sendToConsumer(e,r),this.saveEventToCache(e))})),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return tu(e);default:return!1}}
1478
+ */class xu{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((r=>{this.isEventForConsumer(e,r)&&(t=!0,this.sendToConsumer(e,r),this.saveEventToCache(e))})),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return Du(e);default:return!1}}
1479
1479
  /**
1480
1480
  * @license
1481
1481
  * Copyright 2020 Google LLC
@@ -1491,7 +1491,7 @@ function(e,t){return t?yc(t):(Ha(e._popupRedirectResolver,e,"argument-error"),e.
1491
1491
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1492
1492
  * See the License for the specific language governing permissions and
1493
1493
  * limitations under the License.
1494
- */(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){var r;if(e.error&&!tu(e)){const n=(null===(r=e.error.code)||void 0===r?void 0:r.split("auth/")[1])||"internal-error";t.onError(Ba(this.auth,n))}else t.onAuthEvent(e)}isEventForConsumer(e,t){const r=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&r}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(eu(e))}saveEventToCache(e){this.cachedEventUids.add(eu(e)),this.lastProcessedEventTime=Date.now()}}function eu(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter((e=>e)).join("-")}function tu({type:e,error:t}){return"unknown"===e&&"auth/no-auth-event"===(null==t?void 0:t.code)}
1494
+ */(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){var r;if(e.error&&!Du(e)){const n=(null===(r=e.error.code)||void 0===r?void 0:r.split("auth/")[1])||"internal-error";t.onError(wc(this.auth,n))}else t.onAuthEvent(e)}isEventForConsumer(e,t){const r=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&r}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(Lu(e))}saveEventToCache(e){this.cachedEventUids.add(Lu(e)),this.lastProcessedEventTime=Date.now()}}function Lu(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter((e=>e)).join("-")}function Du({type:e,error:t}){return"unknown"===e&&"auth/no-auth-event"===(null==t?void 0:t.code)}
1495
1495
  /**
1496
1496
  * @license
1497
1497
  * Copyright 2020 Google LLC
@@ -1508,7 +1508,7 @@ function(e,t){return t?yc(t):(Ha(e._popupRedirectResolver,e,"argument-error"),e.
1508
1508
  * See the License for the specific language governing permissions and
1509
1509
  * limitations under the License.
1510
1510
  */
1511
- const ru=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,nu=/^https?/;async function iu(e){if(e.config.emulator)return;const{authorizedDomains:t}=await async function(e,t={}){return tc(e,"GET","/v1/projects",t)}(e);for(const n of t)try{if(ou(n))return}catch(r){}Fa(e,"unauthorized-domain")}function ou(e){const t=qa(),{protocol:r,hostname:n}=new URL(t);if(e.startsWith("chrome-extension://")){const i=new URL(e);return""===i.hostname&&""===n?"chrome-extension:"===r&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===r&&i.hostname===n}if(!nu.test(r))return!1;if(ru.test(e))return n===e;const i=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(n)}
1511
+ const Mu=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,Uu=/^https?/;async function ju(e){if(e.config.emulator)return;const{authorizedDomains:t}=await async function(e,t={}){return Dc(e,"GET","/v1/projects",t)}(e);for(const n of t)try{if(Fu(n))return}catch(r){}yc(e,"unauthorized-domain")}function Fu(e){const t=Tc(),{protocol:r,hostname:n}=new URL(t);if(e.startsWith("chrome-extension://")){const i=new URL(e);return""===i.hostname&&""===n?"chrome-extension:"===r&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===r&&i.hostname===n}if(!Uu.test(r))return!1;if(Mu.test(e))return n===e;const i=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(n)}
1512
1512
  /**
1513
1513
  * @license
1514
1514
  * Copyright 2020 Google LLC.
@@ -1524,7 +1524,7 @@ const ru=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,nu=/^https?/;async function iu(e
1524
1524
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1525
1525
  * See the License for the specific language governing permissions and
1526
1526
  * limitations under the License.
1527
- */const su=new Ga(3e4,6e4);function au(){const e=_l().___jsl;if(null==e?void 0:e.H)for(const t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let r=0;r<e.CP.length;r++)e.CP[r]=null}let cu=null;function lu(e){return cu=cu||function(e){return new Promise(((t,r)=>{var n,i,o;function s(){au(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{au(),r(Ba(e,"network-request-failed"))},timeout:su.get()})}if(null===(i=null===(n=_l().gapi)||void 0===n?void 0:n.iframes)||void 0===i?void 0:i.Iframe)t(gapi.iframes.getContext());else{if(!(null===(o=_l().gapi)||void 0===o?void 0:o.load)){const t=Hc("iframefcb");return _l()[t]=()=>{gapi.load?s():r(Ba(e,"network-request-failed"))},zc(`https://apis.google.com/js/api.js?onload=${t}`).catch((e=>r(e)))}s()}})).catch((e=>{throw cu=null,e}))}(e),cu}
1527
+ */const Bu=new Oc(3e4,6e4);function zu(){const e=Ql().___jsl;if(null==e?void 0:e.H)for(const t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let r=0;r<e.CP.length;r++)e.CP[r]=null}let Hu=null;function Vu(e){return Hu=Hu||function(e){return new Promise(((t,r)=>{var n,i,o;function s(){zu(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{zu(),r(wc(e,"network-request-failed"))},timeout:Bu.get()})}if(null===(i=null===(n=Ql().gapi)||void 0===n?void 0:n.iframes)||void 0===i?void 0:i.Iframe)t(gapi.iframes.getContext());else{if(!(null===(o=Ql().gapi)||void 0===o?void 0:o.load)){const t=El("iframefcb");return Ql()[t]=()=>{gapi.load?s():r(wc(e,"network-request-failed"))},bl(`https://apis.google.com/js/api.js?onload=${t}`).catch((e=>r(e)))}s()}})).catch((e=>{throw Hu=null,e}))}(e),Hu}
1528
1528
  /**
1529
1529
  * @license
1530
1530
  * Copyright 2020 Google LLC.
@@ -1540,7 +1540,7 @@ const ru=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,nu=/^https?/;async function iu(e
1540
1540
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1541
1541
  * See the License for the specific language governing permissions and
1542
1542
  * limitations under the License.
1543
- */const uu=new Ga(5e3,15e3),du="__/auth/iframe",hu="emulator/auth/iframe",pu={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},fu=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function mu(e){const t=e.config;Ha(t.authDomain,e,"auth-domain-config-required");const r=t.emulator?Ya(t,hu):`https://${e.config.authDomain}/${du}`,n={apiKey:t.apiKey,appName:e.name,v:da},i=fu.get(e.config.apiHost);i&&(n.eid=i);const o=e._getFrameworks();return o.length&&(n.fw=o.join(",")),`${r}?${ws(n).slice(1)}`}
1543
+ */const $u=new Oc(5e3,15e3),qu="__/auth/iframe",Wu="emulator/auth/iframe",Ku={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},Ju=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function Gu(e){const t=e.config;Ec(t.authDomain,e,"auth-domain-config-required");const r=t.emulator?Ac(t,Wu):`https://${e.config.authDomain}/${qu}`,n={apiKey:t.apiKey,appName:e.name,v:qa},i=Ju.get(e.config.apiHost);i&&(n.eid=i);const o=e._getFrameworks();return o.length&&(n.fw=o.join(",")),`${r}?${ea(n).slice(1)}`}
1544
1544
  /**
1545
1545
  * @license
1546
1546
  * Copyright 2020 Google LLC.
@@ -1557,7 +1557,7 @@ const ru=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,nu=/^https?/;async function iu(e
1557
1557
  * See the License for the specific language governing permissions and
1558
1558
  * limitations under the License.
1559
1559
  */
1560
- const gu={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class _u{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(Md){}}}function vu(e,t,r,n=500,i=600){const o=Math.max((window.screen.availHeight-i)/2,0).toString(),s=Math.max((window.screen.availWidth-n)/2,0).toString();let a="";const c=Object.assign(Object.assign({},gu),{width:n.toString(),height:i.toString(),top:o,left:s}),l=fs().toLowerCase();r&&(a=Sc(l)?"_blank":r),Tc(l)&&(t=t||"http://localhost",c.scrollbars="yes");const u=Object.entries(c).reduce(((e,[t,r])=>`${e}${t}=${r},`),"");if(function(e=fs()){var t;return Nc(e)&&!!(null===(t=window.navigator)||void 0===t?void 0:t.standalone)}(l)&&"_self"!==a)return function(e,t){const r=document.createElement("a");r.href=e,r.target=t;const n=document.createEvent("MouseEvent");n.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),r.dispatchEvent(n)}
1560
+ const Yu={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class Qu{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(gh){}}}function Xu(e,t,r,n=500,i=600){const o=Math.max((window.screen.availHeight-i)/2,0).toString(),s=Math.max((window.screen.availWidth-n)/2,0).toString();let a="";const c=Object.assign(Object.assign({},Yu),{width:n.toString(),height:i.toString(),top:o,left:s}),l=Js().toLowerCase();r&&(a=al(l)?"_blank":r),ol(l)&&(t=t||"http://localhost",c.scrollbars="yes");const u=Object.entries(c).reduce(((e,[t,r])=>`${e}${t}=${r},`),"");if(function(e=Js()){var t;return hl(e)&&!!(null===(t=window.navigator)||void 0===t?void 0:t.standalone)}(l)&&"_self"!==a)return function(e,t){const r=document.createElement("a");r.href=e,r.target=t;const n=document.createEvent("MouseEvent");n.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),r.dispatchEvent(n)}
1561
1561
  /**
1562
1562
  * @license
1563
1563
  * Copyright 2021 Google LLC
@@ -1573,7 +1573,7 @@ const gu={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class _u{
1573
1573
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1574
1574
  * See the License for the specific language governing permissions and
1575
1575
  * limitations under the License.
1576
- */(t||"",a),new _u(null);const d=window.open(t||"",a,u);Ha(d,e,"popup-blocked");try{d.focus()}catch(Md){}return new _u(d)}const yu="__/auth/handler",wu="emulator/auth/handler",bu=encodeURIComponent("fac");async function Eu(e,t,r,n,i,o){Ha(e.config.authDomain,e,"auth-domain-config-required"),Ha(e.config.apiKey,e,"invalid-api-key");const s={apiKey:e.config.apiKey,appName:e.name,authType:r,redirectUrl:n,v:da,eventId:i};if(t instanceof Qc){t.setDefaultLanguage(e.languageCode),s.providerId=t.providerId||"",function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}(t.getCustomParameters())||(s.customParameters=JSON.stringify(t.getCustomParameters()));for(const[e,t]of Object.entries(o||{}))s[e]=t}if(t instanceof Xc){const e=t.getScopes().filter((e=>""!==e));e.length>0&&(s.scopes=e.join(","))}e.tenantId&&(s.tid=e.tenantId);const a=s;for(const u of Object.keys(a))void 0===a[u]&&delete a[u];const c=await e._getAppCheckToken(),l=c?`#${bu}=${encodeURIComponent(c)}`:"";return`${function({config:e}){if(!e.emulator)return`https://${e.authDomain}/${yu}`;return Ya(e,wu)}
1576
+ */(t||"",a),new Qu(null);const d=window.open(t||"",a,u);Ec(d,e,"popup-blocked");try{d.focus()}catch(gh){}return new Qu(d)}const Zu="__/auth/handler",ed="emulator/auth/handler",td=encodeURIComponent("fac");async function rd(e,t,r,n,i,o){Ec(e.config.authDomain,e,"auth-domain-config-required"),Ec(e.config.apiKey,e,"invalid-api-key");const s={apiKey:e.config.apiKey,appName:e.name,authType:r,redirectUrl:n,v:qa,eventId:i};if(t instanceof Pl){t.setDefaultLanguage(e.languageCode),s.providerId=t.providerId||"",function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}(t.getCustomParameters())||(s.customParameters=JSON.stringify(t.getCustomParameters()));for(const[e,t]of Object.entries(o||{}))s[e]=t}if(t instanceof Nl){const e=t.getScopes().filter((e=>""!==e));e.length>0&&(s.scopes=e.join(","))}e.tenantId&&(s.tid=e.tenantId);const a=s;for(const u of Object.keys(a))void 0===a[u]&&delete a[u];const c=await e._getAppCheckToken(),l=c?`#${td}=${encodeURIComponent(c)}`:"";return`${function({config:e}){if(!e.emulator)return`https://${e.authDomain}/${Zu}`;return Ac(e,ed)}
1577
1577
  /**
1578
1578
  * @license
1579
1579
  * Copyright 2020 Google LLC
@@ -1589,7 +1589,7 @@ const gu={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class _u{
1589
1589
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1590
1590
  * See the License for the specific language governing permissions and
1591
1591
  * limitations under the License.
1592
- */(e)}?${ws(a).slice(1)}${l}`}const ku="webStorageSupport";const Iu=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=pl,this._completeRedirectFn=Xl,this._overrideRedirectResult=Ql}async _openPopup(e,t,r,n){var i;$a(null===(i=this.eventManagers[e._key()])||void 0===i?void 0:i.manager,"_initialize() not called before _openPopup()");return vu(e,await Eu(e,t,r,qa(),n),ml())}async _openRedirect(e,t,r,n){await this._originValidation(e);return function(e){_l().location.href=e}(await Eu(e,t,r,qa(),n)),new Promise((()=>{}))}_initialize(e){const t=e._key();if(this.eventManagers[t]){const{manager:e,promise:r}=this.eventManagers[t];return e?Promise.resolve(e):($a(r,"If manager is not set, promise should be"),r)}const r=this.initAndGetManager(e);return this.eventManagers[t]={promise:r},r.catch((()=>{delete this.eventManagers[t]})),r}async initAndGetManager(e){const t=await async function(e){const t=await lu(e),r=_l().gapi;return Ha(r,e,"internal-error"),t.open({where:document.body,url:mu(e),messageHandlersFilter:r.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:pu,dontclear:!0},(t=>new Promise((async(r,n)=>{await t.restyle({setHideOnLeave:!1});const i=Ba(e,"network-request-failed"),o=_l().setTimeout((()=>{n(i)}),uu.get());function s(){_l().clearTimeout(o),r(t)}t.ping(s).then(s,(()=>{n(i)}))}))))}(e),r=new Zl(e);return t.register("authEvent",(t=>{Ha(null==t?void 0:t.authEvent,e,"invalid-auth-event");return{status:r.onEvent(t.authEvent)?"ACK":"ERROR"}}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:r},this.iframes[e._key()]=t,r}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(ku,{type:ku},(r=>{var n;const i=null===(n=null==r?void 0:r[0])||void 0===n?void 0:n[ku];void 0!==i&&t(!!i),Fa(e,"internal-error")}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=iu(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return Lc()||Cc()||Nc()}};var Tu="@firebase/auth",Cu="1.3.2";
1592
+ */(e)}?${ea(a).slice(1)}${l}`}const nd="webStorageSupport";const id=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Kl,this._completeRedirectFn=Nu,this._overrideRedirectResult=Pu}async _openPopup(e,t,r,n){var i;Ic(null===(i=this.eventManagers[e._key()])||void 0===i?void 0:i.manager,"_initialize() not called before _openPopup()");return Xu(e,await rd(e,t,r,Tc(),n),Gl())}async _openRedirect(e,t,r,n){await this._originValidation(e);return function(e){Ql().location.href=e}(await rd(e,t,r,Tc(),n)),new Promise((()=>{}))}_initialize(e){const t=e._key();if(this.eventManagers[t]){const{manager:e,promise:r}=this.eventManagers[t];return e?Promise.resolve(e):(Ic(r,"If manager is not set, promise should be"),r)}const r=this.initAndGetManager(e);return this.eventManagers[t]={promise:r},r.catch((()=>{delete this.eventManagers[t]})),r}async initAndGetManager(e){const t=await async function(e){const t=await Vu(e),r=Ql().gapi;return Ec(r,e,"internal-error"),t.open({where:document.body,url:Gu(e),messageHandlersFilter:r.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:Ku,dontclear:!0},(t=>new Promise((async(r,n)=>{await t.restyle({setHideOnLeave:!1});const i=wc(e,"network-request-failed"),o=Ql().setTimeout((()=>{n(i)}),$u.get());function s(){Ql().clearTimeout(o),r(t)}t.ping(s).then(s,(()=>{n(i)}))}))))}(e),r=new xu(e);return t.register("authEvent",(t=>{Ec(null==t?void 0:t.authEvent,e,"invalid-auth-event");return{status:r.onEvent(t.authEvent)?"ACK":"ERROR"}}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:r},this.iframes[e._key()]=t,r}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(nd,{type:nd},(r=>{var n;const i=null===(n=null==r?void 0:r[0])||void 0===n?void 0:n[nd];void 0!==i&&t(!!i),yc(e,"internal-error")}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=ju(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return fl()||sl()||hl()}};var od="@firebase/auth",sd="1.3.2";
1593
1593
  /**
1594
1594
  * @license
1595
1595
  * Copyright 2020 Google LLC
@@ -1606,7 +1606,7 @@ const gu={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class _u{
1606
1606
  * See the License for the specific language governing permissions and
1607
1607
  * limitations under the License.
1608
1608
  */
1609
- class Su{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.uid)||null}async getToken(e){if(this.assertAuthConfigured(),await this.auth._initializationPromise,!this.auth.currentUser)return null;return{accessToken:await this.auth.currentUser.getIdToken(e)}}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;const t=this.auth.onIdTokenChanged((t=>{e((null==t?void 0:t.stsTokenManager.accessToken)||null)}));this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();const t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){Ha(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}
1609
+ class ad{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.uid)||null}async getToken(e){if(this.assertAuthConfigured(),await this.auth._initializationPromise,!this.auth.currentUser)return null;return{accessToken:await this.auth.currentUser.getIdToken(e)}}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;const t=this.auth.onIdTokenChanged((t=>{e((null==t?void 0:t.stsTokenManager.accessToken)||null)}));this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();const t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){Ec(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}
1610
1610
  /**
1611
1611
  * @license
1612
1612
  * Copyright 2020 Google LLC
@@ -1639,7 +1639,7 @@ class Su{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var
1639
1639
  * See the License for the specific language governing permissions and
1640
1640
  * limitations under the License.
1641
1641
  */
1642
- const Ru=hs("authIdTokenMaxAge")||300;let Ou=null;function Au(e=function(e=ra){const t=ia.get(e);if(!t&&e===ra&&ds())return ha();if(!t)throw la.create("no-app",{appName:e});return t}()){const t=ca(e,"auth");if(t.isInitialized())return t.getImmediate();const r=function(e,t){const r=ca(e,"auth");if(r.isInitialized()){const e=r.getImmediate();if(vs(r.getOptions(),null!=t?t:{}))return e;Fa(e,"already-initialized")}return r.initialize({options:t})}(e,{popupRedirectResolver:Iu,persistence:[Rl,dl,pl]}),n=hs("authTokenSyncURL");if(n){const e=(i=n,async e=>{const t=e&&await e.getIdTokenResult(),r=t&&((new Date).getTime()-Date.parse(t.issuedAtTime))/1e3;if(r&&r>Ru)return;const n=null==t?void 0:t.token;Ou!==n&&(Ou=n,await fetch(i,{method:n?"POST":"DELETE",headers:n?{Authorization:`Bearer ${n}`}:{}}))});!function(e,t,r){ks(e).beforeAuthStateChanged(t,r)}(r,e,(()=>e(r.currentUser))),function(e,t,r,n){ks(e).onIdTokenChanged(t,r,n)}(r,(t=>e(t)))}var i;const o=(s="auth",null===(c=null===(a=us())||void 0===a?void 0:a.emulatorHosts)||void 0===c?void 0:c[s]);var s,a,c;return o&&Vc(r,`http://${o}`),r}var Pu;Pu="Browser",aa(new Is("auth",((e,{options:t})=>{const r=e.getProvider("app").getImmediate(),n=e.getProvider("heartbeat"),i=e.getProvider("app-check-internal"),{apiKey:o,authDomain:s}=r.options;Ha(o&&!o.includes(":"),"invalid-api-key",{appName:r.name});const a={apiKey:o,authDomain:s,clientPlatform:Pu,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Dc(Pu)},c=new jc(r,n,i,a);return function(e,t){const r=(null==t?void 0:t.persistence)||[],n=(Array.isArray(r)?r:[r]).map(yc);(null==t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(n,null==t?void 0:t.popupRedirectResolver)}(c,t),c}),"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback(((e,t,r)=>{e.getProvider("auth-internal").initialize()}))),aa(new Is("auth-internal",(e=>{const t=Fc(e.getProvider("auth").getImmediate());return new Su(t)}),"PRIVATE").setInstantiationMode("EXPLICIT")),pa(Tu,Cu,function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";default:return}}(Pu)),pa(Tu,Cu,"esm2017");var Nu=(e=>(e.INVALID_PHONE_NUMBER="Mobile number is not a valid Australian mobile number",e.INVALID_RECAPTCHA="reCAPTCHA check failed",e.INVALID_ACCOUNT="User account does not exist",e.INVALID_OTP="Verification failed. Please try again.",e))(Nu||{});
1642
+ const cd=Ws("authIdTokenMaxAge")||300;let ld=null;function ud(e=function(e=Ma){const t=ja.get(e);if(!t&&e===Ma&&qs())return Wa();if(!t)throw Va.create("no-app",{appName:e});return t}()){const t=Ha(e,"auth");if(t.isInitialized())return t.getImmediate();const r=function(e,t){const r=Ha(e,"auth");if(r.isInitialized()){const e=r.getImmediate();if(Xs(r.getOptions(),null!=t?t:{}))return e;yc(e,"already-initialized")}return r.initialize({options:t})}(e,{popupRedirectResolver:id,persistence:[cu,ql,Kl]}),n=Ws("authTokenSyncURL");if(n){const e=(i=n,async e=>{const t=e&&await e.getIdTokenResult(),r=t&&((new Date).getTime()-Date.parse(t.issuedAtTime))/1e3;if(r&&r>cd)return;const n=null==t?void 0:t.token;ld!==n&&(ld=n,await fetch(i,{method:n?"POST":"DELETE",headers:n?{Authorization:`Bearer ${n}`}:{}}))});!function(e,t,r){na(e).beforeAuthStateChanged(t,r)}(r,e,(()=>e(r.currentUser))),function(e,t,r,n){na(e).onIdTokenChanged(t,r,n)}(r,(t=>e(t)))}var i;const o=(s="auth",null===(c=null===(a=$s())||void 0===a?void 0:a.emulatorHosts)||void 0===c?void 0:c[s]);var s,a,c;return o&&kl(r,`http://${o}`),r}var dd;dd="Browser",za(new ia("auth",((e,{options:t})=>{const r=e.getProvider("app").getImmediate(),n=e.getProvider("heartbeat"),i=e.getProvider("app-check-internal"),{apiKey:o,authDomain:s}=r.options;Ec(o&&!o.includes(":"),"invalid-api-key",{appName:r.name});const a={apiKey:o,authDomain:s,clientPlatform:dd,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:ml(dd)},c=new vl(r,n,i,a);return function(e,t){const r=(null==t?void 0:t.persistence)||[],n=(Array.isArray(r)?r:[r]).map(Zc);(null==t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(n,null==t?void 0:t.popupRedirectResolver)}(c,t),c}),"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback(((e,t,r)=>{e.getProvider("auth-internal").initialize()}))),za(new ia("auth-internal",(e=>{const t=yl(e.getProvider("auth").getImmediate());return new ad(t)}),"PRIVATE").setInstantiationMode("EXPLICIT")),Ka(od,sd,function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";default:return}}(dd)),Ka(od,sd,"esm2017");var hd=(e=>(e.INVALID_PHONE_NUMBER="Mobile number is not a valid Australian mobile number",e.INVALID_RECAPTCHA="reCAPTCHA check failed",e.INVALID_ACCOUNT="User account does not exist",e.INVALID_OTP="Verification failed. Please try again.",e))(hd||{});
1643
1643
  /**
1644
1644
  * @license
1645
1645
  * Copyright 2020 Google LLC
@@ -1656,15 +1656,15 @@ const Ru=hs("authIdTokenMaxAge")||300;let Ou=null;function Au(e=function(e=ra){c
1656
1656
  * See the License for the specific language governing permissions and
1657
1657
  * limitations under the License.
1658
1658
  */
1659
- pa("firebase","10.5.2","app");let xu=null,Lu=null;const Du=()=>{if(!xu){if(!Lu)throw"App hasn't been initialized yet. Avoid use getAuth() when not inizialized.";const e=ha(Lu);xu=Au(e),xu.setPersistence(bc)}return xu},Mu=e=>{switch(e.code){case Aa:return Nu.INVALID_RECAPTCHA;case xa:case Da:return Nu.INVALID_PHONE_NUMBER;case Ma:return Nu.INVALID_ACCOUNT;case Na:case Pa:case La:return Nu.INVALID_OTP;default:throw e.message}},Uu=()=>{const[e,t]=ge({state:"idle"}),r=we(null),n=we(""),i=we("");return{authState:e,init:e=>{r.current||(r.current=new jl(Du(),e,{size:"invisible"}))},sendOtp:async e=>{if(!r.current)throw Error("[Sign in]: RecaptchaVerifier has not been initialized yet, please call init()");i.current=e,t({state:"sending"});try{const i=new Bl(Du()),o=await i.verifyPhoneNumber(e,r.current);return n.current=o,t({state:"sent",phoneNumber:e}),!0}catch(Md){return t({state:"error",occuredWhen:"sending",error:Mu(Md)}),!1}},verifyOtp:async e=>{if(!n.current)throw Error("[Sign in]: Please verify phone number first and then verify OTP.");t({state:"verifying"});try{const r=Bl.credential(n.current,e);return await async function(e,t){return al(Fc(e),t)}(Du(),r),t({state:"verified"}),!0}catch(Md){return t({state:"error",occuredWhen:"verifying",error:Mu(Md)}),!1}},resendOtp:async()=>{if(!i.current||!r.current)throw Error("[Sign in]: Please verify phone number first and then resend OTP.");t({state:"resending"});try{const e=new Bl(Du()),o=await e.verifyPhoneNumber(i.current,r.current);return n.current=o,t({state:"sent",phoneNumber:i.current}),!0}catch(Md){return t({state:"error",occuredWhen:"resending",error:Mu(Md)}),!1}}}},ju=re({authState:{state:"idle"},init:()=>{},sendOtp:async()=>!0,resendOtp:async()=>!0,verifyOtp:async()=>!0}),Fu=({children:e})=>{const t=Uu();return ui(ju.Provider,{value:t,children:e})},Bu=()=>Ie(ju),zu=f("div")`
1659
+ Ka("firebase","10.5.2","app");let pd=null,fd=null;const md=()=>{if(!pd){if(!fd)throw"App hasn't been initialized yet. Avoid use getAuth() when not inizialized.";const e=Wa(fd);pd=ud(e),pd.setPersistence(tl)}return pd},gd=e=>{switch(e.code){case uc:return hd.INVALID_RECAPTCHA;case pc:case mc:return hd.INVALID_PHONE_NUMBER;case gc:return hd.INVALID_ACCOUNT;case hc:case dc:case fc:return hd.INVALID_OTP;default:throw e.message}},_d=()=>{const[e,t]=ge({state:"idle"}),r=we(null),n=we(""),i=we("");return{authState:e,init:e=>{r.current||(r.current=new vu(md(),e,{size:"invisible"}))},sendOtp:async e=>{if(!r.current)throw Error("[Sign in]: RecaptchaVerifier has not been initialized yet, please call init()");i.current=e,t({state:"sending"});try{const i=new wu(md()),o=await i.verifyPhoneNumber(e,r.current);return n.current=o,t({state:"sent",phoneNumber:e}),!0}catch(gh){return t({state:"error",occuredWhen:"sending",error:gd(gh)}),!1}},verifyOtp:async e=>{if(!n.current)throw Error("[Sign in]: Please verify phone number first and then verify OTP.");t({state:"verifying"});try{const r=wu.credential(n.current,e);return await async function(e,t){return zl(yl(e),t)}(md(),r),t({state:"verified"}),!0}catch(gh){return t({state:"error",occuredWhen:"verifying",error:gd(gh)}),!1}},resendOtp:async()=>{if(!i.current||!r.current)throw Error("[Sign in]: Please verify phone number first and then resend OTP.");t({state:"resending"});try{const e=new wu(md()),o=await e.verifyPhoneNumber(i.current,r.current);return n.current=o,t({state:"sent",phoneNumber:i.current}),!0}catch(gh){return t({state:"error",occuredWhen:"resending",error:gd(gh)}),!1}}}},vd=re({authState:{state:"idle"},init:()=>{},sendOtp:async()=>!0,resendOtp:async()=>!0,verifyOtp:async()=>!0}),yd=({children:e})=>{const t=_d();return $i(vd.Provider,{value:t,children:e})},wd=()=>Ie(vd),bd=f("div")`
1660
1660
  ${()=>({height:"1.5rem",width:"1.5rem","@keyframes spin":{to:{transform:"rotate(360deg)"}},animation:"spin 1s linear infinite",borderRadius:"9999px",borderWidth:"2px",borderColor:"currentColor",borderLeftColor:"transparent",borderTopColor:"transparent"})}
1661
- `,Hu=f("button")`
1661
+ `,Ed=f("button")`
1662
1662
  ${()=>({display:"inline-flex",height:"1rem",alignItems:"center",justifyContent:"center",gap:"1rem",borderRadius:"0.375rem",borderWidth:"0px",paddingLeft:"0.5rem",paddingRight:"0.5rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(15 77 196 / var(--tw-text-opacity))",":focus":{outline:"2px solid transparent",outlineOffset:"2px"}})}
1663
1663
 
1664
1664
  & > .span {
1665
1665
  ${()=>({height:"1rem",width:"1rem"})}
1666
1666
  }
1667
- `,Vu=f("button")`
1667
+ `,kd=f("button")`
1668
1668
  ${()=>({display:"flex",alignItems:"center",justifyContent:"center",gap:"1rem",borderRadius:"0.375rem",borderWidth:"0px","--tw-bg-opacity":"1",backgroundColor:"rgb(46 102 247 / var(--tw-bg-opacity))",paddingLeft:"0.5rem",paddingRight:"0.5rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))",":hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(225 241 255 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(25 44 84 / var(--tw-text-opacity))"},":focus":{outline:"2px solid transparent",outlineOffset:"2px"}})}
1669
1669
 
1670
1670
  height: 48px;
@@ -1679,39 +1679,39 @@ pa("firebase","10.5.2","app");let xu=null,Lu=null;const Du=()=>{if(!xu){if(!Lu)t
1679
1679
  ${()=>({borderWidth:"0px","--tw-bg-opacity":"1",backgroundColor:"rgb(46 102 247 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))"})}
1680
1680
  cursor: not-allowed;
1681
1681
  }
1682
- `,$u=({onClick:e,children:t})=>{const[r,n]=ge(!1);return ui(Hu,{onClick:async()=>{n(!0),await e().finally((()=>{n(!1)}))},children:[r&&ui(zu,{className:"span"}),t]})},qu=f("img")`
1682
+ `,Id=({onClick:e,children:t})=>{const[r,n]=ge(!1);return $i(Ed,{onClick:async()=>{n(!0),await e().finally((()=>{n(!1)}))},children:[r&&$i(bd,{className:"span"}),t]})},Td=f("img")`
1683
1683
  ${()=>({marginBottom:"3rem",alignSelf:"center"})}
1684
1684
  min-width: 150px;
1685
1685
  max-width: 200px;
1686
- `,Wu=f("div")`
1686
+ `,Sd=f("div")`
1687
1687
  ${()=>({marginBottom:"0.75rem",fontSize:"1.25rem",lineHeight:"1.75rem",fontWeight:"600"})}
1688
- `,Ku=f("div")`
1688
+ `,Cd=f("div")`
1689
1689
  ${()=>({marginBottom:"1rem"})}
1690
- `,Ju=f("input")`
1690
+ `,Rd=f("input")`
1691
1691
  ${()=>({maxHeight:"3.5rem",borderRadius:"0.375rem",borderWidth:"0px","--tw-bg-opacity":"1",backgroundColor:"rgb(248 249 250 / var(--tw-bg-opacity))",paddingLeft:"1rem",paddingRight:"1rem"})}
1692
1692
  height: 48px;
1693
1693
  transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s !important;
1694
- `,Gu=f("div")`
1694
+ `,Od=f("div")`
1695
1695
  ${()=>({marginBottom:"0.75rem",fontSize:"1rem",lineHeight:"1.5rem",fontWeight:"600"})}
1696
- `,Yu=f("div")`
1696
+ `,Ad=f("div")`
1697
1697
  ${()=>({display:"flex",alignItems:"center",justifyContent:"space-between"})}
1698
- `,Qu=f("input")`
1698
+ `,Pd=f("input")`
1699
1699
  ${()=>({marginLeft:"0px",marginRight:"0px",marginTop:"0px",marginBottom:"0px",borderRadius:"0.375rem",borderWidth:"0px","--tw-bg-opacity":"1",backgroundColor:"rgb(248 249 250 / var(--tw-bg-opacity))",fontWeight:"600",caretColor:"transparent","& *::selection":{backgroundColor:"transparent"},"::selection":{backgroundColor:"transparent"}})}
1700
1700
 
1701
1701
  width: 48px;
1702
1702
  height: 48px;
1703
1703
  line-height: 48px;
1704
1704
  text-align: center;
1705
- `,Xu=f("p")`
1705
+ `,Nd=f("p")`
1706
1706
  ${()=>({height:"2rem","--tw-text-opacity":"1",color:"rgb(213 39 18 / var(--tw-text-opacity))"})}
1707
- `,Zu=f("div")`
1707
+ `,xd=f("div")`
1708
1708
  ${()=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"3rem"})}
1709
1709
 
1710
1710
  & > .spin {
1711
1711
  ${()=>({height:"5rem",width:"5rem",borderWidth:"4px","--tw-text-opacity":"1",color:"rgb(46 102 247 / var(--tw-text-opacity))"})}
1712
1712
  }
1713
- `,ed=({onClick:e,disabled:t,children:r})=>{const n=we(!0),[i,o]=ge(!1);return ve((()=>()=>{n.current=!1}),[]),ui(Vu,{onClick:()=>{o(!0),e().finally((()=>{n.current&&o(!1)}))},disabled:t,"data-loading":i,children:[i&&ui(zu,{}),r]})},td=/\D/g,rd=({onChangeText:e})=>{const t=ke((e=>{var t;(null==(t=e.key)?void 0:t.replace(td,""))||e.preventDefault()}),[]);return ui(Qu,{type:"text",maxLength:1,onKeyDown:t,onChange:t=>e(t.currentTarget.value),onCopy:e=>e.preventDefault(),onPaste:e=>e.preventDefault(),onDrag:e=>e.preventDefault(),onDrop:e=>e.preventDefault(),onFocus:e=>e.currentTarget&&e.currentTarget.select()})},nd=({onChangeText:e})=>{const t=we(""),r=we(Array(6).fill(null));ve((()=>{var e;const t=null==(e=r.current[0])?void 0:e.base;null==t||t.focus()}),[]);const n=ke(((n,i)=>{n&&(e=>{var t,n;const i=null==(t=r.current[e+1])?void 0:t.base;if(i)i.focus();else{const t=null==(n=r.current[e])?void 0:n.base;null==t||t.blur()}})(i);const o=t.current,s=o.substring(0,i)+n+o.substring(i+1);t.current=s,e(s)}),[e]);return ui(Yu,{children:Array(6).fill("").map(((e,t)=>ui(rd,{ref:e=>r.current[t]=e,onChangeText:e=>{n(e,t)}},t)))})},id=()=>{const{authState:e,resendOtp:t,verifyOtp:r}=Bu(),[n,i]=ge(""),o=Ee((()=>"error"!==e.state||"verifying"!==e.occuredWhen&&"resending"!==e.occuredWhen?void 0:e.error),[e]),s=t,a=ke((async()=>{await r(n)}),[r,n]);return ui(N,{children:[ui(Wu,{children:"Verify your mobile number"}),ui(Ku,{children:"Enter your 6 digit verification code"}),ui(Ku,{children:["Didn't receive a code?"," ",ui($u,{onClick:s,children:ui(N,{children:"Resend"})})]}),ui(nd,{onChangeText:i}),ui(Xu,{children:o}),ui(ed,{disabled:!n,onClick:a,children:ui(N,{children:"Verify"})})]})},od=["+","Backspace","Delete",...[...Array(10).keys()].map(String)],sd=e=>e.startsWith("+"),ad=e=>"0"===e||"04"===e.substring(0,2),cd=()=>{const{authState:e,sendOtp:t}=Bu(),[r,n]=ge(""),[i,o]=ge(""),s=Ee((()=>sd(r)||ad(r)),[r]),a=ke((e=>{od.find((t=>t===e.key))||e.preventDefault()}),[]),c=ke((e=>{const t=(e=>e.replace(/ /g,""))(e.currentTarget.value),r=ad(t)?((e,t)=>{let r=0;return e.replace(/#/g,(()=>t[r++]??"")).trim()})("#### ### ### ### ### ### ###",t):t;n(r)}),[n]),l=ke((async()=>{const e=sd(r)?r:`+61${r}`;await t(e)}),[t,r]);return ve((()=>{"error"===e.state&&"sending"===e.occuredWhen?o(e.error):o("")}),[e]),ve((()=>{o(r&&!s?Nu.INVALID_PHONE_NUMBER:"")}),[r,s]),ui(N,{children:[ui(Wu,{children:"Enter your mobile number"}),ui(Ku,{children:"Connect your workplace to Flare using your personal mobile number"}),ui(Gu,{children:"Mobile number"}),ui(Ju,{type:"tel",autoFocus:!0,placeholder:"0400 000 000","aria-label":"Mobile number",value:r,onInput:c,onKeyDown:a}),ui(Xu,{children:i}),ui(ed,{onClick:l,disabled:!s,children:ui(N,{children:"Continue"})})]})},ld=()=>ui(Zu,{children:[ui(zu,{className:"spin"}),ui(Ku,{children:"Please wait while we process your information."})]}),ud="INVISIBLE_RECAPTCHA_VERIFIER_ID",dd=()=>{const{authState:e,init:t}=Bu(),[r,n]=ge(0);return ve((()=>{t(ud)}),[t]),ve((()=>{"sent"===e.state?n(1):"verifying"===e.state?n(2):"error"===e.state&&"verifying"===e.occuredWhen&&n(1)}),[e,n]),ui(N,{children:[ui(qu,{src:"https://www.flarehr.com/wp-content/uploads/2022/03/flare-logo.svg",alt:"Flare Logo"}),0===r&&ui(cd,{}),1===r&&ui(id,{}),2===r&&ui(ld,{}),ui("div",{id:ud})]})},hd=()=>ui(Fu,{children:ui(dd,{})}),pd=f("div")`
1713
+ `,Ld=({onClick:e,disabled:t,children:r})=>{const n=we(!0),[i,o]=ge(!1);return ve((()=>()=>{n.current=!1}),[]),$i(kd,{onClick:()=>{o(!0),e().finally((()=>{n.current&&o(!1)}))},disabled:t,"data-loading":i,children:[i&&$i(bd,{}),r]})},Dd=/\D/g,Md=({onChangeText:e})=>{const t=ke((e=>{var t;(null==(t=e.key)?void 0:t.replace(Dd,""))||e.preventDefault()}),[]);return $i(Pd,{type:"text",maxLength:1,onKeyDown:t,onChange:t=>e(t.currentTarget.value),onCopy:e=>e.preventDefault(),onPaste:e=>e.preventDefault(),onDrag:e=>e.preventDefault(),onDrop:e=>e.preventDefault(),onFocus:e=>e.currentTarget&&e.currentTarget.select()})},Ud=({onChangeText:e})=>{const t=we(""),r=we(Array(6).fill(null));ve((()=>{var e;const t=null==(e=r.current[0])?void 0:e.base;null==t||t.focus()}),[]);const n=ke(((n,i)=>{n&&(e=>{var t,n;const i=null==(t=r.current[e+1])?void 0:t.base;if(i)i.focus();else{const t=null==(n=r.current[e])?void 0:n.base;null==t||t.blur()}})(i);const o=t.current,s=o.substring(0,i)+n+o.substring(i+1);t.current=s,e(s)}),[e]);return $i(Ad,{children:Array(6).fill("").map(((e,t)=>$i(Md,{ref:e=>r.current[t]=e,onChangeText:e=>{n(e,t)}},t)))})},jd=()=>{const{authState:e,resendOtp:t,verifyOtp:r}=wd(),[n,i]=ge(""),o=Ee((()=>"error"!==e.state||"verifying"!==e.occuredWhen&&"resending"!==e.occuredWhen?void 0:e.error),[e]),s=t,a=ke((async()=>{await r(n)}),[r,n]);return $i(N,{children:[$i(Sd,{children:"Verify your mobile number"}),$i(Cd,{children:"Enter your 6 digit verification code"}),$i(Cd,{children:["Didn't receive a code?"," ",$i(Id,{onClick:s,children:$i(N,{children:"Resend"})})]}),$i(Ud,{onChangeText:i}),$i(Nd,{children:o}),$i(Ld,{disabled:!n,onClick:a,children:$i(N,{children:"Verify"})})]})},Fd=["+","Backspace","Delete",...[...Array(10).keys()].map(String)],Bd=e=>e.startsWith("+"),zd=e=>"0"===e||"04"===e.substring(0,2),Hd=()=>{const{authState:e,sendOtp:t}=wd(),[r,n]=ge(""),[i,o]=ge(""),s=Ee((()=>Bd(r)||zd(r)),[r]),a=ke((e=>{Fd.find((t=>t===e.key))||e.preventDefault()}),[]),c=ke((e=>{const t=(e=>e.replace(/ /g,""))(e.currentTarget.value),r=zd(t)?((e,t)=>{let r=0;return e.replace(/#/g,(()=>t[r++]??"")).trim()})("#### ### ### ### ### ### ###",t):t;n(r)}),[n]),l=ke((async()=>{const e=Bd(r)?r:`+61${r}`;await t(e)}),[t,r]);return ve((()=>{"error"===e.state&&"sending"===e.occuredWhen?o(e.error):o("")}),[e]),ve((()=>{o(r&&!s?hd.INVALID_PHONE_NUMBER:"")}),[r,s]),$i(N,{children:[$i(Sd,{children:"Enter your mobile number"}),$i(Cd,{children:"Connect your workplace to Flare using your personal mobile number"}),$i(Od,{children:"Mobile number"}),$i(Rd,{type:"tel",autoFocus:!0,placeholder:"0400 000 000","aria-label":"Mobile number",value:r,onInput:c,onKeyDown:a}),$i(Nd,{children:i}),$i(Ld,{onClick:l,disabled:!s,children:$i(N,{children:"Continue"})})]})},Vd=()=>$i(xd,{children:[$i(bd,{className:"spin"}),$i(Cd,{children:"Please wait while we process your information."})]}),$d="INVISIBLE_RECAPTCHA_VERIFIER_ID",qd=()=>{const{authState:e,init:t}=wd(),[r,n]=ge(0);return ve((()=>{t($d)}),[t]),ve((()=>{"sent"===e.state?n(1):"verifying"===e.state?n(2):"error"===e.state&&"verifying"===e.occuredWhen&&n(1)}),[e,n]),$i(N,{children:[$i(Td,{src:"https://www.flarehr.com/wp-content/uploads/2022/03/flare-logo.svg",alt:"Flare Logo"}),0===r&&$i(Hd,{}),1===r&&$i(jd,{}),2===r&&$i(Vd,{}),$i("div",{id:$d})]})},Wd=()=>$i(yd,{children:$i(qd,{})}),Kd=f("div")`
1714
1714
  ${()=>({display:"flex",flexDirection:"column",justifyContent:"center",paddingLeft:"3rem",paddingRight:"3rem",paddingTop:"3rem",paddingBottom:"3rem","--tw-text-opacity":"1",color:"rgb(25 44 84 / var(--tw-text-opacity))"})}
1715
1715
  width: 500px;
1716
1716
  height: 500px;
1717
- `,fd=e=>{const{idToken:t}=(()=>{const[e,t]=ge(""),r=Du().beforeAuthStateChanged((async e=>{t(await(null==e?void 0:e.getIdToken())??"")}));return ve((()=>r),[r]),{idToken:e}})(),[r,n]=ge(0),{apolloAccessToken:i}=e,[o,s]=ge("");vr((async e=>{try{switch(r){case 0:await(async e=>{var t;try{const r=await kr(i,e);return s((null==(t=r.linkRequest)?void 0:t.linkRequestId)??""),{isEstablished:r.isEstablished}}catch(Md){throw`[Link Workplace]: Error when requesting a workplace link: ${Md}`}})(e).then((e=>{e.isEstablished?n(5):n(1)}));break;case 1:t&&n(2);break;case 2:n(3);break;case 3:await(async(e,r)=>{const{sub:n}=Me(i);try{return await Ir(t,e,n,r)}catch(Md){throw`[Link Workplace]: Error when trying to establish workplace link: ${Md}`}})(o,e),n(5);break;case 5:rs()}}catch(Md){console.log(Md),n(4)}}),[r,t]);const a=void 0===r||0==r||3==r;return ui(pd,{children:[a&&ui(di,{isActive:a}),1===r&&ui(hd,{}),4===r&&ui(ts,{}),5===r&&ui(Qo,{})]})};var md=(e=>(e[e.PHONE_NUMBER=0]="PHONE_NUMBER",e[e.OTP=1]="OTP",e[e.SUCCESS=2]="SUCCESS",e))(md||{});const gd=e=>ui("svg",{viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"lg"===e.size?"h-10 w-10":"h-5 w-5",children:[ui("path",{d:"M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM1.99743 8C1.99743 11.3151 4.68487 14.0026 8 14.0026C11.3151 14.0026 14.0026 11.3151 14.0026 8C14.0026 4.68487 11.3151 1.99743 8 1.99743C4.68487 1.99743 1.99743 4.68487 1.99743 8Z",className:"light"===e.theme?"fill-white":"fill-gray-200","fill-opacity":"light"===e.theme?"0.3":"1"}),ui("path",{d:"M8 1C8 0.447715 8.44943 -0.00643769 8.99741 0.0624193C9.70527 0.151368 10.3996 0.334798 11.0615 0.608964C12.0321 1.011 12.914 1.60028 13.6569 2.34315C14.3997 3.08602 14.989 3.96793 15.391 4.93853C15.6652 5.60043 15.8486 6.29473 15.9376 7.0026C16.0064 7.55057 15.5523 8 15 8C14.4477 8 14.0085 7.54925 13.9169 7.00462C13.842 6.55939 13.7169 6.12298 13.5433 5.7039C13.2417 4.97595 12.7998 4.31451 12.2426 3.75736C11.6855 3.20021 11.0241 2.75825 10.2961 2.45672C9.87702 2.28313 9.44061 2.15804 8.99538 2.08314C8.45075 1.99152 8 1.55228 8 1Z",className:"light"===e.theme?"fill-white":"fill-primary-base"})]}),_d=e=>{const[t,r]=ge(!1);return ui("button",{type:"button",className:`inline-flex items-center justify-center px-10 py-2 border border-transparent text-base font-medium rounded-md shadow-sm disabled:text-gray-300 bg-primary-base hover:bg-primary-hover disabled:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-focus w-full md:w-auto ${e.class} `,disabled:e.disabled,onClick:async()=>{if(e.onClickPromise&&!t){r(!0);try{await e.onClickPromise()}catch(n){}r(!1)}},children:[ui("div",{className:"relative "+(t?"invisible":""),children:e.children}),t&&ui("div",{className:"absolute animate-spin",children:ui(gd,{theme:"light"})})]})},vd=({className:e,label:t,allowedKeyPattern:r,onChange:n,value:i,iconElement:o,...s})=>{const a=ke((e=>{r.test(e.key)||e.preventDefault()}),[r]);return ui(N,{children:[ui("label",{className:"font-medium text-sm text-gray-900 text-left",children:ui("span",{children:t})}),ui("div",{className:"relative",children:[ui("input",{type:"text",className:`p-2 border-0 ring-2 ring-gray-200 focus:outline-none focus-visible:ring-gray-500 text-base font-medium rounded-md shadow-sm w-full ${e}`,value:i,onKeyPress:a,onChange:e=>n(e.currentTarget.value),...s}),o]})]})},yd=({className:e,onClick:t,...r})=>{const[n,i]=ge(!1);return ui("button",{className:`inline-flex items-center justify-center px-2 text-primary-base rounded-md bg-transparent hover:bg-sky-50/50 focus:ring-2 focus:ring-primary-focus ${e??""}`,onClick:ke((()=>{if(!n)return i(!0),t().finally((()=>{i(!1)}))}),[n,t]),...r,children:[ui("div",{className:"relative "+(n?"invisible":""),children:r.children}),n&&ui("div",{className:"absolute animate-spin",children:ui(gd,{theme:"primary"})})]})},wd=({className:e,children:t})=>ui("h1",{className:`text-2xl md:text-3xl font-bold ${e??""}`,children:t}),bd=({className:e,children:t})=>ui("h3",{class:`text-base md:text-lg text-gray-600 ${e??""}`,children:t}),Ed=e=>{switch(e){case"sign-up-viewed":case"sign-up-completed":case"sign-up-declined":return new Promise((()=>{}))}};var kd=Object.defineProperty,Id=(e,t,r)=>(((e,t,r)=>{t in e?kd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);let Td=new class{constructor(){Id(this,"current",this.detect()),Id(this,"handoffState","pending"),Id(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}},Cd=(e,t)=>{Td.isServer?ve(e,t):ye(e,t)};function Sd(e){let t=we(e);return Cd((()=>{t.current=e}),[e]),t}function Rd(){let e=[],t={addEventListener:(e,r,n,i)=>(e.addEventListener(r,n,i),t.add((()=>e.removeEventListener(r,n,i)))),requestAnimationFrame(...e){let r=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(r)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let r=setTimeout(...e);return t.add((()=>clearTimeout(r)))},microTask(...e){let r={current:!0};return function(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}((()=>{r.current&&e[0]()})),t.add((()=>{r.current=!1}))},style(e,t,r){let n=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:r}),this.add((()=>{Object.assign(e.style,{[t]:n})}))},group(e){let t=Rd();return e(t),this.add((()=>t.dispose()))},add:t=>(e.push(t),()=>{let r=e.indexOf(t);if(r>=0)for(let t of e.splice(r,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function Od(){let[e]=ge(Rd);return ve((()=>()=>e.dispose()),[e]),e}let Ad=function(e){let t=Sd(e);return bo.useCallback(((...e)=>t.current(...e)),[t])};function Pd(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in Eo&&Eo.useSyncExternalStore((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,r]=ge(Td.isHandoffComplete);return t&&!1===Td.isHandoffComplete&&r(!1),ve((()=>{!0!==t&&r(!0)}),[t]),ve((()=>Td.handoff()),[]),!e&&t}function Nd(e,t,...r){if(e in t){let n=t[e];return"function"==typeof n?n(...r):n}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Nd),n}let xd=Symbol();function Ld(...e){let t=we(e);ve((()=>{t.current=e}),[e]);let r=Ad((e=>{for(let r of t.current)null!=r&&("function"==typeof r?r(e):r.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[xd])))?void 0:r}function Dd(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}var Md,Ud,jd=((Ud=jd||{})[Ud.None=0]="None",Ud[Ud.RenderStrategy=1]="RenderStrategy",Ud[Ud.Static=2]="Static",Ud),Fd=((Md=Fd||{})[Md.Unmount=0]="Unmount",Md[Md.Hidden=1]="Hidden",Md);function Bd({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:i,visible:o=!0,name:s}){let a=Hd(t,e);if(o)return zd(a,r,n,s);let c=null!=i?i:0;if(2&c){let{static:e=!1,...t}=a;if(e)return zd(t,r,n,s)}if(1&c){let{unmount:e=!0,...t}=a;return Nd(e?0:1,{0:()=>null,1:()=>zd({...t,hidden:!0,style:{display:"none"}},r,n,s)})}return zd(a,r,n,s)}function zd(e,t={},r,n){let{as:i=r,children:o,refName:s="ref",...a}=qd(e,["unmount","static"]),c=void 0!==e.ref?{[s]:e.ref}:{},l="function"==typeof o?o(t):o;"className"in a&&a.className&&"function"==typeof a.className&&(a.className=a.className(t));let u={};if(t){let e=!1,r=[];for(let[n,i]of Object.entries(t))"boolean"==typeof i&&(e=!0),!0===i&&r.push(n);e&&(u["data-headlessui-state"]=r.join(" "))}if(i===N&&Object.keys($d(a)).length>0){if(!so(l)||Array.isArray(l)&&l.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(a).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"));let e=l.props,t="function"==typeof(null==e?void 0:e.className)?(...t)=>Dd(null==e?void 0:e.className(...t),a.className):Dd(null==e?void 0:e.className,a.className),r=t?{className:t}:{};return co(l,Object.assign({},Hd(l.props,$d(qd(a,["ref"]))),u,c,function(...e){return{ref:e.every((e=>null==e))?void 0:t=>{for(let r of e)null!=r&&("function"==typeof r?r(t):r.current=t)}}}(l.ref,c.ref),r))}return O(i,Object.assign({},qd(a,["ref"]),i!==N&&c,i!==N&&u),l)}function Hd(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},r={};for(let n of e)for(let e in n)e.startsWith("on")&&"function"==typeof n[e]?(null!=r[e]||(r[e]=[]),r[e].push(n[e])):t[e]=n[e];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(r).map((e=>[e,void 0]))));for(let n in r)Object.assign(t,{[n](e,...t){let i=r[n];for(let r of i){if((e instanceof Event||(null==e?void 0:e.nativeEvent)instanceof Event)&&e.defaultPrevented)return;r(e,...t)}}});return t}function Vd(e){var t;return Object.assign(Ci(e),{displayName:null!=(t=e.displayName)?t:e.name})}function $d(e){let t=Object.assign({},e);for(let r in t)void 0===t[r]&&delete t[r];return t}function qd(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}let Wd=re(null);Wd.displayName="OpenClosedContext";var Kd=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Kd||{});function Jd(){return Ie(Wd)}function Gd({value:e,children:t}){return bo.createElement(Wd.Provider,{value:e},t)}function Yd(){let e=we(!1);return Cd((()=>(e.current=!0,()=>{e.current=!1})),[]),e}function Qd(e,...t){e&&t.length>0&&e.classList.add(...t)}function Xd(e,...t){e&&t.length>0&&e.classList.remove(...t)}function Zd(e,t,r,n){let i=r?"enter":"leave",o=Rd(),s=void 0!==n?function(e){let t={called:!1};return(...r)=>{if(!t.called)return t.called=!0,e(...r)}}(n):()=>{};"enter"===i&&(e.removeAttribute("hidden"),e.style.display="");let a=Nd(i,{enter:()=>t.enter,leave:()=>t.leave}),c=Nd(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),l=Nd(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Xd(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Qd(e,...t.base,...a,...l),o.nextFrame((()=>{Xd(e,...t.base,...a,...l),Qd(e,...t.base,...a,...c),function(e,t){let r=Rd();if(!e)return r.dispose;let{transitionDuration:n,transitionDelay:i}=getComputedStyle(e),[o,s]=[n,i].map((e=>{let[t=0]=e.split(",").filter(Boolean).map((e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e))).sort(((e,t)=>t-e));return t})),a=o+s;if(0!==a){r.group((r=>{r.setTimeout((()=>{t(),r.dispose()}),a),r.addEventListener(e,"transitionrun",(e=>{e.target===e.currentTarget&&r.dispose()}))}));let n=r.addEventListener(e,"transitionend",(e=>{e.target===e.currentTarget&&(t(),n())}))}else t();r.add((()=>t())),r.dispose}(e,(()=>(Xd(e,...t.base,...a),Qd(e,...t.base,...t.entered),s())))})),o.dispose}function eh(e=""){return e.split(" ").filter((e=>e.trim().length>1))}let th=re(null);th.displayName="TransitionContext";var rh,nh=((rh=nh||{}).Visible="visible",rh.Hidden="hidden",rh);let ih=re(null);function oh(e){return"children"in e?oh(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function sh(e,t){let r=Sd(e),n=we([]),i=Yd(),o=Od(),s=Ad(((e,t=Fd.Hidden)=>{let s=n.current.findIndex((({el:t})=>t===e));-1!==s&&(Nd(t,{[Fd.Unmount](){n.current.splice(s,1)},[Fd.Hidden](){n.current[s].state="hidden"}}),o.microTask((()=>{var e;!oh(n)&&i.current&&(null==(e=r.current)||e.call(r))})))})),a=Ad((e=>{let t=n.current.find((({el:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):n.current.push({el:e,state:"visible"}),()=>s(e,Fd.Unmount)})),c=we([]),l=we(Promise.resolve()),u=we({enter:[],leave:[],idle:[]}),d=Ad(((e,r,n)=>{c.current.splice(0),t&&(t.chains.current[r]=t.chains.current[r].filter((([t])=>t!==e))),null==t||t.chains.current[r].push([e,new Promise((e=>{c.current.push(e)}))]),null==t||t.chains.current[r].push([e,new Promise((e=>{Promise.all(u.current[r].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===r?l.current=l.current.then((()=>null==t?void 0:t.wait.current)).then((()=>n(r))):n(r)})),h=Ad(((e,t,r)=>{Promise.all(u.current[t].splice(0).map((([e,t])=>t))).then((()=>{var e;null==(e=c.current.shift())||e()})).then((()=>r(t)))}));return Ee((()=>({children:n,register:a,unregister:s,onStart:d,onStop:h,wait:l,chains:u})),[a,s,n,d,h,u,l])}function ah(){}ih.displayName="NestingContext";let ch=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function lh(e){var t;let r={};for(let n of ch)r[n]=null!=(t=e[n])?t:ah;return r}let uh=jd.RenderStrategy;let dh=Vd((function(e,t){let{show:r,appear:n=!1,unmount:i=!0,...o}=e,s=we(null),a=Ld(s,t);Pd();let c=Jd();if(void 0===r&&null!==c&&(r=(c&Kd.Open)===Kd.Open),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[l,u]=ge(r?"visible":"hidden"),d=sh((()=>{u("hidden")})),[h,p]=ge(!0),f=we([r]);Cd((()=>{!1!==h&&f.current[f.current.length-1]!==r&&(f.current.push(r),p(!1))}),[f,r]);let m=Ee((()=>({show:r,appear:n,initial:h})),[r,n,h]);ve((()=>{if(r)u("visible");else if(oh(d)){let e=s.current;if(!e)return;let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&u("hidden")}else u("hidden")}),[r,d]);let g={unmount:i},_=Ad((()=>{var t;h&&p(!1),null==(t=e.beforeEnter)||t.call(e)})),v=Ad((()=>{var t;h&&p(!1),null==(t=e.beforeLeave)||t.call(e)}));return bo.createElement(ih.Provider,{value:d},bo.createElement(th.Provider,{value:m},Bd({ourProps:{...g,as:N,children:bo.createElement(hh,{ref:a,...g,...o,beforeEnter:_,beforeLeave:v})},theirProps:{},defaultTag:N,features:uh,visible:"visible"===l,name:"Transition"})))})),hh=Vd((function(e,t){var r,n;let{beforeEnter:i,afterEnter:o,beforeLeave:s,afterLeave:a,enter:c,enterFrom:l,enterTo:u,entered:d,leave:h,leaveFrom:p,leaveTo:f,...m}=e,g=we(null),_=Ld(g,t),v=null==(r=m.unmount)||r?Fd.Unmount:Fd.Hidden,{show:y,appear:w,initial:b}=function(){let e=Ie(th);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[E,k]=ge(y?"visible":"hidden"),I=function(){let e=Ie(ih);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:T,unregister:C}=I;ve((()=>T(g)),[T,g]),ve((()=>{if(v===Fd.Hidden&&g.current)return y&&"visible"!==E?void k("visible"):Nd(E,{hidden:()=>C(g),visible:()=>T(g)})}),[E,g,T,C,y,v]);let S=Sd({base:eh(m.className),enter:eh(c),enterFrom:eh(l),enterTo:eh(u),entered:eh(d),leave:eh(h),leaveFrom:eh(p),leaveTo:eh(f)}),R=function(e){let t=we(lh(e));return ve((()=>{t.current=lh(e)}),[e]),t}({beforeEnter:i,afterEnter:o,beforeLeave:s,afterLeave:a}),O=Pd();ve((()=>{if(O&&"visible"===E&&null===g.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[g,E,O]);let A=w&&y&&b,P=!O||b&&!w?"idle":y?"enter":"leave",N=function(e=0){let[t,r]=ge(e),n=Yd(),i=ke((e=>{n.current&&r((t=>t|e))}),[t,n]),o=ke((e=>Boolean(t&e)),[t]),s=ke((e=>{n.current&&r((t=>t&~e))}),[r,n]),a=ke((e=>{n.current&&r((t=>t^e))}),[r]);return{flags:t,addFlag:i,hasFlag:o,removeFlag:s,toggleFlag:a}}(0),x=Ad((e=>Nd(e,{enter:()=>{N.addFlag(Kd.Opening),R.current.beforeEnter()},leave:()=>{N.addFlag(Kd.Closing),R.current.beforeLeave()},idle:()=>{}}))),L=Ad((e=>Nd(e,{enter:()=>{N.removeFlag(Kd.Opening),R.current.afterEnter()},leave:()=>{N.removeFlag(Kd.Closing),R.current.afterLeave()},idle:()=>{}}))),D=sh((()=>{k("hidden"),C(g)}),I);!function({immediate:e,container:t,direction:r,classes:n,onStart:i,onStop:o}){let s=Yd(),a=Od(),c=Sd(r);Cd((()=>{e&&(c.current="enter")}),[e]),Cd((()=>{let e=Rd();a.add(e.dispose);let r=t.current;if(r&&"idle"!==c.current&&s.current)return e.dispose(),i.current(c.current),e.add(Zd(r,n.current,"enter"===c.current,(()=>{e.dispose(),o.current(c.current)}))),e.dispose}),[r])}({immediate:A,container:g,classes:S,direction:P,onStart:Sd((e=>{D.onStart(g,e,x)})),onStop:Sd((e=>{D.onStop(g,e,L),"leave"===e&&!oh(D)&&(k("hidden"),C(g))}))});let M=m,U={ref:_};return A?M={...M,className:Dd(m.className,...S.current.enter,...S.current.enterFrom)}:(M.className=Dd(m.className,null==(n=g.current)?void 0:n.className),""===M.className&&delete M.className),bo.createElement(ih.Provider,{value:D},bo.createElement(Gd,{value:Nd(E,{visible:Kd.Open,hidden:Kd.Closed})|N.flags},Bd({ourProps:U,theirProps:M,defaultTag:"div",features:uh,visible:"visible"===E,name:"Transition.Child"})))})),ph=Vd((function(e,t){let r=null!==Ie(th),n=null!==Jd();return bo.createElement(bo.Fragment,null,!r&&n?bo.createElement(dh,{ref:t,...e}):bo.createElement(hh,{ref:t,...e}))})),fh=Object.assign(dh,{Child:ph,Root:dh});const mh=({children:e})=>{const t=bo.Children.toArray(e),r=t.find((e=>e.type===gh)),n=t.find((e=>e.type===_h));return ui(fh,{appear:!0,show:!0,enter:"transition duration-700 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",class:"opacity-0",children:ui("div",{className:"my-20 flex flex-col text-center items-center max-w-[40rem] mx-auto",children:[ui(fh,{appear:!0,show:!0,enter:"transition duration-700 ease-out md:transition-none",enterFrom:"-translate-y-6",enterTo:"translate-y-0",class:"-translate-y-6",children:r&&ui("div",{className:"flex items-center h-full",children:r})}),ui(fh,{appear:!0,show:!0,enter:"transition delay-300 duration-[600ms] ease-out",enterFrom:"opacity-0 -translate-y-6",enterTo:"opacity-100 translate-y-0",class:"opacity-0 -translate-y-6",children:n&&ui("div",{className:"flex items-center h-full",children:n})})]})})},gh=({children:e})=>ui(N,{children:e}),_h=({children:e})=>ui(N,{children:e});mh.Top=gh,mh.Bottom=_h;const vh={verfiedPhoneNumber:void 0},yh=re(vh),wh=e=>O("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"green",className:"w-5 h-5",...e},O("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"})),bh=({onSubmit:e,onDecline:t})=>{const{trace:r}={trace:Ed},[n,i]=ge(""),{setPhoneNumber:o,phoneNumber:s}=(()=>{const{verfiedPhoneNumber:e}=Ie(yh),[t,r]=ge(e??""),n=Ee((()=>t.replace(/ /g,"")),[t]),i=Ee((()=>n.startsWith("04")&&10===n.length||n.startsWith("614")&&11===n.length||n.startsWith("+614")&&12===n.length||/^\+642\d{7,9}$/.test(n)),[n]),o=Ee((()=>n.startsWith("04")?`+61${n.replace(/^0+/,"")}`:n.startsWith("614")?`+${n}`:n),[n]),s=Ee((()=>(e=>{let t=0;return"#### ### ### ### ### ### ###".replace(/#/g,(()=>e[t++]??"")).trim()})(n)),[n]),a=Ee((()=>o===e),[o,e]);return{setPhoneNumber:r,phoneNumber:{valid:i,formatted:o,masked:s,isVerified:a}}})(),[a,c]=ge(s.isVerified);ve((()=>{r("sign-up-viewed")}),[r]);const l=ke((()=>{i("")}),[]),u=ke((()=>{const e=s.valid?"":"Please enter a valid Australian mobile number beginning with 04.";i(e),c(s.isVerified)}),[s.isVerified,s.valid]),d=ke((async()=>{s.valid&&await e(s).then((()=>r("sign-up-completed"))).catch(i)}),[s,e,r]);ke((()=>r("sign-up-declined").then(t)),[t,r]);const h=ke((async()=>{c(!1)}),[]),p=a?ui("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3 text-xs text-green-700 font-bold",children:["Verified"," ",ui("span",{className:"ml-1",children:ui(wh,{})})]}):void 0;return ui(mh,{children:[ui(mh.Top,{children:ui("div",{className:"flex flex-col gap-5",children:[ui(wd,{children:"Join your workplace benefits program"}),ui(bd,{children:[a?"Confirm ":"Enter "," your ",ui("b",{children:"personal"})," mobile number to finish setting up your Flare Benefits account linked to your workplace"]})]})}),ui(mh.Bottom,{children:ui("div",{className:"mt-5 md:w-[300px] text-left",children:[ui(vd,{allowedKeyPattern:/[+0-9]/,inputMode:"numeric",className:"mt-1 mb-1 w-full",label:"Australian Mobile Number",value:s.formatted,onChange:o,onfocusin:l,onfocusout:u,iconElement:p,disabled:a}),0!==n.length&&ui("div",{className:"h-8 leading-none",children:ui("span",{className:"text-xs text-rose-500",children:n})}),a&&ui("div",{className:"mt-2 ml-2 mb-2 leading-none",children:ui("span",{className:"text-xs",children:["Not your personal number?",ui(yd,{class:"text-blue-500",onClick:h,children:"Change number"})]})}),ui("div",{className:"font-medium text-sm text-gray-900 mt-2",children:["By creating your account you confirm you have read and agree to Flare Benefits"," ",ui("a",{className:"text-primary-base",href:"https://www.flarehr.com/flare-app-terms-and-conditions/",target:"_blank",rel:"noreferrer",children:" Terms of Use "}),"and",ui("a",{className:"text-primary-base",href:"https://www.flarehr.com/privacy-policy/",target:"_blank",rel:"noreferrer",children:" Privacy Policy"}),"."," "]}),ui(_d,{class:"mt-5 md:w-full text-white",onClickPromise:d,children:"Join your workplace"}),!1]})})]})},Eh=e=>O("svg",{xmlns:"http://www.w3.org/2000/svg",height:24,viewBox:"0 -960 960 960",width:24,fill:"currentColor",...e},O("path",{d:"m313-440 224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z"})),kh=({children:e,...t})=>ui("dialog",{className:"z-50 w-full h-full absolute top-0 left-0 bottom-0 right-0",...t,children:e}),Ih=({open:e})=>ui(kh,{open:e,children:ui("div",{className:"flex flex-col gap-5 items-center justify-center text-center mt-20",children:[ui("span",{className:"animate-spin",children:ui(gd,{size:"lg"})}),ui(wd,{children:"Creating your account"}),ui("div",{children:[ui(bd,{children:"This can take up to 30 seconds."}),ui(bd,{children:"Please don't navigate away or refresh your browser."})]})]})}),Th=({phoneNumber:e,onVerify:t,onResendOtp:r,onGoBack:n})=>{const{otp:i,setOtp:o}=(()=>{const[e,t]=ge("");return{otp:{valid:Ee((()=>6===e.length),[e.length]),code:e},setOtp:t}})(),[s,a]=ge(!1),[c,l]=ge(""),{countdown:u,restart:d}=(e=>{const[t,r]=ge(e),n=we(),i=ke((()=>{clearInterval(n.current)}),[]);return ve((()=>i),[i]),{countdown:t,restart:ke((()=>{let t=e;clearInterval(n.current),n.current=setInterval((()=>{t<0?clearInterval(n.current):r(t--)}),1e3)}),[e])}})(60);ve(d,[d]);const h=ke((()=>(a(!0),l(""),t(i.code).catch(l).finally((()=>{a(!1)})))),[t,i.code]),p=ke((()=>(l(""),r().then(d).catch(l))),[r,d]);return ui(N,{children:[ui(Ih,{open:s}),ui(mh,{children:[ui(mh.Top,{children:ui("div",{className:"flex flex-col gap-5",children:[ui(wd,{children:"Verify your mobile number"}),ui(bd,{children:["An SMS verification code has been sent to the number"," ",ui("span",{className:"dd-privacy-mask",children:e}),"."]})]})}),ui(mh.Bottom,{children:ui("div",{className:"mt-5 md:w-[300px] text-left",children:[ui(vd,{allowedKeyPattern:/[0-9]/,inputMode:"numeric",minLength:6,maxLength:6,className:"mt-1 mb-1 w-full",label:"Enter your verification code",onChange:o}),c&&ui("span",{className:"text-xs text-rose-500",children:c}),ui("p",{className:"mt-2 text-center text-xs text-gray-600 disabled:opacity-75 ",children:["Didn't get the code?",ui(yd,{disabled:0!==u,className:"underline mx-2 disabled:text-gray-600 disabled:hover:bg-transparent disabled:cursor-text disabled:px-0",onClick:p,children:"Resend SMS"}),0!==u&&ui(N,{children:["in ",u," secs"]})]}),ui(_d,{class:"mt-5 md:w-full text-white",disabled:!i.valid,onClickPromise:h,children:"Continue"}),ui(_d,{class:"mt-5 md:w-full bg-white hover:bg-gray-100 focus:ring-gray-200 border-0 shadow-none text-gray-700 border-gray-300",onClickPromise:async()=>{n()},children:ui("span",{className:"flex gap-3",children:[ui(Eh,{}),"Back"]})})]})})]})]})},Ch=({onSignUp:e,onVerify:t,onResendOtp:r,onSuccess:n,onDecline:i})=>{const[o,s]=ge(""),{step:a,goBack:c,goToStep:l}=(()=>{const[e,t]=ge(0),r=ke((()=>{const r=e-1;r>=0&&t(r)}),[e]),n=ke((e=>{e<=2&&t(e)}),[]);return{step:e,goBack:r,goToStep:n}})(),u=ke((t=>e(t.formatted).then((e=>{s(t.masked),e.isVerificationRequired?l(md.OTP):n()}))),[l,e,n]),d=ke((e=>t(e).then((()=>{n()}))),[t,n]);return ui(N,{children:[a===md.PHONE_NUMBER&&ui(bh,{onSubmit:u,onDecline:i}),a===md.OTP&&ui(Th,{phoneNumber:o,onVerify:d,onResendOtp:r,onGoBack:c})]})},Sh=e=>{var t,r;throw"Auth_SessionExpired"===(null==(r=null==(t=e.response)?void 0:t.data)?void 0:r.code)&&window.location.reload(),e};let Rh;const Oh=()=>Rh;var Ah=(e=>(e.Auth_AccountDisabled="Sorry, your account has been deactivated. Please contact Flare if there are any issues.",e.Auth_AccountLocked="Sorry, your account is currently locked due to too many attempts. Please try again later.",e.Auth_Unregistered="Sorry, we are currently experiencing some issues. Please try again later.",e.Auth_InvalidVerificationCode="Your one time passcode doesn't look right. Please try again with a new one time passcode.",e.Auth_SessionExpired="Sorry, looks like your session has expired. Please try again.",e.Validation_InvalidPhoneNumber="Please enter a valid Australian mobile number beginning with 04.",e))(Ah||{});const Ph=e=>{var t;const r=null==(t=null==e?void 0:e.response)?void 0:t.data;throw Ah[null==r?void 0:r.code]??"Sorry, we are currently experiencing some issues. Please try again later."},Nh=e=>{const[t,r]=ge(!1),{signUp:n,verifyOtp:i,resendOtp:o}={signUp:async(e,t="Invite",r="invite")=>Oh().post("v2.0/auth/signUp",{mobileNumber:e,source:t,channel:r}).catch((e=>(Ph(e),Promise.reject()))).then((e=>({isVerificationRequired:e.data.isVerificationRequired??!0}))),verifyOtp:async(e,t="Invite",r="invite")=>{await Oh().post("auth/verify",{otp:e,source:t,channel:r}).catch(Ph)},resendOtp:async()=>{await Oh().post("auth/resend").catch(Ph)}},s=()=>{r(!0),rs()};return t?ui(Qo,{}):ui(N,{children:ui("div",{className:"font-inter",children:[ui("style",{children:".pointer-events-none{pointer-events:none!important}.invisible{visibility:hidden!important}.absolute{position:absolute!important}.relative{position:relative!important}.inset-y-0{top:0!important;bottom:0!important}.bottom-0{bottom:0!important}.left-0{left:0!important}.right-0{right:0!important}.top-0{top:0!important}.z-50{z-index:50!important}.mx-2{margin-left:.5rem!important;margin-right:.5rem!important}.mx-auto{margin-left:auto!important;margin-right:auto!important}.my-20{margin-top:5rem!important;margin-bottom:5rem!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}.ml-1{margin-left:.25rem!important}.ml-2{margin-left:.5rem!important}.ml-3{margin-left:.75rem!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-20{margin-top:5rem!important}.mt-5{margin-top:1.25rem!important}.inline-block{display:inline-block!important}.inline{display:inline!important}.flex{display:flex!important}.inline-flex{display:inline-flex!important}.h-10{height:2.5rem!important}.h-16{height:4rem!important}.h-4{height:1rem!important}.h-5{height:1.25rem!important}.h-7{height:1.75rem!important}.h-8{height:2rem!important}.h-\\[1\\.25rem\\]{height:1.25rem!important}.h-\\[1\\.5rem\\]{height:1.5rem!important}.h-full{height:100%!important}.w-10{width:2.5rem!important}.w-16{width:4rem!important}.w-4{width:1rem!important}.w-5{width:1.25rem!important}.w-7{width:1.75rem!important}.w-\\[1\\.25rem\\]{width:1.25rem!important}.w-\\[2\\.75rem\\]{width:2.75rem!important}.w-full{width:100%!important}.max-w-\\[40rem\\]{max-width:40rem!important}.max-w-\\[59\\.5rem\\]{max-width:59.5rem!important}.shrink-0{flex-shrink:0!important}.-translate-y-6{--tw-translate-y: -1.5rem !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.translate-x-0{--tw-translate-x: 0px !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.translate-x-\\[1\\.25rem\\]{--tw-translate-x: 1.25rem !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.translate-y-0{--tw-translate-y: 0px !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite!important}.cursor-pointer{cursor:pointer!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.gap-3{gap:.75rem!important}.gap-5{gap:1.25rem!important}.rounded-full{border-radius:9999px!important}.rounded-md{border-radius:.375rem!important}.border{border-width:1px!important}.border-0{border-width:0px!important}.border-2{border-width:2px!important}.border-gray-300{--tw-border-opacity: 1 !important;border-color:rgb(209 213 219 / var(--tw-border-opacity))!important}.border-transparent{border-color:transparent!important}.bg-blue-50{--tw-bg-opacity: 1 !important;background-color:rgb(239 246 255 / var(--tw-bg-opacity))!important}.bg-gray-200{--tw-bg-opacity: 1 !important;background-color:rgb(229 231 235 / var(--tw-bg-opacity))!important}.bg-primary-base{background-color:var(--fl-color-primary)!important}.bg-transparent{background-color:transparent!important}.bg-white{--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important}.fill-gray-200{fill:#e5e7eb!important}.fill-primary-base{fill:var(--fl-color-primary)!important}.fill-white{fill:#fff!important}.p-2{padding:.5rem!important}.px-10{padding-left:2.5rem!important;padding-right:2.5rem!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.pr-3{padding-right:.75rem!important}.text-left{text-align:left!important}.text-center{text-align:center!important}.text-2xl{font-size:1.5rem!important;line-height:2rem!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.font-bold{font-weight:700!important}.font-medium{font-weight:500!important}.leading-5{line-height:1.25rem!important}.leading-none{line-height:1!important}.text-blue-500{--tw-text-opacity: 1 !important;color:rgb(59 130 246 / var(--tw-text-opacity))!important}.text-gray-600{--tw-text-opacity: 1 !important;color:rgb(75 85 99 / var(--tw-text-opacity))!important}.text-gray-700{--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity))!important}.text-gray-900{--tw-text-opacity: 1 !important;color:rgb(17 24 39 / var(--tw-text-opacity))!important}.text-green-700{--tw-text-opacity: 1 !important;color:rgb(21 128 61 / var(--tw-text-opacity))!important}.text-primary-base{color:var(--fl-color-primary)!important}.text-rose-500{--tw-text-opacity: 1 !important;color:rgb(244 63 94 / var(--tw-text-opacity))!important}.text-white{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity))!important}.underline{text-decoration-line:underline!important}.accent-primary-base{accent-color:var(--fl-color-primary)!important}.opacity-0{opacity:0!important}.opacity-100{opacity:1!important}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow-none{--tw-shadow: 0 0 #0000 !important;--tw-shadow-colored: 0 0 #0000 !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05) !important;--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.ring-gray-200{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity)) !important}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.delay-300{transition-delay:.3s!important}.duration-200{transition-duration:.2s!important}.duration-700{transition-duration:.7s!important}.duration-\\[600ms\\]{transition-duration:.6s!important}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)!important}:root{--fl-color-primary_from_host: var(--fl-color-primary);--fl-color-primary-light_from_host: var(--fl-color-primary-light);--fl-color-primary-dark_from_host: var(--fl-color-primary-dark);--fl-color-primary-disabled_from_host: var(--fl-color-primary-disabled);--fl-color-primary-hover_from_host: var(--fl-color-primary-hover);--fl-color-primary-focus_from_host: var(--fl-color-primary-focus);--fl-color-primary-text_from_host: var(--fl-color-primary-text);--fl-color-secondary_from_host: var(--fl-color-secondary);--fl-color-secondary-light_from_host: var(--fl-color-secondary-light);--fl-color-secondary-dark_from_host: var(--fl-color-secondary-dark);--fl-color-secondary-disabled_from_host: var(--fl-color-secondary-disabled);--fl-color-secondary-hover_from_host: var(--fl-color-secondary-hover);--fl-color-secondary-focus_from_host: var(--fl-color-secondary-focus);--fl-color-secondary-text_from_host: var(--fl-color-secondary-text)}*{--fl-color-primary: var(--fl-color-primary_from_host, #1890ff);--fl-color-primary-light: var(--fl-color-primary-light_from_host, #74c0ff);--fl-color-primary-dark: var(--fl-color-primary-dark_from_host, #006bce);--fl-color-primary-disabled: var(--fl-color-primary-disabled_from_host, #f5f5f5);--fl-color-primary-hover: var(--fl-color-primary-hover_from_host, #40a9ff);--fl-color-primary-focus: var(--fl-color-primary-focus_from_host, #40a9ff);--fl-color-primary-text: var(--fl-color-primary-text_from_host, white);--fl-color-secondary: var(--fl-color-secondary_from_host, #d3d3d3);--fl-color-secondary-light: var(--fl-color-secondary-light_from_host, #e1e1e1);--fl-color-secondary-dark: var(--fl-color-secondary-dark_from_host, #cecece);--fl-color-secondary-disabled: var(--fl-color-secondary-disabled_from_host, #f5f5f5);--fl-color-secondary-hover: var(--fl-color-secondary-hover_from_host, #ebebeb);--fl-color-secondary-focus: var(--fl-color-secondary-focus_from_host, #ebebeb);--fl-color-secondary-text: var(--fl-color-secondary-text_from_host, #262626)}.hover\\:bg-gray-100:hover{--tw-bg-opacity: 1 !important;background-color:rgb(243 244 246 / var(--tw-bg-opacity))!important}.hover\\:bg-primary-hover:hover{background-color:var(--fl-color-primary-hover)!important}.hover\\:bg-sky-50\\/50:hover{background-color:#f0f9ff80!important}.focus\\:outline-none:focus{outline:2px solid transparent!important;outline-offset:2px!important}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.focus\\:ring-gray-200:focus{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity)) !important}.focus\\:ring-primary-focus:focus{--tw-ring-color: var(--fl-color-primary-focus) !important}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px !important}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.focus-visible\\:ring-gray-500:focus-visible{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity)) !important}.focus-visible\\:ring-white:focus-visible{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity)) !important}.focus-visible\\:ring-opacity-75:focus-visible{--tw-ring-opacity: .75 !important}.disabled\\:cursor-text:disabled{cursor:text!important}.disabled\\:bg-gray-100:disabled{--tw-bg-opacity: 1 !important;background-color:rgb(243 244 246 / var(--tw-bg-opacity))!important}.disabled\\:px-0:disabled{padding-left:0!important;padding-right:0!important}.disabled\\:text-gray-300:disabled{--tw-text-opacity: 1 !important;color:rgb(209 213 219 / var(--tw-text-opacity))!important}.disabled\\:text-gray-600:disabled{--tw-text-opacity: 1 !important;color:rgb(75 85 99 / var(--tw-text-opacity))!important}.disabled\\:opacity-75:disabled{opacity:.75!important}.disabled\\:hover\\:bg-transparent:hover:disabled{background-color:transparent!important}@media (min-width: 768px){.md\\:grid{display:grid!important}.md\\:w-\\[240px\\]{width:240px!important}.md\\:w-\\[300px\\]{width:300px!important}.md\\:w-auto{width:auto!important}.md\\:w-full{width:100%!important}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.md\\:text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.md\\:text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.md\\:transition-none{transition-property:none!important}}\n".toString()}),ui(Ch,{onSignUp:t=>n(t,e.source,e.channel),onVerify:t=>i(t,e.source,e.channel),onResendOtp:o,onSuccess:s,onDecline:s})]})})},xh=f("div")([{display:"flex",alignItems:"center",justifyContent:"center"}]),Lh=async(e,t)=>{await(async e=>{if(br)return br;const t=e.replace(/\/?$/,"");return br=_r.create({baseURL:`${t}`}),((e,{onRequest:t,onRequestError:r,onResponse:n,onResponseError:i})=>{e.interceptors.request.use((async e=>(t&&await t(e),e)),(async e=>{throw r&&await r(e),e})),e.interceptors.response.use((async e=>(n&&await n(e),e)),(async e=>{throw i&&await i(e),e}))})(br,{onRequestError:yr,onResponseError:wr}),br})(e.backendUrl);const{googleCloud:r,identityProvider:n,isEstablished:i,verifiedPhoneNumber:o}=await(async(e,t)=>{if(!br)throw new Error("Api has not been initialized");return br.get("customer-profile/backend/v1.0/workplace-link/config",Er(e,t)).then((e=>e.data))})(e.apolloAccessToken,t);Lu=r;const s=e.backendUrl;var a,c;return a=s,c=e.apolloAccessToken,a=a.replace(/\/?$/,""),Rh=_r.create({baseURL:`${a}/benefits-onboarding/backend`,headers:{Authorization:`Bearer ${c}`}}),Rh.interceptors.response.use((e=>e),Sh),{identityProvider:n,isEstablished:i,verifiedPhoneNumber:o}};!function(n,i,o,s){c.p=i,e=n,t=o,r=s}(O);function Dh(){return(Dh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var Mh=["context","children"];function Uh(e){this.getChildContext=function(){return e.context};var t=e.children,r=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)t.indexOf(r=o[n])>=0||(i[r]=e[r]);return i}(e,Mh);return te(t,r)}function jh(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=O(Uh,Dh({},this._props,{context:e.detail.context}),function e(t,r){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var n=[],i={},o=0,s=t.attributes,a=t.childNodes;for(o=s.length;o--;)"slot"!==s[o].name&&(i[s[o].name]=s[o].value,i[Fh(s[o].name)]=s[o].value);for(o=a.length;o--;){var c=e(a[o],null),l=a[o].slot;l?i[l]=O(Hh,{name:l},c):n[o]=c}var u=r?O(Hh,null,n):n;return O(r||t.nodeName.toLowerCase(),i,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?ee:Z)(this._vdom,this._root)}function Fh(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function Bh(e,t,r){if(this._vdom){var n={};n[e]=r=null==r?void 0:r,n[Fh(e)]=r,this._vdom=te(this._vdom,n),Z(this._vdom,this._root)}}function zh(){Z(this._vdom=null,this._root)}function Hh(e,t){var r=this;return O("slot",Dh({},e,{ref:function(e){e?(r.ref=e,r._listener||(r._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",r._listener))):r.ref.removeEventListener("_preact",r._listener)}}))}!function(e,t,r,n){function i(){var t=Reflect.construct(HTMLElement,[],i);return t._vdomComponent=e,t._root=n&&n.shadow?t.attachShadow({mode:n.mode||"open"}):t,t}(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=jh,i.prototype.attributeChangedCallback=Bh,i.prototype.disconnectedCallback=zh,r=r||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=r,r.forEach((function(e){Object.defineProperty(i.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var r=typeof t;null!=t&&"string"!==r&&"boolean"!==r&&"number"!==r||this.setAttribute(e,t)}})})),customElements.define(t||e.tagName||e.displayName||e.name,i)}((e=>{const t={backendUrl:e["backend-url"],apolloAccessToken:e["access-token"],source:e.source,channel:e.channel},[r,n]=ge(!1),i=we(""),[o,s]=ge("Initializing"),[a,c]=ge(vh);return vr((async e=>{if(t.backendUrl)try{const r=await Lh(t,e);i.current=r.identityProvider,n(r.isEstablished),s("Initialized"),c({verfiedPhoneNumber:r.verifiedPhoneNumber})}catch{s("Error")}}),[t.backendUrl]),r?ui(Qo,{}):ui(N,{children:["Initializing"===o&&ui(di,{isActive:!0}),"Error"===o&&ui(ts,{}),"Initialized"===o&&ui("div",{id:"preact_root",children:[ui(oi,{}),ui(xh,{children:["google"===i.current&&ui(fd,{...t}),"adb2c"===i.current&&ui(ns,{...t}),ui(yh.Provider,{value:a,children:"flare-app-identity"===i.current&&ui(Nh,{...t})})]})]})]})}),"workplace-link",["backend-url","access-token","source","channel"],{shadow:!1});
1717
+ `,Jd=e=>{const{idToken:t}=(()=>{const[e,t]=ge(""),r=md().beforeAuthStateChanged((async e=>{t(await(null==e?void 0:e.getIdToken())??"")}));return ve((()=>r),[r]),{idToken:e}})(),[r,n]=ge(0),{apolloAccessToken:i}=e,[o,s]=ge("");Xr((async e=>{try{switch(r){case 0:await(async e=>{var t;try{const r=await nn(i,e);return s((null==(t=r.linkRequest)?void 0:t.linkRequestId)??""),{isEstablished:r.isEstablished}}catch(gh){throw`[Link Workplace]: Error when requesting a workplace link: ${gh}`}})(e).then((e=>{e.isEstablished?n(5):n(1)}));break;case 1:t&&n(2);break;case 2:n(3);break;case 3:await(async(e,r)=>{const{sub:n}=Me(i);try{return await on(t,e,n,r)}catch(gh){throw`[Link Workplace]: Error when trying to establish workplace link: ${gh}`}})(o,e),n(5);break;case 5:Ms()}}catch(gh){console.log(gh),n(4)}}),[r,t]);const a=void 0===r||0==r||3==r;return $i(Kd,{children:[a&&$i(qi,{isActive:a}),1===r&&$i(Wd,{}),4===r&&$i(Ds,{}),5===r&&$i(Ps,{})]})};var Gd=(e=>(e[e.PHONE_NUMBER=0]="PHONE_NUMBER",e[e.OTP=1]="OTP",e[e.SUCCESS=2]="SUCCESS",e))(Gd||{});const Yd=e=>$i("svg",{viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"lg"===e.size?"h-10 w-10":"h-5 w-5",children:[$i("path",{d:"M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM1.99743 8C1.99743 11.3151 4.68487 14.0026 8 14.0026C11.3151 14.0026 14.0026 11.3151 14.0026 8C14.0026 4.68487 11.3151 1.99743 8 1.99743C4.68487 1.99743 1.99743 4.68487 1.99743 8Z",className:"light"===e.theme?"fill-white":"fill-gray-200","fill-opacity":"light"===e.theme?"0.3":"1"}),$i("path",{d:"M8 1C8 0.447715 8.44943 -0.00643769 8.99741 0.0624193C9.70527 0.151368 10.3996 0.334798 11.0615 0.608964C12.0321 1.011 12.914 1.60028 13.6569 2.34315C14.3997 3.08602 14.989 3.96793 15.391 4.93853C15.6652 5.60043 15.8486 6.29473 15.9376 7.0026C16.0064 7.55057 15.5523 8 15 8C14.4477 8 14.0085 7.54925 13.9169 7.00462C13.842 6.55939 13.7169 6.12298 13.5433 5.7039C13.2417 4.97595 12.7998 4.31451 12.2426 3.75736C11.6855 3.20021 11.0241 2.75825 10.2961 2.45672C9.87702 2.28313 9.44061 2.15804 8.99538 2.08314C8.45075 1.99152 8 1.55228 8 1Z",className:"light"===e.theme?"fill-white":"fill-primary-base"})]}),Qd=e=>{const[t,r]=ge(!1);return $i("button",{type:"button",className:`inline-flex items-center justify-center px-10 py-2 border border-transparent text-base font-medium rounded-md shadow-sm disabled:text-gray-300 bg-primary-base hover:bg-primary-hover disabled:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-focus w-full md:w-auto ${e.class} `,disabled:e.disabled,onClick:async()=>{if(e.onClickPromise&&!t){r(!0);try{await e.onClickPromise()}catch(n){}r(!1)}},children:[$i("div",{className:"relative "+(t?"invisible":""),children:e.children}),t&&$i("div",{className:"absolute animate-spin",children:$i(Yd,{theme:"light"})})]})},Xd=({className:e,label:t,allowedKeyPattern:r,onChange:n,value:i,iconElement:o,...s})=>{const a=ke((e=>{r.test(e.key)||e.preventDefault()}),[r]);return $i(N,{children:[$i("label",{className:"font-medium text-sm text-gray-900 text-left",children:$i("span",{children:t})}),$i("div",{className:"relative",children:[$i("input",{type:"text",className:`p-2 border-0 ring-2 ring-gray-200 focus:outline-none focus-visible:ring-gray-500 text-base font-medium rounded-md shadow-sm w-full ${e}`,value:i,onKeyPress:a,onChange:e=>n(e.currentTarget.value),...s}),o]})]})},Zd=({className:e,onClick:t,...r})=>{const[n,i]=ge(!1);return $i("button",{className:`inline-flex items-center justify-center px-2 text-primary-base rounded-md bg-transparent hover:bg-sky-50/50 focus:ring-2 focus:ring-primary-focus ${e??""}`,onClick:ke((()=>{if(!n)return i(!0),t().finally((()=>{i(!1)}))}),[n,t]),...r,children:[$i("div",{className:"relative "+(n?"invisible":""),children:r.children}),n&&$i("div",{className:"absolute animate-spin",children:$i(Yd,{theme:"primary"})})]})},eh=({className:e,children:t})=>$i("h1",{className:`text-2xl md:text-3xl font-bold ${e??""}`,children:t}),th=({className:e,children:t})=>$i("h3",{class:`text-base md:text-lg text-gray-600 ${e??""}`,children:t}),rh=e=>{switch(e){case"sign-up-viewed":case"sign-up-completed":case"sign-up-declined":return new Promise((()=>{}))}};var nh=Object.defineProperty,ih=(e,t,r)=>(((e,t,r)=>{t in e?nh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);let oh=new class{constructor(){ih(this,"current",this.detect()),ih(this,"handoffState","pending"),ih(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}},sh=(e,t)=>{oh.isServer?ve(e,t):ye(e,t)};function ah(e){let t=we(e);return sh((()=>{t.current=e}),[e]),t}function ch(){let e=[],t={addEventListener:(e,r,n,i)=>(e.addEventListener(r,n,i),t.add((()=>e.removeEventListener(r,n,i)))),requestAnimationFrame(...e){let r=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(r)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let r=setTimeout(...e);return t.add((()=>clearTimeout(r)))},microTask(...e){let r={current:!0};return function(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}((()=>{r.current&&e[0]()})),t.add((()=>{r.current=!1}))},style(e,t,r){let n=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:r}),this.add((()=>{Object.assign(e.style,{[t]:n})}))},group(e){let t=ch();return e(t),this.add((()=>t.dispose()))},add:t=>(e.push(t),()=>{let r=e.indexOf(t);if(r>=0)for(let t of e.splice(r,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function lh(){let[e]=ge(ch);return ve((()=>()=>e.dispose()),[e]),e}let uh=function(e){let t=ah(e);return ts.useCallback(((...e)=>t.current(...e)),[t])};function dh(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in rs&&rs.useSyncExternalStore((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,r]=ge(oh.isHandoffComplete);return t&&!1===oh.isHandoffComplete&&r(!1),ve((()=>{!0!==t&&r(!0)}),[t]),ve((()=>oh.handoff()),[]),!e&&t}function hh(e,t,...r){if(e in t){let n=t[e];return"function"==typeof n?n(...r):n}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,hh),n}let ph=Symbol();function fh(...e){let t=we(e);ve((()=>{t.current=e}),[e]);let r=uh((e=>{for(let r of t.current)null!=r&&("function"==typeof r?r(e):r.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[ph])))?void 0:r}function mh(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}var gh,_h,vh=((_h=vh||{})[_h.None=0]="None",_h[_h.RenderStrategy=1]="RenderStrategy",_h[_h.Static=2]="Static",_h),yh=((gh=yh||{})[gh.Unmount=0]="Unmount",gh[gh.Hidden=1]="Hidden",gh);function wh({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:i,visible:o=!0,name:s}){let a=Eh(t,e);if(o)return bh(a,r,n,s);let c=null!=i?i:0;if(2&c){let{static:e=!1,...t}=a;if(e)return bh(t,r,n,s)}if(1&c){let{unmount:e=!0,...t}=a;return hh(e?0:1,{0:()=>null,1:()=>bh({...t,hidden:!0,style:{display:"none"}},r,n,s)})}return bh(a,r,n,s)}function bh(e,t={},r,n){let{as:i=r,children:o,refName:s="ref",...a}=Th(e,["unmount","static"]),c=void 0!==e.ref?{[s]:e.ref}:{},l="function"==typeof o?o(t):o;"className"in a&&a.className&&"function"==typeof a.className&&(a.className=a.className(t));let u={};if(t){let e=!1,r=[];for(let[n,i]of Object.entries(t))"boolean"==typeof i&&(e=!0),!0===i&&r.push(n);e&&(u["data-headlessui-state"]=r.join(" "))}if(i===N&&Object.keys(Ih(a)).length>0){if(!zo(l)||Array.isArray(l)&&l.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(a).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"));let e=l.props,t="function"==typeof(null==e?void 0:e.className)?(...t)=>mh(null==e?void 0:e.className(...t),a.className):mh(null==e?void 0:e.className,a.className),r=t?{className:t}:{};return Vo(l,Object.assign({},Eh(l.props,Ih(Th(a,["ref"]))),u,c,function(...e){return{ref:e.every((e=>null==e))?void 0:t=>{for(let r of e)null!=r&&("function"==typeof r?r(t):r.current=t)}}}(l.ref,c.ref),r))}return O(i,Object.assign({},Th(a,["ref"]),i!==N&&c,i!==N&&u),l)}function Eh(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},r={};for(let n of e)for(let e in n)e.startsWith("on")&&"function"==typeof n[e]?(null!=r[e]||(r[e]=[]),r[e].push(n[e])):t[e]=n[e];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(r).map((e=>[e,void 0]))));for(let n in r)Object.assign(t,{[n](e,...t){let i=r[n];for(let r of i){if((e instanceof Event||(null==e?void 0:e.nativeEvent)instanceof Event)&&e.defaultPrevented)return;r(e,...t)}}});return t}function kh(e){var t;return Object.assign(so(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Ih(e){let t=Object.assign({},e);for(let r in t)void 0===t[r]&&delete t[r];return t}function Th(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}let Sh=re(null);Sh.displayName="OpenClosedContext";var Ch=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ch||{});function Rh(){return Ie(Sh)}function Oh({value:e,children:t}){return ts.createElement(Sh.Provider,{value:e},t)}function Ah(){let e=we(!1);return sh((()=>(e.current=!0,()=>{e.current=!1})),[]),e}function Ph(e,...t){e&&t.length>0&&e.classList.add(...t)}function Nh(e,...t){e&&t.length>0&&e.classList.remove(...t)}function xh(e,t,r,n){let i=r?"enter":"leave",o=ch(),s=void 0!==n?function(e){let t={called:!1};return(...r)=>{if(!t.called)return t.called=!0,e(...r)}}(n):()=>{};"enter"===i&&(e.removeAttribute("hidden"),e.style.display="");let a=hh(i,{enter:()=>t.enter,leave:()=>t.leave}),c=hh(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),l=hh(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Nh(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Ph(e,...t.base,...a,...l),o.nextFrame((()=>{Nh(e,...t.base,...a,...l),Ph(e,...t.base,...a,...c),function(e,t){let r=ch();if(!e)return r.dispose;let{transitionDuration:n,transitionDelay:i}=getComputedStyle(e),[o,s]=[n,i].map((e=>{let[t=0]=e.split(",").filter(Boolean).map((e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e))).sort(((e,t)=>t-e));return t})),a=o+s;if(0!==a){r.group((r=>{r.setTimeout((()=>{t(),r.dispose()}),a),r.addEventListener(e,"transitionrun",(e=>{e.target===e.currentTarget&&r.dispose()}))}));let n=r.addEventListener(e,"transitionend",(e=>{e.target===e.currentTarget&&(t(),n())}))}else t();r.add((()=>t())),r.dispose}(e,(()=>(Nh(e,...t.base,...a),Ph(e,...t.base,...t.entered),s())))})),o.dispose}function Lh(e=""){return e.split(" ").filter((e=>e.trim().length>1))}let Dh=re(null);Dh.displayName="TransitionContext";var Mh,Uh=((Mh=Uh||{}).Visible="visible",Mh.Hidden="hidden",Mh);let jh=re(null);function Fh(e){return"children"in e?Fh(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function Bh(e,t){let r=ah(e),n=we([]),i=Ah(),o=lh(),s=uh(((e,t=yh.Hidden)=>{let s=n.current.findIndex((({el:t})=>t===e));-1!==s&&(hh(t,{[yh.Unmount](){n.current.splice(s,1)},[yh.Hidden](){n.current[s].state="hidden"}}),o.microTask((()=>{var e;!Fh(n)&&i.current&&(null==(e=r.current)||e.call(r))})))})),a=uh((e=>{let t=n.current.find((({el:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):n.current.push({el:e,state:"visible"}),()=>s(e,yh.Unmount)})),c=we([]),l=we(Promise.resolve()),u=we({enter:[],leave:[],idle:[]}),d=uh(((e,r,n)=>{c.current.splice(0),t&&(t.chains.current[r]=t.chains.current[r].filter((([t])=>t!==e))),null==t||t.chains.current[r].push([e,new Promise((e=>{c.current.push(e)}))]),null==t||t.chains.current[r].push([e,new Promise((e=>{Promise.all(u.current[r].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===r?l.current=l.current.then((()=>null==t?void 0:t.wait.current)).then((()=>n(r))):n(r)})),h=uh(((e,t,r)=>{Promise.all(u.current[t].splice(0).map((([e,t])=>t))).then((()=>{var e;null==(e=c.current.shift())||e()})).then((()=>r(t)))}));return Ee((()=>({children:n,register:a,unregister:s,onStart:d,onStop:h,wait:l,chains:u})),[a,s,n,d,h,u,l])}function zh(){}jh.displayName="NestingContext";let Hh=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Vh(e){var t;let r={};for(let n of Hh)r[n]=null!=(t=e[n])?t:zh;return r}let $h=vh.RenderStrategy;let qh=kh((function(e,t){let{show:r,appear:n=!1,unmount:i=!0,...o}=e,s=we(null),a=fh(s,t);dh();let c=Rh();if(void 0===r&&null!==c&&(r=(c&Ch.Open)===Ch.Open),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[l,u]=ge(r?"visible":"hidden"),d=Bh((()=>{u("hidden")})),[h,p]=ge(!0),f=we([r]);sh((()=>{!1!==h&&f.current[f.current.length-1]!==r&&(f.current.push(r),p(!1))}),[f,r]);let m=Ee((()=>({show:r,appear:n,initial:h})),[r,n,h]);ve((()=>{if(r)u("visible");else if(Fh(d)){let e=s.current;if(!e)return;let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&u("hidden")}else u("hidden")}),[r,d]);let g={unmount:i},_=uh((()=>{var t;h&&p(!1),null==(t=e.beforeEnter)||t.call(e)})),v=uh((()=>{var t;h&&p(!1),null==(t=e.beforeLeave)||t.call(e)}));return ts.createElement(jh.Provider,{value:d},ts.createElement(Dh.Provider,{value:m},wh({ourProps:{...g,as:N,children:ts.createElement(Wh,{ref:a,...g,...o,beforeEnter:_,beforeLeave:v})},theirProps:{},defaultTag:N,features:$h,visible:"visible"===l,name:"Transition"})))})),Wh=kh((function(e,t){var r,n;let{beforeEnter:i,afterEnter:o,beforeLeave:s,afterLeave:a,enter:c,enterFrom:l,enterTo:u,entered:d,leave:h,leaveFrom:p,leaveTo:f,...m}=e,g=we(null),_=fh(g,t),v=null==(r=m.unmount)||r?yh.Unmount:yh.Hidden,{show:y,appear:w,initial:b}=function(){let e=Ie(Dh);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[E,k]=ge(y?"visible":"hidden"),I=function(){let e=Ie(jh);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:T,unregister:S}=I;ve((()=>T(g)),[T,g]),ve((()=>{if(v===yh.Hidden&&g.current)return y&&"visible"!==E?void k("visible"):hh(E,{hidden:()=>S(g),visible:()=>T(g)})}),[E,g,T,S,y,v]);let C=ah({base:Lh(m.className),enter:Lh(c),enterFrom:Lh(l),enterTo:Lh(u),entered:Lh(d),leave:Lh(h),leaveFrom:Lh(p),leaveTo:Lh(f)}),R=function(e){let t=we(Vh(e));return ve((()=>{t.current=Vh(e)}),[e]),t}({beforeEnter:i,afterEnter:o,beforeLeave:s,afterLeave:a}),O=dh();ve((()=>{if(O&&"visible"===E&&null===g.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[g,E,O]);let A=w&&y&&b,P=!O||b&&!w?"idle":y?"enter":"leave",N=function(e=0){let[t,r]=ge(e),n=Ah(),i=ke((e=>{n.current&&r((t=>t|e))}),[t,n]),o=ke((e=>Boolean(t&e)),[t]),s=ke((e=>{n.current&&r((t=>t&~e))}),[r,n]),a=ke((e=>{n.current&&r((t=>t^e))}),[r]);return{flags:t,addFlag:i,hasFlag:o,removeFlag:s,toggleFlag:a}}(0),x=uh((e=>hh(e,{enter:()=>{N.addFlag(Ch.Opening),R.current.beforeEnter()},leave:()=>{N.addFlag(Ch.Closing),R.current.beforeLeave()},idle:()=>{}}))),L=uh((e=>hh(e,{enter:()=>{N.removeFlag(Ch.Opening),R.current.afterEnter()},leave:()=>{N.removeFlag(Ch.Closing),R.current.afterLeave()},idle:()=>{}}))),D=Bh((()=>{k("hidden"),S(g)}),I);!function({immediate:e,container:t,direction:r,classes:n,onStart:i,onStop:o}){let s=Ah(),a=lh(),c=ah(r);sh((()=>{e&&(c.current="enter")}),[e]),sh((()=>{let e=ch();a.add(e.dispose);let r=t.current;if(r&&"idle"!==c.current&&s.current)return e.dispose(),i.current(c.current),e.add(xh(r,n.current,"enter"===c.current,(()=>{e.dispose(),o.current(c.current)}))),e.dispose}),[r])}({immediate:A,container:g,classes:C,direction:P,onStart:ah((e=>{D.onStart(g,e,x)})),onStop:ah((e=>{D.onStop(g,e,L),"leave"===e&&!Fh(D)&&(k("hidden"),S(g))}))});let M=m,U={ref:_};return A?M={...M,className:mh(m.className,...C.current.enter,...C.current.enterFrom)}:(M.className=mh(m.className,null==(n=g.current)?void 0:n.className),""===M.className&&delete M.className),ts.createElement(jh.Provider,{value:D},ts.createElement(Oh,{value:hh(E,{visible:Ch.Open,hidden:Ch.Closed})|N.flags},wh({ourProps:U,theirProps:M,defaultTag:"div",features:$h,visible:"visible"===E,name:"Transition.Child"})))})),Kh=kh((function(e,t){let r=null!==Ie(Dh),n=null!==Rh();return ts.createElement(ts.Fragment,null,!r&&n?ts.createElement(qh,{ref:t,...e}):ts.createElement(Wh,{ref:t,...e}))})),Jh=Object.assign(qh,{Child:Kh,Root:qh});const Gh=({children:e})=>{const t=ts.Children.toArray(e),r=t.find((e=>e.type===Yh)),n=t.find((e=>e.type===Qh));return $i(Jh,{appear:!0,show:!0,enter:"transition duration-700 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",class:"opacity-0",children:$i("div",{className:"my-20 flex flex-col text-center items-center max-w-[40rem] mx-auto",children:[$i(Jh,{appear:!0,show:!0,enter:"transition duration-700 ease-out md:transition-none",enterFrom:"-translate-y-6",enterTo:"translate-y-0",class:"-translate-y-6",children:r&&$i("div",{className:"flex items-center h-full",children:r})}),$i(Jh,{appear:!0,show:!0,enter:"transition delay-300 duration-[600ms] ease-out",enterFrom:"opacity-0 -translate-y-6",enterTo:"opacity-100 translate-y-0",class:"opacity-0 -translate-y-6",children:n&&$i("div",{className:"flex items-center h-full",children:n})})]})})},Yh=({children:e})=>$i(N,{children:e}),Qh=({children:e})=>$i(N,{children:e});Gh.Top=Yh,Gh.Bottom=Qh;const Xh={verfiedPhoneNumber:void 0},Zh=re(Xh),ep=e=>O("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"green",className:"w-5 h-5",...e},O("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"})),tp=({onSubmit:e,onDecline:t})=>{const{trace:r}={trace:rh},[n,i]=ge(""),{setPhoneNumber:o,phoneNumber:s}=(()=>{const{verfiedPhoneNumber:e}=Ie(Zh),[t,r]=ge(e??""),n=Ee((()=>t.replace(/ /g,"")),[t]),i=Ee((()=>n.startsWith("04")&&10===n.length||n.startsWith("614")&&11===n.length||n.startsWith("+614")&&12===n.length||/^\+642\d{7,9}$/.test(n)),[n]),o=Ee((()=>n.startsWith("04")?`+61${n.replace(/^0+/,"")}`:n.startsWith("614")?`+${n}`:n),[n]),s=Ee((()=>(e=>{let t=0;return"#### ### ### ### ### ### ###".replace(/#/g,(()=>e[t++]??"")).trim()})(n)),[n]),a=Ee((()=>o===e),[o,e]);return{setPhoneNumber:r,phoneNumber:{valid:i,formatted:o,masked:s,isVerified:a}}})(),[a,c]=ge(s.isVerified);ve((()=>{r("sign-up-viewed")}),[r]);const l=ke((()=>{i("")}),[]),u=ke((()=>{const e=s.valid?"":"Please enter a valid Australian mobile number beginning with 04.";i(e),c(s.isVerified)}),[s.isVerified,s.valid]),d=ke((async()=>{s.valid&&await e(s).then((()=>r("sign-up-completed"))).catch(i)}),[s,e,r]);ke((()=>r("sign-up-declined").then(t)),[t,r]);const h=ke((async()=>{c(!1)}),[]),p=a?$i("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3 text-xs text-green-700 font-bold",children:["Verified"," ",$i("span",{className:"ml-1",children:$i(ep,{})})]}):void 0;return $i(Gh,{children:[$i(Gh.Top,{children:$i("div",{className:"flex flex-col gap-5",children:[$i(eh,{children:"Join your workplace benefits program"}),$i(th,{children:[a?"Confirm ":"Enter "," your ",$i("b",{children:"personal"})," mobile number to finish setting up your Flare Benefits account linked to your workplace"]})]})}),$i(Gh.Bottom,{children:$i("div",{className:"mt-5 md:w-[300px] text-left",children:[$i(Xd,{allowedKeyPattern:/[+0-9]/,inputMode:"numeric",className:"mt-1 mb-1 w-full",label:"Australian Mobile Number",value:s.formatted,onChange:o,onfocusin:l,onfocusout:u,iconElement:p,disabled:a}),0!==n.length&&$i("div",{className:"h-8 leading-none",children:$i("span",{className:"text-xs text-rose-500",children:n})}),a&&$i("div",{className:"mt-2 ml-2 mb-2 leading-none",children:$i("span",{className:"text-xs",children:["Not your personal number?",$i(Zd,{class:"text-blue-500",onClick:h,children:"Change number"})]})}),$i("div",{className:"font-medium text-sm text-gray-900 mt-2",children:["By creating your account you confirm you have read and agree to Flare Benefits"," ",$i("a",{className:"text-primary-base",href:"https://www.flarehr.com/flare-app-terms-and-conditions/",target:"_blank",rel:"noreferrer",children:" Terms of Use "}),"and",$i("a",{className:"text-primary-base",href:"https://www.flarehr.com/privacy-policy/",target:"_blank",rel:"noreferrer",children:" Privacy Policy"}),"."," "]}),$i(Qd,{class:"mt-5 md:w-full text-white",onClickPromise:d,children:"Join your workplace"}),!1]})})]})},rp=e=>O("svg",{xmlns:"http://www.w3.org/2000/svg",height:24,viewBox:"0 -960 960 960",width:24,fill:"currentColor",...e},O("path",{d:"m313-440 224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z"})),np=({children:e,...t})=>$i("dialog",{className:"z-50 w-full h-full absolute top-0 left-0 bottom-0 right-0",...t,children:e}),ip=({open:e})=>$i(np,{open:e,children:$i("div",{className:"flex flex-col gap-5 items-center justify-center text-center mt-20",children:[$i("span",{className:"animate-spin",children:$i(Yd,{size:"lg"})}),$i(eh,{children:"Creating your account"}),$i("div",{children:[$i(th,{children:"This can take up to 30 seconds."}),$i(th,{children:"Please don't navigate away or refresh your browser."})]})]})}),op=({phoneNumber:e,onVerify:t,onResendOtp:r,onGoBack:n})=>{const{otp:i,setOtp:o}=(()=>{const[e,t]=ge("");return{otp:{valid:Ee((()=>6===e.length),[e.length]),code:e},setOtp:t}})(),[s,a]=ge(!1),[c,l]=ge(""),{countdown:u,restart:d}=(e=>{const[t,r]=ge(e),n=we(),i=ke((()=>{clearInterval(n.current)}),[]);return ve((()=>i),[i]),{countdown:t,restart:ke((()=>{let t=e;clearInterval(n.current),n.current=setInterval((()=>{t<0?clearInterval(n.current):r(t--)}),1e3)}),[e])}})(60);ve(d,[d]);const h=ke((()=>(a(!0),l(""),t(i.code).catch(l).finally((()=>{a(!1)})))),[t,i.code]),p=ke((()=>(l(""),r().then(d).catch(l))),[r,d]);return $i(N,{children:[$i(ip,{open:s}),$i(Gh,{children:[$i(Gh.Top,{children:$i("div",{className:"flex flex-col gap-5",children:[$i(eh,{children:"Verify your mobile number"}),$i(th,{children:["An SMS verification code has been sent to the number"," ",$i("span",{className:"dd-privacy-mask",children:e}),"."]})]})}),$i(Gh.Bottom,{children:$i("div",{className:"mt-5 md:w-[300px] text-left",children:[$i(Xd,{allowedKeyPattern:/[0-9]/,inputMode:"numeric",minLength:6,maxLength:6,className:"mt-1 mb-1 w-full",label:"Enter your verification code",onChange:o}),c&&$i("span",{className:"text-xs text-rose-500",children:c}),$i("p",{className:"mt-2 text-center text-xs text-gray-600 disabled:opacity-75 ",children:["Didn't get the code?",$i(Zd,{disabled:0!==u,className:"underline mx-2 disabled:text-gray-600 disabled:hover:bg-transparent disabled:cursor-text disabled:px-0",onClick:p,children:"Resend SMS"}),0!==u&&$i(N,{children:["in ",u," secs"]})]}),$i(Qd,{class:"mt-5 md:w-full text-white",disabled:!i.valid,onClickPromise:h,children:"Continue"}),$i(Qd,{class:"mt-5 md:w-full bg-white hover:bg-gray-100 focus:ring-gray-200 border-0 shadow-none text-gray-700 border-gray-300",onClickPromise:async()=>{n()},children:$i("span",{className:"flex gap-3",children:[$i(rp,{}),"Back"]})})]})})]})]})},sp=({onSignUp:e,onVerify:t,onResendOtp:r,onSuccess:n,onDecline:i})=>{const[o,s]=ge(""),{step:a,goBack:c,goToStep:l}=(()=>{const[e,t]=ge(0),r=ke((()=>{const r=e-1;r>=0&&t(r)}),[e]),n=ke((e=>{e<=2&&t(e)}),[]);return{step:e,goBack:r,goToStep:n}})(),u=ke((t=>e(t.formatted).then((e=>{s(t.masked),e.isVerificationRequired?l(Gd.OTP):n()}))),[l,e,n]),d=ke((e=>t(e).then((()=>{n()}))),[t,n]);return $i(N,{children:[a===Gd.PHONE_NUMBER&&$i(tp,{onSubmit:u,onDecline:i}),a===Gd.OTP&&$i(op,{phoneNumber:o,onVerify:d,onResendOtp:r,onGoBack:c})]})},ap=e=>{var t,r;throw"Auth_SessionExpired"===(null==(r=null==(t=e.response)?void 0:t.data)?void 0:r.code)&&window.location.reload(),e};let cp;const lp=()=>cp;var up=(e=>(e.Auth_AccountDisabled="Sorry, your account has been deactivated. Please contact Flare if there are any issues.",e.Auth_AccountLocked="Sorry, your account is currently locked due to too many attempts. Please try again later.",e.Auth_Unregistered="Sorry, we are currently experiencing some issues. Please try again later.",e.Auth_InvalidVerificationCode="Your one time passcode doesn't look right. Please try again with a new one time passcode.",e.Auth_SessionExpired="Sorry, looks like your session has expired. Please try again.",e.Validation_InvalidPhoneNumber="Please enter a valid Australian mobile number beginning with 04.",e))(up||{});const dp=e=>{var t;const r=null==(t=null==e?void 0:e.response)?void 0:t.data;throw up[null==r?void 0:r.code]??"Sorry, we are currently experiencing some issues. Please try again later."},hp=e=>{const[t,r]=ge(!1),{signUp:n,verifyOtp:i,resendOtp:o}={signUp:async(e,t="Invite",r="invite")=>lp().post("v2.0/auth/signUp",{mobileNumber:e,source:t,channel:r}).catch((e=>(dp(e),Promise.reject()))).then((e=>({isVerificationRequired:e.data.isVerificationRequired??!0}))),verifyOtp:async(e,t="Invite",r="invite")=>{await lp().post("auth/verify",{otp:e,source:t,channel:r}).catch(dp)},resendOtp:async()=>{await lp().post("auth/resend").catch(dp)}},s=()=>{r(!0),Ms()};return t?$i(Ps,{}):$i(N,{children:$i("div",{className:"font-inter",children:[$i("style",{children:".pointer-events-none{pointer-events:none!important}.invisible{visibility:hidden!important}.absolute{position:absolute!important}.relative{position:relative!important}.inset-y-0{top:0!important;bottom:0!important}.bottom-0{bottom:0!important}.left-0{left:0!important}.right-0{right:0!important}.top-0{top:0!important}.z-50{z-index:50!important}.mx-2{margin-left:.5rem!important;margin-right:.5rem!important}.mx-auto{margin-left:auto!important;margin-right:auto!important}.my-20{margin-top:5rem!important;margin-bottom:5rem!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}.ml-1{margin-left:.25rem!important}.ml-2{margin-left:.5rem!important}.ml-3{margin-left:.75rem!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-20{margin-top:5rem!important}.mt-5{margin-top:1.25rem!important}.inline-block{display:inline-block!important}.inline{display:inline!important}.flex{display:flex!important}.inline-flex{display:inline-flex!important}.h-10{height:2.5rem!important}.h-16{height:4rem!important}.h-4{height:1rem!important}.h-5{height:1.25rem!important}.h-7{height:1.75rem!important}.h-8{height:2rem!important}.h-\\[1\\.25rem\\]{height:1.25rem!important}.h-\\[1\\.5rem\\]{height:1.5rem!important}.h-full{height:100%!important}.w-10{width:2.5rem!important}.w-16{width:4rem!important}.w-4{width:1rem!important}.w-5{width:1.25rem!important}.w-7{width:1.75rem!important}.w-\\[1\\.25rem\\]{width:1.25rem!important}.w-\\[2\\.75rem\\]{width:2.75rem!important}.w-full{width:100%!important}.max-w-\\[40rem\\]{max-width:40rem!important}.max-w-\\[59\\.5rem\\]{max-width:59.5rem!important}.shrink-0{flex-shrink:0!important}.-translate-y-6{--tw-translate-y: -1.5rem !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.translate-x-0{--tw-translate-x: 0px !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.translate-x-\\[1\\.25rem\\]{--tw-translate-x: 1.25rem !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.translate-y-0{--tw-translate-y: 0px !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite!important}.cursor-pointer{cursor:pointer!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.gap-3{gap:.75rem!important}.gap-5{gap:1.25rem!important}.rounded-full{border-radius:9999px!important}.rounded-md{border-radius:.375rem!important}.border{border-width:1px!important}.border-0{border-width:0px!important}.border-2{border-width:2px!important}.border-gray-300{--tw-border-opacity: 1 !important;border-color:rgb(209 213 219 / var(--tw-border-opacity))!important}.border-transparent{border-color:transparent!important}.bg-blue-50{--tw-bg-opacity: 1 !important;background-color:rgb(239 246 255 / var(--tw-bg-opacity))!important}.bg-gray-200{--tw-bg-opacity: 1 !important;background-color:rgb(229 231 235 / var(--tw-bg-opacity))!important}.bg-primary-base{background-color:var(--fl-color-primary)!important}.bg-transparent{background-color:transparent!important}.bg-white{--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important}.fill-gray-200{fill:#e5e7eb!important}.fill-primary-base{fill:var(--fl-color-primary)!important}.fill-white{fill:#fff!important}.p-2{padding:.5rem!important}.px-10{padding-left:2.5rem!important;padding-right:2.5rem!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.pr-3{padding-right:.75rem!important}.text-left{text-align:left!important}.text-center{text-align:center!important}.text-2xl{font-size:1.5rem!important;line-height:2rem!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.font-bold{font-weight:700!important}.font-medium{font-weight:500!important}.leading-5{line-height:1.25rem!important}.leading-none{line-height:1!important}.text-blue-500{--tw-text-opacity: 1 !important;color:rgb(59 130 246 / var(--tw-text-opacity))!important}.text-gray-600{--tw-text-opacity: 1 !important;color:rgb(75 85 99 / var(--tw-text-opacity))!important}.text-gray-700{--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity))!important}.text-gray-900{--tw-text-opacity: 1 !important;color:rgb(17 24 39 / var(--tw-text-opacity))!important}.text-green-700{--tw-text-opacity: 1 !important;color:rgb(21 128 61 / var(--tw-text-opacity))!important}.text-primary-base{color:var(--fl-color-primary)!important}.text-rose-500{--tw-text-opacity: 1 !important;color:rgb(244 63 94 / var(--tw-text-opacity))!important}.text-white{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity))!important}.underline{text-decoration-line:underline!important}.accent-primary-base{accent-color:var(--fl-color-primary)!important}.opacity-0{opacity:0!important}.opacity-100{opacity:1!important}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow-none{--tw-shadow: 0 0 #0000 !important;--tw-shadow-colored: 0 0 #0000 !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05) !important;--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.ring-gray-200{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity)) !important}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.delay-300{transition-delay:.3s!important}.duration-200{transition-duration:.2s!important}.duration-700{transition-duration:.7s!important}.duration-\\[600ms\\]{transition-duration:.6s!important}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)!important}:root{--fl-color-primary_from_host: var(--fl-color-primary);--fl-color-primary-light_from_host: var(--fl-color-primary-light);--fl-color-primary-dark_from_host: var(--fl-color-primary-dark);--fl-color-primary-disabled_from_host: var(--fl-color-primary-disabled);--fl-color-primary-hover_from_host: var(--fl-color-primary-hover);--fl-color-primary-focus_from_host: var(--fl-color-primary-focus);--fl-color-primary-text_from_host: var(--fl-color-primary-text);--fl-color-secondary_from_host: var(--fl-color-secondary);--fl-color-secondary-light_from_host: var(--fl-color-secondary-light);--fl-color-secondary-dark_from_host: var(--fl-color-secondary-dark);--fl-color-secondary-disabled_from_host: var(--fl-color-secondary-disabled);--fl-color-secondary-hover_from_host: var(--fl-color-secondary-hover);--fl-color-secondary-focus_from_host: var(--fl-color-secondary-focus);--fl-color-secondary-text_from_host: var(--fl-color-secondary-text)}*{--fl-color-primary: var(--fl-color-primary_from_host, #1890ff);--fl-color-primary-light: var(--fl-color-primary-light_from_host, #74c0ff);--fl-color-primary-dark: var(--fl-color-primary-dark_from_host, #006bce);--fl-color-primary-disabled: var(--fl-color-primary-disabled_from_host, #f5f5f5);--fl-color-primary-hover: var(--fl-color-primary-hover_from_host, #40a9ff);--fl-color-primary-focus: var(--fl-color-primary-focus_from_host, #40a9ff);--fl-color-primary-text: var(--fl-color-primary-text_from_host, white);--fl-color-secondary: var(--fl-color-secondary_from_host, #d3d3d3);--fl-color-secondary-light: var(--fl-color-secondary-light_from_host, #e1e1e1);--fl-color-secondary-dark: var(--fl-color-secondary-dark_from_host, #cecece);--fl-color-secondary-disabled: var(--fl-color-secondary-disabled_from_host, #f5f5f5);--fl-color-secondary-hover: var(--fl-color-secondary-hover_from_host, #ebebeb);--fl-color-secondary-focus: var(--fl-color-secondary-focus_from_host, #ebebeb);--fl-color-secondary-text: var(--fl-color-secondary-text_from_host, #262626)}.hover\\:bg-gray-100:hover{--tw-bg-opacity: 1 !important;background-color:rgb(243 244 246 / var(--tw-bg-opacity))!important}.hover\\:bg-primary-hover:hover{background-color:var(--fl-color-primary-hover)!important}.hover\\:bg-sky-50\\/50:hover{background-color:#f0f9ff80!important}.focus\\:outline-none:focus{outline:2px solid transparent!important;outline-offset:2px!important}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.focus\\:ring-gray-200:focus{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity)) !important}.focus\\:ring-primary-focus:focus{--tw-ring-color: var(--fl-color-primary-focus) !important}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px !important}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)!important}.focus-visible\\:ring-gray-500:focus-visible{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity)) !important}.focus-visible\\:ring-white:focus-visible{--tw-ring-opacity: 1 !important;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity)) !important}.focus-visible\\:ring-opacity-75:focus-visible{--tw-ring-opacity: .75 !important}.disabled\\:cursor-text:disabled{cursor:text!important}.disabled\\:bg-gray-100:disabled{--tw-bg-opacity: 1 !important;background-color:rgb(243 244 246 / var(--tw-bg-opacity))!important}.disabled\\:px-0:disabled{padding-left:0!important;padding-right:0!important}.disabled\\:text-gray-300:disabled{--tw-text-opacity: 1 !important;color:rgb(209 213 219 / var(--tw-text-opacity))!important}.disabled\\:text-gray-600:disabled{--tw-text-opacity: 1 !important;color:rgb(75 85 99 / var(--tw-text-opacity))!important}.disabled\\:opacity-75:disabled{opacity:.75!important}.disabled\\:hover\\:bg-transparent:hover:disabled{background-color:transparent!important}@media (min-width: 768px){.md\\:grid{display:grid!important}.md\\:w-\\[240px\\]{width:240px!important}.md\\:w-\\[300px\\]{width:300px!important}.md\\:w-auto{width:auto!important}.md\\:w-full{width:100%!important}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.md\\:text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.md\\:text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.md\\:transition-none{transition-property:none!important}}\n".toString()}),$i(sp,{onSignUp:t=>n(t,e.source,e.channel),onVerify:t=>i(t,e.source,e.channel),onResendOtp:o,onSuccess:s,onDecline:s})]})})},pp=f("div")([{display:"flex",alignItems:"center",justifyContent:"center"}]),fp=async(e,t)=>{await(async e=>{if(tn)return tn;const t=e.replace(/\/?$/,"");return tn=Qr.create({baseURL:`${t}`}),((e,{onRequest:t,onRequestError:r,onResponse:n,onResponseError:i})=>{e.interceptors.request.use((async e=>(t&&await t(e),e)),(async e=>{throw r&&await r(e),e})),e.interceptors.response.use((async e=>(n&&await n(e),e)),(async e=>{throw i&&await i(e),e}))})(tn,{onRequestError:Zr,onResponseError:en}),tn})(e.backendUrl);const{googleCloud:r,identityProvider:n,isEstablished:i,verifiedPhoneNumber:o}=await(async(e,t)=>{if(!tn)throw new Error("Api has not been initialized");return tn.get("customer-profile/backend/v1.0/workplace-link/config",rn(e,t)).then((e=>e.data))})(e.apolloAccessToken,t);fd=r;const s=e.backendUrl;var a,c;return a=s,c=e.apolloAccessToken,a=a.replace(/\/?$/,""),cp=Qr.create({baseURL:`${a}/benefits-onboarding/backend`,headers:{Authorization:`Bearer ${c}`}}),cp.interceptors.response.use((e=>e),ap),{identityProvider:n,isEstablished:i,verifiedPhoneNumber:o}};!function(n,i,o,s){c.p=i,e=n,t=o,r=s}(O);function mp(){return(mp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var gp=["context","children"];function _p(e){this.getChildContext=function(){return e.context};var t=e.children,r=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)t.indexOf(r=o[n])>=0||(i[r]=e[r]);return i}(e,gp);return te(t,r)}function vp(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=O(_p,mp({},this._props,{context:e.detail.context}),function e(t,r){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var n=[],i={},o=0,s=t.attributes,a=t.childNodes;for(o=s.length;o--;)"slot"!==s[o].name&&(i[s[o].name]=s[o].value,i[yp(s[o].name)]=s[o].value);for(o=a.length;o--;){var c=e(a[o],null),l=a[o].slot;l?i[l]=O(Ep,{name:l},c):n[o]=c}var u=r?O(Ep,null,n):n;return O(r||t.nodeName.toLowerCase(),i,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?ee:Z)(this._vdom,this._root)}function yp(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function wp(e,t,r){if(this._vdom){var n={};n[e]=r=null==r?void 0:r,n[yp(e)]=r,this._vdom=te(this._vdom,n),Z(this._vdom,this._root)}}function bp(){Z(this._vdom=null,this._root)}function Ep(e,t){var r=this;return O("slot",mp({},e,{ref:function(e){e?(r.ref=e,r._listener||(r._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",r._listener))):r.ref.removeEventListener("_preact",r._listener)}}))}!function(e,t,r,n){function i(){var t=Reflect.construct(HTMLElement,[],i);return t._vdomComponent=e,t._root=n&&n.shadow?t.attachShadow({mode:n.mode||"open"}):t,t}(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=vp,i.prototype.attributeChangedCallback=wp,i.prototype.disconnectedCallback=bp,r=r||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=r,r.forEach((function(e){Object.defineProperty(i.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var r=typeof t;null!=t&&"string"!==r&&"boolean"!==r&&"number"!==r||this.setAttribute(e,t)}})})),customElements.define(t||e.tagName||e.displayName||e.name,i)}((e=>{const t={backendUrl:e["backend-url"],apolloAccessToken:e["access-token"],source:e.source,channel:e.channel},[r,n]=ge(!1),i=we(""),[o,s]=ge("Initializing"),[a,c]=ge(Xh);return Xr((async e=>{if(t.backendUrl)try{const r=await fp(t,e);i.current=r.identityProvider,n(r.isEstablished),s("Initialized"),c({verfiedPhoneNumber:r.verifiedPhoneNumber})}catch{s("Error")}}),[t.backendUrl]),r?$i(Ps,{}):$i(N,{children:["Initializing"===o&&$i(qi,{isActive:!0}),"Error"===o&&$i(Ds,{}),"Initialized"===o&&$i("div",{id:"preact_root",children:[$i(Fi,{}),$i(pp,{children:["google"===i.current&&$i(Jd,{...t}),"adb2c"===i.current&&$i(Us,{...t}),$i(Zh.Provider,{value:a,children:"flare-app-identity"===i.current&&$i(hp,{...t})})]})]})]})}),"workplace-link",["backend-url","access-token","source","channel"],{shadow:!1});